hexsha
stringlengths
40
40
size
int64
8
1.04M
content
stringlengths
8
1.04M
avg_line_length
float64
2.24
100
max_line_length
int64
4
1k
alphanum_fraction
float64
0.25
0.97
e15b6b4eb1cc8d7abd8c0ac406d617958bd3ea5d
313
package lejos.internal.charset; public class Latin1Decoder implements CharsetDecoder { public int decode(byte[] buf, int offset, int limit) { return buf[offset] & 0xFF; } public int estimateByteCount(byte[] buf, int offset, int limit) { return 1; } public int getMaxCharLength() { return 1; } }
15.65
64
0.709265
9e2ac3ef564e0a99d68cb6f2fbae811b71e34e96
147
package com.spread.contouring; /** * @author Marc Suchard */ public interface ContourMaker { ContourPath[] getContourPaths(double level); }
12.25
45
0.727891
0e96b0c73a73a091e9cf70a208075a40a0ebf73e
6,032
package ru.job4j.tracker; import org.junit.Test; import ru.job4j.tracker.inputs.Input; import ru.job4j.tracker.inputs.StubInput; import ru.job4j.tracker.inputs.ValidateInput; import java.io.ByteArrayOutputStream; import java.io.PrintStream; import java.util.ArrayList; import java.util.Arrays; import java.util.StringJoiner; import java.util.function.Consumer; import static org.hamcrest.core.Is.is; import static org.junit.Assert.assertThat; public class StartUITest { private final ByteArrayOutputStream out = new ByteArrayOutputStream(); private final Consumer<String> output = new Consumer<>() { private final PrintStream stdout = new PrintStream(out); @Override public void accept(String s) { stdout.println(s); } }; @Test public void whenUserAddItemThenTrackerHasNewItemWithSameName() { Tracker tracker = new Tracker(); Input input = new StubInput(new String[]{"0", "test name", "desc", "6"}); new StartUI(input, tracker, output).init(); assertThat(tracker.findAll().get(0).getName(), is("test name")); } @Test public void whenUpdateThenTrackerHasUpdatedValue() { Tracker tracker = new Tracker(); Item item = new Item("test name", "desc"); tracker.add(item); Input input = new StubInput(new String[]{"2", "test replace", "заменили заявку", item.getId(), "6"}); new StartUI(input, tracker, output).init(); assertThat(tracker.findAll().get(0).getName(), is("test replace")); } @Test public void whenDeleteItemThenTrackerUpdateValue() { Tracker tracker = new Tracker(); Item firstItem = tracker.add(new Item("name1", "desc1")); Item secondItem = tracker.add(new Item("name2", "desc2")); Item threeItem = tracker.add(new Item("name3", "desc3")); Input input = new StubInput(new String[]{"3", secondItem.getId(), "6"}); new StartUI(input, tracker, output).init(); assertThat(tracker.findAll(), is(new ArrayList<>(Arrays.asList(firstItem, threeItem)))); } @Test public void whenShowAllItemThenSeeAllItem() { Tracker tracker = new Tracker(); Item firstItem = tracker.add(new Item("name1", "desc1")); Item secondItem = tracker.add(new Item("name2", "desc2")); Item threeItem = tracker.add(new Item("name3", "desc3")); Input input = new StubInput(new String[]{"1", "6"}); StringJoiner expect = new StringJoiner(System.lineSeparator()) .add("0. Add items") .add("1. Show All items") .add("2. Edit item") .add("3. Delete item") .add("4. Find item by Id") .add("5. Find Items By Name") .add("6. Exit Program") .add("-------------- Список заявок---------------") .add("Наменование заявки: name1 ID заявки: " + firstItem.getId()) .add("Наменование заявки: name2 ID заявки: " + secondItem.getId()) .add("Наменование заявки: name3 ID заявки: " + threeItem.getId()) .add("0. Add items") .add("1. Show All items") .add("2. Edit item") .add("3. Delete item") .add("4. Find item by Id") .add("5. Find Items By Name") .add("6. Exit Program") .add("Завершение работы"); new StartUI(input, tracker, output).init(); assertThat(out.toString(), is(expect.toString() + System.lineSeparator())); } @Test public void whenFindItemByIdThenShowThisItem() { Tracker tracker = new Tracker(); Item firstItem = tracker.add(new Item("name1", "desc1")); Item secondItem = tracker.add(new Item("name2", "desc2")); Item threeItem = tracker.add(new Item("name3", "desc3")); Input input = new StubInput(new String[]{"4", secondItem.getId(), "6"}); StringJoiner expect = new StringJoiner(System.lineSeparator()) .add("0. Add items") .add("1. Show All items") .add("2. Edit item") .add("3. Delete item") .add("4. Find item by Id") .add("5. Find Items By Name") .add("6. Exit Program") .add("------------ Поиск заявки по ID --------------") .add("Имя заявки: " + secondItem.getName() + " Описание заявки: " + secondItem.getDesc() + "") .add("0. Add items") .add("1. Show All items") .add("2. Edit item") .add("3. Delete item") .add("4. Find item by Id") .add("5. Find Items By Name") .add("6. Exit Program") .add("Завершение работы"); new StartUI(input, tracker, output).init(); assertThat(out.toString(), is(expect.toString() + System.lineSeparator())); } @Test public void whenInvalidInput() { ValidateInput input = new ValidateInput( new StubInput(new String[] {"invalid", "1"}), output); input.ask("Enter", new int[] {1}); assertThat( this.out.toString(), is( String.format("Необходимо ввести корректное значение%n") ) ); } }
45.014925
118
0.500166
a7f36a8271fe36b86535b185456921fa89fa7784
3,650
package petClinic.entities; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; import static petClinic.utilities.Constants.EXCEPTION_MESSAGE; import static petClinic.utilities.Constants.NAME_VALIDATOR; public class Clinic implements Iterable<Room>{ private String name; private int roomsNumber; private List<Room> rooms; private Iterator<Room> accommodationIterator; public Clinic(String name, int roomsNumber) { this.setName(name); this.setRoomsNumber(roomsNumber); this.rooms = new ArrayList<>(); this.setRooms(); this.accommodationIterator = new AccommodationIterator(); } @Override public Iterator<Room> iterator() { return new ClinicIterator(); } private final class ClinicIterator implements Iterator<Room>{ private int index; private boolean reachTheLastRoom; private boolean reachTheFinalRoom; private ClinicIterator() { this.index = roomsNumber/2; this.reachTheLastRoom = false; this.reachTheFinalRoom = this.index == roomsNumber/2; } @Override public boolean hasNext() { boolean hasNext = this.index<roomsNumber; if(!hasNext){ if(roomsNumber==1){ return false; } this.reachTheLastRoom = true; this.index = 0; } if(this.reachTheFinalRoom && this.reachTheLastRoom){ return false; } return true; } @Override public Room next() { return rooms.get(this.index++); } } private final class AccommodationIterator implements Iterator<Room>{ private int cursor; private int cursorMover; private AccommodationIterator() { this.cursor = rooms.size()/2; this.cursorMover = 0; } @Override public boolean hasNext() { return this.cursorMover<rooms.size(); } @Override public Room next() { Room toReturn = null; if(this.cursorMover % 2 == 0){ toReturn = rooms.get(this.cursor); this.cursor -= ++this.cursorMover; }else{ toReturn = rooms.get(this.cursor); this.cursor += ++this.cursorMover; } return toReturn; } } public String getName() { return this.name; } private void setName(String name) { if(!name.matches(NAME_VALIDATOR)){ throw new IllegalArgumentException(EXCEPTION_MESSAGE); } this.name = name; } public int getRoomsNumber() { return this.roomsNumber; } public void setRoomsNumber(int roomsNumber) { if(roomsNumber<1 || roomsNumber>101 || roomsNumber%2==0){ throw new IllegalArgumentException(EXCEPTION_MESSAGE); } this.roomsNumber = roomsNumber; } public List<Room> getRooms() { return Collections.unmodifiableList(this.rooms); } private void setRooms(){ for (int i = 1; i <= this.getRoomsNumber(); i++) { rooms.add(new Room(i)); } } public boolean addPet(Pet pet){ while(this.accommodationIterator.hasNext()){ Room roomToAdd = this.accommodationIterator.next(); if(roomToAdd.isEmpty()){ roomToAdd.enterPet(pet); return true; } } return false; } }
26.838235
72
0.571781
1d04b524db4d906a1f75e319a3d77bcd2efedfc5
869
/** *Simple data structure that holds two values *Author: James Koppel *School: Lindbergh High School *Date: 3/19/09 *Computer used: Sandro *IDE: JCreator LE v4.0 */ package mao.util; import java.io.Serializable; //Mastery aspects: //HL: Encapsulation //SL: 2,3,8,9,10 public class Pair<U,V> implements Serializable { private U first; //The first value private V second; //The second value //Initializes this Pair public Pair(U u, V v) { first = u; second = v; } //Returns first value public U getFirst() { return first; } //Sets first value public void setFirsT(U u) { first = u; } //Returns second value public V getSecond() { return second; } //Sets second value public void setSecond(V v) { second = v; } }
15.8
48
0.58458
d0ac4dda6cd8ed73140f79387fd6f5a7416c2f41
3,017
package us.nineworlds.serenity.core.imageloader; import android.content.SharedPreferences; import android.graphics.Bitmap; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.graphics.drawable.TransitionDrawable; import android.preference.PreferenceManager; import android.view.View; /** * A runnable that transitions between a drawable and a bitmap. * <p> * It supports not doing transitions when the bitmaps are the same. * <p> * It currently depends on setting transitions at all if there is a fade in * transition preference enabled in the app. Remove that section of code if you * don't need this support. * <p> * If transition support isn't enabled then it doesn't do transitions and just * sets the bitmap as the background to the view passed in the constructor. * <p> * Code licensed under an MIT license so do what you want just give attribution * where it was obtained. * * @author davidcarver */ public class BackgroundBitmapDisplayer implements Runnable { protected Bitmap bitmap; protected int defaultImageId; protected View backgroundView; public BackgroundBitmapDisplayer(Bitmap bitmap, int defaultImage, View view) { this.bitmap = bitmap; this.defaultImageId = defaultImage; this.backgroundView = view; } @Override public void run() { if (bitmap == null) { backgroundView.setBackgroundResource(defaultImageId); return; } SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(backgroundView.getContext()); boolean shouldFadeIn = preferences.getBoolean("animation_background_fadein", false); BitmapDrawable bitmapdrawable = new BitmapDrawable(backgroundView.getContext().getResources(), bitmap); if (!shouldFadeIn) { backgroundView.setBackgroundDrawable(bitmapdrawable); return; } crossfadeImages(bitmapdrawable); } private void crossfadeImages(BitmapDrawable newBitmapDrawable) { Drawable currentDrawable = backgroundView.getBackground(); if (currentDrawable instanceof TransitionDrawable) { currentDrawable = ((TransitionDrawable) currentDrawable).getDrawable(1); } if (currentDrawable == null) { currentDrawable = backgroundView.getContext().getResources().getDrawable(defaultImageId); } Drawable[] drawables = { currentDrawable, newBitmapDrawable }; TransitionDrawable transitionDrawable = new TransitionDrawable(drawables); backgroundView.setBackgroundDrawable(transitionDrawable); transitionDrawable.setCrossFadeEnabled(true); int crossfadeduration = 200; if (currentDrawable instanceof BitmapDrawable) { BitmapDrawable currentBitmapDrawable = (BitmapDrawable) currentDrawable; if (currentBitmapDrawable.getBitmap().sameAs(newBitmapDrawable.getBitmap())) { transitionDrawable.setCrossFadeEnabled(false); crossfadeduration = 0; } } transitionDrawable.startTransition(crossfadeduration); } }
35.081395
95
0.757043
2c898dab8289202a2ee92860e8e67f65efb59215
1,490
/* * Copyright (c) 2008-2021, Hazelcast, Inc. All Rights Reserved. * * 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 com.hazelcast.test; import javax.annotation.Nullable; import com.hazelcast.logging.Logger; import net.spy.memcached.MemcachedClient; public final class MemcacheTestUtil { private MemcacheTestUtil() { } /** * Shutdowns {@link MemcachedClient} ignoring exceptions. Problems are just logged on FINE level. Workaround a * {@link java.util.ConcurrentModificationException} issue in Selector.shutdown() on IBM JDK. * * @param client a {@link MemcachedClient} to be shut down */ public static void shutdownQuietly(@Nullable MemcachedClient client) { if (client == null) { return; } try { client.shutdown(); } catch (Exception e) { Logger.getLogger(MemcacheTestUtil.class).fine("MemcachedClient.shutdown() failed. Ignoring.", e); } } }
31.702128
114
0.691946
1632c221476dea19e543054943de5864c252e6de
2,132
package cn.ffcs.wisdom.city.modular.query.entity; import java.util.List; /** * <p>Title: 查询类控件配置信息</p> * <p>Description: </p> * <p>@author: caijj </p> * <p>Copyright: Copyright (c) 2012 </p> * <p>Company: FFCS Co., Ltd. </p> * <p>Create Time: 2012-10-19 </p> * <p>Update Time: </p> * <p>Updater: </p> * <p>Update Comments: </p> */ public class ViewConfig { private String queryPlaceholder; // 默认提示文本 private String queryInputTitle; // 输入字段的标题 private String inputType; // 输入类型 private String queryDefault; // 输入的默认值 private String fieldName; // 字段名 private boolean isMustInput; // 是否为必填 private String inputId; // 输入标识 private List<DataArray> queryInputDataInfo; public List<DataArray> getQueryInputDataInfo() { return queryInputDataInfo; } public void setQueryInputDataInfo(List<DataArray> queryInputDataInfo) { this.queryInputDataInfo = queryInputDataInfo; } public void setMustInput(boolean isMustInput) { this.isMustInput = isMustInput; } public String getQueryPlaceholder() { return queryPlaceholder; } public void setQueryPlaceholder(String queryPlaceholder) { this.queryPlaceholder = queryPlaceholder; } public String getQueryInputTitle() { return queryInputTitle; } public void setQueryInputTitle(String queryInputTitle) { this.queryInputTitle = queryInputTitle; } public String getInputType() { return inputType; } public void setInputType(String inputType) { this.inputType = inputType; } public String getQueryDefault() { return queryDefault; } public void setQueryDefault(String queryDefault) { this.queryDefault = queryDefault; } public String getFieldName() { return fieldName; } public void setFieldName(String fieldName) { this.fieldName = fieldName; } public boolean getIsMustInput() { return isMustInput; } public void setIsMustInput(boolean isMustInput) { this.isMustInput = isMustInput; } public String getInputId() { return inputId; } public void setInputId(String inputId) { this.inputId = inputId; } }
22.208333
72
0.695122
49c6999b5ffbc4adc8bc4e89ce8d46ace1bff5f1
264
package org.opensrp.repository; import java.util.List; import org.opensrp.domain.Multimedia; public interface MultimediaRepository extends BaseRepository<Multimedia> { Multimedia findByCaseId(String entityId); List<Multimedia> all(String providerId); }
18.857143
74
0.80303
530cc251103baef5529757a3e036575260b18df5
846
/** * Paquet de définition **/ package com.github.biconou.inotify; /** * Description: Merci de donner une description du service rendu par cette interface */ public interface InotifywaitEventListener { void doEvent(InotifywaitEvent event); void doAccess(InotifywaitEvent event); void doModify(InotifywaitEvent event); void doAttrib(InotifywaitEvent event); void doCloseWrite(InotifywaitEvent event); void doCloseNowrite(InotifywaitEvent event); void doOpen(InotifywaitEvent event); void doMovedTo(InotifywaitEvent event); void doMovedFrom(InotifywaitEvent event); void doMoveSelf(InotifywaitEvent event); void doCreate(InotifywaitEvent event); void doDelete(InotifywaitEvent event); void doDeleteSelf(InotifywaitEvent event); void doUnmount(InotifywaitEvent event); }
20.634146
84
0.751773
f0cce26a504ddb12f298668d67b0bb85e63c7513
1,807
package com.taikang.tkdoctor.alarmclock; import com.lidroid.xutils.util.LogUtils; import com.taikang.tkdoctor.activity.mycenter.HealthPlansActivity; import com.taikang.tkdoctor.bean.SetRemindBean; import com.taikang.tkdoctor.db.RemindDBDaoImp; import com.taikang.tkdoctor.util.TimeUtil; import android.content.BroadcastReceiver; import android.content.ComponentName; import android.content.ContentValues; import android.content.Context; import android.content.Intent; import android.content.ServiceConnection; import android.os.Handler; import android.os.IBinder; public class AlarmReceiver extends BroadcastReceiver { // 服务 private AlarmService alarmService; private Context mContext; @Override public void onReceive(Context context, Intent intent) { LogUtils.e("定时发送广播 广播接收器..." + intent.getAction()); this.mContext=context; if (intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED)) { AlarmClockManager.setNextAlarm(context); } else { // 进入处置页面 // 进入健康计划列表页面 // Intent deal = new Intent(context, HealthPlansActivity.class); // deal.putExtra(AlarmClock._ID, // intent.getStringExtra(AlarmClock._ID)); // deal.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // context.startActivity(deal); // 在这块进行处理操作 String id=intent.getStringExtra(AlarmClock._ID); initAlarmClock(id); } } // 新的信息 private void initAlarmClock(String id) { LogUtils.e("initAlaramClock()....alarmid....." + id); if (id != null && !"0".equals(id)) { LogUtils.e("定点进入健康计划页面.."); RemindDBDaoImp reminDb = new RemindDBDaoImp(mContext); final SetRemindBean bean = reminDb.getAlarmClockById(id); // 开启服务,监听电话状态和音乐播放 Intent intent = new Intent(mContext, AlarmService.class); intent.putExtra("alarm", bean); mContext.startService(intent); } } }
30.116667
67
0.744881
216faf71709552a3f1b643b2c55a8fc837f5021c
2,245
/* * Copyright 2018-2022 adorsys GmbH & Co KG * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU Affero General Public License as published * by the Free Software Foundation, either version 3 of the License, or (at * your option) any later version. This program 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. * See the GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see https://www.gnu.org/licenses/. * * This project is also available under a separate commercial license. You can * contact us at psd2@adorsys.com. */ package de.adorsys.xs2a.adapter.api.model; import javax.annotation.Generated; import java.util.Objects; @Generated("xs2a-adapter-codegen") public class RemittanceInformationStructured { private String reference; private String referenceType; private String referenceIssuer; public String getReference() { return reference; } public void setReference(String reference) { this.reference = reference; } public String getReferenceType() { return referenceType; } public void setReferenceType(String referenceType) { this.referenceType = referenceType; } public String getReferenceIssuer() { return referenceIssuer; } public void setReferenceIssuer(String referenceIssuer) { this.referenceIssuer = referenceIssuer; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; RemittanceInformationStructured that = (RemittanceInformationStructured) o; return Objects.equals(reference, that.reference) && Objects.equals(referenceType, that.referenceType) && Objects.equals(referenceIssuer, that.referenceIssuer); } @Override public int hashCode() { return Objects.hash(reference, referenceType, referenceIssuer); } }
30.753425
83
0.700668
acfb0f656a032d7addb95b21b705e224ed6f681c
3,579
// patterns/observer/ObservedFlower.java // (c)2021 MindView LLC: see Copyright.txt // We make no guarantees that this code is fit for any purpose. // Visit http://OnJava8.com for more book information. // Demonstration of the Observer pattern. // {java patterns.observer.ObservedFlower} package patterns.observer; import java.util.*; import java.util.function.*; @SuppressWarnings("deprecation") class Flower { private boolean isOpen = false; private boolean alreadyOpen = false; private boolean alreadyClosed = false; Observable opening = new Observable() { @Override public void notifyObservers() { if(isOpen && !alreadyOpen) { setChanged(); super.notifyObservers(); alreadyOpen = true; } } }; Observable closing = new Observable() { @Override public void notifyObservers() { if(!isOpen && !alreadyClosed) { setChanged(); super.notifyObservers(); alreadyClosed = true; } } }; public void open() { // Opens its petals isOpen = true; opening.notifyObservers(); alreadyClosed = false; } public void close() { // Closes its petals isOpen = false; closing.notifyObservers(); alreadyOpen = false; } } @SuppressWarnings("deprecation") class Bee { private String id; Bee(String name) { id = name; } // Observe openings: public final Observer whenOpened = (ob, a) -> System.out.println( "Bee " + id + "'s breakfast time!"); // Observe closings: public final Observer whenClosed = (ob, a) -> System.out.println( "Bee " + id + "'s bed time!"); } @SuppressWarnings("deprecation") class Hummingbird { private String id; Hummingbird(String name) { id = name; } public final Observer whenOpened = (ob, a) -> System.out.println("Hummingbird " + id + "'s breakfast time!"); public final Observer whenClosed = (ob, a) -> System.out.println("Hummingbird " + id + "'s bed time!"); } public class ObservedFlower { public static void main(String[] args) { Flower f = new Flower(); Bee ba = new Bee("A"), bb = new Bee("B"); Hummingbird ha = new Hummingbird("A"), hb = new Hummingbird("B"); f.opening.addObserver(ha.whenOpened); f.opening.addObserver(hb.whenOpened); f.opening.addObserver(ba.whenOpened); f.opening.addObserver(bb.whenOpened); f.closing.addObserver(ha.whenClosed); f.closing.addObserver(hb.whenClosed); f.closing.addObserver(ba.whenClosed); f.closing.addObserver(bb.whenClosed); // Hummingbird B decides to sleep in. // Removing whenOpened stops open updates. f.opening.deleteObserver(hb.whenOpened); // A change that interests observers: f.open(); f.open(); // No effect: it's already open. System.out.println("---------------"); // Bee A doesn't want to go to bed. // Removing whenClosed stops close updates. f.closing.deleteObserver(ba.whenClosed); f.close(); System.out.println("+++++++++++++++"); f.close(); // No effect: it's already closed. System.out.println("==============="); f.opening.deleteObservers(); f.open(); // No observers to update. System.out.println("###############"); f.close(); // Close observers are still there. } } /* Output: Bee B's breakfast time! Bee A's breakfast time! Hummingbird A's breakfast time! --------------- Bee B's bed time! Hummingbird B's bed time! Hummingbird A's bed time! +++++++++++++++ =============== ############### Bee B's bed time! Hummingbird B's bed time! Hummingbird A's bed time! */
28.862903
63
0.63202
d5713cbaf4615ce74d6678e79bbf01679e73238a
5,913
/* * Copyright 2014 Loic Merckel * * 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.swiftexplorer.gui; import java.awt.Dimension; import java.awt.FontMetrics; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; import java.awt.event.ComponentAdapter; import java.awt.event.ComponentEvent; import javax.swing.BorderFactory; import javax.swing.Box; import javax.swing.JDialog; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JProgressBar; import javax.swing.SwingUtilities; import javax.swing.event.AncestorEvent; import javax.swing.event.AncestorListener; public class ProgressPanel extends JPanel { private static final long serialVersionUID = 1L; private final JProgressBar progressBarTotal = new JProgressBar (0, 100) ; private final JLabel progressLabelTotal = new JLabel () ; private final JProgressBar progressBarCurrent = new JProgressBar (0, 100) ; private final JLabel progressLabelCurrent = new JLabel () ; private final int border = 15 ; private final int initialWidth = 500 ; private final int initialHeight = 160 ; static private class Listener extends ComponentAdapter implements AncestorListener { private int height = -1 ; private final JPanel panel ; public Listener(JPanel panel) { super(); this.panel = panel; } @Override public void componentResized(ComponentEvent e) { if (height > 0 && e.getComponent() instanceof JPanel) { JDialog parent = (JDialog) SwingUtilities.getAncestorOfClass(JDialog.class, e.getComponent()); if (parent != null) { parent.setSize(new Dimension(parent.getWidth(), height)); } } super.componentResized(e); } @Override public void ancestorAdded(AncestorEvent event) { JDialog parent = (JDialog) SwingUtilities.getAncestorOfClass(JDialog.class, panel); if (parent != null) { height = parent.getHeight() ; } } @Override public void ancestorRemoved(AncestorEvent event) { } @Override public void ancestorMoved(AncestorEvent event) { } } public ProgressPanel () { super (new GridBagLayout()) ; GridBagConstraints c = new GridBagConstraints(); setBorder(BorderFactory.createEmptyBorder(border, border, border, border)) ; c.fill = GridBagConstraints.HORIZONTAL; c.weightx = 1; c.insets = new Insets(5, 0, 0, 0) ; c.gridx = 0; c.gridy = 0; this.add(progressLabelTotal, c) ; c.gridx = 0; c.gridy = 1; this.add(progressBarTotal, c) ; c.gridx = 0; c.gridy = 2; this.add(Box.createVerticalStrut(10), c) ; c.gridx = 0; c.gridy = 3; this.add(progressLabelCurrent, c) ; c.gridx = 0; c.gridy = 4; this.add(progressBarCurrent, c) ; setPreferredSize(new Dimension (initialWidth, initialHeight)) ; Listener listener = new Listener(this) ; addComponentListener(listener); addAncestorListener(listener) ; } public void start () { start (progressBarTotal, progressLabelTotal) ; start (progressBarCurrent, progressLabelCurrent) ; } public void done () { done (progressBarTotal, progressLabelTotal) ; done (progressBarCurrent, progressLabelCurrent) ; } private final void start (JProgressBar progressBar, JLabel progressLabel) { progressBar.setValue(0); progressLabel.setText("Processing"); progressBar.setIndeterminate(true) ; } private final void done (JProgressBar progressBar, JLabel progressLabel) { progressBar.setValue(100); } public void setProgress (double totalProgress, String totalMsg, double currentProgress, String currentMsg) { setProgressValues (progressBarTotal, progressLabelTotal, totalProgress, totalMsg) ; setProgressValues (progressBarCurrent, progressLabelCurrent, currentProgress, processTextToFit (progressLabelCurrent, currentMsg)) ; progressLabelCurrent.setToolTipText(currentMsg); } private String processTextToFit (JLabel lbl, String text) { if (text == null) return "" ; FontMetrics fm = lbl.getFontMetrics(lbl.getFont()); if (fm == null) return text ; int textWidth = fm.stringWidth(text); int lblWidth = lbl.getWidth() ; if (lblWidth >= textWidth) return text ; // we assume that the set of all characters have a mean length equal or smaller than 'Aa' / 2 String dots = " ... " ; int charWidth = fm.stringWidth("Aa") / 2; int dotsWidth = fm.stringWidth(dots); int maxNumChar = (lblWidth - dotsWidth) / charWidth ; int blockWidth = maxNumChar / 2 ; if (blockWidth <= 0) return text ; StringBuilder sb = new StringBuilder () ; sb.append(text.substring(0, blockWidth)) ; sb.append(dots) ; sb.append(text.substring(text.length() - blockWidth)) ; return sb.toString() ; } private void setProgressValues (JProgressBar pb, JLabel lbl, double value, String msg) { if (!pb.isVisible()) return ; int pbVal = Math.min((int) (value * 100), 100) ; if (pb.isIndeterminate()) pb.setIndeterminate(false) ; pb.setValue(pbVal); lbl.setText((msg == null)?(""):(msg)); } }
28.427885
134
0.671064
7f89aeeb32a91536e6086ae302c803213e055e7c
1,984
package com.plumelog.core.dto; /** * className:WarningRule * description:错误告警规则 * time:2020/7/2 10:52 * * @author Frank.chen * @version 1.0.0 */ public class WarningRule { private String appName; private String env; private String appCategory; private String className; private String receiver; private String webhookUrl; private int errorCount; private int time; private int status; private int hookServe = 1; // 1 DingTalk 2 Wechat public String getAppName() { return appName; } public void setAppName(String appName) { this.appName = appName; } public String getEnv() { return env; } public void setEnv(String env) { this.env = env; } public String getAppCategory() { return appCategory; } public void setAppCategory(String appCategory) { this.appCategory = appCategory; } public String getClassName() { return className; } public void setClassName(String className) { this.className = className; } public String getReceiver() { return receiver; } public void setReceiver(String receiver) { this.receiver = receiver; } public String getWebhookUrl() { return webhookUrl; } public void setWebhookUrl(String webhookUrl) { this.webhookUrl = webhookUrl; } public int getErrorCount() { return errorCount; } public void setErrorCount(int errorCount) { this.errorCount = errorCount; } public int getTime() { return time; } public void setTime(int time) { this.time = time; } public int getStatus() { return status; } public void setStatus(int status) { this.status = status; } public int getHookServe() { return hookServe; } public void setHookServe(int hookServe) { this.hookServe = hookServe; } }
19.076923
53
0.611391
163349d38f0f9ce2a27b1db998252de785237b6a
264
package com.sinosoft.exam.user.mapper; import org.springframework.stereotype.Repository; import com.sinosoft.exam.user.model.User; @Repository public interface UserMapper { public User getUserByName(String name); public boolean createAccount(User user); }
18.857143
49
0.80303
10028a9c15faa629763a3432d6cb4c3f444a3ef5
902
/* author : oloop */ public class Histogram { private final double freq[]; private double max; public Histogram(int n) { // Create a new histogram freq = new double[n]; } public void addDataPoint(int i) { // Add one occurance of the value i freq[i]++; if ( freq[i] > max ) max = freq[i]; } public void draw() { //Draw and (Scale) the histogram StdDraw.setYscale(0,max); StdStats.plotBars(freq); } public static void main(String[] args) { int n = Integer.parseInt(args[0]); int trials = Integer.parseInt(args[1]); Histogram histogram = new Histogram(n + 1); StdDraw.setCanvasSize(500, 200); for ( int i = 0; i < trials; i++) { histogram.addDataPoint(Bernoulli.binomial(n)); } histogram.draw(); } }
19.608696
58
0.535477
cc4b71f33534088b2cab9d8ca022ecb376483cf9
606
package com.easy.serviceProvider.web; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import java.util.Random; @RestController public class HelloController { @GetMapping("hello") public String hello(@RequestParam String p1, @RequestParam String p2) throws Exception { int sleepTime = new Random().nextInt(2000); System.out.println("hello sleep " + sleepTime); Thread.sleep(sleepTime); return "hello, " + p1 + ", " + p2; } }
31.894737
92
0.726073
1edfc6a74ac78ef5ecb9f80658cc3d8f2cb7b375
780
// Observable.java package de.htwg.battleship.observer.impl; import de.htwg.battleship.observer.IObservable; import de.htwg.battleship.observer.IObserver; import java.util.LinkedList; import java.util.List; /** * Standard-Implementation of the Observer-Interface. * * @author Moritz Sauter (SauterMoritz@gmx.de) * @version 1.00 * @since 2014-12-10 */ public class Observable implements IObservable { /** * List to save the Observables. */ private final List<IObserver> subscriber = new LinkedList<>(); @Override public void addObserver(final IObserver observer) { subscriber.add(observer); } @Override public void notifyObserver() { for (IObserver sub : subscriber) { sub.update(); } } }
20.526316
66
0.673077
7fb486560fed41ac050d8cee5835d343dd7b1cc3
1,110
package fi.fmi.avi.converter.iwxxm.v2_1.metar; import fi.fmi.avi.converter.iwxxm.AbstractPropertyContainer; import fi.fmi.avi.converter.iwxxm.GenericReportProperties; import fi.fmi.avi.converter.iwxxm.v2_1.OMObservationProperties; import fi.fmi.avi.model.AviationCodeListUser; /** * Created by rinne on 25/07/2018. */ public class METARProperties extends AbstractPropertyContainer { public enum Name implements PropertyName { STATUS(AviationCodeListUser.MetarStatus.class),// SPECI(Boolean.class),// AUTOMATED(Boolean.class),// OBSERVATION(OMObservationProperties.class),// TREND_FORECAST(OMObservationProperties.class),// SNOW_CLOSURE(Boolean.class),// TREND_NO_SIGNIFICANT_CHANGES(Boolean.class),// REPORT_METADATA(GenericReportProperties.class); private final Class<?> acceptedType; Name(final Class<?> type) { this.acceptedType = type; } @Override public Class<?> getAcceptedType() { return this.acceptedType; } } public METARProperties() { } }
29.210526
64
0.69009
154a43dfe73c250c81519a51365894ca7028799a
673
package com.moringaschool.network; import retrofit2.Retrofit; import retrofit2.converter.gson.GsonConverterFactory; import static com.moringaschool.brewerydb.Constants.BREWERYDB_BASE_URL; public class BreweryClient { private static Retrofit retrofit = null; public static BreweryApi getClient(){ if(retrofit == null){ retrofit = new Retrofit.Builder() .baseUrl(BREWERYDB_BASE_URL) .addConverterFactory(GsonConverterFactory.create()) .build(); } return retrofit.create(BreweryApi.class); } }
21.709677
87
0.598811
08a0a7e4900740fca5d6d5590d90ac5c8a61a233
1,210
package me.joe.mpe.impl.commands.misc; import com.mojang.brigadier.CommandDispatcher; import me.joe.mpe.api.Command; import net.fabricmc.fabric.api.registry.CommandRegistry; import net.minecraft.server.command.CommandManager; import net.minecraft.server.command.ServerCommandSource; import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.text.ClickEvent; import net.minecraft.text.ClickEvent.Action; import net.minecraft.text.LiteralText; import net.minecraft.text.Style; import net.minecraft.text.TranslatableText; public class ReportCommand { public static void register(CommandDispatcher<ServerCommandSource> dispatcher, boolean b) { dispatcher.register(CommandManager.literal("report").executes((context) -> { ServerPlayerEntity playerEntity = context.getSource().getPlayer(); playerEntity.sendMessage((new TranslatableText("§c§l[REPORT] ")).append((new LiteralText("§fSend player reports here!")).setStyle((Style.EMPTY).withClickEvent(new ClickEvent(Action.OPEN_URL, "https://docs.google.com/forms/d/e/1FAIpQLSeJg8f3xHXKPxx4zkoxLVIkH_8qoSdow_CJJDiKXlwqJO_eKg/viewform")))), false); return 1; })); } }
50.416667
321
0.765289
982bf7e9c4f4c9ea8d778a8e109343e93a97aefb
1,395
/** * This file is automatically generated by MyBatis Generator, do not modify. */ package com.creditease.adx.clockwork.dao.mapper.clockwork; import com.creditease.adx.clockwork.common.entity.gen.TbClockworkTaskSubscription; import com.creditease.adx.clockwork.common.entity.gen.TbClockworkTaskSubscriptionExample; import java.util.List; import org.apache.ibatis.annotations.Param; public interface TbClockworkTaskSubscriptionMapper { long countByExample(TbClockworkTaskSubscriptionExample example); int deleteByExample(TbClockworkTaskSubscriptionExample example); int deleteByPrimaryKey(Integer id); int insert(TbClockworkTaskSubscription record); int insertSelective(TbClockworkTaskSubscription record); List<TbClockworkTaskSubscription> selectByExample(TbClockworkTaskSubscriptionExample example); TbClockworkTaskSubscription selectByPrimaryKey(Integer id); int updateByExampleSelective(@Param("record") TbClockworkTaskSubscription record, @Param("example") TbClockworkTaskSubscriptionExample example); int updateByExample(@Param("record") TbClockworkTaskSubscription record, @Param("example") TbClockworkTaskSubscriptionExample example); int updateByPrimaryKeySelective(TbClockworkTaskSubscription record); int updateByPrimaryKey(TbClockworkTaskSubscription record); int batchInsert(List<TbClockworkTaskSubscription> records); }
39.857143
148
0.829391
794b409ac6973927a1e611e169bd3cab5965c9aa
244
package com.emersonrte.spring.data.orm; import java.io.Serializable; import java.math.BigDecimal; public interface FuncionarioProjecao extends Serializable { Long getIdFuncionario(); String getNome(); BigDecimal getSalario(); }
18.769231
59
0.766393
2f6d2142884b264f038df235047cbce690cfd666
5,214
package edu.umb.cs680.hw09; import static org.junit.Assert.assertArrayEquals; import static org.junit.jupiter.api.Assertions.*; import java.time.LocalDateTime; import java.util.LinkedList; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import edu.umb.cs680.hw09.apfs.ApfsDirectory; import edu.umb.cs680.hw09.apfs.ApfsFile; import edu.umb.cs680.hw09.apfs.ApfsLink; public class ApfsDirectoryTest { private static ApfsDirectory root; private static ApfsDirectory apps; private static ApfsDirectory bin; private static ApfsDirectory home; private static ApfsDirectory pictures; private static ApfsFile x; private static ApfsFile y; private static ApfsFile a; private static ApfsFile b; private static ApfsFile c; private static ApfsLink m; private static ApfsLink n; @BeforeAll static void setUpBeforeClass() throws Exception { root = new ApfsDirectory(null, "root", 0, LocalDateTime.now(), "defaultOwnerName", "defaultLastModifiedTime"); apps = new ApfsDirectory(root, "apps", 0, LocalDateTime.now(), "defaultOwnerName", "defaultLastModifiedTime"); bin = new ApfsDirectory(root, "bin", 0, LocalDateTime.now(), "defaultOwnerName", "defaultLastModifiedTime"); home = new ApfsDirectory(root, "home", 0, LocalDateTime.now(), "defaultOwnerName", "defaultLastModifiedTime"); pictures = new ApfsDirectory(home, "pictures", 0, LocalDateTime.now(), "defaultOwnerName", "defaultLastModifiedTime"); x = new ApfsFile(apps, "x", 10, LocalDateTime.now(), "defaultOwnerName", "defaultLastModifiedTime"); y = new ApfsFile(bin, "y", 20, LocalDateTime.now(), "defaultOwnerName", "defaultLastModifiedTime"); a = new ApfsFile(pictures, "a", 30, LocalDateTime.now(), "defaultOwnerName", "defaultLastModifiedTime"); b = new ApfsFile(pictures, "b", 40, LocalDateTime.now(), "defaultOwnerName", "defaultLastModifiedTime"); c = new ApfsFile(home, "c", 50, LocalDateTime.now(), "defaultOwnerName", "defaultLastModifiedTime"); m = new ApfsLink(home, "m", 0, LocalDateTime.now(), "defaultOwnerName", "defaultLastModifiedTime", bin); n = new ApfsLink(pictures, "n", 0, LocalDateTime.now(), "defaultOwnerName", "defaultLastModifiedTime", y); root.appendChild(apps); root.appendChild(bin); root.appendChild(home); apps.appendChild(x); apps.appendChild(y); home.appendChild(pictures); home.appendChild(c); home.appendChild(m); pictures.appendChild(a); pictures.appendChild(b); pictures.appendChild(n); } private String[] dirToStringArray(ApfsDirectory d) { String[] dirInfo = { String.valueOf(d.isDirectory()), d.getOwnerName(), String.valueOf(d.getTotalSize()), d.getLastModifiedTime(), String.valueOf(d.countChildren()) }; return dirInfo; } @Test public void verifyDirectoryEqualityRoot() { String[] expected = { "true", "defaultOwnerName", "150", "defaultLastModifiedTime", "3" }; ApfsDirectory actual = root; assertArrayEquals(expected, dirToStringArray(actual)); } @Test public void verifyDirectoryEqualityHome() { String[] expected = { "true", "defaultOwnerName", "120", "defaultLastModifiedTime", "3" }; ApfsDirectory actual = home; assertArrayEquals(expected, dirToStringArray(actual)); } @Test public void isDirectoyTestingWithRoot() { assertTrue(root.isDirectory()); } @Test public void isFileTestingWithRoot() { assertFalse(root.isFile()); } @Test public void isLinkTestingWithRoot() { assertFalse(root.isLink()); } @Test public void appendChildrenTestingWithRoot() { assertSame(root, apps.getParent()); } @Test public void appendChildrenTestingWithHome() { assertSame(home, c.getParent()); } @Test public void countChildrenTestingWithRoot() { assertEquals(3, root.countChildren());; } @Test public void countChildrenTestingWithHome() { assertSame(3, home.countChildren()); } @Test public void getSubDirectoriesTestingWithRoot() { ApfsDirectory[] expected = new ApfsDirectory[3]; expected[0] = apps; expected[1] = bin; expected[2] = home; ApfsDirectory[] actual = new ApfsDirectory[3]; LinkedList<ApfsDirectory> subDirectories = root.getSubDirectories(); actual[0] = subDirectories.get(0); actual[1] = subDirectories.get(1); actual[2] = subDirectories.get(2); assertArrayEquals(expected, actual); } @Test public void getSubDirectoriesTestingWithHome() { assertSame(pictures, home.getSubDirectories().get(0)); } @Test public void getFilesTestingWithHome() { assertSame(c, home.getFiles().get(0)); } @Test public void getFilesTestingWithPictures() { ApfsFile[] expected = new ApfsFile[2]; expected[0] = a; expected[1] = b; ApfsFile[] actual = new ApfsFile[2]; LinkedList<ApfsFile> files = pictures.getFiles(); actual[0] = files.get(0); actual[1] = files.get(1); assertArrayEquals(expected, actual); } @Test public void getLinksTestingWithHome() { assertSame(m, home.getLinks().get(0)); } @Test public void getLinksTestingWithPictures() { assertSame(n, pictures.getLinks().get(0)); } @Test public void getTotalSizeTestingWithRoot() { assertEquals(150, root.getTotalSize()); } @Test public void getTotalSizeTestingWithHome() { assertEquals(120, home.getTotalSize()); } }
30.670588
120
0.732068
8db8ac2fbb9ccb9ce4864c5a45d730bfc1c5f027
13,606
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright 1997-2008 Sun Microsystems, Inc. All rights reserved. * * The contents of this file are subject to the terms of either the GNU * General Public License Version 2 only ("GPL") or the Common Development * and Distribution License("CDDL") (collectively, the "License"). You * may not use this file except in compliance with the License. You can obtain * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html * or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific * language governing permissions and limitations under the License. * * When distributing the software, include this License Header Notice in each * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt. * Sun designates this particular file as subject to the "Classpath" exception * as provided by Sun in the GPL Version 2 section of the License file that * accompanied this code. If applicable, add the following below the License * Header, with the fields enclosed by brackets [] replaced by your own * identifying information: "Portions Copyrighted [year] * [name of copyright owner]" * * Contributor(s): * * If you wish your version of this file to be governed by only the CDDL or * only the GPL Version 2, indicate your decision by adding "[Contributor] * elects to include this software in this distribution under the [CDDL or GPL * Version 2] license." If you don't indicate a single choice of license, a * recipient has the option to distribute your version of this file under * either the CDDL, the GPL Version 2 or to extend the choice of license to * its licensees as provided above. However, if you add GPL Version 2 code * and therefore, elected the GPL Version 2 license, then the option applies * only if the new code is made subject to such option by the copyright * holder. */ package com.sun.xml.ws.mex.server; import com.sun.istack.NotNull; import com.sun.xml.stream.buffer.MutableXMLStreamBuffer; import com.sun.xml.ws.api.SOAPVersion; import com.sun.xml.ws.api.addressing.AddressingVersion; import com.sun.xml.ws.api.message.HeaderList; import com.sun.xml.ws.api.message.Headers; import com.sun.xml.ws.api.message.Message; import com.sun.xml.ws.api.message.Messages; import com.sun.xml.ws.api.server.BoundEndpoint; import com.sun.xml.ws.api.server.WSEndpoint; import com.sun.xml.ws.developer.JAXWSProperties; import com.sun.xml.ws.fault.SOAPFaultBuilder; import com.sun.xml.ws.message.ProblemActionHeader; import com.sun.xml.ws.mex.MetadataConstants; import com.sun.xml.ws.mex.MessagesMessages; import com.sun.xml.ws.transport.http.servlet.ServletModule; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.xml.namespace.QName; import javax.xml.soap.Detail; import javax.xml.soap.SOAPConstants; import javax.xml.soap.SOAPElement; import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPFault; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; import javax.xml.ws.BindingProvider; import javax.xml.ws.WebServiceContext; import javax.xml.ws.WebServiceException; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.Provider; import javax.xml.ws.Service; import javax.xml.ws.ServiceMode; import javax.xml.ws.WebServiceProvider; import javax.xml.ws.soap.Addressing; import static com.sun.xml.ws.mex.MetadataConstants.GET_MDATA_REQUEST; import static com.sun.xml.ws.mex.MetadataConstants.GET_REQUEST; import static com.sun.xml.ws.mex.MetadataConstants.GET_RESPONSE; @ServiceMode(value=Service.Mode.MESSAGE) @WebServiceProvider @Addressing(enabled=true,required=true) public class MEXEndpoint implements Provider<Message> { @Resource protected WebServiceContext wsContext; private static final Logger logger = Logger.getLogger(MEXEndpoint.class.getName()); public Message invoke(Message requestMsg) { if (requestMsg == null || !requestMsg.hasHeaders()) { // TODO: Better error message throw new WebServiceException("Malformed MEX Request"); } WSEndpoint wsEndpoint = (WSEndpoint) wsContext.getMessageContext().get(JAXWSProperties.WSENDPOINT); SOAPVersion soapVersion = wsEndpoint.getBinding().getSOAPVersion(); // try w3c version of ws-a first, then member submission version final HeaderList headers = requestMsg.getHeaders(); String action = headers.getAction(AddressingVersion.W3C, soapVersion); AddressingVersion wsaVersion = AddressingVersion.W3C; if (action == null) { action = headers.getAction(AddressingVersion.MEMBER, soapVersion); wsaVersion = AddressingVersion.MEMBER; } if (action == null) { // TODO: Better error message throw new WebServiceException("No wsa:Action specified"); } else if (action.equals(GET_REQUEST)) { final String toAddress = headers.getTo(wsaVersion, soapVersion); return processGetRequest(requestMsg, toAddress, wsaVersion, soapVersion); } else if (action.equals(GET_MDATA_REQUEST)) { String faultText = MessagesMessages.MEX_0017_GET_METADATA_NOT_IMPLEMENTED(GET_MDATA_REQUEST, GET_REQUEST); logger.warning(faultText); final Message faultMessage = createFaultMessage(faultText, GET_MDATA_REQUEST, wsaVersion, soapVersion); wsContext.getMessageContext().put(BindingProvider.SOAPACTION_URI_PROPERTY, wsaVersion.getDefaultFaultAction()); return faultMessage; } // If here, either action is unsupported // TODO: Better error message throw new UnsupportedOperationException(action); } /* * This method creates an xml stream buffer, writes the response to * it, and uses it to create a response message. */ private Message processGetRequest(final Message request, String address, final AddressingVersion wsaVersion, final SOAPVersion soapVersion) { try { WSEndpoint ownerEndpoint = findEndpoint(); // If the owner endpoint has been found, then // get its metadata and write it to the response message if (ownerEndpoint != null) { final MutableXMLStreamBuffer buffer = new MutableXMLStreamBuffer(); final XMLStreamWriter writer = buffer.createFromXMLStreamWriter(); address = this.getAddressFromMexAddress(address, soapVersion); writeStartEnvelope(writer, wsaVersion, soapVersion); WSDLRetriever wsdlRetriever = new WSDLRetriever(ownerEndpoint); wsdlRetriever.addDocuments(writer, null, address); writer.writeEndDocument(); writer.flush(); final Message responseMessage = Messages.create(buffer); HeaderList headers = responseMessage.getHeaders(); //headers.add(Headers.create(new QName(wsaVersion.nsUri, "To"), "http://www.w3.org/2005/08/addressing/anonymous")); headers.add(Headers.create(new QName(wsaVersion.nsUri, "Action"), GET_RESPONSE)); //headers.add(Headers.create(new QName(wsaVersion.nsUri, "MessageID"), "uuid:" + UUID.randomUUID().toString())); //headers.add(Headers.create(new QName(wsaVersion.nsUri, "RelatedTo"), request.getHeaders().getMessageID(wsaVersion, soapVersion))); //wsContext.getMessageContext().put(BindingProvider.SOAPACTION_URI_PROPERTY, GET_RESPONSE); return responseMessage; } // If we get here there was no metadata for the owner endpoint WebServiceException exception = new WebServiceException(MessagesMessages.MEX_0016_NO_METADATA()); final Message faultMessage = Messages.create(exception, soapVersion); wsContext.getMessageContext().put(BindingProvider.SOAPACTION_URI_PROPERTY, wsaVersion.getDefaultFaultAction()); return faultMessage; } catch (XMLStreamException streamE) { final String exceptionMessage = MessagesMessages.MEX_0001_RESPONSE_WRITING_FAILURE(address); logger.log(Level.SEVERE, exceptionMessage, streamE); throw new WebServiceException(exceptionMessage, streamE); } } /** * Find the endpoint that this MEX endpoint is serving. * * This method is searching for an endpoint that has the same address as the MEX endpoint * with the suffix "/mex" removed. If the MEX endpoint has an HTTPS address, * it will first look for an endpoint on HTTP and then HTTPS. * * @return The endpoint that owns the actual service or null. */ private WSEndpoint findEndpoint() { WSEndpoint wsEndpoint = (WSEndpoint) wsContext.getMessageContext().get(JAXWSProperties.WSENDPOINT); HttpServletRequest servletRequest = (HttpServletRequest)wsContext.getMessageContext().get(MessageContext.SERVLET_REQUEST); if (servletRequest == null) { // TODO: better error message throw new WebServiceException("MEX: no ServletRequest can be found"); } // Derive the address of the owner endpoint. // e.g. http://localhost/foo/mex --> http://localhost/foo WSEndpoint ownerEndpoint = null; ServletModule module = (ServletModule) wsEndpoint.getContainer().getSPI(ServletModule.class); String baseAddress = module.getContextPath(servletRequest); String ownerEndpointAddress = null; List<BoundEndpoint> boundEndpoints = module.getBoundEndpoints(); for (BoundEndpoint endpoint : boundEndpoints) { if (wsEndpoint == endpoint.getEndpoint()) { ownerEndpointAddress = endpoint.getAddress(baseAddress).toString(); break; } } if (ownerEndpointAddress != null) { ownerEndpointAddress = getAddressFromMexAddress(ownerEndpointAddress, wsEndpoint.getBinding().getSOAPVersion()); boundEndpoints = module.getBoundEndpoints(); for (BoundEndpoint endpoint : boundEndpoints) { //compare ownerEndpointAddress with this endpoints address // if matches, set ownerEndpoint to the corresponding WSEndpoint String endpointAddress = endpoint.getAddress(baseAddress).toString(); if (endpointAddress.equals(ownerEndpointAddress)) { ownerEndpoint = endpoint.getEndpoint(); break; } } } return ownerEndpoint; } private void writeStartEnvelope(final XMLStreamWriter writer, final AddressingVersion wsaVersion, final SOAPVersion soapVersion) throws XMLStreamException { final String soapPrefix = "soapenv"; writer.writeStartDocument(); writer.writeStartElement(soapPrefix, "Envelope", soapVersion.nsUri); // todo: this line should go away after bug fix - 6418039 writer.writeNamespace(soapPrefix, soapVersion.nsUri); writer.writeNamespace(MetadataConstants.WSA_PREFIX, wsaVersion.nsUri); writer.writeNamespace(MetadataConstants.MEX_PREFIX, MetadataConstants.MEX_NAMESPACE); writer.writeStartElement(soapPrefix, "Body", soapVersion.nsUri); writer.writeStartElement(MetadataConstants.MEX_PREFIX, "Metadata", MetadataConstants.MEX_NAMESPACE); } private Message createFaultMessage(@NotNull final String faultText, @NotNull final String unsupportedAction, @NotNull final AddressingVersion av, @NotNull final SOAPVersion sv) { final QName subcode = av.actionNotSupportedTag; Message faultMessage; SOAPFault fault; try { if (sv == SOAPVersion.SOAP_12) { fault = SOAPVersion.SOAP_12.saajSoapFactory.createFault(); fault.setFaultCode(SOAPConstants.SOAP_SENDER_FAULT); fault.appendFaultSubcode(subcode); Detail detail = fault.addDetail(); SOAPElement se = detail.addChildElement(av.problemActionTag); se = se.addChildElement(av.actionTag); se.addTextNode(unsupportedAction); } else { fault = SOAPVersion.SOAP_11.saajSoapFactory.createFault(); fault.setFaultCode(subcode); } fault.setFaultString(faultText); faultMessage = SOAPFaultBuilder.createSOAPFaultMessage(sv, fault); if (sv == SOAPVersion.SOAP_11) { faultMessage.getHeaders().add(new ProblemActionHeader(unsupportedAction, av)); } } catch (SOAPException e) { throw new WebServiceException(e); } return faultMessage; } private String getAddressFromMexAddress(String mexAddress, SOAPVersion soapVersion){ if (mexAddress.endsWith("mex")){ return mexAddress.substring(0, mexAddress.length()-"/mex".length()); } if (soapVersion.equals(SOAPVersion.SOAP_11)){ return mexAddress.substring(0, mexAddress.length()-"/mex/soap11".length()); } else if (soapVersion.equals(SOAPVersion.SOAP_12)){ return mexAddress.substring(0, mexAddress.length()-"/mex/soap12".length()); } return null; } }
46.278912
148
0.693444
5db5362493d5970de671a413782db8e5a826baec
2,419
/* * Copyright (c) 2007 David Crawshaw <david@zentus.com> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ package org.sqlite; import java.sql.*; import java.util.*; public class JDBC implements Driver { private static final String PREFIX = "jdbc:sqlite:"; static { try { DriverManager.registerDriver(new JDBC()); } catch (SQLException e) { e.printStackTrace(); } } public int getMajorVersion() { return 1; } public int getMinorVersion() { return 1; } public boolean jdbcCompliant() { return false; } public boolean acceptsURL(String url) { return url != null && url.toLowerCase().startsWith(PREFIX); } public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException { DriverPropertyInfo sharedCache = new DriverPropertyInfo( "shared_cache", "false"); sharedCache.choices = new String[] { "true", "false" }; sharedCache.description = "Enable SQLite Shared-Cache mode, native driver only."; sharedCache.required = false; return new DriverPropertyInfo[] { sharedCache }; } public Connection connect(String url, Properties info) throws SQLException { if (!acceptsURL(url)) return null; url = url.trim(); // if no file name is given use a memory database String file = PREFIX.equalsIgnoreCase(url) ? ":memory:" : url.substring(PREFIX.length()); if (info.getProperty("shared_cache") == null) return new Conn(url, file); else return new Conn(url, file, Boolean.parseBoolean(info.getProperty("shared_cache"))); } }
34.557143
80
0.664737
223de44877d6a08596268ae2335e21afc7de3295
439,140
package com.mypurecloud.sdk.v2.api; import com.fasterxml.jackson.core.type.TypeReference; import com.mypurecloud.sdk.v2.ApiException; import com.mypurecloud.sdk.v2.ApiClient; import com.mypurecloud.sdk.v2.ApiRequest; import com.mypurecloud.sdk.v2.ApiResponse; import com.mypurecloud.sdk.v2.Configuration; import com.mypurecloud.sdk.v2.model.*; import com.mypurecloud.sdk.v2.Pair; import com.mypurecloud.sdk.v2.model.ErrorBody; import com.mypurecloud.sdk.v2.model.SchemaCategoryEntityListing; import com.mypurecloud.sdk.v2.model.SchemaReferenceEntityListing; import com.mypurecloud.sdk.v2.model.Organization; import com.mypurecloud.sdk.v2.model.Edge; import com.mypurecloud.sdk.v2.model.EdgeNetworkDiagnosticResponse; import com.mypurecloud.sdk.v2.model.EdgeLine; import com.mypurecloud.sdk.v2.model.EdgeLineEntityListing; import com.mypurecloud.sdk.v2.model.DomainLogicalInterface; import com.mypurecloud.sdk.v2.model.LogicalInterfaceEntityListing; import com.mypurecloud.sdk.v2.model.EdgeLogsJob; import com.mypurecloud.sdk.v2.model.EdgeMetrics; import com.mypurecloud.sdk.v2.model.DomainPhysicalInterface; import com.mypurecloud.sdk.v2.model.PhysicalInterfaceEntityListing; import com.mypurecloud.sdk.v2.model.VmPairingInfo; import com.mypurecloud.sdk.v2.model.DomainEdgeSoftwareUpdateDto; import com.mypurecloud.sdk.v2.model.DomainEdgeSoftwareVersionDtoEntityListing; import com.mypurecloud.sdk.v2.model.TrunkEntityListing; import com.mypurecloud.sdk.v2.model.EdgeEntityListing; import com.mypurecloud.sdk.v2.model.AvailableLanguageList; import com.mypurecloud.sdk.v2.model.CertificateAuthorityEntityListing; import com.mypurecloud.sdk.v2.model.DomainCertificateAuthority; import com.mypurecloud.sdk.v2.model.DID; import com.mypurecloud.sdk.v2.model.DIDPool; import com.mypurecloud.sdk.v2.model.DIDPoolEntityListing; import com.mypurecloud.sdk.v2.model.DIDEntityListing; import com.mypurecloud.sdk.v2.model.EdgeGroup; import com.mypurecloud.sdk.v2.model.EdgeTrunkBase; import com.mypurecloud.sdk.v2.model.EdgeGroupEntityListing; import com.mypurecloud.sdk.v2.model.EdgeVersionReport; import com.mypurecloud.sdk.v2.model.Extension; import com.mypurecloud.sdk.v2.model.ExtensionPool; import com.mypurecloud.sdk.v2.model.ExtensionPoolEntityListing; import com.mypurecloud.sdk.v2.model.ExtensionEntityListing; import com.mypurecloud.sdk.v2.model.Line; import com.mypurecloud.sdk.v2.model.LineBase; import com.mypurecloud.sdk.v2.model.LineBaseEntityListing; import com.mypurecloud.sdk.v2.model.LineEntityListing; import com.mypurecloud.sdk.v2.model.OutboundRoute; import com.mypurecloud.sdk.v2.model.OutboundRouteEntityListing; import com.mypurecloud.sdk.v2.model.Phone; import com.mypurecloud.sdk.v2.model.PhoneBase; import com.mypurecloud.sdk.v2.model.PhoneBaseEntityListing; import com.mypurecloud.sdk.v2.model.PhoneMetaBaseEntityListing; import com.mypurecloud.sdk.v2.model.PhoneEntityListing; import com.mypurecloud.sdk.v2.model.Site; import com.mypurecloud.sdk.v2.model.NumberPlan; import com.mypurecloud.sdk.v2.model.OutboundRouteBase; import com.mypurecloud.sdk.v2.model.OutboundRouteBaseEntityListing; import com.mypurecloud.sdk.v2.model.SiteEntityListing; import com.mypurecloud.sdk.v2.model.TimeZoneEntityListing; import com.mypurecloud.sdk.v2.model.Trunk; import com.mypurecloud.sdk.v2.model.TrunkMetrics; import com.mypurecloud.sdk.v2.model.TrunkBase; import com.mypurecloud.sdk.v2.model.TrunkBaseEntityListing; import com.mypurecloud.sdk.v2.model.TrunkMetabaseEntityListing; import com.mypurecloud.sdk.v2.model.TrunkRecordingEnabledCount; import com.mypurecloud.sdk.v2.model.EdgeNetworkDiagnostic; import com.mypurecloud.sdk.v2.model.EdgeNetworkDiagnosticRequest; import com.mypurecloud.sdk.v2.model.EdgeLogsJobUploadRequest; import com.mypurecloud.sdk.v2.model.EdgeLogsJobRequest; import com.mypurecloud.sdk.v2.model.EdgeLogsJobResponse; import com.mypurecloud.sdk.v2.model.EdgeRebootParameters; import com.mypurecloud.sdk.v2.model.EdgeServiceStateRequest; import com.mypurecloud.sdk.v2.model.ValidateAddressResponse; import com.mypurecloud.sdk.v2.model.ValidateAddressRequest; import com.mypurecloud.sdk.v2.model.PhonesReboot; import com.mypurecloud.sdk.v2.api.request.DeleteTelephonyProvidersEdgeRequest; import com.mypurecloud.sdk.v2.api.request.DeleteTelephonyProvidersEdgeLogicalinterfaceRequest; import com.mypurecloud.sdk.v2.api.request.DeleteTelephonyProvidersEdgeSoftwareupdateRequest; import com.mypurecloud.sdk.v2.api.request.DeleteTelephonyProvidersEdgesCertificateauthorityRequest; import com.mypurecloud.sdk.v2.api.request.DeleteTelephonyProvidersEdgesDidpoolRequest; import com.mypurecloud.sdk.v2.api.request.DeleteTelephonyProvidersEdgesEdgegroupRequest; import com.mypurecloud.sdk.v2.api.request.DeleteTelephonyProvidersEdgesExtensionpoolRequest; import com.mypurecloud.sdk.v2.api.request.DeleteTelephonyProvidersEdgesOutboundrouteRequest; import com.mypurecloud.sdk.v2.api.request.DeleteTelephonyProvidersEdgesPhoneRequest; import com.mypurecloud.sdk.v2.api.request.DeleteTelephonyProvidersEdgesPhonebasesettingRequest; import com.mypurecloud.sdk.v2.api.request.DeleteTelephonyProvidersEdgesSiteRequest; import com.mypurecloud.sdk.v2.api.request.DeleteTelephonyProvidersEdgesSiteOutboundrouteRequest; import com.mypurecloud.sdk.v2.api.request.DeleteTelephonyProvidersEdgesTrunkbasesettingRequest; import com.mypurecloud.sdk.v2.api.request.GetConfigurationSchemasEdgesVnextRequest; import com.mypurecloud.sdk.v2.api.request.GetConfigurationSchemasEdgesVnextSchemaCategoryRequest; import com.mypurecloud.sdk.v2.api.request.GetConfigurationSchemasEdgesVnextSchemaCategorySchemaTypeRequest; import com.mypurecloud.sdk.v2.api.request.GetConfigurationSchemasEdgesVnextSchemaCategorySchemaTypeSchemaIdRequest; import com.mypurecloud.sdk.v2.api.request.GetConfigurationSchemasEdgesVnextSchemaCategorySchemaTypeSchemaIdExtensionTypeMetadataIdRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgeRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgeDiagnosticNslookupRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgeDiagnosticPingRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgeDiagnosticRouteRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgeDiagnosticTracepathRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgeLineRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgeLinesRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgeLogicalinterfaceRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgeLogicalinterfacesRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgeLogsJobRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgeMetricsRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgePhysicalinterfaceRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgePhysicalinterfacesRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgeSetuppackageRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgeSoftwareupdateRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgeSoftwareversionsRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgeTrunksRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesAvailablelanguagesRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesCertificateauthoritiesRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesCertificateauthorityRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesDidRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesDidpoolRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesDidpoolsRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesDidsRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesEdgegroupRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesEdgegroupEdgetrunkbaseRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesEdgegroupsRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesEdgeversionreportRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesExtensionRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesExtensionpoolRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesExtensionpoolsRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesExtensionsRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesLineRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesLinebasesettingRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesLinebasesettingsRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesLinesRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesLinesTemplateRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesLogicalinterfacesRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesMetricsRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesOutboundrouteRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesOutboundroutesRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesPhoneRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesPhonebasesettingRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesPhonebasesettingsRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesPhonebasesettingsAvailablemetabasesRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesPhonebasesettingsTemplateRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesPhonesRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesPhonesTemplateRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesPhysicalinterfacesRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesSiteRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesSiteNumberplanRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesSiteNumberplansRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesSiteNumberplansClassificationsRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesSiteOutboundrouteRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesSiteOutboundroutesRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesSitesRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesTimezonesRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesTrunkRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesTrunkMetricsRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesTrunkbasesettingRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesTrunkbasesettingsRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesTrunkbasesettingsAvailablemetabasesRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesTrunkbasesettingsTemplateRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesTrunksRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesTrunksMetricsRequest; import com.mypurecloud.sdk.v2.api.request.GetTelephonyProvidersEdgesTrunkswithrecordingRequest; import com.mypurecloud.sdk.v2.api.request.PostTelephonyProvidersEdgeDiagnosticNslookupRequest; import com.mypurecloud.sdk.v2.api.request.PostTelephonyProvidersEdgeDiagnosticPingRequest; import com.mypurecloud.sdk.v2.api.request.PostTelephonyProvidersEdgeDiagnosticRouteRequest; import com.mypurecloud.sdk.v2.api.request.PostTelephonyProvidersEdgeDiagnosticTracepathRequest; import com.mypurecloud.sdk.v2.api.request.PostTelephonyProvidersEdgeLogicalinterfacesRequest; import com.mypurecloud.sdk.v2.api.request.PostTelephonyProvidersEdgeLogsJobUploadRequest; import com.mypurecloud.sdk.v2.api.request.PostTelephonyProvidersEdgeLogsJobsRequest; import com.mypurecloud.sdk.v2.api.request.PostTelephonyProvidersEdgeRebootRequest; import com.mypurecloud.sdk.v2.api.request.PostTelephonyProvidersEdgeSoftwareupdateRequest; import com.mypurecloud.sdk.v2.api.request.PostTelephonyProvidersEdgeStatuscodeRequest; import com.mypurecloud.sdk.v2.api.request.PostTelephonyProvidersEdgeUnpairRequest; import com.mypurecloud.sdk.v2.api.request.PostTelephonyProvidersEdgesRequest; import com.mypurecloud.sdk.v2.api.request.PostTelephonyProvidersEdgesAddressvalidationRequest; import com.mypurecloud.sdk.v2.api.request.PostTelephonyProvidersEdgesCertificateauthoritiesRequest; import com.mypurecloud.sdk.v2.api.request.PostTelephonyProvidersEdgesDidpoolsRequest; import com.mypurecloud.sdk.v2.api.request.PostTelephonyProvidersEdgesEdgegroupsRequest; import com.mypurecloud.sdk.v2.api.request.PostTelephonyProvidersEdgesExtensionpoolsRequest; import com.mypurecloud.sdk.v2.api.request.PostTelephonyProvidersEdgesOutboundroutesRequest; import com.mypurecloud.sdk.v2.api.request.PostTelephonyProvidersEdgesPhoneRebootRequest; import com.mypurecloud.sdk.v2.api.request.PostTelephonyProvidersEdgesPhonebasesettingsRequest; import com.mypurecloud.sdk.v2.api.request.PostTelephonyProvidersEdgesPhonesRequest; import com.mypurecloud.sdk.v2.api.request.PostTelephonyProvidersEdgesPhonesRebootRequest; import com.mypurecloud.sdk.v2.api.request.PostTelephonyProvidersEdgesSiteOutboundroutesRequest; import com.mypurecloud.sdk.v2.api.request.PostTelephonyProvidersEdgesSiteRebalanceRequest; import com.mypurecloud.sdk.v2.api.request.PostTelephonyProvidersEdgesSitesRequest; import com.mypurecloud.sdk.v2.api.request.PostTelephonyProvidersEdgesTrunkbasesettingsRequest; import com.mypurecloud.sdk.v2.api.request.PutTelephonyProvidersEdgeRequest; import com.mypurecloud.sdk.v2.api.request.PutTelephonyProvidersEdgeLineRequest; import com.mypurecloud.sdk.v2.api.request.PutTelephonyProvidersEdgeLogicalinterfaceRequest; import com.mypurecloud.sdk.v2.api.request.PutTelephonyProvidersEdgesCertificateauthorityRequest; import com.mypurecloud.sdk.v2.api.request.PutTelephonyProvidersEdgesDidRequest; import com.mypurecloud.sdk.v2.api.request.PutTelephonyProvidersEdgesDidpoolRequest; import com.mypurecloud.sdk.v2.api.request.PutTelephonyProvidersEdgesEdgegroupRequest; import com.mypurecloud.sdk.v2.api.request.PutTelephonyProvidersEdgesEdgegroupEdgetrunkbaseRequest; import com.mypurecloud.sdk.v2.api.request.PutTelephonyProvidersEdgesExtensionRequest; import com.mypurecloud.sdk.v2.api.request.PutTelephonyProvidersEdgesExtensionpoolRequest; import com.mypurecloud.sdk.v2.api.request.PutTelephonyProvidersEdgesOutboundrouteRequest; import com.mypurecloud.sdk.v2.api.request.PutTelephonyProvidersEdgesPhoneRequest; import com.mypurecloud.sdk.v2.api.request.PutTelephonyProvidersEdgesPhonebasesettingRequest; import com.mypurecloud.sdk.v2.api.request.PutTelephonyProvidersEdgesSiteRequest; import com.mypurecloud.sdk.v2.api.request.PutTelephonyProvidersEdgesSiteNumberplansRequest; import com.mypurecloud.sdk.v2.api.request.PutTelephonyProvidersEdgesSiteOutboundrouteRequest; import com.mypurecloud.sdk.v2.api.request.PutTelephonyProvidersEdgesTrunkbasesettingRequest; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; public class TelephonyProvidersEdgeApi { private final ApiClient pcapiClient; public TelephonyProvidersEdgeApi() { this(Configuration.getDefaultApiClient()); } public TelephonyProvidersEdgeApi(ApiClient apiClient) { this.pcapiClient = apiClient; } /** * Delete a edge. * * @param edgeId Edge ID (required) * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public void deleteTelephonyProvidersEdge(String edgeId) throws IOException, ApiException { deleteTelephonyProvidersEdge(createDeleteTelephonyProvidersEdgeRequest(edgeId)); } /** * Delete a edge. * * @param edgeId Edge ID (required) * @throws IOException if the request fails to be processed */ public ApiResponse<Void> deleteTelephonyProvidersEdgeWithHttpInfo(String edgeId) throws IOException { return deleteTelephonyProvidersEdge(createDeleteTelephonyProvidersEdgeRequest(edgeId).withHttpInfo()); } private DeleteTelephonyProvidersEdgeRequest createDeleteTelephonyProvidersEdgeRequest(String edgeId) { return DeleteTelephonyProvidersEdgeRequest.builder() .withEdgeId(edgeId) .build(); } /** * Delete a edge. * * @param request The request object * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public void deleteTelephonyProvidersEdge(DeleteTelephonyProvidersEdgeRequest request) throws IOException, ApiException { try { ApiResponse<Void> response = pcapiClient.invoke(request.withHttpInfo(), null); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; } } /** * Delete a edge. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<Void> deleteTelephonyProvidersEdge(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, null); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<Void> response = (ApiResponse<Void>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<Void> response = (ApiResponse<Void>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Delete an edge logical interface * * @param edgeId Edge ID (required) * @param interfaceId Interface ID (required) * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public void deleteTelephonyProvidersEdgeLogicalinterface(String edgeId, String interfaceId) throws IOException, ApiException { deleteTelephonyProvidersEdgeLogicalinterface(createDeleteTelephonyProvidersEdgeLogicalinterfaceRequest(edgeId, interfaceId)); } /** * Delete an edge logical interface * * @param edgeId Edge ID (required) * @param interfaceId Interface ID (required) * @throws IOException if the request fails to be processed */ public ApiResponse<Void> deleteTelephonyProvidersEdgeLogicalinterfaceWithHttpInfo(String edgeId, String interfaceId) throws IOException { return deleteTelephonyProvidersEdgeLogicalinterface(createDeleteTelephonyProvidersEdgeLogicalinterfaceRequest(edgeId, interfaceId).withHttpInfo()); } private DeleteTelephonyProvidersEdgeLogicalinterfaceRequest createDeleteTelephonyProvidersEdgeLogicalinterfaceRequest(String edgeId, String interfaceId) { return DeleteTelephonyProvidersEdgeLogicalinterfaceRequest.builder() .withEdgeId(edgeId) .withInterfaceId(interfaceId) .build(); } /** * Delete an edge logical interface * * @param request The request object * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public void deleteTelephonyProvidersEdgeLogicalinterface(DeleteTelephonyProvidersEdgeLogicalinterfaceRequest request) throws IOException, ApiException { try { ApiResponse<Void> response = pcapiClient.invoke(request.withHttpInfo(), null); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; } } /** * Delete an edge logical interface * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<Void> deleteTelephonyProvidersEdgeLogicalinterface(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, null); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<Void> response = (ApiResponse<Void>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<Void> response = (ApiResponse<Void>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Cancels any in-progress update for this edge. * * @param edgeId Edge ID (required) * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public void deleteTelephonyProvidersEdgeSoftwareupdate(String edgeId) throws IOException, ApiException { deleteTelephonyProvidersEdgeSoftwareupdate(createDeleteTelephonyProvidersEdgeSoftwareupdateRequest(edgeId)); } /** * Cancels any in-progress update for this edge. * * @param edgeId Edge ID (required) * @throws IOException if the request fails to be processed */ public ApiResponse<Void> deleteTelephonyProvidersEdgeSoftwareupdateWithHttpInfo(String edgeId) throws IOException { return deleteTelephonyProvidersEdgeSoftwareupdate(createDeleteTelephonyProvidersEdgeSoftwareupdateRequest(edgeId).withHttpInfo()); } private DeleteTelephonyProvidersEdgeSoftwareupdateRequest createDeleteTelephonyProvidersEdgeSoftwareupdateRequest(String edgeId) { return DeleteTelephonyProvidersEdgeSoftwareupdateRequest.builder() .withEdgeId(edgeId) .build(); } /** * Cancels any in-progress update for this edge. * * @param request The request object * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public void deleteTelephonyProvidersEdgeSoftwareupdate(DeleteTelephonyProvidersEdgeSoftwareupdateRequest request) throws IOException, ApiException { try { ApiResponse<Void> response = pcapiClient.invoke(request.withHttpInfo(), null); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; } } /** * Cancels any in-progress update for this edge. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<Void> deleteTelephonyProvidersEdgeSoftwareupdate(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, null); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<Void> response = (ApiResponse<Void>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<Void> response = (ApiResponse<Void>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Delete a certificate authority. * * @param certificateId Certificate ID (required) * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public void deleteTelephonyProvidersEdgesCertificateauthority(String certificateId) throws IOException, ApiException { deleteTelephonyProvidersEdgesCertificateauthority(createDeleteTelephonyProvidersEdgesCertificateauthorityRequest(certificateId)); } /** * Delete a certificate authority. * * @param certificateId Certificate ID (required) * @throws IOException if the request fails to be processed */ public ApiResponse<Void> deleteTelephonyProvidersEdgesCertificateauthorityWithHttpInfo(String certificateId) throws IOException { return deleteTelephonyProvidersEdgesCertificateauthority(createDeleteTelephonyProvidersEdgesCertificateauthorityRequest(certificateId).withHttpInfo()); } private DeleteTelephonyProvidersEdgesCertificateauthorityRequest createDeleteTelephonyProvidersEdgesCertificateauthorityRequest(String certificateId) { return DeleteTelephonyProvidersEdgesCertificateauthorityRequest.builder() .withCertificateId(certificateId) .build(); } /** * Delete a certificate authority. * * @param request The request object * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public void deleteTelephonyProvidersEdgesCertificateauthority(DeleteTelephonyProvidersEdgesCertificateauthorityRequest request) throws IOException, ApiException { try { ApiResponse<Void> response = pcapiClient.invoke(request.withHttpInfo(), null); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; } } /** * Delete a certificate authority. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<Void> deleteTelephonyProvidersEdgesCertificateauthority(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, null); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<Void> response = (ApiResponse<Void>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<Void> response = (ApiResponse<Void>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Delete a DID Pool by ID. * * @param didPoolId DID pool ID (required) * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public void deleteTelephonyProvidersEdgesDidpool(String didPoolId) throws IOException, ApiException { deleteTelephonyProvidersEdgesDidpool(createDeleteTelephonyProvidersEdgesDidpoolRequest(didPoolId)); } /** * Delete a DID Pool by ID. * * @param didPoolId DID pool ID (required) * @throws IOException if the request fails to be processed */ public ApiResponse<Void> deleteTelephonyProvidersEdgesDidpoolWithHttpInfo(String didPoolId) throws IOException { return deleteTelephonyProvidersEdgesDidpool(createDeleteTelephonyProvidersEdgesDidpoolRequest(didPoolId).withHttpInfo()); } private DeleteTelephonyProvidersEdgesDidpoolRequest createDeleteTelephonyProvidersEdgesDidpoolRequest(String didPoolId) { return DeleteTelephonyProvidersEdgesDidpoolRequest.builder() .withDidPoolId(didPoolId) .build(); } /** * Delete a DID Pool by ID. * * @param request The request object * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public void deleteTelephonyProvidersEdgesDidpool(DeleteTelephonyProvidersEdgesDidpoolRequest request) throws IOException, ApiException { try { ApiResponse<Void> response = pcapiClient.invoke(request.withHttpInfo(), null); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; } } /** * Delete a DID Pool by ID. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<Void> deleteTelephonyProvidersEdgesDidpool(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, null); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<Void> response = (ApiResponse<Void>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<Void> response = (ApiResponse<Void>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Delete an edge group. * * @param edgeGroupId Edge group ID (required) * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public void deleteTelephonyProvidersEdgesEdgegroup(String edgeGroupId) throws IOException, ApiException { deleteTelephonyProvidersEdgesEdgegroup(createDeleteTelephonyProvidersEdgesEdgegroupRequest(edgeGroupId)); } /** * Delete an edge group. * * @param edgeGroupId Edge group ID (required) * @throws IOException if the request fails to be processed */ public ApiResponse<Void> deleteTelephonyProvidersEdgesEdgegroupWithHttpInfo(String edgeGroupId) throws IOException { return deleteTelephonyProvidersEdgesEdgegroup(createDeleteTelephonyProvidersEdgesEdgegroupRequest(edgeGroupId).withHttpInfo()); } private DeleteTelephonyProvidersEdgesEdgegroupRequest createDeleteTelephonyProvidersEdgesEdgegroupRequest(String edgeGroupId) { return DeleteTelephonyProvidersEdgesEdgegroupRequest.builder() .withEdgeGroupId(edgeGroupId) .build(); } /** * Delete an edge group. * * @param request The request object * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public void deleteTelephonyProvidersEdgesEdgegroup(DeleteTelephonyProvidersEdgesEdgegroupRequest request) throws IOException, ApiException { try { ApiResponse<Void> response = pcapiClient.invoke(request.withHttpInfo(), null); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; } } /** * Delete an edge group. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<Void> deleteTelephonyProvidersEdgesEdgegroup(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, null); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<Void> response = (ApiResponse<Void>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<Void> response = (ApiResponse<Void>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Delete an extension pool by ID * * @param extensionPoolId Extension pool ID (required) * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public void deleteTelephonyProvidersEdgesExtensionpool(String extensionPoolId) throws IOException, ApiException { deleteTelephonyProvidersEdgesExtensionpool(createDeleteTelephonyProvidersEdgesExtensionpoolRequest(extensionPoolId)); } /** * Delete an extension pool by ID * * @param extensionPoolId Extension pool ID (required) * @throws IOException if the request fails to be processed */ public ApiResponse<Void> deleteTelephonyProvidersEdgesExtensionpoolWithHttpInfo(String extensionPoolId) throws IOException { return deleteTelephonyProvidersEdgesExtensionpool(createDeleteTelephonyProvidersEdgesExtensionpoolRequest(extensionPoolId).withHttpInfo()); } private DeleteTelephonyProvidersEdgesExtensionpoolRequest createDeleteTelephonyProvidersEdgesExtensionpoolRequest(String extensionPoolId) { return DeleteTelephonyProvidersEdgesExtensionpoolRequest.builder() .withExtensionPoolId(extensionPoolId) .build(); } /** * Delete an extension pool by ID * * @param request The request object * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public void deleteTelephonyProvidersEdgesExtensionpool(DeleteTelephonyProvidersEdgesExtensionpoolRequest request) throws IOException, ApiException { try { ApiResponse<Void> response = pcapiClient.invoke(request.withHttpInfo(), null); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; } } /** * Delete an extension pool by ID * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<Void> deleteTelephonyProvidersEdgesExtensionpool(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, null); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<Void> response = (ApiResponse<Void>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<Void> response = (ApiResponse<Void>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Delete Outbound Route * * @param outboundRouteId Outbound route ID (required) * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public void deleteTelephonyProvidersEdgesOutboundroute(String outboundRouteId) throws IOException, ApiException { deleteTelephonyProvidersEdgesOutboundroute(createDeleteTelephonyProvidersEdgesOutboundrouteRequest(outboundRouteId)); } /** * Delete Outbound Route * * @param outboundRouteId Outbound route ID (required) * @throws IOException if the request fails to be processed */ public ApiResponse<Void> deleteTelephonyProvidersEdgesOutboundrouteWithHttpInfo(String outboundRouteId) throws IOException { return deleteTelephonyProvidersEdgesOutboundroute(createDeleteTelephonyProvidersEdgesOutboundrouteRequest(outboundRouteId).withHttpInfo()); } private DeleteTelephonyProvidersEdgesOutboundrouteRequest createDeleteTelephonyProvidersEdgesOutboundrouteRequest(String outboundRouteId) { return DeleteTelephonyProvidersEdgesOutboundrouteRequest.builder() .withOutboundRouteId(outboundRouteId) .build(); } /** * Delete Outbound Route * * @param request The request object * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public void deleteTelephonyProvidersEdgesOutboundroute(DeleteTelephonyProvidersEdgesOutboundrouteRequest request) throws IOException, ApiException { try { ApiResponse<Void> response = pcapiClient.invoke(request.withHttpInfo(), null); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; } } /** * Delete Outbound Route * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<Void> deleteTelephonyProvidersEdgesOutboundroute(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, null); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<Void> response = (ApiResponse<Void>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<Void> response = (ApiResponse<Void>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Delete a Phone by ID * * @param phoneId Phone ID (required) * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public void deleteTelephonyProvidersEdgesPhone(String phoneId) throws IOException, ApiException { deleteTelephonyProvidersEdgesPhone(createDeleteTelephonyProvidersEdgesPhoneRequest(phoneId)); } /** * Delete a Phone by ID * * @param phoneId Phone ID (required) * @throws IOException if the request fails to be processed */ public ApiResponse<Void> deleteTelephonyProvidersEdgesPhoneWithHttpInfo(String phoneId) throws IOException { return deleteTelephonyProvidersEdgesPhone(createDeleteTelephonyProvidersEdgesPhoneRequest(phoneId).withHttpInfo()); } private DeleteTelephonyProvidersEdgesPhoneRequest createDeleteTelephonyProvidersEdgesPhoneRequest(String phoneId) { return DeleteTelephonyProvidersEdgesPhoneRequest.builder() .withPhoneId(phoneId) .build(); } /** * Delete a Phone by ID * * @param request The request object * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public void deleteTelephonyProvidersEdgesPhone(DeleteTelephonyProvidersEdgesPhoneRequest request) throws IOException, ApiException { try { ApiResponse<Void> response = pcapiClient.invoke(request.withHttpInfo(), null); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; } } /** * Delete a Phone by ID * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<Void> deleteTelephonyProvidersEdgesPhone(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, null); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<Void> response = (ApiResponse<Void>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<Void> response = (ApiResponse<Void>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Delete a Phone Base Settings by ID * * @param phoneBaseId Phone base ID (required) * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public void deleteTelephonyProvidersEdgesPhonebasesetting(String phoneBaseId) throws IOException, ApiException { deleteTelephonyProvidersEdgesPhonebasesetting(createDeleteTelephonyProvidersEdgesPhonebasesettingRequest(phoneBaseId)); } /** * Delete a Phone Base Settings by ID * * @param phoneBaseId Phone base ID (required) * @throws IOException if the request fails to be processed */ public ApiResponse<Void> deleteTelephonyProvidersEdgesPhonebasesettingWithHttpInfo(String phoneBaseId) throws IOException { return deleteTelephonyProvidersEdgesPhonebasesetting(createDeleteTelephonyProvidersEdgesPhonebasesettingRequest(phoneBaseId).withHttpInfo()); } private DeleteTelephonyProvidersEdgesPhonebasesettingRequest createDeleteTelephonyProvidersEdgesPhonebasesettingRequest(String phoneBaseId) { return DeleteTelephonyProvidersEdgesPhonebasesettingRequest.builder() .withPhoneBaseId(phoneBaseId) .build(); } /** * Delete a Phone Base Settings by ID * * @param request The request object * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public void deleteTelephonyProvidersEdgesPhonebasesetting(DeleteTelephonyProvidersEdgesPhonebasesettingRequest request) throws IOException, ApiException { try { ApiResponse<Void> response = pcapiClient.invoke(request.withHttpInfo(), null); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; } } /** * Delete a Phone Base Settings by ID * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<Void> deleteTelephonyProvidersEdgesPhonebasesetting(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, null); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<Void> response = (ApiResponse<Void>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<Void> response = (ApiResponse<Void>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Delete a Site by ID * * @param siteId Site ID (required) * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public void deleteTelephonyProvidersEdgesSite(String siteId) throws IOException, ApiException { deleteTelephonyProvidersEdgesSite(createDeleteTelephonyProvidersEdgesSiteRequest(siteId)); } /** * Delete a Site by ID * * @param siteId Site ID (required) * @throws IOException if the request fails to be processed */ public ApiResponse<Void> deleteTelephonyProvidersEdgesSiteWithHttpInfo(String siteId) throws IOException { return deleteTelephonyProvidersEdgesSite(createDeleteTelephonyProvidersEdgesSiteRequest(siteId).withHttpInfo()); } private DeleteTelephonyProvidersEdgesSiteRequest createDeleteTelephonyProvidersEdgesSiteRequest(String siteId) { return DeleteTelephonyProvidersEdgesSiteRequest.builder() .withSiteId(siteId) .build(); } /** * Delete a Site by ID * * @param request The request object * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public void deleteTelephonyProvidersEdgesSite(DeleteTelephonyProvidersEdgesSiteRequest request) throws IOException, ApiException { try { ApiResponse<Void> response = pcapiClient.invoke(request.withHttpInfo(), null); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; } } /** * Delete a Site by ID * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<Void> deleteTelephonyProvidersEdgesSite(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, null); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<Void> response = (ApiResponse<Void>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<Void> response = (ApiResponse<Void>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Delete Outbound Route * * @param siteId Site ID (required) * @param outboundRouteId Outbound route ID (required) * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public void deleteTelephonyProvidersEdgesSiteOutboundroute(String siteId, String outboundRouteId) throws IOException, ApiException { deleteTelephonyProvidersEdgesSiteOutboundroute(createDeleteTelephonyProvidersEdgesSiteOutboundrouteRequest(siteId, outboundRouteId)); } /** * Delete Outbound Route * * @param siteId Site ID (required) * @param outboundRouteId Outbound route ID (required) * @throws IOException if the request fails to be processed */ public ApiResponse<Void> deleteTelephonyProvidersEdgesSiteOutboundrouteWithHttpInfo(String siteId, String outboundRouteId) throws IOException { return deleteTelephonyProvidersEdgesSiteOutboundroute(createDeleteTelephonyProvidersEdgesSiteOutboundrouteRequest(siteId, outboundRouteId).withHttpInfo()); } private DeleteTelephonyProvidersEdgesSiteOutboundrouteRequest createDeleteTelephonyProvidersEdgesSiteOutboundrouteRequest(String siteId, String outboundRouteId) { return DeleteTelephonyProvidersEdgesSiteOutboundrouteRequest.builder() .withSiteId(siteId) .withOutboundRouteId(outboundRouteId) .build(); } /** * Delete Outbound Route * * @param request The request object * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public void deleteTelephonyProvidersEdgesSiteOutboundroute(DeleteTelephonyProvidersEdgesSiteOutboundrouteRequest request) throws IOException, ApiException { try { ApiResponse<Void> response = pcapiClient.invoke(request.withHttpInfo(), null); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; } } /** * Delete Outbound Route * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<Void> deleteTelephonyProvidersEdgesSiteOutboundroute(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, null); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<Void> response = (ApiResponse<Void>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<Void> response = (ApiResponse<Void>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Delete a Trunk Base Settings object by ID * * @param trunkBaseSettingsId Trunk Base ID (required) * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public void deleteTelephonyProvidersEdgesTrunkbasesetting(String trunkBaseSettingsId) throws IOException, ApiException { deleteTelephonyProvidersEdgesTrunkbasesetting(createDeleteTelephonyProvidersEdgesTrunkbasesettingRequest(trunkBaseSettingsId)); } /** * Delete a Trunk Base Settings object by ID * * @param trunkBaseSettingsId Trunk Base ID (required) * @throws IOException if the request fails to be processed */ public ApiResponse<Void> deleteTelephonyProvidersEdgesTrunkbasesettingWithHttpInfo(String trunkBaseSettingsId) throws IOException { return deleteTelephonyProvidersEdgesTrunkbasesetting(createDeleteTelephonyProvidersEdgesTrunkbasesettingRequest(trunkBaseSettingsId).withHttpInfo()); } private DeleteTelephonyProvidersEdgesTrunkbasesettingRequest createDeleteTelephonyProvidersEdgesTrunkbasesettingRequest(String trunkBaseSettingsId) { return DeleteTelephonyProvidersEdgesTrunkbasesettingRequest.builder() .withTrunkBaseSettingsId(trunkBaseSettingsId) .build(); } /** * Delete a Trunk Base Settings object by ID * * @param request The request object * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public void deleteTelephonyProvidersEdgesTrunkbasesetting(DeleteTelephonyProvidersEdgesTrunkbasesettingRequest request) throws IOException, ApiException { try { ApiResponse<Void> response = pcapiClient.invoke(request.withHttpInfo(), null); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; } } /** * Delete a Trunk Base Settings object by ID * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<Void> deleteTelephonyProvidersEdgesTrunkbasesetting(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, null); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<Void> response = (ApiResponse<Void>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<Void> response = (ApiResponse<Void>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Lists available schema categories (Deprecated) * * @param pageSize Page size (optional, default to 25) * @param pageNumber Page number (optional, default to 1) * @return SchemaCategoryEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public SchemaCategoryEntityListing getConfigurationSchemasEdgesVnext(Integer pageSize, Integer pageNumber) throws IOException, ApiException { return getConfigurationSchemasEdgesVnext(createGetConfigurationSchemasEdgesVnextRequest(pageSize, pageNumber)); } /** * Lists available schema categories (Deprecated) * * @param pageSize Page size (optional, default to 25) * @param pageNumber Page number (optional, default to 1) * @return SchemaCategoryEntityListing * @throws IOException if the request fails to be processed */ public ApiResponse<SchemaCategoryEntityListing> getConfigurationSchemasEdgesVnextWithHttpInfo(Integer pageSize, Integer pageNumber) throws IOException { return getConfigurationSchemasEdgesVnext(createGetConfigurationSchemasEdgesVnextRequest(pageSize, pageNumber).withHttpInfo()); } private GetConfigurationSchemasEdgesVnextRequest createGetConfigurationSchemasEdgesVnextRequest(Integer pageSize, Integer pageNumber) { return GetConfigurationSchemasEdgesVnextRequest.builder() .withPageSize(pageSize) .withPageNumber(pageNumber) .build(); } /** * Lists available schema categories (Deprecated) * * @param request The request object * @return SchemaCategoryEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public SchemaCategoryEntityListing getConfigurationSchemasEdgesVnext(GetConfigurationSchemasEdgesVnextRequest request) throws IOException, ApiException { try { ApiResponse<SchemaCategoryEntityListing> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<SchemaCategoryEntityListing>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Lists available schema categories (Deprecated) * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<SchemaCategoryEntityListing> getConfigurationSchemasEdgesVnext(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<SchemaCategoryEntityListing>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<SchemaCategoryEntityListing> response = (ApiResponse<SchemaCategoryEntityListing>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<SchemaCategoryEntityListing> response = (ApiResponse<SchemaCategoryEntityListing>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * List schemas of a specific category (Deprecated) * * @param schemaCategory Schema category (required) * @param pageSize Page size (optional, default to 25) * @param pageNumber Page number (optional, default to 1) * @return SchemaReferenceEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public SchemaReferenceEntityListing getConfigurationSchemasEdgesVnextSchemaCategory(String schemaCategory, Integer pageSize, Integer pageNumber) throws IOException, ApiException { return getConfigurationSchemasEdgesVnextSchemaCategory(createGetConfigurationSchemasEdgesVnextSchemaCategoryRequest(schemaCategory, pageSize, pageNumber)); } /** * List schemas of a specific category (Deprecated) * * @param schemaCategory Schema category (required) * @param pageSize Page size (optional, default to 25) * @param pageNumber Page number (optional, default to 1) * @return SchemaReferenceEntityListing * @throws IOException if the request fails to be processed */ public ApiResponse<SchemaReferenceEntityListing> getConfigurationSchemasEdgesVnextSchemaCategoryWithHttpInfo(String schemaCategory, Integer pageSize, Integer pageNumber) throws IOException { return getConfigurationSchemasEdgesVnextSchemaCategory(createGetConfigurationSchemasEdgesVnextSchemaCategoryRequest(schemaCategory, pageSize, pageNumber).withHttpInfo()); } private GetConfigurationSchemasEdgesVnextSchemaCategoryRequest createGetConfigurationSchemasEdgesVnextSchemaCategoryRequest(String schemaCategory, Integer pageSize, Integer pageNumber) { return GetConfigurationSchemasEdgesVnextSchemaCategoryRequest.builder() .withSchemaCategory(schemaCategory) .withPageSize(pageSize) .withPageNumber(pageNumber) .build(); } /** * List schemas of a specific category (Deprecated) * * @param request The request object * @return SchemaReferenceEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public SchemaReferenceEntityListing getConfigurationSchemasEdgesVnextSchemaCategory(GetConfigurationSchemasEdgesVnextSchemaCategoryRequest request) throws IOException, ApiException { try { ApiResponse<SchemaReferenceEntityListing> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<SchemaReferenceEntityListing>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * List schemas of a specific category (Deprecated) * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<SchemaReferenceEntityListing> getConfigurationSchemasEdgesVnextSchemaCategory(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<SchemaReferenceEntityListing>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<SchemaReferenceEntityListing> response = (ApiResponse<SchemaReferenceEntityListing>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<SchemaReferenceEntityListing> response = (ApiResponse<SchemaReferenceEntityListing>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * List schemas of a specific category (Deprecated) * * @param schemaCategory Schema category (required) * @param schemaType Schema type (required) * @param pageSize Page size (optional, default to 25) * @param pageNumber Page number (optional, default to 1) * @return SchemaReferenceEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public SchemaReferenceEntityListing getConfigurationSchemasEdgesVnextSchemaCategorySchemaType(String schemaCategory, String schemaType, Integer pageSize, Integer pageNumber) throws IOException, ApiException { return getConfigurationSchemasEdgesVnextSchemaCategorySchemaType(createGetConfigurationSchemasEdgesVnextSchemaCategorySchemaTypeRequest(schemaCategory, schemaType, pageSize, pageNumber)); } /** * List schemas of a specific category (Deprecated) * * @param schemaCategory Schema category (required) * @param schemaType Schema type (required) * @param pageSize Page size (optional, default to 25) * @param pageNumber Page number (optional, default to 1) * @return SchemaReferenceEntityListing * @throws IOException if the request fails to be processed */ public ApiResponse<SchemaReferenceEntityListing> getConfigurationSchemasEdgesVnextSchemaCategorySchemaTypeWithHttpInfo(String schemaCategory, String schemaType, Integer pageSize, Integer pageNumber) throws IOException { return getConfigurationSchemasEdgesVnextSchemaCategorySchemaType(createGetConfigurationSchemasEdgesVnextSchemaCategorySchemaTypeRequest(schemaCategory, schemaType, pageSize, pageNumber).withHttpInfo()); } private GetConfigurationSchemasEdgesVnextSchemaCategorySchemaTypeRequest createGetConfigurationSchemasEdgesVnextSchemaCategorySchemaTypeRequest(String schemaCategory, String schemaType, Integer pageSize, Integer pageNumber) { return GetConfigurationSchemasEdgesVnextSchemaCategorySchemaTypeRequest.builder() .withSchemaCategory(schemaCategory) .withSchemaType(schemaType) .withPageSize(pageSize) .withPageNumber(pageNumber) .build(); } /** * List schemas of a specific category (Deprecated) * * @param request The request object * @return SchemaReferenceEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public SchemaReferenceEntityListing getConfigurationSchemasEdgesVnextSchemaCategorySchemaType(GetConfigurationSchemasEdgesVnextSchemaCategorySchemaTypeRequest request) throws IOException, ApiException { try { ApiResponse<SchemaReferenceEntityListing> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<SchemaReferenceEntityListing>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * List schemas of a specific category (Deprecated) * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<SchemaReferenceEntityListing> getConfigurationSchemasEdgesVnextSchemaCategorySchemaType(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<SchemaReferenceEntityListing>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<SchemaReferenceEntityListing> response = (ApiResponse<SchemaReferenceEntityListing>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<SchemaReferenceEntityListing> response = (ApiResponse<SchemaReferenceEntityListing>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get a json schema (Deprecated) * * @param schemaCategory Schema category (required) * @param schemaType Schema type (required) * @param schemaId Schema ID (required) * @return Organization * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public Organization getConfigurationSchemasEdgesVnextSchemaCategorySchemaTypeSchemaId(String schemaCategory, String schemaType, String schemaId) throws IOException, ApiException { return getConfigurationSchemasEdgesVnextSchemaCategorySchemaTypeSchemaId(createGetConfigurationSchemasEdgesVnextSchemaCategorySchemaTypeSchemaIdRequest(schemaCategory, schemaType, schemaId)); } /** * Get a json schema (Deprecated) * * @param schemaCategory Schema category (required) * @param schemaType Schema type (required) * @param schemaId Schema ID (required) * @return Organization * @throws IOException if the request fails to be processed */ public ApiResponse<Organization> getConfigurationSchemasEdgesVnextSchemaCategorySchemaTypeSchemaIdWithHttpInfo(String schemaCategory, String schemaType, String schemaId) throws IOException { return getConfigurationSchemasEdgesVnextSchemaCategorySchemaTypeSchemaId(createGetConfigurationSchemasEdgesVnextSchemaCategorySchemaTypeSchemaIdRequest(schemaCategory, schemaType, schemaId).withHttpInfo()); } private GetConfigurationSchemasEdgesVnextSchemaCategorySchemaTypeSchemaIdRequest createGetConfigurationSchemasEdgesVnextSchemaCategorySchemaTypeSchemaIdRequest(String schemaCategory, String schemaType, String schemaId) { return GetConfigurationSchemasEdgesVnextSchemaCategorySchemaTypeSchemaIdRequest.builder() .withSchemaCategory(schemaCategory) .withSchemaType(schemaType) .withSchemaId(schemaId) .build(); } /** * Get a json schema (Deprecated) * * @param request The request object * @return Organization * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public Organization getConfigurationSchemasEdgesVnextSchemaCategorySchemaTypeSchemaId(GetConfigurationSchemasEdgesVnextSchemaCategorySchemaTypeSchemaIdRequest request) throws IOException, ApiException { try { ApiResponse<Organization> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<Organization>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get a json schema (Deprecated) * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<Organization> getConfigurationSchemasEdgesVnextSchemaCategorySchemaTypeSchemaId(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<Organization>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<Organization> response = (ApiResponse<Organization>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<Organization> response = (ApiResponse<Organization>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get metadata for a schema (Deprecated) * * @param schemaCategory Schema category (required) * @param schemaType Schema type (required) * @param schemaId Schema ID (required) * @param extensionType extension (required) * @param metadataId Metadata ID (required) * @param type Type (optional) * @return Organization * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public Organization getConfigurationSchemasEdgesVnextSchemaCategorySchemaTypeSchemaIdExtensionTypeMetadataId(String schemaCategory, String schemaType, String schemaId, String extensionType, String metadataId, String type) throws IOException, ApiException { return getConfigurationSchemasEdgesVnextSchemaCategorySchemaTypeSchemaIdExtensionTypeMetadataId(createGetConfigurationSchemasEdgesVnextSchemaCategorySchemaTypeSchemaIdExtensionTypeMetadataIdRequest(schemaCategory, schemaType, schemaId, extensionType, metadataId, type)); } /** * Get metadata for a schema (Deprecated) * * @param schemaCategory Schema category (required) * @param schemaType Schema type (required) * @param schemaId Schema ID (required) * @param extensionType extension (required) * @param metadataId Metadata ID (required) * @param type Type (optional) * @return Organization * @throws IOException if the request fails to be processed */ public ApiResponse<Organization> getConfigurationSchemasEdgesVnextSchemaCategorySchemaTypeSchemaIdExtensionTypeMetadataIdWithHttpInfo(String schemaCategory, String schemaType, String schemaId, String extensionType, String metadataId, String type) throws IOException { return getConfigurationSchemasEdgesVnextSchemaCategorySchemaTypeSchemaIdExtensionTypeMetadataId(createGetConfigurationSchemasEdgesVnextSchemaCategorySchemaTypeSchemaIdExtensionTypeMetadataIdRequest(schemaCategory, schemaType, schemaId, extensionType, metadataId, type).withHttpInfo()); } private GetConfigurationSchemasEdgesVnextSchemaCategorySchemaTypeSchemaIdExtensionTypeMetadataIdRequest createGetConfigurationSchemasEdgesVnextSchemaCategorySchemaTypeSchemaIdExtensionTypeMetadataIdRequest(String schemaCategory, String schemaType, String schemaId, String extensionType, String metadataId, String type) { return GetConfigurationSchemasEdgesVnextSchemaCategorySchemaTypeSchemaIdExtensionTypeMetadataIdRequest.builder() .withSchemaCategory(schemaCategory) .withSchemaType(schemaType) .withSchemaId(schemaId) .withExtensionType(extensionType) .withMetadataId(metadataId) .withType(type) .build(); } /** * Get metadata for a schema (Deprecated) * * @param request The request object * @return Organization * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public Organization getConfigurationSchemasEdgesVnextSchemaCategorySchemaTypeSchemaIdExtensionTypeMetadataId(GetConfigurationSchemasEdgesVnextSchemaCategorySchemaTypeSchemaIdExtensionTypeMetadataIdRequest request) throws IOException, ApiException { try { ApiResponse<Organization> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<Organization>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get metadata for a schema (Deprecated) * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<Organization> getConfigurationSchemasEdgesVnextSchemaCategorySchemaTypeSchemaIdExtensionTypeMetadataId(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<Organization>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<Organization> response = (ApiResponse<Organization>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<Organization> response = (ApiResponse<Organization>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get edge. * * @param edgeId Edge ID (required) * @param expand Fields to expand in the response, comma-separated (optional) * @return Edge * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public Edge getTelephonyProvidersEdge(String edgeId, List<String> expand) throws IOException, ApiException { return getTelephonyProvidersEdge(createGetTelephonyProvidersEdgeRequest(edgeId, expand)); } /** * Get edge. * * @param edgeId Edge ID (required) * @param expand Fields to expand in the response, comma-separated (optional) * @return Edge * @throws IOException if the request fails to be processed */ public ApiResponse<Edge> getTelephonyProvidersEdgeWithHttpInfo(String edgeId, List<String> expand) throws IOException { return getTelephonyProvidersEdge(createGetTelephonyProvidersEdgeRequest(edgeId, expand).withHttpInfo()); } private GetTelephonyProvidersEdgeRequest createGetTelephonyProvidersEdgeRequest(String edgeId, List<String> expand) { return GetTelephonyProvidersEdgeRequest.builder() .withEdgeId(edgeId) .withExpand(expand) .build(); } /** * Get edge. * * @param request The request object * @return Edge * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public Edge getTelephonyProvidersEdge(GetTelephonyProvidersEdgeRequest request) throws IOException, ApiException { try { ApiResponse<Edge> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<Edge>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get edge. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<Edge> getTelephonyProvidersEdge(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<Edge>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<Edge> response = (ApiResponse<Edge>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<Edge> response = (ApiResponse<Edge>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get networking-related information from an Edge for a target IP or host. * * @param edgeId Edge Id (required) * @return EdgeNetworkDiagnosticResponse * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeNetworkDiagnosticResponse getTelephonyProvidersEdgeDiagnosticNslookup(String edgeId) throws IOException, ApiException { return getTelephonyProvidersEdgeDiagnosticNslookup(createGetTelephonyProvidersEdgeDiagnosticNslookupRequest(edgeId)); } /** * Get networking-related information from an Edge for a target IP or host. * * @param edgeId Edge Id (required) * @return EdgeNetworkDiagnosticResponse * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeNetworkDiagnosticResponse> getTelephonyProvidersEdgeDiagnosticNslookupWithHttpInfo(String edgeId) throws IOException { return getTelephonyProvidersEdgeDiagnosticNslookup(createGetTelephonyProvidersEdgeDiagnosticNslookupRequest(edgeId).withHttpInfo()); } private GetTelephonyProvidersEdgeDiagnosticNslookupRequest createGetTelephonyProvidersEdgeDiagnosticNslookupRequest(String edgeId) { return GetTelephonyProvidersEdgeDiagnosticNslookupRequest.builder() .withEdgeId(edgeId) .build(); } /** * Get networking-related information from an Edge for a target IP or host. * * @param request The request object * @return EdgeNetworkDiagnosticResponse * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeNetworkDiagnosticResponse getTelephonyProvidersEdgeDiagnosticNslookup(GetTelephonyProvidersEdgeDiagnosticNslookupRequest request) throws IOException, ApiException { try { ApiResponse<EdgeNetworkDiagnosticResponse> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<EdgeNetworkDiagnosticResponse>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get networking-related information from an Edge for a target IP or host. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeNetworkDiagnosticResponse> getTelephonyProvidersEdgeDiagnosticNslookup(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<EdgeNetworkDiagnosticResponse>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<EdgeNetworkDiagnosticResponse> response = (ApiResponse<EdgeNetworkDiagnosticResponse>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<EdgeNetworkDiagnosticResponse> response = (ApiResponse<EdgeNetworkDiagnosticResponse>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get networking-related information from an Edge for a target IP or host. * * @param edgeId Edge Id (required) * @return EdgeNetworkDiagnosticResponse * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeNetworkDiagnosticResponse getTelephonyProvidersEdgeDiagnosticPing(String edgeId) throws IOException, ApiException { return getTelephonyProvidersEdgeDiagnosticPing(createGetTelephonyProvidersEdgeDiagnosticPingRequest(edgeId)); } /** * Get networking-related information from an Edge for a target IP or host. * * @param edgeId Edge Id (required) * @return EdgeNetworkDiagnosticResponse * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeNetworkDiagnosticResponse> getTelephonyProvidersEdgeDiagnosticPingWithHttpInfo(String edgeId) throws IOException { return getTelephonyProvidersEdgeDiagnosticPing(createGetTelephonyProvidersEdgeDiagnosticPingRequest(edgeId).withHttpInfo()); } private GetTelephonyProvidersEdgeDiagnosticPingRequest createGetTelephonyProvidersEdgeDiagnosticPingRequest(String edgeId) { return GetTelephonyProvidersEdgeDiagnosticPingRequest.builder() .withEdgeId(edgeId) .build(); } /** * Get networking-related information from an Edge for a target IP or host. * * @param request The request object * @return EdgeNetworkDiagnosticResponse * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeNetworkDiagnosticResponse getTelephonyProvidersEdgeDiagnosticPing(GetTelephonyProvidersEdgeDiagnosticPingRequest request) throws IOException, ApiException { try { ApiResponse<EdgeNetworkDiagnosticResponse> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<EdgeNetworkDiagnosticResponse>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get networking-related information from an Edge for a target IP or host. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeNetworkDiagnosticResponse> getTelephonyProvidersEdgeDiagnosticPing(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<EdgeNetworkDiagnosticResponse>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<EdgeNetworkDiagnosticResponse> response = (ApiResponse<EdgeNetworkDiagnosticResponse>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<EdgeNetworkDiagnosticResponse> response = (ApiResponse<EdgeNetworkDiagnosticResponse>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get networking-related information from an Edge for a target IP or host. * * @param edgeId Edge Id (required) * @return EdgeNetworkDiagnosticResponse * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeNetworkDiagnosticResponse getTelephonyProvidersEdgeDiagnosticRoute(String edgeId) throws IOException, ApiException { return getTelephonyProvidersEdgeDiagnosticRoute(createGetTelephonyProvidersEdgeDiagnosticRouteRequest(edgeId)); } /** * Get networking-related information from an Edge for a target IP or host. * * @param edgeId Edge Id (required) * @return EdgeNetworkDiagnosticResponse * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeNetworkDiagnosticResponse> getTelephonyProvidersEdgeDiagnosticRouteWithHttpInfo(String edgeId) throws IOException { return getTelephonyProvidersEdgeDiagnosticRoute(createGetTelephonyProvidersEdgeDiagnosticRouteRequest(edgeId).withHttpInfo()); } private GetTelephonyProvidersEdgeDiagnosticRouteRequest createGetTelephonyProvidersEdgeDiagnosticRouteRequest(String edgeId) { return GetTelephonyProvidersEdgeDiagnosticRouteRequest.builder() .withEdgeId(edgeId) .build(); } /** * Get networking-related information from an Edge for a target IP or host. * * @param request The request object * @return EdgeNetworkDiagnosticResponse * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeNetworkDiagnosticResponse getTelephonyProvidersEdgeDiagnosticRoute(GetTelephonyProvidersEdgeDiagnosticRouteRequest request) throws IOException, ApiException { try { ApiResponse<EdgeNetworkDiagnosticResponse> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<EdgeNetworkDiagnosticResponse>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get networking-related information from an Edge for a target IP or host. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeNetworkDiagnosticResponse> getTelephonyProvidersEdgeDiagnosticRoute(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<EdgeNetworkDiagnosticResponse>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<EdgeNetworkDiagnosticResponse> response = (ApiResponse<EdgeNetworkDiagnosticResponse>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<EdgeNetworkDiagnosticResponse> response = (ApiResponse<EdgeNetworkDiagnosticResponse>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get networking-related information from an Edge for a target IP or host. * * @param edgeId Edge Id (required) * @return EdgeNetworkDiagnosticResponse * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeNetworkDiagnosticResponse getTelephonyProvidersEdgeDiagnosticTracepath(String edgeId) throws IOException, ApiException { return getTelephonyProvidersEdgeDiagnosticTracepath(createGetTelephonyProvidersEdgeDiagnosticTracepathRequest(edgeId)); } /** * Get networking-related information from an Edge for a target IP or host. * * @param edgeId Edge Id (required) * @return EdgeNetworkDiagnosticResponse * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeNetworkDiagnosticResponse> getTelephonyProvidersEdgeDiagnosticTracepathWithHttpInfo(String edgeId) throws IOException { return getTelephonyProvidersEdgeDiagnosticTracepath(createGetTelephonyProvidersEdgeDiagnosticTracepathRequest(edgeId).withHttpInfo()); } private GetTelephonyProvidersEdgeDiagnosticTracepathRequest createGetTelephonyProvidersEdgeDiagnosticTracepathRequest(String edgeId) { return GetTelephonyProvidersEdgeDiagnosticTracepathRequest.builder() .withEdgeId(edgeId) .build(); } /** * Get networking-related information from an Edge for a target IP or host. * * @param request The request object * @return EdgeNetworkDiagnosticResponse * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeNetworkDiagnosticResponse getTelephonyProvidersEdgeDiagnosticTracepath(GetTelephonyProvidersEdgeDiagnosticTracepathRequest request) throws IOException, ApiException { try { ApiResponse<EdgeNetworkDiagnosticResponse> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<EdgeNetworkDiagnosticResponse>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get networking-related information from an Edge for a target IP or host. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeNetworkDiagnosticResponse> getTelephonyProvidersEdgeDiagnosticTracepath(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<EdgeNetworkDiagnosticResponse>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<EdgeNetworkDiagnosticResponse> response = (ApiResponse<EdgeNetworkDiagnosticResponse>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<EdgeNetworkDiagnosticResponse> response = (ApiResponse<EdgeNetworkDiagnosticResponse>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get line * * @param edgeId Edge ID (required) * @param lineId Line ID (required) * @return EdgeLine * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeLine getTelephonyProvidersEdgeLine(String edgeId, String lineId) throws IOException, ApiException { return getTelephonyProvidersEdgeLine(createGetTelephonyProvidersEdgeLineRequest(edgeId, lineId)); } /** * Get line * * @param edgeId Edge ID (required) * @param lineId Line ID (required) * @return EdgeLine * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeLine> getTelephonyProvidersEdgeLineWithHttpInfo(String edgeId, String lineId) throws IOException { return getTelephonyProvidersEdgeLine(createGetTelephonyProvidersEdgeLineRequest(edgeId, lineId).withHttpInfo()); } private GetTelephonyProvidersEdgeLineRequest createGetTelephonyProvidersEdgeLineRequest(String edgeId, String lineId) { return GetTelephonyProvidersEdgeLineRequest.builder() .withEdgeId(edgeId) .withLineId(lineId) .build(); } /** * Get line * * @param request The request object * @return EdgeLine * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeLine getTelephonyProvidersEdgeLine(GetTelephonyProvidersEdgeLineRequest request) throws IOException, ApiException { try { ApiResponse<EdgeLine> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<EdgeLine>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get line * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeLine> getTelephonyProvidersEdgeLine(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<EdgeLine>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<EdgeLine> response = (ApiResponse<EdgeLine>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<EdgeLine> response = (ApiResponse<EdgeLine>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get the list of lines. * * @param edgeId Edge ID (required) * @param pageSize Page size (optional, default to 25) * @param pageNumber Page number (optional, default to 1) * @return EdgeLineEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeLineEntityListing getTelephonyProvidersEdgeLines(String edgeId, Integer pageSize, Integer pageNumber) throws IOException, ApiException { return getTelephonyProvidersEdgeLines(createGetTelephonyProvidersEdgeLinesRequest(edgeId, pageSize, pageNumber)); } /** * Get the list of lines. * * @param edgeId Edge ID (required) * @param pageSize Page size (optional, default to 25) * @param pageNumber Page number (optional, default to 1) * @return EdgeLineEntityListing * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeLineEntityListing> getTelephonyProvidersEdgeLinesWithHttpInfo(String edgeId, Integer pageSize, Integer pageNumber) throws IOException { return getTelephonyProvidersEdgeLines(createGetTelephonyProvidersEdgeLinesRequest(edgeId, pageSize, pageNumber).withHttpInfo()); } private GetTelephonyProvidersEdgeLinesRequest createGetTelephonyProvidersEdgeLinesRequest(String edgeId, Integer pageSize, Integer pageNumber) { return GetTelephonyProvidersEdgeLinesRequest.builder() .withEdgeId(edgeId) .withPageSize(pageSize) .withPageNumber(pageNumber) .build(); } /** * Get the list of lines. * * @param request The request object * @return EdgeLineEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeLineEntityListing getTelephonyProvidersEdgeLines(GetTelephonyProvidersEdgeLinesRequest request) throws IOException, ApiException { try { ApiResponse<EdgeLineEntityListing> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<EdgeLineEntityListing>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get the list of lines. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeLineEntityListing> getTelephonyProvidersEdgeLines(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<EdgeLineEntityListing>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<EdgeLineEntityListing> response = (ApiResponse<EdgeLineEntityListing>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<EdgeLineEntityListing> response = (ApiResponse<EdgeLineEntityListing>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get an edge logical interface * * @param edgeId Edge ID (required) * @param interfaceId Interface ID (required) * @param expand Field to expand in the response (optional) * @return DomainLogicalInterface * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public DomainLogicalInterface getTelephonyProvidersEdgeLogicalinterface(String edgeId, String interfaceId, List<String> expand) throws IOException, ApiException { return getTelephonyProvidersEdgeLogicalinterface(createGetTelephonyProvidersEdgeLogicalinterfaceRequest(edgeId, interfaceId, expand)); } /** * Get an edge logical interface * * @param edgeId Edge ID (required) * @param interfaceId Interface ID (required) * @param expand Field to expand in the response (optional) * @return DomainLogicalInterface * @throws IOException if the request fails to be processed */ public ApiResponse<DomainLogicalInterface> getTelephonyProvidersEdgeLogicalinterfaceWithHttpInfo(String edgeId, String interfaceId, List<String> expand) throws IOException { return getTelephonyProvidersEdgeLogicalinterface(createGetTelephonyProvidersEdgeLogicalinterfaceRequest(edgeId, interfaceId, expand).withHttpInfo()); } private GetTelephonyProvidersEdgeLogicalinterfaceRequest createGetTelephonyProvidersEdgeLogicalinterfaceRequest(String edgeId, String interfaceId, List<String> expand) { return GetTelephonyProvidersEdgeLogicalinterfaceRequest.builder() .withEdgeId(edgeId) .withInterfaceId(interfaceId) .withExpand(expand) .build(); } /** * Get an edge logical interface * * @param request The request object * @return DomainLogicalInterface * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public DomainLogicalInterface getTelephonyProvidersEdgeLogicalinterface(GetTelephonyProvidersEdgeLogicalinterfaceRequest request) throws IOException, ApiException { try { ApiResponse<DomainLogicalInterface> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<DomainLogicalInterface>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get an edge logical interface * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<DomainLogicalInterface> getTelephonyProvidersEdgeLogicalinterface(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<DomainLogicalInterface>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<DomainLogicalInterface> response = (ApiResponse<DomainLogicalInterface>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<DomainLogicalInterface> response = (ApiResponse<DomainLogicalInterface>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get edge logical interfaces. * Retrieve a list of all configured logical interfaces from a specific edge. * @param edgeId Edge ID (required) * @param expand Field to expand in the response (optional) * @return LogicalInterfaceEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public LogicalInterfaceEntityListing getTelephonyProvidersEdgeLogicalinterfaces(String edgeId, List<String> expand) throws IOException, ApiException { return getTelephonyProvidersEdgeLogicalinterfaces(createGetTelephonyProvidersEdgeLogicalinterfacesRequest(edgeId, expand)); } /** * Get edge logical interfaces. * Retrieve a list of all configured logical interfaces from a specific edge. * @param edgeId Edge ID (required) * @param expand Field to expand in the response (optional) * @return LogicalInterfaceEntityListing * @throws IOException if the request fails to be processed */ public ApiResponse<LogicalInterfaceEntityListing> getTelephonyProvidersEdgeLogicalinterfacesWithHttpInfo(String edgeId, List<String> expand) throws IOException { return getTelephonyProvidersEdgeLogicalinterfaces(createGetTelephonyProvidersEdgeLogicalinterfacesRequest(edgeId, expand).withHttpInfo()); } private GetTelephonyProvidersEdgeLogicalinterfacesRequest createGetTelephonyProvidersEdgeLogicalinterfacesRequest(String edgeId, List<String> expand) { return GetTelephonyProvidersEdgeLogicalinterfacesRequest.builder() .withEdgeId(edgeId) .withExpand(expand) .build(); } /** * Get edge logical interfaces. * Retrieve a list of all configured logical interfaces from a specific edge. * @param request The request object * @return LogicalInterfaceEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public LogicalInterfaceEntityListing getTelephonyProvidersEdgeLogicalinterfaces(GetTelephonyProvidersEdgeLogicalinterfacesRequest request) throws IOException, ApiException { try { ApiResponse<LogicalInterfaceEntityListing> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<LogicalInterfaceEntityListing>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get edge logical interfaces. * Retrieve a list of all configured logical interfaces from a specific edge. * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<LogicalInterfaceEntityListing> getTelephonyProvidersEdgeLogicalinterfaces(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<LogicalInterfaceEntityListing>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<LogicalInterfaceEntityListing> response = (ApiResponse<LogicalInterfaceEntityListing>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<LogicalInterfaceEntityListing> response = (ApiResponse<LogicalInterfaceEntityListing>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get an Edge logs job. * * @param edgeId Edge ID (required) * @param jobId Job ID (required) * @return EdgeLogsJob * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeLogsJob getTelephonyProvidersEdgeLogsJob(String edgeId, String jobId) throws IOException, ApiException { return getTelephonyProvidersEdgeLogsJob(createGetTelephonyProvidersEdgeLogsJobRequest(edgeId, jobId)); } /** * Get an Edge logs job. * * @param edgeId Edge ID (required) * @param jobId Job ID (required) * @return EdgeLogsJob * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeLogsJob> getTelephonyProvidersEdgeLogsJobWithHttpInfo(String edgeId, String jobId) throws IOException { return getTelephonyProvidersEdgeLogsJob(createGetTelephonyProvidersEdgeLogsJobRequest(edgeId, jobId).withHttpInfo()); } private GetTelephonyProvidersEdgeLogsJobRequest createGetTelephonyProvidersEdgeLogsJobRequest(String edgeId, String jobId) { return GetTelephonyProvidersEdgeLogsJobRequest.builder() .withEdgeId(edgeId) .withJobId(jobId) .build(); } /** * Get an Edge logs job. * * @param request The request object * @return EdgeLogsJob * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeLogsJob getTelephonyProvidersEdgeLogsJob(GetTelephonyProvidersEdgeLogsJobRequest request) throws IOException, ApiException { try { ApiResponse<EdgeLogsJob> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<EdgeLogsJob>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get an Edge logs job. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeLogsJob> getTelephonyProvidersEdgeLogsJob(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<EdgeLogsJob>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<EdgeLogsJob> response = (ApiResponse<EdgeLogsJob>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<EdgeLogsJob> response = (ApiResponse<EdgeLogsJob>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get the edge metrics. * * @param edgeId Edge Id (required) * @return EdgeMetrics * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeMetrics getTelephonyProvidersEdgeMetrics(String edgeId) throws IOException, ApiException { return getTelephonyProvidersEdgeMetrics(createGetTelephonyProvidersEdgeMetricsRequest(edgeId)); } /** * Get the edge metrics. * * @param edgeId Edge Id (required) * @return EdgeMetrics * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeMetrics> getTelephonyProvidersEdgeMetricsWithHttpInfo(String edgeId) throws IOException { return getTelephonyProvidersEdgeMetrics(createGetTelephonyProvidersEdgeMetricsRequest(edgeId).withHttpInfo()); } private GetTelephonyProvidersEdgeMetricsRequest createGetTelephonyProvidersEdgeMetricsRequest(String edgeId) { return GetTelephonyProvidersEdgeMetricsRequest.builder() .withEdgeId(edgeId) .build(); } /** * Get the edge metrics. * * @param request The request object * @return EdgeMetrics * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeMetrics getTelephonyProvidersEdgeMetrics(GetTelephonyProvidersEdgeMetricsRequest request) throws IOException, ApiException { try { ApiResponse<EdgeMetrics> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<EdgeMetrics>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get the edge metrics. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeMetrics> getTelephonyProvidersEdgeMetrics(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<EdgeMetrics>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<EdgeMetrics> response = (ApiResponse<EdgeMetrics>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<EdgeMetrics> response = (ApiResponse<EdgeMetrics>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get edge physical interface. * Retrieve a physical interface from a specific edge. * @param edgeId Edge ID (required) * @param interfaceId Interface ID (required) * @return DomainPhysicalInterface * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public DomainPhysicalInterface getTelephonyProvidersEdgePhysicalinterface(String edgeId, String interfaceId) throws IOException, ApiException { return getTelephonyProvidersEdgePhysicalinterface(createGetTelephonyProvidersEdgePhysicalinterfaceRequest(edgeId, interfaceId)); } /** * Get edge physical interface. * Retrieve a physical interface from a specific edge. * @param edgeId Edge ID (required) * @param interfaceId Interface ID (required) * @return DomainPhysicalInterface * @throws IOException if the request fails to be processed */ public ApiResponse<DomainPhysicalInterface> getTelephonyProvidersEdgePhysicalinterfaceWithHttpInfo(String edgeId, String interfaceId) throws IOException { return getTelephonyProvidersEdgePhysicalinterface(createGetTelephonyProvidersEdgePhysicalinterfaceRequest(edgeId, interfaceId).withHttpInfo()); } private GetTelephonyProvidersEdgePhysicalinterfaceRequest createGetTelephonyProvidersEdgePhysicalinterfaceRequest(String edgeId, String interfaceId) { return GetTelephonyProvidersEdgePhysicalinterfaceRequest.builder() .withEdgeId(edgeId) .withInterfaceId(interfaceId) .build(); } /** * Get edge physical interface. * Retrieve a physical interface from a specific edge. * @param request The request object * @return DomainPhysicalInterface * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public DomainPhysicalInterface getTelephonyProvidersEdgePhysicalinterface(GetTelephonyProvidersEdgePhysicalinterfaceRequest request) throws IOException, ApiException { try { ApiResponse<DomainPhysicalInterface> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<DomainPhysicalInterface>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get edge physical interface. * Retrieve a physical interface from a specific edge. * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<DomainPhysicalInterface> getTelephonyProvidersEdgePhysicalinterface(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<DomainPhysicalInterface>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<DomainPhysicalInterface> response = (ApiResponse<DomainPhysicalInterface>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<DomainPhysicalInterface> response = (ApiResponse<DomainPhysicalInterface>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Retrieve a list of all configured physical interfaces from a specific edge. * * @param edgeId Edge ID (required) * @return PhysicalInterfaceEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public PhysicalInterfaceEntityListing getTelephonyProvidersEdgePhysicalinterfaces(String edgeId) throws IOException, ApiException { return getTelephonyProvidersEdgePhysicalinterfaces(createGetTelephonyProvidersEdgePhysicalinterfacesRequest(edgeId)); } /** * Retrieve a list of all configured physical interfaces from a specific edge. * * @param edgeId Edge ID (required) * @return PhysicalInterfaceEntityListing * @throws IOException if the request fails to be processed */ public ApiResponse<PhysicalInterfaceEntityListing> getTelephonyProvidersEdgePhysicalinterfacesWithHttpInfo(String edgeId) throws IOException { return getTelephonyProvidersEdgePhysicalinterfaces(createGetTelephonyProvidersEdgePhysicalinterfacesRequest(edgeId).withHttpInfo()); } private GetTelephonyProvidersEdgePhysicalinterfacesRequest createGetTelephonyProvidersEdgePhysicalinterfacesRequest(String edgeId) { return GetTelephonyProvidersEdgePhysicalinterfacesRequest.builder() .withEdgeId(edgeId) .build(); } /** * Retrieve a list of all configured physical interfaces from a specific edge. * * @param request The request object * @return PhysicalInterfaceEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public PhysicalInterfaceEntityListing getTelephonyProvidersEdgePhysicalinterfaces(GetTelephonyProvidersEdgePhysicalinterfacesRequest request) throws IOException, ApiException { try { ApiResponse<PhysicalInterfaceEntityListing> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<PhysicalInterfaceEntityListing>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Retrieve a list of all configured physical interfaces from a specific edge. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<PhysicalInterfaceEntityListing> getTelephonyProvidersEdgePhysicalinterfaces(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<PhysicalInterfaceEntityListing>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<PhysicalInterfaceEntityListing> response = (ApiResponse<PhysicalInterfaceEntityListing>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<PhysicalInterfaceEntityListing> response = (ApiResponse<PhysicalInterfaceEntityListing>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get the setup package for a locally deployed edge device. This is needed to complete the setup process for the virtual edge. * * @param edgeId Edge ID (required) * @return VmPairingInfo * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public VmPairingInfo getTelephonyProvidersEdgeSetuppackage(String edgeId) throws IOException, ApiException { return getTelephonyProvidersEdgeSetuppackage(createGetTelephonyProvidersEdgeSetuppackageRequest(edgeId)); } /** * Get the setup package for a locally deployed edge device. This is needed to complete the setup process for the virtual edge. * * @param edgeId Edge ID (required) * @return VmPairingInfo * @throws IOException if the request fails to be processed */ public ApiResponse<VmPairingInfo> getTelephonyProvidersEdgeSetuppackageWithHttpInfo(String edgeId) throws IOException { return getTelephonyProvidersEdgeSetuppackage(createGetTelephonyProvidersEdgeSetuppackageRequest(edgeId).withHttpInfo()); } private GetTelephonyProvidersEdgeSetuppackageRequest createGetTelephonyProvidersEdgeSetuppackageRequest(String edgeId) { return GetTelephonyProvidersEdgeSetuppackageRequest.builder() .withEdgeId(edgeId) .build(); } /** * Get the setup package for a locally deployed edge device. This is needed to complete the setup process for the virtual edge. * * @param request The request object * @return VmPairingInfo * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public VmPairingInfo getTelephonyProvidersEdgeSetuppackage(GetTelephonyProvidersEdgeSetuppackageRequest request) throws IOException, ApiException { try { ApiResponse<VmPairingInfo> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<VmPairingInfo>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get the setup package for a locally deployed edge device. This is needed to complete the setup process for the virtual edge. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<VmPairingInfo> getTelephonyProvidersEdgeSetuppackage(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<VmPairingInfo>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<VmPairingInfo> response = (ApiResponse<VmPairingInfo>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<VmPairingInfo> response = (ApiResponse<VmPairingInfo>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Gets software update status information about any edge. * * @param edgeId Edge ID (required) * @return DomainEdgeSoftwareUpdateDto * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public DomainEdgeSoftwareUpdateDto getTelephonyProvidersEdgeSoftwareupdate(String edgeId) throws IOException, ApiException { return getTelephonyProvidersEdgeSoftwareupdate(createGetTelephonyProvidersEdgeSoftwareupdateRequest(edgeId)); } /** * Gets software update status information about any edge. * * @param edgeId Edge ID (required) * @return DomainEdgeSoftwareUpdateDto * @throws IOException if the request fails to be processed */ public ApiResponse<DomainEdgeSoftwareUpdateDto> getTelephonyProvidersEdgeSoftwareupdateWithHttpInfo(String edgeId) throws IOException { return getTelephonyProvidersEdgeSoftwareupdate(createGetTelephonyProvidersEdgeSoftwareupdateRequest(edgeId).withHttpInfo()); } private GetTelephonyProvidersEdgeSoftwareupdateRequest createGetTelephonyProvidersEdgeSoftwareupdateRequest(String edgeId) { return GetTelephonyProvidersEdgeSoftwareupdateRequest.builder() .withEdgeId(edgeId) .build(); } /** * Gets software update status information about any edge. * * @param request The request object * @return DomainEdgeSoftwareUpdateDto * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public DomainEdgeSoftwareUpdateDto getTelephonyProvidersEdgeSoftwareupdate(GetTelephonyProvidersEdgeSoftwareupdateRequest request) throws IOException, ApiException { try { ApiResponse<DomainEdgeSoftwareUpdateDto> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<DomainEdgeSoftwareUpdateDto>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Gets software update status information about any edge. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<DomainEdgeSoftwareUpdateDto> getTelephonyProvidersEdgeSoftwareupdate(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<DomainEdgeSoftwareUpdateDto>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<DomainEdgeSoftwareUpdateDto> response = (ApiResponse<DomainEdgeSoftwareUpdateDto>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<DomainEdgeSoftwareUpdateDto> response = (ApiResponse<DomainEdgeSoftwareUpdateDto>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Gets all the available software versions for this edge. * * @param edgeId Edge ID (required) * @return DomainEdgeSoftwareVersionDtoEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public DomainEdgeSoftwareVersionDtoEntityListing getTelephonyProvidersEdgeSoftwareversions(String edgeId) throws IOException, ApiException { return getTelephonyProvidersEdgeSoftwareversions(createGetTelephonyProvidersEdgeSoftwareversionsRequest(edgeId)); } /** * Gets all the available software versions for this edge. * * @param edgeId Edge ID (required) * @return DomainEdgeSoftwareVersionDtoEntityListing * @throws IOException if the request fails to be processed */ public ApiResponse<DomainEdgeSoftwareVersionDtoEntityListing> getTelephonyProvidersEdgeSoftwareversionsWithHttpInfo(String edgeId) throws IOException { return getTelephonyProvidersEdgeSoftwareversions(createGetTelephonyProvidersEdgeSoftwareversionsRequest(edgeId).withHttpInfo()); } private GetTelephonyProvidersEdgeSoftwareversionsRequest createGetTelephonyProvidersEdgeSoftwareversionsRequest(String edgeId) { return GetTelephonyProvidersEdgeSoftwareversionsRequest.builder() .withEdgeId(edgeId) .build(); } /** * Gets all the available software versions for this edge. * * @param request The request object * @return DomainEdgeSoftwareVersionDtoEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public DomainEdgeSoftwareVersionDtoEntityListing getTelephonyProvidersEdgeSoftwareversions(GetTelephonyProvidersEdgeSoftwareversionsRequest request) throws IOException, ApiException { try { ApiResponse<DomainEdgeSoftwareVersionDtoEntityListing> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<DomainEdgeSoftwareVersionDtoEntityListing>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Gets all the available software versions for this edge. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<DomainEdgeSoftwareVersionDtoEntityListing> getTelephonyProvidersEdgeSoftwareversions(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<DomainEdgeSoftwareVersionDtoEntityListing>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<DomainEdgeSoftwareVersionDtoEntityListing> response = (ApiResponse<DomainEdgeSoftwareVersionDtoEntityListing>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<DomainEdgeSoftwareVersionDtoEntityListing> response = (ApiResponse<DomainEdgeSoftwareVersionDtoEntityListing>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get the list of available trunks for the given Edge. * Trunks are created by assigning trunk base settings to an Edge or Edge Group. * @param edgeId Edge ID (required) * @param pageNumber Page number (optional, default to 1) * @param pageSize Page size (optional, default to 25) * @param sortBy Value by which to sort (optional, default to name) * @param sortOrder Sort order (optional, default to ASC) * @param trunkBaseId Filter by Trunk Base Ids (optional) * @param trunkType Filter by a Trunk type (optional) * @return TrunkEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public TrunkEntityListing getTelephonyProvidersEdgeTrunks(String edgeId, Integer pageNumber, Integer pageSize, String sortBy, String sortOrder, String trunkBaseId, String trunkType) throws IOException, ApiException { return getTelephonyProvidersEdgeTrunks(createGetTelephonyProvidersEdgeTrunksRequest(edgeId, pageNumber, pageSize, sortBy, sortOrder, trunkBaseId, trunkType)); } /** * Get the list of available trunks for the given Edge. * Trunks are created by assigning trunk base settings to an Edge or Edge Group. * @param edgeId Edge ID (required) * @param pageNumber Page number (optional, default to 1) * @param pageSize Page size (optional, default to 25) * @param sortBy Value by which to sort (optional, default to name) * @param sortOrder Sort order (optional, default to ASC) * @param trunkBaseId Filter by Trunk Base Ids (optional) * @param trunkType Filter by a Trunk type (optional) * @return TrunkEntityListing * @throws IOException if the request fails to be processed */ public ApiResponse<TrunkEntityListing> getTelephonyProvidersEdgeTrunksWithHttpInfo(String edgeId, Integer pageNumber, Integer pageSize, String sortBy, String sortOrder, String trunkBaseId, String trunkType) throws IOException { return getTelephonyProvidersEdgeTrunks(createGetTelephonyProvidersEdgeTrunksRequest(edgeId, pageNumber, pageSize, sortBy, sortOrder, trunkBaseId, trunkType).withHttpInfo()); } private GetTelephonyProvidersEdgeTrunksRequest createGetTelephonyProvidersEdgeTrunksRequest(String edgeId, Integer pageNumber, Integer pageSize, String sortBy, String sortOrder, String trunkBaseId, String trunkType) { return GetTelephonyProvidersEdgeTrunksRequest.builder() .withEdgeId(edgeId) .withPageNumber(pageNumber) .withPageSize(pageSize) .withSortBy(sortBy) .withSortOrder(sortOrder) .withTrunkBaseId(trunkBaseId) .withTrunkType(trunkType) .build(); } /** * Get the list of available trunks for the given Edge. * Trunks are created by assigning trunk base settings to an Edge or Edge Group. * @param request The request object * @return TrunkEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public TrunkEntityListing getTelephonyProvidersEdgeTrunks(GetTelephonyProvidersEdgeTrunksRequest request) throws IOException, ApiException { try { ApiResponse<TrunkEntityListing> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<TrunkEntityListing>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get the list of available trunks for the given Edge. * Trunks are created by assigning trunk base settings to an Edge or Edge Group. * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<TrunkEntityListing> getTelephonyProvidersEdgeTrunks(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<TrunkEntityListing>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<TrunkEntityListing> response = (ApiResponse<TrunkEntityListing>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<TrunkEntityListing> response = (ApiResponse<TrunkEntityListing>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get the list of edges. * * @param pageSize Page size (optional, default to 25) * @param pageNumber Page number (optional, default to 1) * @param name Name (optional) * @param siteId Filter by site.id (optional) * @param edgeGroupId Filter by edgeGroup.id (optional) * @param sortBy Sort by (optional, default to name) * @param managed Filter by managed (optional) * @return EdgeEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeEntityListing getTelephonyProvidersEdges(Integer pageSize, Integer pageNumber, String name, String siteId, String edgeGroupId, String sortBy, Boolean managed) throws IOException, ApiException { return getTelephonyProvidersEdges(createGetTelephonyProvidersEdgesRequest(pageSize, pageNumber, name, siteId, edgeGroupId, sortBy, managed)); } /** * Get the list of edges. * * @param pageSize Page size (optional, default to 25) * @param pageNumber Page number (optional, default to 1) * @param name Name (optional) * @param siteId Filter by site.id (optional) * @param edgeGroupId Filter by edgeGroup.id (optional) * @param sortBy Sort by (optional, default to name) * @param managed Filter by managed (optional) * @return EdgeEntityListing * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeEntityListing> getTelephonyProvidersEdgesWithHttpInfo(Integer pageSize, Integer pageNumber, String name, String siteId, String edgeGroupId, String sortBy, Boolean managed) throws IOException { return getTelephonyProvidersEdges(createGetTelephonyProvidersEdgesRequest(pageSize, pageNumber, name, siteId, edgeGroupId, sortBy, managed).withHttpInfo()); } private GetTelephonyProvidersEdgesRequest createGetTelephonyProvidersEdgesRequest(Integer pageSize, Integer pageNumber, String name, String siteId, String edgeGroupId, String sortBy, Boolean managed) { return GetTelephonyProvidersEdgesRequest.builder() .withPageSize(pageSize) .withPageNumber(pageNumber) .withName(name) .withSiteId(siteId) .withEdgeGroupId(edgeGroupId) .withSortBy(sortBy) .withManaged(managed) .build(); } /** * Get the list of edges. * * @param request The request object * @return EdgeEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeEntityListing getTelephonyProvidersEdges(GetTelephonyProvidersEdgesRequest request) throws IOException, ApiException { try { ApiResponse<EdgeEntityListing> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<EdgeEntityListing>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get the list of edges. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeEntityListing> getTelephonyProvidersEdges(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<EdgeEntityListing>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<EdgeEntityListing> response = (ApiResponse<EdgeEntityListing>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<EdgeEntityListing> response = (ApiResponse<EdgeEntityListing>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get the list of available languages. * * @return AvailableLanguageList * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public AvailableLanguageList getTelephonyProvidersEdgesAvailablelanguages() throws IOException, ApiException { return getTelephonyProvidersEdgesAvailablelanguages(createGetTelephonyProvidersEdgesAvailablelanguagesRequest()); } /** * Get the list of available languages. * * @return AvailableLanguageList * @throws IOException if the request fails to be processed */ public ApiResponse<AvailableLanguageList> getTelephonyProvidersEdgesAvailablelanguagesWithHttpInfo() throws IOException { return getTelephonyProvidersEdgesAvailablelanguages(createGetTelephonyProvidersEdgesAvailablelanguagesRequest().withHttpInfo()); } private GetTelephonyProvidersEdgesAvailablelanguagesRequest createGetTelephonyProvidersEdgesAvailablelanguagesRequest() { return GetTelephonyProvidersEdgesAvailablelanguagesRequest.builder() .build(); } /** * Get the list of available languages. * * @param request The request object * @return AvailableLanguageList * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public AvailableLanguageList getTelephonyProvidersEdgesAvailablelanguages(GetTelephonyProvidersEdgesAvailablelanguagesRequest request) throws IOException, ApiException { try { ApiResponse<AvailableLanguageList> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<AvailableLanguageList>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get the list of available languages. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<AvailableLanguageList> getTelephonyProvidersEdgesAvailablelanguages(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<AvailableLanguageList>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<AvailableLanguageList> response = (ApiResponse<AvailableLanguageList>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<AvailableLanguageList> response = (ApiResponse<AvailableLanguageList>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get the list of certificate authorities. * * @return CertificateAuthorityEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public CertificateAuthorityEntityListing getTelephonyProvidersEdgesCertificateauthorities() throws IOException, ApiException { return getTelephonyProvidersEdgesCertificateauthorities(createGetTelephonyProvidersEdgesCertificateauthoritiesRequest()); } /** * Get the list of certificate authorities. * * @return CertificateAuthorityEntityListing * @throws IOException if the request fails to be processed */ public ApiResponse<CertificateAuthorityEntityListing> getTelephonyProvidersEdgesCertificateauthoritiesWithHttpInfo() throws IOException { return getTelephonyProvidersEdgesCertificateauthorities(createGetTelephonyProvidersEdgesCertificateauthoritiesRequest().withHttpInfo()); } private GetTelephonyProvidersEdgesCertificateauthoritiesRequest createGetTelephonyProvidersEdgesCertificateauthoritiesRequest() { return GetTelephonyProvidersEdgesCertificateauthoritiesRequest.builder() .build(); } /** * Get the list of certificate authorities. * * @param request The request object * @return CertificateAuthorityEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public CertificateAuthorityEntityListing getTelephonyProvidersEdgesCertificateauthorities(GetTelephonyProvidersEdgesCertificateauthoritiesRequest request) throws IOException, ApiException { try { ApiResponse<CertificateAuthorityEntityListing> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<CertificateAuthorityEntityListing>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get the list of certificate authorities. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<CertificateAuthorityEntityListing> getTelephonyProvidersEdgesCertificateauthorities(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<CertificateAuthorityEntityListing>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<CertificateAuthorityEntityListing> response = (ApiResponse<CertificateAuthorityEntityListing>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<CertificateAuthorityEntityListing> response = (ApiResponse<CertificateAuthorityEntityListing>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get a certificate authority. * * @param certificateId Certificate ID (required) * @return DomainCertificateAuthority * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public DomainCertificateAuthority getTelephonyProvidersEdgesCertificateauthority(String certificateId) throws IOException, ApiException { return getTelephonyProvidersEdgesCertificateauthority(createGetTelephonyProvidersEdgesCertificateauthorityRequest(certificateId)); } /** * Get a certificate authority. * * @param certificateId Certificate ID (required) * @return DomainCertificateAuthority * @throws IOException if the request fails to be processed */ public ApiResponse<DomainCertificateAuthority> getTelephonyProvidersEdgesCertificateauthorityWithHttpInfo(String certificateId) throws IOException { return getTelephonyProvidersEdgesCertificateauthority(createGetTelephonyProvidersEdgesCertificateauthorityRequest(certificateId).withHttpInfo()); } private GetTelephonyProvidersEdgesCertificateauthorityRequest createGetTelephonyProvidersEdgesCertificateauthorityRequest(String certificateId) { return GetTelephonyProvidersEdgesCertificateauthorityRequest.builder() .withCertificateId(certificateId) .build(); } /** * Get a certificate authority. * * @param request The request object * @return DomainCertificateAuthority * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public DomainCertificateAuthority getTelephonyProvidersEdgesCertificateauthority(GetTelephonyProvidersEdgesCertificateauthorityRequest request) throws IOException, ApiException { try { ApiResponse<DomainCertificateAuthority> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<DomainCertificateAuthority>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get a certificate authority. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<DomainCertificateAuthority> getTelephonyProvidersEdgesCertificateauthority(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<DomainCertificateAuthority>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<DomainCertificateAuthority> response = (ApiResponse<DomainCertificateAuthority>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<DomainCertificateAuthority> response = (ApiResponse<DomainCertificateAuthority>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get a DID by ID. * * @param didId DID ID (required) * @return DID * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public DID getTelephonyProvidersEdgesDid(String didId) throws IOException, ApiException { return getTelephonyProvidersEdgesDid(createGetTelephonyProvidersEdgesDidRequest(didId)); } /** * Get a DID by ID. * * @param didId DID ID (required) * @return DID * @throws IOException if the request fails to be processed */ public ApiResponse<DID> getTelephonyProvidersEdgesDidWithHttpInfo(String didId) throws IOException { return getTelephonyProvidersEdgesDid(createGetTelephonyProvidersEdgesDidRequest(didId).withHttpInfo()); } private GetTelephonyProvidersEdgesDidRequest createGetTelephonyProvidersEdgesDidRequest(String didId) { return GetTelephonyProvidersEdgesDidRequest.builder() .withDidId(didId) .build(); } /** * Get a DID by ID. * * @param request The request object * @return DID * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public DID getTelephonyProvidersEdgesDid(GetTelephonyProvidersEdgesDidRequest request) throws IOException, ApiException { try { ApiResponse<DID> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<DID>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get a DID by ID. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<DID> getTelephonyProvidersEdgesDid(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<DID>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<DID> response = (ApiResponse<DID>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<DID> response = (ApiResponse<DID>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get a DID Pool by ID. * * @param didPoolId DID pool ID (required) * @return DIDPool * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public DIDPool getTelephonyProvidersEdgesDidpool(String didPoolId) throws IOException, ApiException { return getTelephonyProvidersEdgesDidpool(createGetTelephonyProvidersEdgesDidpoolRequest(didPoolId)); } /** * Get a DID Pool by ID. * * @param didPoolId DID pool ID (required) * @return DIDPool * @throws IOException if the request fails to be processed */ public ApiResponse<DIDPool> getTelephonyProvidersEdgesDidpoolWithHttpInfo(String didPoolId) throws IOException { return getTelephonyProvidersEdgesDidpool(createGetTelephonyProvidersEdgesDidpoolRequest(didPoolId).withHttpInfo()); } private GetTelephonyProvidersEdgesDidpoolRequest createGetTelephonyProvidersEdgesDidpoolRequest(String didPoolId) { return GetTelephonyProvidersEdgesDidpoolRequest.builder() .withDidPoolId(didPoolId) .build(); } /** * Get a DID Pool by ID. * * @param request The request object * @return DIDPool * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public DIDPool getTelephonyProvidersEdgesDidpool(GetTelephonyProvidersEdgesDidpoolRequest request) throws IOException, ApiException { try { ApiResponse<DIDPool> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<DIDPool>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get a DID Pool by ID. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<DIDPool> getTelephonyProvidersEdgesDidpool(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<DIDPool>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<DIDPool> response = (ApiResponse<DIDPool>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<DIDPool> response = (ApiResponse<DIDPool>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get a listing of DID Pools * * @param pageSize Page size (optional, default to 25) * @param pageNumber Page number (optional, default to 1) * @param sortBy Sort by (optional, default to number) * @return DIDPoolEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public DIDPoolEntityListing getTelephonyProvidersEdgesDidpools(Integer pageSize, Integer pageNumber, String sortBy) throws IOException, ApiException { return getTelephonyProvidersEdgesDidpools(createGetTelephonyProvidersEdgesDidpoolsRequest(pageSize, pageNumber, sortBy)); } /** * Get a listing of DID Pools * * @param pageSize Page size (optional, default to 25) * @param pageNumber Page number (optional, default to 1) * @param sortBy Sort by (optional, default to number) * @return DIDPoolEntityListing * @throws IOException if the request fails to be processed */ public ApiResponse<DIDPoolEntityListing> getTelephonyProvidersEdgesDidpoolsWithHttpInfo(Integer pageSize, Integer pageNumber, String sortBy) throws IOException { return getTelephonyProvidersEdgesDidpools(createGetTelephonyProvidersEdgesDidpoolsRequest(pageSize, pageNumber, sortBy).withHttpInfo()); } private GetTelephonyProvidersEdgesDidpoolsRequest createGetTelephonyProvidersEdgesDidpoolsRequest(Integer pageSize, Integer pageNumber, String sortBy) { return GetTelephonyProvidersEdgesDidpoolsRequest.builder() .withPageSize(pageSize) .withPageNumber(pageNumber) .withSortBy(sortBy) .build(); } /** * Get a listing of DID Pools * * @param request The request object * @return DIDPoolEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public DIDPoolEntityListing getTelephonyProvidersEdgesDidpools(GetTelephonyProvidersEdgesDidpoolsRequest request) throws IOException, ApiException { try { ApiResponse<DIDPoolEntityListing> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<DIDPoolEntityListing>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get a listing of DID Pools * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<DIDPoolEntityListing> getTelephonyProvidersEdgesDidpools(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<DIDPoolEntityListing>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<DIDPoolEntityListing> response = (ApiResponse<DIDPoolEntityListing>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<DIDPoolEntityListing> response = (ApiResponse<DIDPoolEntityListing>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get a listing of DIDs * * @param pageSize Page size (optional, default to 25) * @param pageNumber Page number (optional, default to 1) * @param sortBy Sort by (optional, default to number) * @param sortOrder Sort order (optional, default to ASC) * @param phoneNumber Filter by phoneNumber (optional) * @param ownerId Filter by the owner of a phone number (optional) * @param didPoolId Filter by the DID Pool assignment (optional) * @return DIDEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public DIDEntityListing getTelephonyProvidersEdgesDids(Integer pageSize, Integer pageNumber, String sortBy, String sortOrder, String phoneNumber, String ownerId, String didPoolId) throws IOException, ApiException { return getTelephonyProvidersEdgesDids(createGetTelephonyProvidersEdgesDidsRequest(pageSize, pageNumber, sortBy, sortOrder, phoneNumber, ownerId, didPoolId)); } /** * Get a listing of DIDs * * @param pageSize Page size (optional, default to 25) * @param pageNumber Page number (optional, default to 1) * @param sortBy Sort by (optional, default to number) * @param sortOrder Sort order (optional, default to ASC) * @param phoneNumber Filter by phoneNumber (optional) * @param ownerId Filter by the owner of a phone number (optional) * @param didPoolId Filter by the DID Pool assignment (optional) * @return DIDEntityListing * @throws IOException if the request fails to be processed */ public ApiResponse<DIDEntityListing> getTelephonyProvidersEdgesDidsWithHttpInfo(Integer pageSize, Integer pageNumber, String sortBy, String sortOrder, String phoneNumber, String ownerId, String didPoolId) throws IOException { return getTelephonyProvidersEdgesDids(createGetTelephonyProvidersEdgesDidsRequest(pageSize, pageNumber, sortBy, sortOrder, phoneNumber, ownerId, didPoolId).withHttpInfo()); } private GetTelephonyProvidersEdgesDidsRequest createGetTelephonyProvidersEdgesDidsRequest(Integer pageSize, Integer pageNumber, String sortBy, String sortOrder, String phoneNumber, String ownerId, String didPoolId) { return GetTelephonyProvidersEdgesDidsRequest.builder() .withPageSize(pageSize) .withPageNumber(pageNumber) .withSortBy(sortBy) .withSortOrder(sortOrder) .withPhoneNumber(phoneNumber) .withOwnerId(ownerId) .withDidPoolId(didPoolId) .build(); } /** * Get a listing of DIDs * * @param request The request object * @return DIDEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public DIDEntityListing getTelephonyProvidersEdgesDids(GetTelephonyProvidersEdgesDidsRequest request) throws IOException, ApiException { try { ApiResponse<DIDEntityListing> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<DIDEntityListing>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get a listing of DIDs * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<DIDEntityListing> getTelephonyProvidersEdgesDids(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<DIDEntityListing>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<DIDEntityListing> response = (ApiResponse<DIDEntityListing>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<DIDEntityListing> response = (ApiResponse<DIDEntityListing>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get edge group. * * @param edgeGroupId Edge group ID (required) * @param expand Fields to expand in the response (optional) * @return EdgeGroup * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeGroup getTelephonyProvidersEdgesEdgegroup(String edgeGroupId, List<String> expand) throws IOException, ApiException { return getTelephonyProvidersEdgesEdgegroup(createGetTelephonyProvidersEdgesEdgegroupRequest(edgeGroupId, expand)); } /** * Get edge group. * * @param edgeGroupId Edge group ID (required) * @param expand Fields to expand in the response (optional) * @return EdgeGroup * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeGroup> getTelephonyProvidersEdgesEdgegroupWithHttpInfo(String edgeGroupId, List<String> expand) throws IOException { return getTelephonyProvidersEdgesEdgegroup(createGetTelephonyProvidersEdgesEdgegroupRequest(edgeGroupId, expand).withHttpInfo()); } private GetTelephonyProvidersEdgesEdgegroupRequest createGetTelephonyProvidersEdgesEdgegroupRequest(String edgeGroupId, List<String> expand) { return GetTelephonyProvidersEdgesEdgegroupRequest.builder() .withEdgeGroupId(edgeGroupId) .withExpand(expand) .build(); } /** * Get edge group. * * @param request The request object * @return EdgeGroup * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeGroup getTelephonyProvidersEdgesEdgegroup(GetTelephonyProvidersEdgesEdgegroupRequest request) throws IOException, ApiException { try { ApiResponse<EdgeGroup> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<EdgeGroup>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get edge group. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeGroup> getTelephonyProvidersEdgesEdgegroup(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<EdgeGroup>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<EdgeGroup> response = (ApiResponse<EdgeGroup>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<EdgeGroup> response = (ApiResponse<EdgeGroup>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Gets the edge trunk base associated with the edge group * * @param edgegroupId Edge Group ID (required) * @param edgetrunkbaseId Edge Trunk Base ID (required) * @return EdgeTrunkBase * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeTrunkBase getTelephonyProvidersEdgesEdgegroupEdgetrunkbase(String edgegroupId, String edgetrunkbaseId) throws IOException, ApiException { return getTelephonyProvidersEdgesEdgegroupEdgetrunkbase(createGetTelephonyProvidersEdgesEdgegroupEdgetrunkbaseRequest(edgegroupId, edgetrunkbaseId)); } /** * Gets the edge trunk base associated with the edge group * * @param edgegroupId Edge Group ID (required) * @param edgetrunkbaseId Edge Trunk Base ID (required) * @return EdgeTrunkBase * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeTrunkBase> getTelephonyProvidersEdgesEdgegroupEdgetrunkbaseWithHttpInfo(String edgegroupId, String edgetrunkbaseId) throws IOException { return getTelephonyProvidersEdgesEdgegroupEdgetrunkbase(createGetTelephonyProvidersEdgesEdgegroupEdgetrunkbaseRequest(edgegroupId, edgetrunkbaseId).withHttpInfo()); } private GetTelephonyProvidersEdgesEdgegroupEdgetrunkbaseRequest createGetTelephonyProvidersEdgesEdgegroupEdgetrunkbaseRequest(String edgegroupId, String edgetrunkbaseId) { return GetTelephonyProvidersEdgesEdgegroupEdgetrunkbaseRequest.builder() .withEdgegroupId(edgegroupId) .withEdgetrunkbaseId(edgetrunkbaseId) .build(); } /** * Gets the edge trunk base associated with the edge group * * @param request The request object * @return EdgeTrunkBase * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeTrunkBase getTelephonyProvidersEdgesEdgegroupEdgetrunkbase(GetTelephonyProvidersEdgesEdgegroupEdgetrunkbaseRequest request) throws IOException, ApiException { try { ApiResponse<EdgeTrunkBase> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<EdgeTrunkBase>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Gets the edge trunk base associated with the edge group * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeTrunkBase> getTelephonyProvidersEdgesEdgegroupEdgetrunkbase(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<EdgeTrunkBase>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<EdgeTrunkBase> response = (ApiResponse<EdgeTrunkBase>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<EdgeTrunkBase> response = (ApiResponse<EdgeTrunkBase>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get the list of edge groups. * * @param pageSize Page size (optional, default to 25) * @param pageNumber Page number (optional, default to 1) * @param name Name (optional) * @param sortBy Sort by (optional, default to name) * @param managed Filter by managed (optional) * @return EdgeGroupEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeGroupEntityListing getTelephonyProvidersEdgesEdgegroups(Integer pageSize, Integer pageNumber, String name, String sortBy, Boolean managed) throws IOException, ApiException { return getTelephonyProvidersEdgesEdgegroups(createGetTelephonyProvidersEdgesEdgegroupsRequest(pageSize, pageNumber, name, sortBy, managed)); } /** * Get the list of edge groups. * * @param pageSize Page size (optional, default to 25) * @param pageNumber Page number (optional, default to 1) * @param name Name (optional) * @param sortBy Sort by (optional, default to name) * @param managed Filter by managed (optional) * @return EdgeGroupEntityListing * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeGroupEntityListing> getTelephonyProvidersEdgesEdgegroupsWithHttpInfo(Integer pageSize, Integer pageNumber, String name, String sortBy, Boolean managed) throws IOException { return getTelephonyProvidersEdgesEdgegroups(createGetTelephonyProvidersEdgesEdgegroupsRequest(pageSize, pageNumber, name, sortBy, managed).withHttpInfo()); } private GetTelephonyProvidersEdgesEdgegroupsRequest createGetTelephonyProvidersEdgesEdgegroupsRequest(Integer pageSize, Integer pageNumber, String name, String sortBy, Boolean managed) { return GetTelephonyProvidersEdgesEdgegroupsRequest.builder() .withPageSize(pageSize) .withPageNumber(pageNumber) .withName(name) .withSortBy(sortBy) .withManaged(managed) .build(); } /** * Get the list of edge groups. * * @param request The request object * @return EdgeGroupEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeGroupEntityListing getTelephonyProvidersEdgesEdgegroups(GetTelephonyProvidersEdgesEdgegroupsRequest request) throws IOException, ApiException { try { ApiResponse<EdgeGroupEntityListing> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<EdgeGroupEntityListing>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get the list of edge groups. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeGroupEntityListing> getTelephonyProvidersEdgesEdgegroups(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<EdgeGroupEntityListing>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<EdgeGroupEntityListing> response = (ApiResponse<EdgeGroupEntityListing>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<EdgeGroupEntityListing> response = (ApiResponse<EdgeGroupEntityListing>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get the edge version report. * The report will not have consistent data about the edge version(s) until all edges have been reset. * @return EdgeVersionReport * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeVersionReport getTelephonyProvidersEdgesEdgeversionreport() throws IOException, ApiException { return getTelephonyProvidersEdgesEdgeversionreport(createGetTelephonyProvidersEdgesEdgeversionreportRequest()); } /** * Get the edge version report. * The report will not have consistent data about the edge version(s) until all edges have been reset. * @return EdgeVersionReport * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeVersionReport> getTelephonyProvidersEdgesEdgeversionreportWithHttpInfo() throws IOException { return getTelephonyProvidersEdgesEdgeversionreport(createGetTelephonyProvidersEdgesEdgeversionreportRequest().withHttpInfo()); } private GetTelephonyProvidersEdgesEdgeversionreportRequest createGetTelephonyProvidersEdgesEdgeversionreportRequest() { return GetTelephonyProvidersEdgesEdgeversionreportRequest.builder() .build(); } /** * Get the edge version report. * The report will not have consistent data about the edge version(s) until all edges have been reset. * @param request The request object * @return EdgeVersionReport * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeVersionReport getTelephonyProvidersEdgesEdgeversionreport(GetTelephonyProvidersEdgesEdgeversionreportRequest request) throws IOException, ApiException { try { ApiResponse<EdgeVersionReport> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<EdgeVersionReport>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get the edge version report. * The report will not have consistent data about the edge version(s) until all edges have been reset. * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeVersionReport> getTelephonyProvidersEdgesEdgeversionreport(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<EdgeVersionReport>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<EdgeVersionReport> response = (ApiResponse<EdgeVersionReport>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<EdgeVersionReport> response = (ApiResponse<EdgeVersionReport>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get an extension by ID. * * @param extensionId Extension ID (required) * @return Extension * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public Extension getTelephonyProvidersEdgesExtension(String extensionId) throws IOException, ApiException { return getTelephonyProvidersEdgesExtension(createGetTelephonyProvidersEdgesExtensionRequest(extensionId)); } /** * Get an extension by ID. * * @param extensionId Extension ID (required) * @return Extension * @throws IOException if the request fails to be processed */ public ApiResponse<Extension> getTelephonyProvidersEdgesExtensionWithHttpInfo(String extensionId) throws IOException { return getTelephonyProvidersEdgesExtension(createGetTelephonyProvidersEdgesExtensionRequest(extensionId).withHttpInfo()); } private GetTelephonyProvidersEdgesExtensionRequest createGetTelephonyProvidersEdgesExtensionRequest(String extensionId) { return GetTelephonyProvidersEdgesExtensionRequest.builder() .withExtensionId(extensionId) .build(); } /** * Get an extension by ID. * * @param request The request object * @return Extension * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public Extension getTelephonyProvidersEdgesExtension(GetTelephonyProvidersEdgesExtensionRequest request) throws IOException, ApiException { try { ApiResponse<Extension> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<Extension>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get an extension by ID. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<Extension> getTelephonyProvidersEdgesExtension(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<Extension>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<Extension> response = (ApiResponse<Extension>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<Extension> response = (ApiResponse<Extension>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get an extension pool by ID * * @param extensionPoolId Extension pool ID (required) * @return ExtensionPool * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public ExtensionPool getTelephonyProvidersEdgesExtensionpool(String extensionPoolId) throws IOException, ApiException { return getTelephonyProvidersEdgesExtensionpool(createGetTelephonyProvidersEdgesExtensionpoolRequest(extensionPoolId)); } /** * Get an extension pool by ID * * @param extensionPoolId Extension pool ID (required) * @return ExtensionPool * @throws IOException if the request fails to be processed */ public ApiResponse<ExtensionPool> getTelephonyProvidersEdgesExtensionpoolWithHttpInfo(String extensionPoolId) throws IOException { return getTelephonyProvidersEdgesExtensionpool(createGetTelephonyProvidersEdgesExtensionpoolRequest(extensionPoolId).withHttpInfo()); } private GetTelephonyProvidersEdgesExtensionpoolRequest createGetTelephonyProvidersEdgesExtensionpoolRequest(String extensionPoolId) { return GetTelephonyProvidersEdgesExtensionpoolRequest.builder() .withExtensionPoolId(extensionPoolId) .build(); } /** * Get an extension pool by ID * * @param request The request object * @return ExtensionPool * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public ExtensionPool getTelephonyProvidersEdgesExtensionpool(GetTelephonyProvidersEdgesExtensionpoolRequest request) throws IOException, ApiException { try { ApiResponse<ExtensionPool> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<ExtensionPool>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get an extension pool by ID * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<ExtensionPool> getTelephonyProvidersEdgesExtensionpool(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<ExtensionPool>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<ExtensionPool> response = (ApiResponse<ExtensionPool>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<ExtensionPool> response = (ApiResponse<ExtensionPool>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get a listing of extension pools * * @param pageSize Page size (optional, default to 25) * @param pageNumber Page number (optional, default to 1) * @param sortBy Sort by (optional, default to startNumber) * @param number Number (optional) * @return ExtensionPoolEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public ExtensionPoolEntityListing getTelephonyProvidersEdgesExtensionpools(Integer pageSize, Integer pageNumber, String sortBy, String number) throws IOException, ApiException { return getTelephonyProvidersEdgesExtensionpools(createGetTelephonyProvidersEdgesExtensionpoolsRequest(pageSize, pageNumber, sortBy, number)); } /** * Get a listing of extension pools * * @param pageSize Page size (optional, default to 25) * @param pageNumber Page number (optional, default to 1) * @param sortBy Sort by (optional, default to startNumber) * @param number Number (optional) * @return ExtensionPoolEntityListing * @throws IOException if the request fails to be processed */ public ApiResponse<ExtensionPoolEntityListing> getTelephonyProvidersEdgesExtensionpoolsWithHttpInfo(Integer pageSize, Integer pageNumber, String sortBy, String number) throws IOException { return getTelephonyProvidersEdgesExtensionpools(createGetTelephonyProvidersEdgesExtensionpoolsRequest(pageSize, pageNumber, sortBy, number).withHttpInfo()); } private GetTelephonyProvidersEdgesExtensionpoolsRequest createGetTelephonyProvidersEdgesExtensionpoolsRequest(Integer pageSize, Integer pageNumber, String sortBy, String number) { return GetTelephonyProvidersEdgesExtensionpoolsRequest.builder() .withPageSize(pageSize) .withPageNumber(pageNumber) .withSortBy(sortBy) .withNumber(number) .build(); } /** * Get a listing of extension pools * * @param request The request object * @return ExtensionPoolEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public ExtensionPoolEntityListing getTelephonyProvidersEdgesExtensionpools(GetTelephonyProvidersEdgesExtensionpoolsRequest request) throws IOException, ApiException { try { ApiResponse<ExtensionPoolEntityListing> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<ExtensionPoolEntityListing>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get a listing of extension pools * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<ExtensionPoolEntityListing> getTelephonyProvidersEdgesExtensionpools(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<ExtensionPoolEntityListing>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<ExtensionPoolEntityListing> response = (ApiResponse<ExtensionPoolEntityListing>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<ExtensionPoolEntityListing> response = (ApiResponse<ExtensionPoolEntityListing>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get a listing of extensions * * @param pageSize Page size (optional, default to 25) * @param pageNumber Page number (optional, default to 1) * @param sortBy Sort by (optional, default to number) * @param sortOrder Sort order (optional, default to ASC) * @param number Filter by number (optional) * @return ExtensionEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public ExtensionEntityListing getTelephonyProvidersEdgesExtensions(Integer pageSize, Integer pageNumber, String sortBy, String sortOrder, String number) throws IOException, ApiException { return getTelephonyProvidersEdgesExtensions(createGetTelephonyProvidersEdgesExtensionsRequest(pageSize, pageNumber, sortBy, sortOrder, number)); } /** * Get a listing of extensions * * @param pageSize Page size (optional, default to 25) * @param pageNumber Page number (optional, default to 1) * @param sortBy Sort by (optional, default to number) * @param sortOrder Sort order (optional, default to ASC) * @param number Filter by number (optional) * @return ExtensionEntityListing * @throws IOException if the request fails to be processed */ public ApiResponse<ExtensionEntityListing> getTelephonyProvidersEdgesExtensionsWithHttpInfo(Integer pageSize, Integer pageNumber, String sortBy, String sortOrder, String number) throws IOException { return getTelephonyProvidersEdgesExtensions(createGetTelephonyProvidersEdgesExtensionsRequest(pageSize, pageNumber, sortBy, sortOrder, number).withHttpInfo()); } private GetTelephonyProvidersEdgesExtensionsRequest createGetTelephonyProvidersEdgesExtensionsRequest(Integer pageSize, Integer pageNumber, String sortBy, String sortOrder, String number) { return GetTelephonyProvidersEdgesExtensionsRequest.builder() .withPageSize(pageSize) .withPageNumber(pageNumber) .withSortBy(sortBy) .withSortOrder(sortOrder) .withNumber(number) .build(); } /** * Get a listing of extensions * * @param request The request object * @return ExtensionEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public ExtensionEntityListing getTelephonyProvidersEdgesExtensions(GetTelephonyProvidersEdgesExtensionsRequest request) throws IOException, ApiException { try { ApiResponse<ExtensionEntityListing> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<ExtensionEntityListing>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get a listing of extensions * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<ExtensionEntityListing> getTelephonyProvidersEdgesExtensions(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<ExtensionEntityListing>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<ExtensionEntityListing> response = (ApiResponse<ExtensionEntityListing>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<ExtensionEntityListing> response = (ApiResponse<ExtensionEntityListing>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get a Line by ID * * @param lineId Line ID (required) * @return Line * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public Line getTelephonyProvidersEdgesLine(String lineId) throws IOException, ApiException { return getTelephonyProvidersEdgesLine(createGetTelephonyProvidersEdgesLineRequest(lineId)); } /** * Get a Line by ID * * @param lineId Line ID (required) * @return Line * @throws IOException if the request fails to be processed */ public ApiResponse<Line> getTelephonyProvidersEdgesLineWithHttpInfo(String lineId) throws IOException { return getTelephonyProvidersEdgesLine(createGetTelephonyProvidersEdgesLineRequest(lineId).withHttpInfo()); } private GetTelephonyProvidersEdgesLineRequest createGetTelephonyProvidersEdgesLineRequest(String lineId) { return GetTelephonyProvidersEdgesLineRequest.builder() .withLineId(lineId) .build(); } /** * Get a Line by ID * * @param request The request object * @return Line * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public Line getTelephonyProvidersEdgesLine(GetTelephonyProvidersEdgesLineRequest request) throws IOException, ApiException { try { ApiResponse<Line> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<Line>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get a Line by ID * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<Line> getTelephonyProvidersEdgesLine(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<Line>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<Line> response = (ApiResponse<Line>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<Line> response = (ApiResponse<Line>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get a line base settings object by ID * * @param lineBaseId Line base ID (required) * @return LineBase * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public LineBase getTelephonyProvidersEdgesLinebasesetting(String lineBaseId) throws IOException, ApiException { return getTelephonyProvidersEdgesLinebasesetting(createGetTelephonyProvidersEdgesLinebasesettingRequest(lineBaseId)); } /** * Get a line base settings object by ID * * @param lineBaseId Line base ID (required) * @return LineBase * @throws IOException if the request fails to be processed */ public ApiResponse<LineBase> getTelephonyProvidersEdgesLinebasesettingWithHttpInfo(String lineBaseId) throws IOException { return getTelephonyProvidersEdgesLinebasesetting(createGetTelephonyProvidersEdgesLinebasesettingRequest(lineBaseId).withHttpInfo()); } private GetTelephonyProvidersEdgesLinebasesettingRequest createGetTelephonyProvidersEdgesLinebasesettingRequest(String lineBaseId) { return GetTelephonyProvidersEdgesLinebasesettingRequest.builder() .withLineBaseId(lineBaseId) .build(); } /** * Get a line base settings object by ID * * @param request The request object * @return LineBase * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public LineBase getTelephonyProvidersEdgesLinebasesetting(GetTelephonyProvidersEdgesLinebasesettingRequest request) throws IOException, ApiException { try { ApiResponse<LineBase> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<LineBase>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get a line base settings object by ID * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<LineBase> getTelephonyProvidersEdgesLinebasesetting(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<LineBase>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<LineBase> response = (ApiResponse<LineBase>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<LineBase> response = (ApiResponse<LineBase>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get a listing of line base settings objects * * @param pageNumber Page number (optional, default to 1) * @param pageSize Page size (optional, default to 25) * @param sortBy Value by which to sort (optional, default to name) * @param sortOrder Sort order (optional, default to ASC) * @return LineBaseEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public LineBaseEntityListing getTelephonyProvidersEdgesLinebasesettings(Integer pageNumber, Integer pageSize, String sortBy, String sortOrder) throws IOException, ApiException { return getTelephonyProvidersEdgesLinebasesettings(createGetTelephonyProvidersEdgesLinebasesettingsRequest(pageNumber, pageSize, sortBy, sortOrder)); } /** * Get a listing of line base settings objects * * @param pageNumber Page number (optional, default to 1) * @param pageSize Page size (optional, default to 25) * @param sortBy Value by which to sort (optional, default to name) * @param sortOrder Sort order (optional, default to ASC) * @return LineBaseEntityListing * @throws IOException if the request fails to be processed */ public ApiResponse<LineBaseEntityListing> getTelephonyProvidersEdgesLinebasesettingsWithHttpInfo(Integer pageNumber, Integer pageSize, String sortBy, String sortOrder) throws IOException { return getTelephonyProvidersEdgesLinebasesettings(createGetTelephonyProvidersEdgesLinebasesettingsRequest(pageNumber, pageSize, sortBy, sortOrder).withHttpInfo()); } private GetTelephonyProvidersEdgesLinebasesettingsRequest createGetTelephonyProvidersEdgesLinebasesettingsRequest(Integer pageNumber, Integer pageSize, String sortBy, String sortOrder) { return GetTelephonyProvidersEdgesLinebasesettingsRequest.builder() .withPageNumber(pageNumber) .withPageSize(pageSize) .withSortBy(sortBy) .withSortOrder(sortOrder) .build(); } /** * Get a listing of line base settings objects * * @param request The request object * @return LineBaseEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public LineBaseEntityListing getTelephonyProvidersEdgesLinebasesettings(GetTelephonyProvidersEdgesLinebasesettingsRequest request) throws IOException, ApiException { try { ApiResponse<LineBaseEntityListing> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<LineBaseEntityListing>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get a listing of line base settings objects * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<LineBaseEntityListing> getTelephonyProvidersEdgesLinebasesettings(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<LineBaseEntityListing>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<LineBaseEntityListing> response = (ApiResponse<LineBaseEntityListing>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<LineBaseEntityListing> response = (ApiResponse<LineBaseEntityListing>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get a list of Lines * * @param pageSize Page size (optional, default to 25) * @param pageNumber Page number (optional, default to 1) * @param name Name (optional) * @param sortBy Value by which to sort (optional, default to name) * @param expand Fields to expand in the response, comma-separated (optional) * @return LineEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public LineEntityListing getTelephonyProvidersEdgesLines(Integer pageSize, Integer pageNumber, String name, String sortBy, List<String> expand) throws IOException, ApiException { return getTelephonyProvidersEdgesLines(createGetTelephonyProvidersEdgesLinesRequest(pageSize, pageNumber, name, sortBy, expand)); } /** * Get a list of Lines * * @param pageSize Page size (optional, default to 25) * @param pageNumber Page number (optional, default to 1) * @param name Name (optional) * @param sortBy Value by which to sort (optional, default to name) * @param expand Fields to expand in the response, comma-separated (optional) * @return LineEntityListing * @throws IOException if the request fails to be processed */ public ApiResponse<LineEntityListing> getTelephonyProvidersEdgesLinesWithHttpInfo(Integer pageSize, Integer pageNumber, String name, String sortBy, List<String> expand) throws IOException { return getTelephonyProvidersEdgesLines(createGetTelephonyProvidersEdgesLinesRequest(pageSize, pageNumber, name, sortBy, expand).withHttpInfo()); } private GetTelephonyProvidersEdgesLinesRequest createGetTelephonyProvidersEdgesLinesRequest(Integer pageSize, Integer pageNumber, String name, String sortBy, List<String> expand) { return GetTelephonyProvidersEdgesLinesRequest.builder() .withPageSize(pageSize) .withPageNumber(pageNumber) .withName(name) .withSortBy(sortBy) .withExpand(expand) .build(); } /** * Get a list of Lines * * @param request The request object * @return LineEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public LineEntityListing getTelephonyProvidersEdgesLines(GetTelephonyProvidersEdgesLinesRequest request) throws IOException, ApiException { try { ApiResponse<LineEntityListing> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<LineEntityListing>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get a list of Lines * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<LineEntityListing> getTelephonyProvidersEdgesLines(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<LineEntityListing>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<LineEntityListing> response = (ApiResponse<LineEntityListing>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<LineEntityListing> response = (ApiResponse<LineEntityListing>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get a Line instance template based on a Line Base Settings object. This object can then be modified and saved as a new Line instance * * @param lineBaseSettingsId The id of a Line Base Settings object upon which to base this Line (required) * @return Line * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public Line getTelephonyProvidersEdgesLinesTemplate(String lineBaseSettingsId) throws IOException, ApiException { return getTelephonyProvidersEdgesLinesTemplate(createGetTelephonyProvidersEdgesLinesTemplateRequest(lineBaseSettingsId)); } /** * Get a Line instance template based on a Line Base Settings object. This object can then be modified and saved as a new Line instance * * @param lineBaseSettingsId The id of a Line Base Settings object upon which to base this Line (required) * @return Line * @throws IOException if the request fails to be processed */ public ApiResponse<Line> getTelephonyProvidersEdgesLinesTemplateWithHttpInfo(String lineBaseSettingsId) throws IOException { return getTelephonyProvidersEdgesLinesTemplate(createGetTelephonyProvidersEdgesLinesTemplateRequest(lineBaseSettingsId).withHttpInfo()); } private GetTelephonyProvidersEdgesLinesTemplateRequest createGetTelephonyProvidersEdgesLinesTemplateRequest(String lineBaseSettingsId) { return GetTelephonyProvidersEdgesLinesTemplateRequest.builder() .withLineBaseSettingsId(lineBaseSettingsId) .build(); } /** * Get a Line instance template based on a Line Base Settings object. This object can then be modified and saved as a new Line instance * * @param request The request object * @return Line * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public Line getTelephonyProvidersEdgesLinesTemplate(GetTelephonyProvidersEdgesLinesTemplateRequest request) throws IOException, ApiException { try { ApiResponse<Line> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<Line>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get a Line instance template based on a Line Base Settings object. This object can then be modified and saved as a new Line instance * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<Line> getTelephonyProvidersEdgesLinesTemplate(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<Line>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<Line> response = (ApiResponse<Line>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<Line> response = (ApiResponse<Line>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get edge logical interfaces. * Retrieve the configured logical interfaces for a list edges. Only 100 edges can be requested at a time. * @param edgeIds Comma separated list of Edge Id&#39;s (required) * @param expand Field to expand in the response (optional) * @return LogicalInterfaceEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public LogicalInterfaceEntityListing getTelephonyProvidersEdgesLogicalinterfaces(String edgeIds, List<String> expand) throws IOException, ApiException { return getTelephonyProvidersEdgesLogicalinterfaces(createGetTelephonyProvidersEdgesLogicalinterfacesRequest(edgeIds, expand)); } /** * Get edge logical interfaces. * Retrieve the configured logical interfaces for a list edges. Only 100 edges can be requested at a time. * @param edgeIds Comma separated list of Edge Id&#39;s (required) * @param expand Field to expand in the response (optional) * @return LogicalInterfaceEntityListing * @throws IOException if the request fails to be processed */ public ApiResponse<LogicalInterfaceEntityListing> getTelephonyProvidersEdgesLogicalinterfacesWithHttpInfo(String edgeIds, List<String> expand) throws IOException { return getTelephonyProvidersEdgesLogicalinterfaces(createGetTelephonyProvidersEdgesLogicalinterfacesRequest(edgeIds, expand).withHttpInfo()); } private GetTelephonyProvidersEdgesLogicalinterfacesRequest createGetTelephonyProvidersEdgesLogicalinterfacesRequest(String edgeIds, List<String> expand) { return GetTelephonyProvidersEdgesLogicalinterfacesRequest.builder() .withEdgeIds(edgeIds) .withExpand(expand) .build(); } /** * Get edge logical interfaces. * Retrieve the configured logical interfaces for a list edges. Only 100 edges can be requested at a time. * @param request The request object * @return LogicalInterfaceEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public LogicalInterfaceEntityListing getTelephonyProvidersEdgesLogicalinterfaces(GetTelephonyProvidersEdgesLogicalinterfacesRequest request) throws IOException, ApiException { try { ApiResponse<LogicalInterfaceEntityListing> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<LogicalInterfaceEntityListing>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get edge logical interfaces. * Retrieve the configured logical interfaces for a list edges. Only 100 edges can be requested at a time. * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<LogicalInterfaceEntityListing> getTelephonyProvidersEdgesLogicalinterfaces(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<LogicalInterfaceEntityListing>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<LogicalInterfaceEntityListing> response = (ApiResponse<LogicalInterfaceEntityListing>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<LogicalInterfaceEntityListing> response = (ApiResponse<LogicalInterfaceEntityListing>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get the metrics for a list of edges. * * @param edgeIds Comma separated list of Edge Id&#39;s (required) * @return List<EdgeMetrics> * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public List<EdgeMetrics> getTelephonyProvidersEdgesMetrics(String edgeIds) throws IOException, ApiException { return getTelephonyProvidersEdgesMetrics(createGetTelephonyProvidersEdgesMetricsRequest(edgeIds)); } /** * Get the metrics for a list of edges. * * @param edgeIds Comma separated list of Edge Id&#39;s (required) * @return List<EdgeMetrics> * @throws IOException if the request fails to be processed */ public ApiResponse<List<EdgeMetrics>> getTelephonyProvidersEdgesMetricsWithHttpInfo(String edgeIds) throws IOException { return getTelephonyProvidersEdgesMetrics(createGetTelephonyProvidersEdgesMetricsRequest(edgeIds).withHttpInfo()); } private GetTelephonyProvidersEdgesMetricsRequest createGetTelephonyProvidersEdgesMetricsRequest(String edgeIds) { return GetTelephonyProvidersEdgesMetricsRequest.builder() .withEdgeIds(edgeIds) .build(); } /** * Get the metrics for a list of edges. * * @param request The request object * @return List<EdgeMetrics> * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public List<EdgeMetrics> getTelephonyProvidersEdgesMetrics(GetTelephonyProvidersEdgesMetricsRequest request) throws IOException, ApiException { try { ApiResponse<List<EdgeMetrics>> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<List<EdgeMetrics>>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get the metrics for a list of edges. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<List<EdgeMetrics>> getTelephonyProvidersEdgesMetrics(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<List<EdgeMetrics>>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<List<EdgeMetrics>> response = (ApiResponse<List<EdgeMetrics>>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<List<EdgeMetrics>> response = (ApiResponse<List<EdgeMetrics>>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get outbound route * * @param outboundRouteId Outbound route ID (required) * @return OutboundRoute * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public OutboundRoute getTelephonyProvidersEdgesOutboundroute(String outboundRouteId) throws IOException, ApiException { return getTelephonyProvidersEdgesOutboundroute(createGetTelephonyProvidersEdgesOutboundrouteRequest(outboundRouteId)); } /** * Get outbound route * * @param outboundRouteId Outbound route ID (required) * @return OutboundRoute * @throws IOException if the request fails to be processed */ public ApiResponse<OutboundRoute> getTelephonyProvidersEdgesOutboundrouteWithHttpInfo(String outboundRouteId) throws IOException { return getTelephonyProvidersEdgesOutboundroute(createGetTelephonyProvidersEdgesOutboundrouteRequest(outboundRouteId).withHttpInfo()); } private GetTelephonyProvidersEdgesOutboundrouteRequest createGetTelephonyProvidersEdgesOutboundrouteRequest(String outboundRouteId) { return GetTelephonyProvidersEdgesOutboundrouteRequest.builder() .withOutboundRouteId(outboundRouteId) .build(); } /** * Get outbound route * * @param request The request object * @return OutboundRoute * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public OutboundRoute getTelephonyProvidersEdgesOutboundroute(GetTelephonyProvidersEdgesOutboundrouteRequest request) throws IOException, ApiException { try { ApiResponse<OutboundRoute> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<OutboundRoute>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get outbound route * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<OutboundRoute> getTelephonyProvidersEdgesOutboundroute(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<OutboundRoute>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<OutboundRoute> response = (ApiResponse<OutboundRoute>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<OutboundRoute> response = (ApiResponse<OutboundRoute>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get outbound routes * * @param pageSize Page size (optional, default to 25) * @param pageNumber Page number (optional, default to 1) * @param name Name (optional) * @param siteId Filter by site.id (optional) * @param externalTrunkBasesIds Filter by externalTrunkBases.ids (optional) * @param sortBy Sort by (optional, default to name) * @return OutboundRouteEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public OutboundRouteEntityListing getTelephonyProvidersEdgesOutboundroutes(Integer pageSize, Integer pageNumber, String name, String siteId, String externalTrunkBasesIds, String sortBy) throws IOException, ApiException { return getTelephonyProvidersEdgesOutboundroutes(createGetTelephonyProvidersEdgesOutboundroutesRequest(pageSize, pageNumber, name, siteId, externalTrunkBasesIds, sortBy)); } /** * Get outbound routes * * @param pageSize Page size (optional, default to 25) * @param pageNumber Page number (optional, default to 1) * @param name Name (optional) * @param siteId Filter by site.id (optional) * @param externalTrunkBasesIds Filter by externalTrunkBases.ids (optional) * @param sortBy Sort by (optional, default to name) * @return OutboundRouteEntityListing * @throws IOException if the request fails to be processed */ public ApiResponse<OutboundRouteEntityListing> getTelephonyProvidersEdgesOutboundroutesWithHttpInfo(Integer pageSize, Integer pageNumber, String name, String siteId, String externalTrunkBasesIds, String sortBy) throws IOException { return getTelephonyProvidersEdgesOutboundroutes(createGetTelephonyProvidersEdgesOutboundroutesRequest(pageSize, pageNumber, name, siteId, externalTrunkBasesIds, sortBy).withHttpInfo()); } private GetTelephonyProvidersEdgesOutboundroutesRequest createGetTelephonyProvidersEdgesOutboundroutesRequest(Integer pageSize, Integer pageNumber, String name, String siteId, String externalTrunkBasesIds, String sortBy) { return GetTelephonyProvidersEdgesOutboundroutesRequest.builder() .withPageSize(pageSize) .withPageNumber(pageNumber) .withName(name) .withSiteId(siteId) .withExternalTrunkBasesIds(externalTrunkBasesIds) .withSortBy(sortBy) .build(); } /** * Get outbound routes * * @param request The request object * @return OutboundRouteEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public OutboundRouteEntityListing getTelephonyProvidersEdgesOutboundroutes(GetTelephonyProvidersEdgesOutboundroutesRequest request) throws IOException, ApiException { try { ApiResponse<OutboundRouteEntityListing> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<OutboundRouteEntityListing>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get outbound routes * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<OutboundRouteEntityListing> getTelephonyProvidersEdgesOutboundroutes(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<OutboundRouteEntityListing>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<OutboundRouteEntityListing> response = (ApiResponse<OutboundRouteEntityListing>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<OutboundRouteEntityListing> response = (ApiResponse<OutboundRouteEntityListing>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get a Phone by ID * * @param phoneId Phone ID (required) * @return Phone * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public Phone getTelephonyProvidersEdgesPhone(String phoneId) throws IOException, ApiException { return getTelephonyProvidersEdgesPhone(createGetTelephonyProvidersEdgesPhoneRequest(phoneId)); } /** * Get a Phone by ID * * @param phoneId Phone ID (required) * @return Phone * @throws IOException if the request fails to be processed */ public ApiResponse<Phone> getTelephonyProvidersEdgesPhoneWithHttpInfo(String phoneId) throws IOException { return getTelephonyProvidersEdgesPhone(createGetTelephonyProvidersEdgesPhoneRequest(phoneId).withHttpInfo()); } private GetTelephonyProvidersEdgesPhoneRequest createGetTelephonyProvidersEdgesPhoneRequest(String phoneId) { return GetTelephonyProvidersEdgesPhoneRequest.builder() .withPhoneId(phoneId) .build(); } /** * Get a Phone by ID * * @param request The request object * @return Phone * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public Phone getTelephonyProvidersEdgesPhone(GetTelephonyProvidersEdgesPhoneRequest request) throws IOException, ApiException { try { ApiResponse<Phone> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<Phone>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get a Phone by ID * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<Phone> getTelephonyProvidersEdgesPhone(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<Phone>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<Phone> response = (ApiResponse<Phone>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<Phone> response = (ApiResponse<Phone>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get a Phone Base Settings object by ID * * @param phoneBaseId Phone base ID (required) * @return PhoneBase * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public PhoneBase getTelephonyProvidersEdgesPhonebasesetting(String phoneBaseId) throws IOException, ApiException { return getTelephonyProvidersEdgesPhonebasesetting(createGetTelephonyProvidersEdgesPhonebasesettingRequest(phoneBaseId)); } /** * Get a Phone Base Settings object by ID * * @param phoneBaseId Phone base ID (required) * @return PhoneBase * @throws IOException if the request fails to be processed */ public ApiResponse<PhoneBase> getTelephonyProvidersEdgesPhonebasesettingWithHttpInfo(String phoneBaseId) throws IOException { return getTelephonyProvidersEdgesPhonebasesetting(createGetTelephonyProvidersEdgesPhonebasesettingRequest(phoneBaseId).withHttpInfo()); } private GetTelephonyProvidersEdgesPhonebasesettingRequest createGetTelephonyProvidersEdgesPhonebasesettingRequest(String phoneBaseId) { return GetTelephonyProvidersEdgesPhonebasesettingRequest.builder() .withPhoneBaseId(phoneBaseId) .build(); } /** * Get a Phone Base Settings object by ID * * @param request The request object * @return PhoneBase * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public PhoneBase getTelephonyProvidersEdgesPhonebasesetting(GetTelephonyProvidersEdgesPhonebasesettingRequest request) throws IOException, ApiException { try { ApiResponse<PhoneBase> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<PhoneBase>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get a Phone Base Settings object by ID * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<PhoneBase> getTelephonyProvidersEdgesPhonebasesetting(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<PhoneBase>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<PhoneBase> response = (ApiResponse<PhoneBase>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<PhoneBase> response = (ApiResponse<PhoneBase>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get a list of Phone Base Settings objects * * @param pageSize Page size (optional, default to 25) * @param pageNumber Page number (optional, default to 1) * @param sortBy Value by which to sort (optional, default to name) * @param sortOrder Sort order (optional, default to ASC) * @param expand Fields to expand in the response, comma-separated (optional) * @param name Name (optional) * @return PhoneBaseEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public PhoneBaseEntityListing getTelephonyProvidersEdgesPhonebasesettings(Integer pageSize, Integer pageNumber, String sortBy, String sortOrder, List<String> expand, String name) throws IOException, ApiException { return getTelephonyProvidersEdgesPhonebasesettings(createGetTelephonyProvidersEdgesPhonebasesettingsRequest(pageSize, pageNumber, sortBy, sortOrder, expand, name)); } /** * Get a list of Phone Base Settings objects * * @param pageSize Page size (optional, default to 25) * @param pageNumber Page number (optional, default to 1) * @param sortBy Value by which to sort (optional, default to name) * @param sortOrder Sort order (optional, default to ASC) * @param expand Fields to expand in the response, comma-separated (optional) * @param name Name (optional) * @return PhoneBaseEntityListing * @throws IOException if the request fails to be processed */ public ApiResponse<PhoneBaseEntityListing> getTelephonyProvidersEdgesPhonebasesettingsWithHttpInfo(Integer pageSize, Integer pageNumber, String sortBy, String sortOrder, List<String> expand, String name) throws IOException { return getTelephonyProvidersEdgesPhonebasesettings(createGetTelephonyProvidersEdgesPhonebasesettingsRequest(pageSize, pageNumber, sortBy, sortOrder, expand, name).withHttpInfo()); } private GetTelephonyProvidersEdgesPhonebasesettingsRequest createGetTelephonyProvidersEdgesPhonebasesettingsRequest(Integer pageSize, Integer pageNumber, String sortBy, String sortOrder, List<String> expand, String name) { return GetTelephonyProvidersEdgesPhonebasesettingsRequest.builder() .withPageSize(pageSize) .withPageNumber(pageNumber) .withSortBy(sortBy) .withSortOrder(sortOrder) .withExpand(expand) .withName(name) .build(); } /** * Get a list of Phone Base Settings objects * * @param request The request object * @return PhoneBaseEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public PhoneBaseEntityListing getTelephonyProvidersEdgesPhonebasesettings(GetTelephonyProvidersEdgesPhonebasesettingsRequest request) throws IOException, ApiException { try { ApiResponse<PhoneBaseEntityListing> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<PhoneBaseEntityListing>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get a list of Phone Base Settings objects * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<PhoneBaseEntityListing> getTelephonyProvidersEdgesPhonebasesettings(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<PhoneBaseEntityListing>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<PhoneBaseEntityListing> response = (ApiResponse<PhoneBaseEntityListing>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<PhoneBaseEntityListing> response = (ApiResponse<PhoneBaseEntityListing>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get a list of available makes and models to create a new Phone Base Settings * * @param pageSize Page size (optional, default to 25) * @param pageNumber Page number (optional, default to 1) * @return PhoneMetaBaseEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public PhoneMetaBaseEntityListing getTelephonyProvidersEdgesPhonebasesettingsAvailablemetabases(Integer pageSize, Integer pageNumber) throws IOException, ApiException { return getTelephonyProvidersEdgesPhonebasesettingsAvailablemetabases(createGetTelephonyProvidersEdgesPhonebasesettingsAvailablemetabasesRequest(pageSize, pageNumber)); } /** * Get a list of available makes and models to create a new Phone Base Settings * * @param pageSize Page size (optional, default to 25) * @param pageNumber Page number (optional, default to 1) * @return PhoneMetaBaseEntityListing * @throws IOException if the request fails to be processed */ public ApiResponse<PhoneMetaBaseEntityListing> getTelephonyProvidersEdgesPhonebasesettingsAvailablemetabasesWithHttpInfo(Integer pageSize, Integer pageNumber) throws IOException { return getTelephonyProvidersEdgesPhonebasesettingsAvailablemetabases(createGetTelephonyProvidersEdgesPhonebasesettingsAvailablemetabasesRequest(pageSize, pageNumber).withHttpInfo()); } private GetTelephonyProvidersEdgesPhonebasesettingsAvailablemetabasesRequest createGetTelephonyProvidersEdgesPhonebasesettingsAvailablemetabasesRequest(Integer pageSize, Integer pageNumber) { return GetTelephonyProvidersEdgesPhonebasesettingsAvailablemetabasesRequest.builder() .withPageSize(pageSize) .withPageNumber(pageNumber) .build(); } /** * Get a list of available makes and models to create a new Phone Base Settings * * @param request The request object * @return PhoneMetaBaseEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public PhoneMetaBaseEntityListing getTelephonyProvidersEdgesPhonebasesettingsAvailablemetabases(GetTelephonyProvidersEdgesPhonebasesettingsAvailablemetabasesRequest request) throws IOException, ApiException { try { ApiResponse<PhoneMetaBaseEntityListing> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<PhoneMetaBaseEntityListing>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get a list of available makes and models to create a new Phone Base Settings * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<PhoneMetaBaseEntityListing> getTelephonyProvidersEdgesPhonebasesettingsAvailablemetabases(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<PhoneMetaBaseEntityListing>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<PhoneMetaBaseEntityListing> response = (ApiResponse<PhoneMetaBaseEntityListing>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<PhoneMetaBaseEntityListing> response = (ApiResponse<PhoneMetaBaseEntityListing>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get a Phone Base Settings instance template from a given make and model. This object can then be modified and saved as a new Phone Base Settings instance * * @param phoneMetabaseId The id of a metabase object upon which to base this Phone Base Settings (required) * @return PhoneBase * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public PhoneBase getTelephonyProvidersEdgesPhonebasesettingsTemplate(String phoneMetabaseId) throws IOException, ApiException { return getTelephonyProvidersEdgesPhonebasesettingsTemplate(createGetTelephonyProvidersEdgesPhonebasesettingsTemplateRequest(phoneMetabaseId)); } /** * Get a Phone Base Settings instance template from a given make and model. This object can then be modified and saved as a new Phone Base Settings instance * * @param phoneMetabaseId The id of a metabase object upon which to base this Phone Base Settings (required) * @return PhoneBase * @throws IOException if the request fails to be processed */ public ApiResponse<PhoneBase> getTelephonyProvidersEdgesPhonebasesettingsTemplateWithHttpInfo(String phoneMetabaseId) throws IOException { return getTelephonyProvidersEdgesPhonebasesettingsTemplate(createGetTelephonyProvidersEdgesPhonebasesettingsTemplateRequest(phoneMetabaseId).withHttpInfo()); } private GetTelephonyProvidersEdgesPhonebasesettingsTemplateRequest createGetTelephonyProvidersEdgesPhonebasesettingsTemplateRequest(String phoneMetabaseId) { return GetTelephonyProvidersEdgesPhonebasesettingsTemplateRequest.builder() .withPhoneMetabaseId(phoneMetabaseId) .build(); } /** * Get a Phone Base Settings instance template from a given make and model. This object can then be modified and saved as a new Phone Base Settings instance * * @param request The request object * @return PhoneBase * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public PhoneBase getTelephonyProvidersEdgesPhonebasesettingsTemplate(GetTelephonyProvidersEdgesPhonebasesettingsTemplateRequest request) throws IOException, ApiException { try { ApiResponse<PhoneBase> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<PhoneBase>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get a Phone Base Settings instance template from a given make and model. This object can then be modified and saved as a new Phone Base Settings instance * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<PhoneBase> getTelephonyProvidersEdgesPhonebasesettingsTemplate(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<PhoneBase>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<PhoneBase> response = (ApiResponse<PhoneBase>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<PhoneBase> response = (ApiResponse<PhoneBase>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get a list of Phone Instances * * @param pageNumber Page number (optional, default to 1) * @param pageSize Page size (optional, default to 25) * @param sortBy Value by which to sort (optional, default to name) * @param sortOrder Sort order (optional, default to ASC) * @param siteId Filter by site.id (optional) * @param webRtcUserId Filter by webRtcUser.id (optional) * @param phoneBaseSettingsId Filter by phoneBaseSettings.id (optional) * @param linesLoggedInUserId Filter by lines.loggedInUser.id (optional) * @param linesDefaultForUserId Filter by lines.defaultForUser.id (optional) * @param phoneHardwareId Filter by phone_hardwareId (optional) * @param linesId Filter by lines.id (optional) * @param linesName Filter by lines.name (optional) * @param name Name of the Phone to filter by (optional) * @param expand Fields to expand in the response, comma-separated (optional) * @param fields Fields and properties to get, comma-separated (optional) * @return PhoneEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public PhoneEntityListing getTelephonyProvidersEdgesPhones(Integer pageNumber, Integer pageSize, String sortBy, String sortOrder, String siteId, String webRtcUserId, String phoneBaseSettingsId, String linesLoggedInUserId, String linesDefaultForUserId, String phoneHardwareId, String linesId, String linesName, String name, List<String> expand, List<String> fields) throws IOException, ApiException { return getTelephonyProvidersEdgesPhones(createGetTelephonyProvidersEdgesPhonesRequest(pageNumber, pageSize, sortBy, sortOrder, siteId, webRtcUserId, phoneBaseSettingsId, linesLoggedInUserId, linesDefaultForUserId, phoneHardwareId, linesId, linesName, name, expand, fields)); } /** * Get a list of Phone Instances * * @param pageNumber Page number (optional, default to 1) * @param pageSize Page size (optional, default to 25) * @param sortBy Value by which to sort (optional, default to name) * @param sortOrder Sort order (optional, default to ASC) * @param siteId Filter by site.id (optional) * @param webRtcUserId Filter by webRtcUser.id (optional) * @param phoneBaseSettingsId Filter by phoneBaseSettings.id (optional) * @param linesLoggedInUserId Filter by lines.loggedInUser.id (optional) * @param linesDefaultForUserId Filter by lines.defaultForUser.id (optional) * @param phoneHardwareId Filter by phone_hardwareId (optional) * @param linesId Filter by lines.id (optional) * @param linesName Filter by lines.name (optional) * @param name Name of the Phone to filter by (optional) * @param expand Fields to expand in the response, comma-separated (optional) * @param fields Fields and properties to get, comma-separated (optional) * @return PhoneEntityListing * @throws IOException if the request fails to be processed */ public ApiResponse<PhoneEntityListing> getTelephonyProvidersEdgesPhonesWithHttpInfo(Integer pageNumber, Integer pageSize, String sortBy, String sortOrder, String siteId, String webRtcUserId, String phoneBaseSettingsId, String linesLoggedInUserId, String linesDefaultForUserId, String phoneHardwareId, String linesId, String linesName, String name, List<String> expand, List<String> fields) throws IOException { return getTelephonyProvidersEdgesPhones(createGetTelephonyProvidersEdgesPhonesRequest(pageNumber, pageSize, sortBy, sortOrder, siteId, webRtcUserId, phoneBaseSettingsId, linesLoggedInUserId, linesDefaultForUserId, phoneHardwareId, linesId, linesName, name, expand, fields).withHttpInfo()); } private GetTelephonyProvidersEdgesPhonesRequest createGetTelephonyProvidersEdgesPhonesRequest(Integer pageNumber, Integer pageSize, String sortBy, String sortOrder, String siteId, String webRtcUserId, String phoneBaseSettingsId, String linesLoggedInUserId, String linesDefaultForUserId, String phoneHardwareId, String linesId, String linesName, String name, List<String> expand, List<String> fields) { return GetTelephonyProvidersEdgesPhonesRequest.builder() .withPageNumber(pageNumber) .withPageSize(pageSize) .withSortBy(sortBy) .withSortOrder(sortOrder) .withSiteId(siteId) .withWebRtcUserId(webRtcUserId) .withPhoneBaseSettingsId(phoneBaseSettingsId) .withLinesLoggedInUserId(linesLoggedInUserId) .withLinesDefaultForUserId(linesDefaultForUserId) .withPhoneHardwareId(phoneHardwareId) .withLinesId(linesId) .withLinesName(linesName) .withName(name) .withExpand(expand) .withFields(fields) .build(); } /** * Get a list of Phone Instances * * @param request The request object * @return PhoneEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public PhoneEntityListing getTelephonyProvidersEdgesPhones(GetTelephonyProvidersEdgesPhonesRequest request) throws IOException, ApiException { try { ApiResponse<PhoneEntityListing> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<PhoneEntityListing>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get a list of Phone Instances * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<PhoneEntityListing> getTelephonyProvidersEdgesPhones(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<PhoneEntityListing>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<PhoneEntityListing> response = (ApiResponse<PhoneEntityListing>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<PhoneEntityListing> response = (ApiResponse<PhoneEntityListing>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get a Phone instance template based on a Phone Base Settings object. This object can then be modified and saved as a new Phone instance * * @param phoneBaseSettingsId The id of a Phone Base Settings object upon which to base this Phone (required) * @return Phone * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public Phone getTelephonyProvidersEdgesPhonesTemplate(String phoneBaseSettingsId) throws IOException, ApiException { return getTelephonyProvidersEdgesPhonesTemplate(createGetTelephonyProvidersEdgesPhonesTemplateRequest(phoneBaseSettingsId)); } /** * Get a Phone instance template based on a Phone Base Settings object. This object can then be modified and saved as a new Phone instance * * @param phoneBaseSettingsId The id of a Phone Base Settings object upon which to base this Phone (required) * @return Phone * @throws IOException if the request fails to be processed */ public ApiResponse<Phone> getTelephonyProvidersEdgesPhonesTemplateWithHttpInfo(String phoneBaseSettingsId) throws IOException { return getTelephonyProvidersEdgesPhonesTemplate(createGetTelephonyProvidersEdgesPhonesTemplateRequest(phoneBaseSettingsId).withHttpInfo()); } private GetTelephonyProvidersEdgesPhonesTemplateRequest createGetTelephonyProvidersEdgesPhonesTemplateRequest(String phoneBaseSettingsId) { return GetTelephonyProvidersEdgesPhonesTemplateRequest.builder() .withPhoneBaseSettingsId(phoneBaseSettingsId) .build(); } /** * Get a Phone instance template based on a Phone Base Settings object. This object can then be modified and saved as a new Phone instance * * @param request The request object * @return Phone * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public Phone getTelephonyProvidersEdgesPhonesTemplate(GetTelephonyProvidersEdgesPhonesTemplateRequest request) throws IOException, ApiException { try { ApiResponse<Phone> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<Phone>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get a Phone instance template based on a Phone Base Settings object. This object can then be modified and saved as a new Phone instance * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<Phone> getTelephonyProvidersEdgesPhonesTemplate(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<Phone>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<Phone> response = (ApiResponse<Phone>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<Phone> response = (ApiResponse<Phone>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get physical interfaces for edges. * Retrieves a list of all configured physical interfaces for a list of edges. Only 100 edges can be requested at a time. * @param edgeIds Comma separated list of Edge Id&#39;s (required) * @return PhysicalInterfaceEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public PhysicalInterfaceEntityListing getTelephonyProvidersEdgesPhysicalinterfaces(String edgeIds) throws IOException, ApiException { return getTelephonyProvidersEdgesPhysicalinterfaces(createGetTelephonyProvidersEdgesPhysicalinterfacesRequest(edgeIds)); } /** * Get physical interfaces for edges. * Retrieves a list of all configured physical interfaces for a list of edges. Only 100 edges can be requested at a time. * @param edgeIds Comma separated list of Edge Id&#39;s (required) * @return PhysicalInterfaceEntityListing * @throws IOException if the request fails to be processed */ public ApiResponse<PhysicalInterfaceEntityListing> getTelephonyProvidersEdgesPhysicalinterfacesWithHttpInfo(String edgeIds) throws IOException { return getTelephonyProvidersEdgesPhysicalinterfaces(createGetTelephonyProvidersEdgesPhysicalinterfacesRequest(edgeIds).withHttpInfo()); } private GetTelephonyProvidersEdgesPhysicalinterfacesRequest createGetTelephonyProvidersEdgesPhysicalinterfacesRequest(String edgeIds) { return GetTelephonyProvidersEdgesPhysicalinterfacesRequest.builder() .withEdgeIds(edgeIds) .build(); } /** * Get physical interfaces for edges. * Retrieves a list of all configured physical interfaces for a list of edges. Only 100 edges can be requested at a time. * @param request The request object * @return PhysicalInterfaceEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public PhysicalInterfaceEntityListing getTelephonyProvidersEdgesPhysicalinterfaces(GetTelephonyProvidersEdgesPhysicalinterfacesRequest request) throws IOException, ApiException { try { ApiResponse<PhysicalInterfaceEntityListing> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<PhysicalInterfaceEntityListing>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get physical interfaces for edges. * Retrieves a list of all configured physical interfaces for a list of edges. Only 100 edges can be requested at a time. * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<PhysicalInterfaceEntityListing> getTelephonyProvidersEdgesPhysicalinterfaces(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<PhysicalInterfaceEntityListing>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<PhysicalInterfaceEntityListing> response = (ApiResponse<PhysicalInterfaceEntityListing>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<PhysicalInterfaceEntityListing> response = (ApiResponse<PhysicalInterfaceEntityListing>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get a Site by ID. * * @param siteId Site ID (required) * @return Site * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public Site getTelephonyProvidersEdgesSite(String siteId) throws IOException, ApiException { return getTelephonyProvidersEdgesSite(createGetTelephonyProvidersEdgesSiteRequest(siteId)); } /** * Get a Site by ID. * * @param siteId Site ID (required) * @return Site * @throws IOException if the request fails to be processed */ public ApiResponse<Site> getTelephonyProvidersEdgesSiteWithHttpInfo(String siteId) throws IOException { return getTelephonyProvidersEdgesSite(createGetTelephonyProvidersEdgesSiteRequest(siteId).withHttpInfo()); } private GetTelephonyProvidersEdgesSiteRequest createGetTelephonyProvidersEdgesSiteRequest(String siteId) { return GetTelephonyProvidersEdgesSiteRequest.builder() .withSiteId(siteId) .build(); } /** * Get a Site by ID. * * @param request The request object * @return Site * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public Site getTelephonyProvidersEdgesSite(GetTelephonyProvidersEdgesSiteRequest request) throws IOException, ApiException { try { ApiResponse<Site> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<Site>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get a Site by ID. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<Site> getTelephonyProvidersEdgesSite(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<Site>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<Site> response = (ApiResponse<Site>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<Site> response = (ApiResponse<Site>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get a Number Plan by ID. * * @param siteId Site ID (required) * @param numberPlanId Number Plan ID (required) * @return NumberPlan * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public NumberPlan getTelephonyProvidersEdgesSiteNumberplan(String siteId, String numberPlanId) throws IOException, ApiException { return getTelephonyProvidersEdgesSiteNumberplan(createGetTelephonyProvidersEdgesSiteNumberplanRequest(siteId, numberPlanId)); } /** * Get a Number Plan by ID. * * @param siteId Site ID (required) * @param numberPlanId Number Plan ID (required) * @return NumberPlan * @throws IOException if the request fails to be processed */ public ApiResponse<NumberPlan> getTelephonyProvidersEdgesSiteNumberplanWithHttpInfo(String siteId, String numberPlanId) throws IOException { return getTelephonyProvidersEdgesSiteNumberplan(createGetTelephonyProvidersEdgesSiteNumberplanRequest(siteId, numberPlanId).withHttpInfo()); } private GetTelephonyProvidersEdgesSiteNumberplanRequest createGetTelephonyProvidersEdgesSiteNumberplanRequest(String siteId, String numberPlanId) { return GetTelephonyProvidersEdgesSiteNumberplanRequest.builder() .withSiteId(siteId) .withNumberPlanId(numberPlanId) .build(); } /** * Get a Number Plan by ID. * * @param request The request object * @return NumberPlan * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public NumberPlan getTelephonyProvidersEdgesSiteNumberplan(GetTelephonyProvidersEdgesSiteNumberplanRequest request) throws IOException, ApiException { try { ApiResponse<NumberPlan> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<NumberPlan>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get a Number Plan by ID. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<NumberPlan> getTelephonyProvidersEdgesSiteNumberplan(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<NumberPlan>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<NumberPlan> response = (ApiResponse<NumberPlan>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<NumberPlan> response = (ApiResponse<NumberPlan>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get the list of Number Plans for this Site. Only fetches the first 200 records. * * @param siteId Site ID (required) * @return List<NumberPlan> * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public List<NumberPlan> getTelephonyProvidersEdgesSiteNumberplans(String siteId) throws IOException, ApiException { return getTelephonyProvidersEdgesSiteNumberplans(createGetTelephonyProvidersEdgesSiteNumberplansRequest(siteId)); } /** * Get the list of Number Plans for this Site. Only fetches the first 200 records. * * @param siteId Site ID (required) * @return List<NumberPlan> * @throws IOException if the request fails to be processed */ public ApiResponse<List<NumberPlan>> getTelephonyProvidersEdgesSiteNumberplansWithHttpInfo(String siteId) throws IOException { return getTelephonyProvidersEdgesSiteNumberplans(createGetTelephonyProvidersEdgesSiteNumberplansRequest(siteId).withHttpInfo()); } private GetTelephonyProvidersEdgesSiteNumberplansRequest createGetTelephonyProvidersEdgesSiteNumberplansRequest(String siteId) { return GetTelephonyProvidersEdgesSiteNumberplansRequest.builder() .withSiteId(siteId) .build(); } /** * Get the list of Number Plans for this Site. Only fetches the first 200 records. * * @param request The request object * @return List<NumberPlan> * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public List<NumberPlan> getTelephonyProvidersEdgesSiteNumberplans(GetTelephonyProvidersEdgesSiteNumberplansRequest request) throws IOException, ApiException { try { ApiResponse<List<NumberPlan>> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<List<NumberPlan>>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get the list of Number Plans for this Site. Only fetches the first 200 records. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<List<NumberPlan>> getTelephonyProvidersEdgesSiteNumberplans(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<List<NumberPlan>>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<List<NumberPlan>> response = (ApiResponse<List<NumberPlan>>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<List<NumberPlan>> response = (ApiResponse<List<NumberPlan>>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get a list of Classifications for this Site * * @param siteId Site ID (required) * @param classification Classification (optional) * @return List<String> * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public List<String> getTelephonyProvidersEdgesSiteNumberplansClassifications(String siteId, String classification) throws IOException, ApiException { return getTelephonyProvidersEdgesSiteNumberplansClassifications(createGetTelephonyProvidersEdgesSiteNumberplansClassificationsRequest(siteId, classification)); } /** * Get a list of Classifications for this Site * * @param siteId Site ID (required) * @param classification Classification (optional) * @return List<String> * @throws IOException if the request fails to be processed */ public ApiResponse<List<String>> getTelephonyProvidersEdgesSiteNumberplansClassificationsWithHttpInfo(String siteId, String classification) throws IOException { return getTelephonyProvidersEdgesSiteNumberplansClassifications(createGetTelephonyProvidersEdgesSiteNumberplansClassificationsRequest(siteId, classification).withHttpInfo()); } private GetTelephonyProvidersEdgesSiteNumberplansClassificationsRequest createGetTelephonyProvidersEdgesSiteNumberplansClassificationsRequest(String siteId, String classification) { return GetTelephonyProvidersEdgesSiteNumberplansClassificationsRequest.builder() .withSiteId(siteId) .withClassification(classification) .build(); } /** * Get a list of Classifications for this Site * * @param request The request object * @return List<String> * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public List<String> getTelephonyProvidersEdgesSiteNumberplansClassifications(GetTelephonyProvidersEdgesSiteNumberplansClassificationsRequest request) throws IOException, ApiException { try { ApiResponse<List<String>> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<List<String>>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get a list of Classifications for this Site * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<List<String>> getTelephonyProvidersEdgesSiteNumberplansClassifications(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<List<String>>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<List<String>> response = (ApiResponse<List<String>>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<List<String>> response = (ApiResponse<List<String>>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get an outbound route * * @param siteId Site ID (required) * @param outboundRouteId Outbound route ID (required) * @return OutboundRouteBase * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public OutboundRouteBase getTelephonyProvidersEdgesSiteOutboundroute(String siteId, String outboundRouteId) throws IOException, ApiException { return getTelephonyProvidersEdgesSiteOutboundroute(createGetTelephonyProvidersEdgesSiteOutboundrouteRequest(siteId, outboundRouteId)); } /** * Get an outbound route * * @param siteId Site ID (required) * @param outboundRouteId Outbound route ID (required) * @return OutboundRouteBase * @throws IOException if the request fails to be processed */ public ApiResponse<OutboundRouteBase> getTelephonyProvidersEdgesSiteOutboundrouteWithHttpInfo(String siteId, String outboundRouteId) throws IOException { return getTelephonyProvidersEdgesSiteOutboundroute(createGetTelephonyProvidersEdgesSiteOutboundrouteRequest(siteId, outboundRouteId).withHttpInfo()); } private GetTelephonyProvidersEdgesSiteOutboundrouteRequest createGetTelephonyProvidersEdgesSiteOutboundrouteRequest(String siteId, String outboundRouteId) { return GetTelephonyProvidersEdgesSiteOutboundrouteRequest.builder() .withSiteId(siteId) .withOutboundRouteId(outboundRouteId) .build(); } /** * Get an outbound route * * @param request The request object * @return OutboundRouteBase * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public OutboundRouteBase getTelephonyProvidersEdgesSiteOutboundroute(GetTelephonyProvidersEdgesSiteOutboundrouteRequest request) throws IOException, ApiException { try { ApiResponse<OutboundRouteBase> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<OutboundRouteBase>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get an outbound route * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<OutboundRouteBase> getTelephonyProvidersEdgesSiteOutboundroute(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<OutboundRouteBase>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<OutboundRouteBase> response = (ApiResponse<OutboundRouteBase>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<OutboundRouteBase> response = (ApiResponse<OutboundRouteBase>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get outbound routes * * @param siteId Site ID (required) * @param pageSize Page size (optional, default to 25) * @param pageNumber Page number (optional, default to 1) * @param name Name (optional) * @param externalTrunkBasesIds externalTrunkBases.ids (optional) * @param sortBy Sort by (optional, default to name) * @return OutboundRouteBaseEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public OutboundRouteBaseEntityListing getTelephonyProvidersEdgesSiteOutboundroutes(String siteId, Integer pageSize, Integer pageNumber, String name, String externalTrunkBasesIds, String sortBy) throws IOException, ApiException { return getTelephonyProvidersEdgesSiteOutboundroutes(createGetTelephonyProvidersEdgesSiteOutboundroutesRequest(siteId, pageSize, pageNumber, name, externalTrunkBasesIds, sortBy)); } /** * Get outbound routes * * @param siteId Site ID (required) * @param pageSize Page size (optional, default to 25) * @param pageNumber Page number (optional, default to 1) * @param name Name (optional) * @param externalTrunkBasesIds externalTrunkBases.ids (optional) * @param sortBy Sort by (optional, default to name) * @return OutboundRouteBaseEntityListing * @throws IOException if the request fails to be processed */ public ApiResponse<OutboundRouteBaseEntityListing> getTelephonyProvidersEdgesSiteOutboundroutesWithHttpInfo(String siteId, Integer pageSize, Integer pageNumber, String name, String externalTrunkBasesIds, String sortBy) throws IOException { return getTelephonyProvidersEdgesSiteOutboundroutes(createGetTelephonyProvidersEdgesSiteOutboundroutesRequest(siteId, pageSize, pageNumber, name, externalTrunkBasesIds, sortBy).withHttpInfo()); } private GetTelephonyProvidersEdgesSiteOutboundroutesRequest createGetTelephonyProvidersEdgesSiteOutboundroutesRequest(String siteId, Integer pageSize, Integer pageNumber, String name, String externalTrunkBasesIds, String sortBy) { return GetTelephonyProvidersEdgesSiteOutboundroutesRequest.builder() .withSiteId(siteId) .withPageSize(pageSize) .withPageNumber(pageNumber) .withName(name) .withExternalTrunkBasesIds(externalTrunkBasesIds) .withSortBy(sortBy) .build(); } /** * Get outbound routes * * @param request The request object * @return OutboundRouteBaseEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public OutboundRouteBaseEntityListing getTelephonyProvidersEdgesSiteOutboundroutes(GetTelephonyProvidersEdgesSiteOutboundroutesRequest request) throws IOException, ApiException { try { ApiResponse<OutboundRouteBaseEntityListing> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<OutboundRouteBaseEntityListing>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get outbound routes * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<OutboundRouteBaseEntityListing> getTelephonyProvidersEdgesSiteOutboundroutes(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<OutboundRouteBaseEntityListing>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<OutboundRouteBaseEntityListing> response = (ApiResponse<OutboundRouteBaseEntityListing>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<OutboundRouteBaseEntityListing> response = (ApiResponse<OutboundRouteBaseEntityListing>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get the list of Sites. * * @param pageSize Page size (optional, default to 25) * @param pageNumber Page number (optional, default to 1) * @param sortBy Sort by (optional, default to name) * @param sortOrder Sort order (optional, default to ASC) * @param name Name (optional) * @param locationId Location Id (optional) * @param managed Filter by managed (optional) * @return SiteEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public SiteEntityListing getTelephonyProvidersEdgesSites(Integer pageSize, Integer pageNumber, String sortBy, String sortOrder, String name, String locationId, Boolean managed) throws IOException, ApiException { return getTelephonyProvidersEdgesSites(createGetTelephonyProvidersEdgesSitesRequest(pageSize, pageNumber, sortBy, sortOrder, name, locationId, managed)); } /** * Get the list of Sites. * * @param pageSize Page size (optional, default to 25) * @param pageNumber Page number (optional, default to 1) * @param sortBy Sort by (optional, default to name) * @param sortOrder Sort order (optional, default to ASC) * @param name Name (optional) * @param locationId Location Id (optional) * @param managed Filter by managed (optional) * @return SiteEntityListing * @throws IOException if the request fails to be processed */ public ApiResponse<SiteEntityListing> getTelephonyProvidersEdgesSitesWithHttpInfo(Integer pageSize, Integer pageNumber, String sortBy, String sortOrder, String name, String locationId, Boolean managed) throws IOException { return getTelephonyProvidersEdgesSites(createGetTelephonyProvidersEdgesSitesRequest(pageSize, pageNumber, sortBy, sortOrder, name, locationId, managed).withHttpInfo()); } private GetTelephonyProvidersEdgesSitesRequest createGetTelephonyProvidersEdgesSitesRequest(Integer pageSize, Integer pageNumber, String sortBy, String sortOrder, String name, String locationId, Boolean managed) { return GetTelephonyProvidersEdgesSitesRequest.builder() .withPageSize(pageSize) .withPageNumber(pageNumber) .withSortBy(sortBy) .withSortOrder(sortOrder) .withName(name) .withLocationId(locationId) .withManaged(managed) .build(); } /** * Get the list of Sites. * * @param request The request object * @return SiteEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public SiteEntityListing getTelephonyProvidersEdgesSites(GetTelephonyProvidersEdgesSitesRequest request) throws IOException, ApiException { try { ApiResponse<SiteEntityListing> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<SiteEntityListing>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get the list of Sites. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<SiteEntityListing> getTelephonyProvidersEdgesSites(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<SiteEntityListing>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<SiteEntityListing> response = (ApiResponse<SiteEntityListing>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<SiteEntityListing> response = (ApiResponse<SiteEntityListing>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get a list of Edge-compatible time zones * * @param pageSize Page size (optional, default to 1000) * @param pageNumber Page number (optional, default to 1) * @return TimeZoneEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public TimeZoneEntityListing getTelephonyProvidersEdgesTimezones(Integer pageSize, Integer pageNumber) throws IOException, ApiException { return getTelephonyProvidersEdgesTimezones(createGetTelephonyProvidersEdgesTimezonesRequest(pageSize, pageNumber)); } /** * Get a list of Edge-compatible time zones * * @param pageSize Page size (optional, default to 1000) * @param pageNumber Page number (optional, default to 1) * @return TimeZoneEntityListing * @throws IOException if the request fails to be processed */ public ApiResponse<TimeZoneEntityListing> getTelephonyProvidersEdgesTimezonesWithHttpInfo(Integer pageSize, Integer pageNumber) throws IOException { return getTelephonyProvidersEdgesTimezones(createGetTelephonyProvidersEdgesTimezonesRequest(pageSize, pageNumber).withHttpInfo()); } private GetTelephonyProvidersEdgesTimezonesRequest createGetTelephonyProvidersEdgesTimezonesRequest(Integer pageSize, Integer pageNumber) { return GetTelephonyProvidersEdgesTimezonesRequest.builder() .withPageSize(pageSize) .withPageNumber(pageNumber) .build(); } /** * Get a list of Edge-compatible time zones * * @param request The request object * @return TimeZoneEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public TimeZoneEntityListing getTelephonyProvidersEdgesTimezones(GetTelephonyProvidersEdgesTimezonesRequest request) throws IOException, ApiException { try { ApiResponse<TimeZoneEntityListing> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<TimeZoneEntityListing>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get a list of Edge-compatible time zones * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<TimeZoneEntityListing> getTelephonyProvidersEdgesTimezones(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<TimeZoneEntityListing>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<TimeZoneEntityListing> response = (ApiResponse<TimeZoneEntityListing>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<TimeZoneEntityListing> response = (ApiResponse<TimeZoneEntityListing>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get a Trunk by ID * * @param trunkId Trunk ID (required) * @return Trunk * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public Trunk getTelephonyProvidersEdgesTrunk(String trunkId) throws IOException, ApiException { return getTelephonyProvidersEdgesTrunk(createGetTelephonyProvidersEdgesTrunkRequest(trunkId)); } /** * Get a Trunk by ID * * @param trunkId Trunk ID (required) * @return Trunk * @throws IOException if the request fails to be processed */ public ApiResponse<Trunk> getTelephonyProvidersEdgesTrunkWithHttpInfo(String trunkId) throws IOException { return getTelephonyProvidersEdgesTrunk(createGetTelephonyProvidersEdgesTrunkRequest(trunkId).withHttpInfo()); } private GetTelephonyProvidersEdgesTrunkRequest createGetTelephonyProvidersEdgesTrunkRequest(String trunkId) { return GetTelephonyProvidersEdgesTrunkRequest.builder() .withTrunkId(trunkId) .build(); } /** * Get a Trunk by ID * * @param request The request object * @return Trunk * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public Trunk getTelephonyProvidersEdgesTrunk(GetTelephonyProvidersEdgesTrunkRequest request) throws IOException, ApiException { try { ApiResponse<Trunk> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<Trunk>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get a Trunk by ID * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<Trunk> getTelephonyProvidersEdgesTrunk(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<Trunk>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<Trunk> response = (ApiResponse<Trunk>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<Trunk> response = (ApiResponse<Trunk>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get the trunk metrics. * * @param trunkId Trunk Id (required) * @return TrunkMetrics * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public TrunkMetrics getTelephonyProvidersEdgesTrunkMetrics(String trunkId) throws IOException, ApiException { return getTelephonyProvidersEdgesTrunkMetrics(createGetTelephonyProvidersEdgesTrunkMetricsRequest(trunkId)); } /** * Get the trunk metrics. * * @param trunkId Trunk Id (required) * @return TrunkMetrics * @throws IOException if the request fails to be processed */ public ApiResponse<TrunkMetrics> getTelephonyProvidersEdgesTrunkMetricsWithHttpInfo(String trunkId) throws IOException { return getTelephonyProvidersEdgesTrunkMetrics(createGetTelephonyProvidersEdgesTrunkMetricsRequest(trunkId).withHttpInfo()); } private GetTelephonyProvidersEdgesTrunkMetricsRequest createGetTelephonyProvidersEdgesTrunkMetricsRequest(String trunkId) { return GetTelephonyProvidersEdgesTrunkMetricsRequest.builder() .withTrunkId(trunkId) .build(); } /** * Get the trunk metrics. * * @param request The request object * @return TrunkMetrics * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public TrunkMetrics getTelephonyProvidersEdgesTrunkMetrics(GetTelephonyProvidersEdgesTrunkMetricsRequest request) throws IOException, ApiException { try { ApiResponse<TrunkMetrics> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<TrunkMetrics>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get the trunk metrics. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<TrunkMetrics> getTelephonyProvidersEdgesTrunkMetrics(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<TrunkMetrics>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<TrunkMetrics> response = (ApiResponse<TrunkMetrics>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<TrunkMetrics> response = (ApiResponse<TrunkMetrics>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get a Trunk Base Settings object by ID * Managed properties will not be returned unless the user is assigned the internal:trunk:edit permission. * @param trunkBaseSettingsId Trunk Base ID (required) * @param ignoreHidden Set this to true to not receive trunk properties that are meant to be hidden or for internal system usage only. (optional) * @return TrunkBase * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public TrunkBase getTelephonyProvidersEdgesTrunkbasesetting(String trunkBaseSettingsId, Boolean ignoreHidden) throws IOException, ApiException { return getTelephonyProvidersEdgesTrunkbasesetting(createGetTelephonyProvidersEdgesTrunkbasesettingRequest(trunkBaseSettingsId, ignoreHidden)); } /** * Get a Trunk Base Settings object by ID * Managed properties will not be returned unless the user is assigned the internal:trunk:edit permission. * @param trunkBaseSettingsId Trunk Base ID (required) * @param ignoreHidden Set this to true to not receive trunk properties that are meant to be hidden or for internal system usage only. (optional) * @return TrunkBase * @throws IOException if the request fails to be processed */ public ApiResponse<TrunkBase> getTelephonyProvidersEdgesTrunkbasesettingWithHttpInfo(String trunkBaseSettingsId, Boolean ignoreHidden) throws IOException { return getTelephonyProvidersEdgesTrunkbasesetting(createGetTelephonyProvidersEdgesTrunkbasesettingRequest(trunkBaseSettingsId, ignoreHidden).withHttpInfo()); } private GetTelephonyProvidersEdgesTrunkbasesettingRequest createGetTelephonyProvidersEdgesTrunkbasesettingRequest(String trunkBaseSettingsId, Boolean ignoreHidden) { return GetTelephonyProvidersEdgesTrunkbasesettingRequest.builder() .withTrunkBaseSettingsId(trunkBaseSettingsId) .withIgnoreHidden(ignoreHidden) .build(); } /** * Get a Trunk Base Settings object by ID * Managed properties will not be returned unless the user is assigned the internal:trunk:edit permission. * @param request The request object * @return TrunkBase * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public TrunkBase getTelephonyProvidersEdgesTrunkbasesetting(GetTelephonyProvidersEdgesTrunkbasesettingRequest request) throws IOException, ApiException { try { ApiResponse<TrunkBase> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<TrunkBase>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get a Trunk Base Settings object by ID * Managed properties will not be returned unless the user is assigned the internal:trunk:edit permission. * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<TrunkBase> getTelephonyProvidersEdgesTrunkbasesetting(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<TrunkBase>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<TrunkBase> response = (ApiResponse<TrunkBase>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<TrunkBase> response = (ApiResponse<TrunkBase>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get Trunk Base Settings listing * Managed properties will not be returned unless the user is assigned the internal:trunk:edit permission. * @param pageNumber Page number (optional, default to 1) * @param pageSize Page size (optional, default to 25) * @param sortBy Value by which to sort (optional, default to name) * @param sortOrder Sort order (optional, default to ASC) * @param recordingEnabled Filter trunks by recording enabled (optional) * @param ignoreHidden Set this to true to not receive trunk properties that are meant to be hidden or for internal system usage only. (optional) * @param managed Filter by managed (optional) * @param expand Fields to expand in the response, comma-separated (optional) * @param name Name of the TrunkBase to filter by (optional) * @return TrunkBaseEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public TrunkBaseEntityListing getTelephonyProvidersEdgesTrunkbasesettings(Integer pageNumber, Integer pageSize, String sortBy, String sortOrder, Boolean recordingEnabled, Boolean ignoreHidden, Boolean managed, List<String> expand, String name) throws IOException, ApiException { return getTelephonyProvidersEdgesTrunkbasesettings(createGetTelephonyProvidersEdgesTrunkbasesettingsRequest(pageNumber, pageSize, sortBy, sortOrder, recordingEnabled, ignoreHidden, managed, expand, name)); } /** * Get Trunk Base Settings listing * Managed properties will not be returned unless the user is assigned the internal:trunk:edit permission. * @param pageNumber Page number (optional, default to 1) * @param pageSize Page size (optional, default to 25) * @param sortBy Value by which to sort (optional, default to name) * @param sortOrder Sort order (optional, default to ASC) * @param recordingEnabled Filter trunks by recording enabled (optional) * @param ignoreHidden Set this to true to not receive trunk properties that are meant to be hidden or for internal system usage only. (optional) * @param managed Filter by managed (optional) * @param expand Fields to expand in the response, comma-separated (optional) * @param name Name of the TrunkBase to filter by (optional) * @return TrunkBaseEntityListing * @throws IOException if the request fails to be processed */ public ApiResponse<TrunkBaseEntityListing> getTelephonyProvidersEdgesTrunkbasesettingsWithHttpInfo(Integer pageNumber, Integer pageSize, String sortBy, String sortOrder, Boolean recordingEnabled, Boolean ignoreHidden, Boolean managed, List<String> expand, String name) throws IOException { return getTelephonyProvidersEdgesTrunkbasesettings(createGetTelephonyProvidersEdgesTrunkbasesettingsRequest(pageNumber, pageSize, sortBy, sortOrder, recordingEnabled, ignoreHidden, managed, expand, name).withHttpInfo()); } private GetTelephonyProvidersEdgesTrunkbasesettingsRequest createGetTelephonyProvidersEdgesTrunkbasesettingsRequest(Integer pageNumber, Integer pageSize, String sortBy, String sortOrder, Boolean recordingEnabled, Boolean ignoreHidden, Boolean managed, List<String> expand, String name) { return GetTelephonyProvidersEdgesTrunkbasesettingsRequest.builder() .withPageNumber(pageNumber) .withPageSize(pageSize) .withSortBy(sortBy) .withSortOrder(sortOrder) .withRecordingEnabled(recordingEnabled) .withIgnoreHidden(ignoreHidden) .withManaged(managed) .withExpand(expand) .withName(name) .build(); } /** * Get Trunk Base Settings listing * Managed properties will not be returned unless the user is assigned the internal:trunk:edit permission. * @param request The request object * @return TrunkBaseEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public TrunkBaseEntityListing getTelephonyProvidersEdgesTrunkbasesettings(GetTelephonyProvidersEdgesTrunkbasesettingsRequest request) throws IOException, ApiException { try { ApiResponse<TrunkBaseEntityListing> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<TrunkBaseEntityListing>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get Trunk Base Settings listing * Managed properties will not be returned unless the user is assigned the internal:trunk:edit permission. * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<TrunkBaseEntityListing> getTelephonyProvidersEdgesTrunkbasesettings(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<TrunkBaseEntityListing>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<TrunkBaseEntityListing> response = (ApiResponse<TrunkBaseEntityListing>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<TrunkBaseEntityListing> response = (ApiResponse<TrunkBaseEntityListing>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get a list of available makes and models to create a new Trunk Base Settings * * @param type (optional) * @param pageSize (optional, default to 25) * @param pageNumber (optional, default to 1) * @return TrunkMetabaseEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public TrunkMetabaseEntityListing getTelephonyProvidersEdgesTrunkbasesettingsAvailablemetabases(String type, Integer pageSize, Integer pageNumber) throws IOException, ApiException { return getTelephonyProvidersEdgesTrunkbasesettingsAvailablemetabases(createGetTelephonyProvidersEdgesTrunkbasesettingsAvailablemetabasesRequest(type, pageSize, pageNumber)); } /** * Get a list of available makes and models to create a new Trunk Base Settings * * @param type (optional) * @param pageSize (optional, default to 25) * @param pageNumber (optional, default to 1) * @return TrunkMetabaseEntityListing * @throws IOException if the request fails to be processed */ public ApiResponse<TrunkMetabaseEntityListing> getTelephonyProvidersEdgesTrunkbasesettingsAvailablemetabasesWithHttpInfo(String type, Integer pageSize, Integer pageNumber) throws IOException { return getTelephonyProvidersEdgesTrunkbasesettingsAvailablemetabases(createGetTelephonyProvidersEdgesTrunkbasesettingsAvailablemetabasesRequest(type, pageSize, pageNumber).withHttpInfo()); } private GetTelephonyProvidersEdgesTrunkbasesettingsAvailablemetabasesRequest createGetTelephonyProvidersEdgesTrunkbasesettingsAvailablemetabasesRequest(String type, Integer pageSize, Integer pageNumber) { return GetTelephonyProvidersEdgesTrunkbasesettingsAvailablemetabasesRequest.builder() .withType(type) .withPageSize(pageSize) .withPageNumber(pageNumber) .build(); } /** * Get a list of available makes and models to create a new Trunk Base Settings * * @param request The request object * @return TrunkMetabaseEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public TrunkMetabaseEntityListing getTelephonyProvidersEdgesTrunkbasesettingsAvailablemetabases(GetTelephonyProvidersEdgesTrunkbasesettingsAvailablemetabasesRequest request) throws IOException, ApiException { try { ApiResponse<TrunkMetabaseEntityListing> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<TrunkMetabaseEntityListing>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get a list of available makes and models to create a new Trunk Base Settings * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<TrunkMetabaseEntityListing> getTelephonyProvidersEdgesTrunkbasesettingsAvailablemetabases(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<TrunkMetabaseEntityListing>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<TrunkMetabaseEntityListing> response = (ApiResponse<TrunkMetabaseEntityListing>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<TrunkMetabaseEntityListing> response = (ApiResponse<TrunkMetabaseEntityListing>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get a Trunk Base Settings instance template from a given make and model. This object can then be modified and saved as a new Trunk Base Settings instance * * @param trunkMetabaseId The id of a metabase object upon which to base this Trunk Base Settings (required) * @return TrunkBase * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public TrunkBase getTelephonyProvidersEdgesTrunkbasesettingsTemplate(String trunkMetabaseId) throws IOException, ApiException { return getTelephonyProvidersEdgesTrunkbasesettingsTemplate(createGetTelephonyProvidersEdgesTrunkbasesettingsTemplateRequest(trunkMetabaseId)); } /** * Get a Trunk Base Settings instance template from a given make and model. This object can then be modified and saved as a new Trunk Base Settings instance * * @param trunkMetabaseId The id of a metabase object upon which to base this Trunk Base Settings (required) * @return TrunkBase * @throws IOException if the request fails to be processed */ public ApiResponse<TrunkBase> getTelephonyProvidersEdgesTrunkbasesettingsTemplateWithHttpInfo(String trunkMetabaseId) throws IOException { return getTelephonyProvidersEdgesTrunkbasesettingsTemplate(createGetTelephonyProvidersEdgesTrunkbasesettingsTemplateRequest(trunkMetabaseId).withHttpInfo()); } private GetTelephonyProvidersEdgesTrunkbasesettingsTemplateRequest createGetTelephonyProvidersEdgesTrunkbasesettingsTemplateRequest(String trunkMetabaseId) { return GetTelephonyProvidersEdgesTrunkbasesettingsTemplateRequest.builder() .withTrunkMetabaseId(trunkMetabaseId) .build(); } /** * Get a Trunk Base Settings instance template from a given make and model. This object can then be modified and saved as a new Trunk Base Settings instance * * @param request The request object * @return TrunkBase * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public TrunkBase getTelephonyProvidersEdgesTrunkbasesettingsTemplate(GetTelephonyProvidersEdgesTrunkbasesettingsTemplateRequest request) throws IOException, ApiException { try { ApiResponse<TrunkBase> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<TrunkBase>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get a Trunk Base Settings instance template from a given make and model. This object can then be modified and saved as a new Trunk Base Settings instance * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<TrunkBase> getTelephonyProvidersEdgesTrunkbasesettingsTemplate(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<TrunkBase>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<TrunkBase> response = (ApiResponse<TrunkBase>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<TrunkBase> response = (ApiResponse<TrunkBase>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get the list of available trunks. * Trunks are created by assigning trunk base settings to an Edge or Edge Group. * @param pageNumber Page number (optional, default to 1) * @param pageSize Page size (optional, default to 25) * @param sortBy Value by which to sort (optional, default to name) * @param sortOrder Sort order (optional, default to ASC) * @param edgeId Filter by Edge Ids (optional) * @param trunkBaseId Filter by Trunk Base Ids (optional) * @param trunkType Filter by a Trunk type (optional) * @return TrunkEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public TrunkEntityListing getTelephonyProvidersEdgesTrunks(Integer pageNumber, Integer pageSize, String sortBy, String sortOrder, String edgeId, String trunkBaseId, String trunkType) throws IOException, ApiException { return getTelephonyProvidersEdgesTrunks(createGetTelephonyProvidersEdgesTrunksRequest(pageNumber, pageSize, sortBy, sortOrder, edgeId, trunkBaseId, trunkType)); } /** * Get the list of available trunks. * Trunks are created by assigning trunk base settings to an Edge or Edge Group. * @param pageNumber Page number (optional, default to 1) * @param pageSize Page size (optional, default to 25) * @param sortBy Value by which to sort (optional, default to name) * @param sortOrder Sort order (optional, default to ASC) * @param edgeId Filter by Edge Ids (optional) * @param trunkBaseId Filter by Trunk Base Ids (optional) * @param trunkType Filter by a Trunk type (optional) * @return TrunkEntityListing * @throws IOException if the request fails to be processed */ public ApiResponse<TrunkEntityListing> getTelephonyProvidersEdgesTrunksWithHttpInfo(Integer pageNumber, Integer pageSize, String sortBy, String sortOrder, String edgeId, String trunkBaseId, String trunkType) throws IOException { return getTelephonyProvidersEdgesTrunks(createGetTelephonyProvidersEdgesTrunksRequest(pageNumber, pageSize, sortBy, sortOrder, edgeId, trunkBaseId, trunkType).withHttpInfo()); } private GetTelephonyProvidersEdgesTrunksRequest createGetTelephonyProvidersEdgesTrunksRequest(Integer pageNumber, Integer pageSize, String sortBy, String sortOrder, String edgeId, String trunkBaseId, String trunkType) { return GetTelephonyProvidersEdgesTrunksRequest.builder() .withPageNumber(pageNumber) .withPageSize(pageSize) .withSortBy(sortBy) .withSortOrder(sortOrder) .withEdgeId(edgeId) .withTrunkBaseId(trunkBaseId) .withTrunkType(trunkType) .build(); } /** * Get the list of available trunks. * Trunks are created by assigning trunk base settings to an Edge or Edge Group. * @param request The request object * @return TrunkEntityListing * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public TrunkEntityListing getTelephonyProvidersEdgesTrunks(GetTelephonyProvidersEdgesTrunksRequest request) throws IOException, ApiException { try { ApiResponse<TrunkEntityListing> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<TrunkEntityListing>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get the list of available trunks. * Trunks are created by assigning trunk base settings to an Edge or Edge Group. * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<TrunkEntityListing> getTelephonyProvidersEdgesTrunks(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<TrunkEntityListing>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<TrunkEntityListing> response = (ApiResponse<TrunkEntityListing>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<TrunkEntityListing> response = (ApiResponse<TrunkEntityListing>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get the metrics for a list of trunks. * * @param trunkIds Comma separated list of Trunk Id&#39;s (required) * @return List<TrunkMetrics> * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public List<TrunkMetrics> getTelephonyProvidersEdgesTrunksMetrics(String trunkIds) throws IOException, ApiException { return getTelephonyProvidersEdgesTrunksMetrics(createGetTelephonyProvidersEdgesTrunksMetricsRequest(trunkIds)); } /** * Get the metrics for a list of trunks. * * @param trunkIds Comma separated list of Trunk Id&#39;s (required) * @return List<TrunkMetrics> * @throws IOException if the request fails to be processed */ public ApiResponse<List<TrunkMetrics>> getTelephonyProvidersEdgesTrunksMetricsWithHttpInfo(String trunkIds) throws IOException { return getTelephonyProvidersEdgesTrunksMetrics(createGetTelephonyProvidersEdgesTrunksMetricsRequest(trunkIds).withHttpInfo()); } private GetTelephonyProvidersEdgesTrunksMetricsRequest createGetTelephonyProvidersEdgesTrunksMetricsRequest(String trunkIds) { return GetTelephonyProvidersEdgesTrunksMetricsRequest.builder() .withTrunkIds(trunkIds) .build(); } /** * Get the metrics for a list of trunks. * * @param request The request object * @return List<TrunkMetrics> * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public List<TrunkMetrics> getTelephonyProvidersEdgesTrunksMetrics(GetTelephonyProvidersEdgesTrunksMetricsRequest request) throws IOException, ApiException { try { ApiResponse<List<TrunkMetrics>> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<List<TrunkMetrics>>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get the metrics for a list of trunks. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<List<TrunkMetrics>> getTelephonyProvidersEdgesTrunksMetrics(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<List<TrunkMetrics>>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<List<TrunkMetrics>> response = (ApiResponse<List<TrunkMetrics>>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<List<TrunkMetrics>> response = (ApiResponse<List<TrunkMetrics>>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Get Counts of trunks that have recording disabled or enabled * * @param trunkType The type of this trunk base. (optional) * @return TrunkRecordingEnabledCount * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public TrunkRecordingEnabledCount getTelephonyProvidersEdgesTrunkswithrecording(String trunkType) throws IOException, ApiException { return getTelephonyProvidersEdgesTrunkswithrecording(createGetTelephonyProvidersEdgesTrunkswithrecordingRequest(trunkType)); } /** * Get Counts of trunks that have recording disabled or enabled * * @param trunkType The type of this trunk base. (optional) * @return TrunkRecordingEnabledCount * @throws IOException if the request fails to be processed */ public ApiResponse<TrunkRecordingEnabledCount> getTelephonyProvidersEdgesTrunkswithrecordingWithHttpInfo(String trunkType) throws IOException { return getTelephonyProvidersEdgesTrunkswithrecording(createGetTelephonyProvidersEdgesTrunkswithrecordingRequest(trunkType).withHttpInfo()); } private GetTelephonyProvidersEdgesTrunkswithrecordingRequest createGetTelephonyProvidersEdgesTrunkswithrecordingRequest(String trunkType) { return GetTelephonyProvidersEdgesTrunkswithrecordingRequest.builder() .withTrunkType(trunkType) .build(); } /** * Get Counts of trunks that have recording disabled or enabled * * @param request The request object * @return TrunkRecordingEnabledCount * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public TrunkRecordingEnabledCount getTelephonyProvidersEdgesTrunkswithrecording(GetTelephonyProvidersEdgesTrunkswithrecordingRequest request) throws IOException, ApiException { try { ApiResponse<TrunkRecordingEnabledCount> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<TrunkRecordingEnabledCount>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Get Counts of trunks that have recording disabled or enabled * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<TrunkRecordingEnabledCount> getTelephonyProvidersEdgesTrunkswithrecording(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<TrunkRecordingEnabledCount>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<TrunkRecordingEnabledCount> response = (ApiResponse<TrunkRecordingEnabledCount>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<TrunkRecordingEnabledCount> response = (ApiResponse<TrunkRecordingEnabledCount>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Nslookup request command to collect networking-related information from an Edge for a target IP or host. * * @param edgeId Edge Id (required) * @param body request payload to get network diagnostic (required) * @return EdgeNetworkDiagnostic * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeNetworkDiagnostic postTelephonyProvidersEdgeDiagnosticNslookup(String edgeId, EdgeNetworkDiagnosticRequest body) throws IOException, ApiException { return postTelephonyProvidersEdgeDiagnosticNslookup(createPostTelephonyProvidersEdgeDiagnosticNslookupRequest(edgeId, body)); } /** * Nslookup request command to collect networking-related information from an Edge for a target IP or host. * * @param edgeId Edge Id (required) * @param body request payload to get network diagnostic (required) * @return EdgeNetworkDiagnostic * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeNetworkDiagnostic> postTelephonyProvidersEdgeDiagnosticNslookupWithHttpInfo(String edgeId, EdgeNetworkDiagnosticRequest body) throws IOException { return postTelephonyProvidersEdgeDiagnosticNslookup(createPostTelephonyProvidersEdgeDiagnosticNslookupRequest(edgeId, body).withHttpInfo()); } private PostTelephonyProvidersEdgeDiagnosticNslookupRequest createPostTelephonyProvidersEdgeDiagnosticNslookupRequest(String edgeId, EdgeNetworkDiagnosticRequest body) { return PostTelephonyProvidersEdgeDiagnosticNslookupRequest.builder() .withEdgeId(edgeId) .withBody(body) .build(); } /** * Nslookup request command to collect networking-related information from an Edge for a target IP or host. * * @param request The request object * @return EdgeNetworkDiagnostic * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeNetworkDiagnostic postTelephonyProvidersEdgeDiagnosticNslookup(PostTelephonyProvidersEdgeDiagnosticNslookupRequest request) throws IOException, ApiException { try { ApiResponse<EdgeNetworkDiagnostic> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<EdgeNetworkDiagnostic>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Nslookup request command to collect networking-related information from an Edge for a target IP or host. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeNetworkDiagnostic> postTelephonyProvidersEdgeDiagnosticNslookup(ApiRequest<EdgeNetworkDiagnosticRequest> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<EdgeNetworkDiagnostic>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<EdgeNetworkDiagnostic> response = (ApiResponse<EdgeNetworkDiagnostic>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<EdgeNetworkDiagnostic> response = (ApiResponse<EdgeNetworkDiagnostic>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Ping Request command to collect networking-related information from an Edge for a target IP or host. * * @param edgeId Edge Id (required) * @param body request payload to get network diagnostic (required) * @return EdgeNetworkDiagnostic * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeNetworkDiagnostic postTelephonyProvidersEdgeDiagnosticPing(String edgeId, EdgeNetworkDiagnosticRequest body) throws IOException, ApiException { return postTelephonyProvidersEdgeDiagnosticPing(createPostTelephonyProvidersEdgeDiagnosticPingRequest(edgeId, body)); } /** * Ping Request command to collect networking-related information from an Edge for a target IP or host. * * @param edgeId Edge Id (required) * @param body request payload to get network diagnostic (required) * @return EdgeNetworkDiagnostic * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeNetworkDiagnostic> postTelephonyProvidersEdgeDiagnosticPingWithHttpInfo(String edgeId, EdgeNetworkDiagnosticRequest body) throws IOException { return postTelephonyProvidersEdgeDiagnosticPing(createPostTelephonyProvidersEdgeDiagnosticPingRequest(edgeId, body).withHttpInfo()); } private PostTelephonyProvidersEdgeDiagnosticPingRequest createPostTelephonyProvidersEdgeDiagnosticPingRequest(String edgeId, EdgeNetworkDiagnosticRequest body) { return PostTelephonyProvidersEdgeDiagnosticPingRequest.builder() .withEdgeId(edgeId) .withBody(body) .build(); } /** * Ping Request command to collect networking-related information from an Edge for a target IP or host. * * @param request The request object * @return EdgeNetworkDiagnostic * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeNetworkDiagnostic postTelephonyProvidersEdgeDiagnosticPing(PostTelephonyProvidersEdgeDiagnosticPingRequest request) throws IOException, ApiException { try { ApiResponse<EdgeNetworkDiagnostic> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<EdgeNetworkDiagnostic>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Ping Request command to collect networking-related information from an Edge for a target IP or host. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeNetworkDiagnostic> postTelephonyProvidersEdgeDiagnosticPing(ApiRequest<EdgeNetworkDiagnosticRequest> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<EdgeNetworkDiagnostic>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<EdgeNetworkDiagnostic> response = (ApiResponse<EdgeNetworkDiagnostic>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<EdgeNetworkDiagnostic> response = (ApiResponse<EdgeNetworkDiagnostic>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Route request command to collect networking-related information from an Edge for a target IP or host. * * @param edgeId Edge Id (required) * @param body request payload to get network diagnostic (required) * @return EdgeNetworkDiagnostic * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeNetworkDiagnostic postTelephonyProvidersEdgeDiagnosticRoute(String edgeId, EdgeNetworkDiagnosticRequest body) throws IOException, ApiException { return postTelephonyProvidersEdgeDiagnosticRoute(createPostTelephonyProvidersEdgeDiagnosticRouteRequest(edgeId, body)); } /** * Route request command to collect networking-related information from an Edge for a target IP or host. * * @param edgeId Edge Id (required) * @param body request payload to get network diagnostic (required) * @return EdgeNetworkDiagnostic * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeNetworkDiagnostic> postTelephonyProvidersEdgeDiagnosticRouteWithHttpInfo(String edgeId, EdgeNetworkDiagnosticRequest body) throws IOException { return postTelephonyProvidersEdgeDiagnosticRoute(createPostTelephonyProvidersEdgeDiagnosticRouteRequest(edgeId, body).withHttpInfo()); } private PostTelephonyProvidersEdgeDiagnosticRouteRequest createPostTelephonyProvidersEdgeDiagnosticRouteRequest(String edgeId, EdgeNetworkDiagnosticRequest body) { return PostTelephonyProvidersEdgeDiagnosticRouteRequest.builder() .withEdgeId(edgeId) .withBody(body) .build(); } /** * Route request command to collect networking-related information from an Edge for a target IP or host. * * @param request The request object * @return EdgeNetworkDiagnostic * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeNetworkDiagnostic postTelephonyProvidersEdgeDiagnosticRoute(PostTelephonyProvidersEdgeDiagnosticRouteRequest request) throws IOException, ApiException { try { ApiResponse<EdgeNetworkDiagnostic> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<EdgeNetworkDiagnostic>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Route request command to collect networking-related information from an Edge for a target IP or host. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeNetworkDiagnostic> postTelephonyProvidersEdgeDiagnosticRoute(ApiRequest<EdgeNetworkDiagnosticRequest> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<EdgeNetworkDiagnostic>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<EdgeNetworkDiagnostic> response = (ApiResponse<EdgeNetworkDiagnostic>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<EdgeNetworkDiagnostic> response = (ApiResponse<EdgeNetworkDiagnostic>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Tracepath request command to collect networking-related information from an Edge for a target IP or host. * * @param edgeId Edge Id (required) * @param body request payload to get network diagnostic (required) * @return EdgeNetworkDiagnostic * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeNetworkDiagnostic postTelephonyProvidersEdgeDiagnosticTracepath(String edgeId, EdgeNetworkDiagnosticRequest body) throws IOException, ApiException { return postTelephonyProvidersEdgeDiagnosticTracepath(createPostTelephonyProvidersEdgeDiagnosticTracepathRequest(edgeId, body)); } /** * Tracepath request command to collect networking-related information from an Edge for a target IP or host. * * @param edgeId Edge Id (required) * @param body request payload to get network diagnostic (required) * @return EdgeNetworkDiagnostic * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeNetworkDiagnostic> postTelephonyProvidersEdgeDiagnosticTracepathWithHttpInfo(String edgeId, EdgeNetworkDiagnosticRequest body) throws IOException { return postTelephonyProvidersEdgeDiagnosticTracepath(createPostTelephonyProvidersEdgeDiagnosticTracepathRequest(edgeId, body).withHttpInfo()); } private PostTelephonyProvidersEdgeDiagnosticTracepathRequest createPostTelephonyProvidersEdgeDiagnosticTracepathRequest(String edgeId, EdgeNetworkDiagnosticRequest body) { return PostTelephonyProvidersEdgeDiagnosticTracepathRequest.builder() .withEdgeId(edgeId) .withBody(body) .build(); } /** * Tracepath request command to collect networking-related information from an Edge for a target IP or host. * * @param request The request object * @return EdgeNetworkDiagnostic * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeNetworkDiagnostic postTelephonyProvidersEdgeDiagnosticTracepath(PostTelephonyProvidersEdgeDiagnosticTracepathRequest request) throws IOException, ApiException { try { ApiResponse<EdgeNetworkDiagnostic> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<EdgeNetworkDiagnostic>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Tracepath request command to collect networking-related information from an Edge for a target IP or host. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeNetworkDiagnostic> postTelephonyProvidersEdgeDiagnosticTracepath(ApiRequest<EdgeNetworkDiagnosticRequest> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<EdgeNetworkDiagnostic>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<EdgeNetworkDiagnostic> response = (ApiResponse<EdgeNetworkDiagnostic>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<EdgeNetworkDiagnostic> response = (ApiResponse<EdgeNetworkDiagnostic>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Create an edge logical interface. * Create * @param edgeId Edge ID (required) * @param body Logical interface (required) * @return DomainLogicalInterface * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public DomainLogicalInterface postTelephonyProvidersEdgeLogicalinterfaces(String edgeId, DomainLogicalInterface body) throws IOException, ApiException { return postTelephonyProvidersEdgeLogicalinterfaces(createPostTelephonyProvidersEdgeLogicalinterfacesRequest(edgeId, body)); } /** * Create an edge logical interface. * Create * @param edgeId Edge ID (required) * @param body Logical interface (required) * @return DomainLogicalInterface * @throws IOException if the request fails to be processed */ public ApiResponse<DomainLogicalInterface> postTelephonyProvidersEdgeLogicalinterfacesWithHttpInfo(String edgeId, DomainLogicalInterface body) throws IOException { return postTelephonyProvidersEdgeLogicalinterfaces(createPostTelephonyProvidersEdgeLogicalinterfacesRequest(edgeId, body).withHttpInfo()); } private PostTelephonyProvidersEdgeLogicalinterfacesRequest createPostTelephonyProvidersEdgeLogicalinterfacesRequest(String edgeId, DomainLogicalInterface body) { return PostTelephonyProvidersEdgeLogicalinterfacesRequest.builder() .withEdgeId(edgeId) .withBody(body) .build(); } /** * Create an edge logical interface. * Create * @param request The request object * @return DomainLogicalInterface * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public DomainLogicalInterface postTelephonyProvidersEdgeLogicalinterfaces(PostTelephonyProvidersEdgeLogicalinterfacesRequest request) throws IOException, ApiException { try { ApiResponse<DomainLogicalInterface> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<DomainLogicalInterface>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Create an edge logical interface. * Create * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<DomainLogicalInterface> postTelephonyProvidersEdgeLogicalinterfaces(ApiRequest<DomainLogicalInterface> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<DomainLogicalInterface>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<DomainLogicalInterface> response = (ApiResponse<DomainLogicalInterface>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<DomainLogicalInterface> response = (ApiResponse<DomainLogicalInterface>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Request that the specified fileIds be uploaded from the Edge. * * @param edgeId Edge ID (required) * @param jobId Job ID (required) * @param body Log upload request (required) * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public void postTelephonyProvidersEdgeLogsJobUpload(String edgeId, String jobId, EdgeLogsJobUploadRequest body) throws IOException, ApiException { postTelephonyProvidersEdgeLogsJobUpload(createPostTelephonyProvidersEdgeLogsJobUploadRequest(edgeId, jobId, body)); } /** * Request that the specified fileIds be uploaded from the Edge. * * @param edgeId Edge ID (required) * @param jobId Job ID (required) * @param body Log upload request (required) * @throws IOException if the request fails to be processed */ public ApiResponse<Void> postTelephonyProvidersEdgeLogsJobUploadWithHttpInfo(String edgeId, String jobId, EdgeLogsJobUploadRequest body) throws IOException { return postTelephonyProvidersEdgeLogsJobUpload(createPostTelephonyProvidersEdgeLogsJobUploadRequest(edgeId, jobId, body).withHttpInfo()); } private PostTelephonyProvidersEdgeLogsJobUploadRequest createPostTelephonyProvidersEdgeLogsJobUploadRequest(String edgeId, String jobId, EdgeLogsJobUploadRequest body) { return PostTelephonyProvidersEdgeLogsJobUploadRequest.builder() .withEdgeId(edgeId) .withJobId(jobId) .withBody(body) .build(); } /** * Request that the specified fileIds be uploaded from the Edge. * * @param request The request object * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public void postTelephonyProvidersEdgeLogsJobUpload(PostTelephonyProvidersEdgeLogsJobUploadRequest request) throws IOException, ApiException { try { ApiResponse<Void> response = pcapiClient.invoke(request.withHttpInfo(), null); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; } } /** * Request that the specified fileIds be uploaded from the Edge. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<Void> postTelephonyProvidersEdgeLogsJobUpload(ApiRequest<EdgeLogsJobUploadRequest> request) throws IOException { try { return pcapiClient.invoke(request, null); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<Void> response = (ApiResponse<Void>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<Void> response = (ApiResponse<Void>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Create a job to upload a list of Edge logs. * * @param edgeId Edge ID (required) * @param body EdgeLogsJobRequest (required) * @return EdgeLogsJobResponse * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeLogsJobResponse postTelephonyProvidersEdgeLogsJobs(String edgeId, EdgeLogsJobRequest body) throws IOException, ApiException { return postTelephonyProvidersEdgeLogsJobs(createPostTelephonyProvidersEdgeLogsJobsRequest(edgeId, body)); } /** * Create a job to upload a list of Edge logs. * * @param edgeId Edge ID (required) * @param body EdgeLogsJobRequest (required) * @return EdgeLogsJobResponse * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeLogsJobResponse> postTelephonyProvidersEdgeLogsJobsWithHttpInfo(String edgeId, EdgeLogsJobRequest body) throws IOException { return postTelephonyProvidersEdgeLogsJobs(createPostTelephonyProvidersEdgeLogsJobsRequest(edgeId, body).withHttpInfo()); } private PostTelephonyProvidersEdgeLogsJobsRequest createPostTelephonyProvidersEdgeLogsJobsRequest(String edgeId, EdgeLogsJobRequest body) { return PostTelephonyProvidersEdgeLogsJobsRequest.builder() .withEdgeId(edgeId) .withBody(body) .build(); } /** * Create a job to upload a list of Edge logs. * * @param request The request object * @return EdgeLogsJobResponse * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeLogsJobResponse postTelephonyProvidersEdgeLogsJobs(PostTelephonyProvidersEdgeLogsJobsRequest request) throws IOException, ApiException { try { ApiResponse<EdgeLogsJobResponse> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<EdgeLogsJobResponse>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Create a job to upload a list of Edge logs. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeLogsJobResponse> postTelephonyProvidersEdgeLogsJobs(ApiRequest<EdgeLogsJobRequest> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<EdgeLogsJobResponse>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<EdgeLogsJobResponse> response = (ApiResponse<EdgeLogsJobResponse>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<EdgeLogsJobResponse> response = (ApiResponse<EdgeLogsJobResponse>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Reboot an Edge * * @param edgeId Edge ID (required) * @param body Parameters for the edge reboot (optional) * @return String * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public String postTelephonyProvidersEdgeReboot(String edgeId, EdgeRebootParameters body) throws IOException, ApiException { return postTelephonyProvidersEdgeReboot(createPostTelephonyProvidersEdgeRebootRequest(edgeId, body)); } /** * Reboot an Edge * * @param edgeId Edge ID (required) * @param body Parameters for the edge reboot (optional) * @return String * @throws IOException if the request fails to be processed */ public ApiResponse<String> postTelephonyProvidersEdgeRebootWithHttpInfo(String edgeId, EdgeRebootParameters body) throws IOException { return postTelephonyProvidersEdgeReboot(createPostTelephonyProvidersEdgeRebootRequest(edgeId, body).withHttpInfo()); } private PostTelephonyProvidersEdgeRebootRequest createPostTelephonyProvidersEdgeRebootRequest(String edgeId, EdgeRebootParameters body) { return PostTelephonyProvidersEdgeRebootRequest.builder() .withEdgeId(edgeId) .withBody(body) .build(); } /** * Reboot an Edge * * @param request The request object * @return String * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public String postTelephonyProvidersEdgeReboot(PostTelephonyProvidersEdgeRebootRequest request) throws IOException, ApiException { try { ApiResponse<String> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<String>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Reboot an Edge * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<String> postTelephonyProvidersEdgeReboot(ApiRequest<EdgeRebootParameters> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<String>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<String> response = (ApiResponse<String>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<String> response = (ApiResponse<String>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Starts a software update for this edge. * * @param edgeId Edge ID (required) * @param body Software update request (required) * @return DomainEdgeSoftwareUpdateDto * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public DomainEdgeSoftwareUpdateDto postTelephonyProvidersEdgeSoftwareupdate(String edgeId, DomainEdgeSoftwareUpdateDto body) throws IOException, ApiException { return postTelephonyProvidersEdgeSoftwareupdate(createPostTelephonyProvidersEdgeSoftwareupdateRequest(edgeId, body)); } /** * Starts a software update for this edge. * * @param edgeId Edge ID (required) * @param body Software update request (required) * @return DomainEdgeSoftwareUpdateDto * @throws IOException if the request fails to be processed */ public ApiResponse<DomainEdgeSoftwareUpdateDto> postTelephonyProvidersEdgeSoftwareupdateWithHttpInfo(String edgeId, DomainEdgeSoftwareUpdateDto body) throws IOException { return postTelephonyProvidersEdgeSoftwareupdate(createPostTelephonyProvidersEdgeSoftwareupdateRequest(edgeId, body).withHttpInfo()); } private PostTelephonyProvidersEdgeSoftwareupdateRequest createPostTelephonyProvidersEdgeSoftwareupdateRequest(String edgeId, DomainEdgeSoftwareUpdateDto body) { return PostTelephonyProvidersEdgeSoftwareupdateRequest.builder() .withEdgeId(edgeId) .withBody(body) .build(); } /** * Starts a software update for this edge. * * @param request The request object * @return DomainEdgeSoftwareUpdateDto * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public DomainEdgeSoftwareUpdateDto postTelephonyProvidersEdgeSoftwareupdate(PostTelephonyProvidersEdgeSoftwareupdateRequest request) throws IOException, ApiException { try { ApiResponse<DomainEdgeSoftwareUpdateDto> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<DomainEdgeSoftwareUpdateDto>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Starts a software update for this edge. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<DomainEdgeSoftwareUpdateDto> postTelephonyProvidersEdgeSoftwareupdate(ApiRequest<DomainEdgeSoftwareUpdateDto> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<DomainEdgeSoftwareUpdateDto>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<DomainEdgeSoftwareUpdateDto> response = (ApiResponse<DomainEdgeSoftwareUpdateDto>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<DomainEdgeSoftwareUpdateDto> response = (ApiResponse<DomainEdgeSoftwareUpdateDto>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Take an Edge in or out of service * * @param edgeId Edge ID (required) * @param body Edge Service State (optional) * @return String * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public String postTelephonyProvidersEdgeStatuscode(String edgeId, EdgeServiceStateRequest body) throws IOException, ApiException { return postTelephonyProvidersEdgeStatuscode(createPostTelephonyProvidersEdgeStatuscodeRequest(edgeId, body)); } /** * Take an Edge in or out of service * * @param edgeId Edge ID (required) * @param body Edge Service State (optional) * @return String * @throws IOException if the request fails to be processed */ public ApiResponse<String> postTelephonyProvidersEdgeStatuscodeWithHttpInfo(String edgeId, EdgeServiceStateRequest body) throws IOException { return postTelephonyProvidersEdgeStatuscode(createPostTelephonyProvidersEdgeStatuscodeRequest(edgeId, body).withHttpInfo()); } private PostTelephonyProvidersEdgeStatuscodeRequest createPostTelephonyProvidersEdgeStatuscodeRequest(String edgeId, EdgeServiceStateRequest body) { return PostTelephonyProvidersEdgeStatuscodeRequest.builder() .withEdgeId(edgeId) .withBody(body) .build(); } /** * Take an Edge in or out of service * * @param request The request object * @return String * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public String postTelephonyProvidersEdgeStatuscode(PostTelephonyProvidersEdgeStatuscodeRequest request) throws IOException, ApiException { try { ApiResponse<String> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<String>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Take an Edge in or out of service * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<String> postTelephonyProvidersEdgeStatuscode(ApiRequest<EdgeServiceStateRequest> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<String>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<String> response = (ApiResponse<String>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<String> response = (ApiResponse<String>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Unpair an Edge * * @param edgeId Edge Id (required) * @return String * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public String postTelephonyProvidersEdgeUnpair(String edgeId) throws IOException, ApiException { return postTelephonyProvidersEdgeUnpair(createPostTelephonyProvidersEdgeUnpairRequest(edgeId)); } /** * Unpair an Edge * * @param edgeId Edge Id (required) * @return String * @throws IOException if the request fails to be processed */ public ApiResponse<String> postTelephonyProvidersEdgeUnpairWithHttpInfo(String edgeId) throws IOException { return postTelephonyProvidersEdgeUnpair(createPostTelephonyProvidersEdgeUnpairRequest(edgeId).withHttpInfo()); } private PostTelephonyProvidersEdgeUnpairRequest createPostTelephonyProvidersEdgeUnpairRequest(String edgeId) { return PostTelephonyProvidersEdgeUnpairRequest.builder() .withEdgeId(edgeId) .build(); } /** * Unpair an Edge * * @param request The request object * @return String * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public String postTelephonyProvidersEdgeUnpair(PostTelephonyProvidersEdgeUnpairRequest request) throws IOException, ApiException { try { ApiResponse<String> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<String>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Unpair an Edge * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<String> postTelephonyProvidersEdgeUnpair(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<String>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<String> response = (ApiResponse<String>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<String> response = (ApiResponse<String>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Create an edge. * * @param body Edge (required) * @return Edge * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public Edge postTelephonyProvidersEdges(Edge body) throws IOException, ApiException { return postTelephonyProvidersEdges(createPostTelephonyProvidersEdgesRequest(body)); } /** * Create an edge. * * @param body Edge (required) * @return Edge * @throws IOException if the request fails to be processed */ public ApiResponse<Edge> postTelephonyProvidersEdgesWithHttpInfo(Edge body) throws IOException { return postTelephonyProvidersEdges(createPostTelephonyProvidersEdgesRequest(body).withHttpInfo()); } private PostTelephonyProvidersEdgesRequest createPostTelephonyProvidersEdgesRequest(Edge body) { return PostTelephonyProvidersEdgesRequest.builder() .withBody(body) .build(); } /** * Create an edge. * * @param request The request object * @return Edge * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public Edge postTelephonyProvidersEdges(PostTelephonyProvidersEdgesRequest request) throws IOException, ApiException { try { ApiResponse<Edge> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<Edge>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Create an edge. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<Edge> postTelephonyProvidersEdges(ApiRequest<Edge> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<Edge>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<Edge> response = (ApiResponse<Edge>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<Edge> response = (ApiResponse<Edge>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Validates a street address * * @param body Address (required) * @return ValidateAddressResponse * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public ValidateAddressResponse postTelephonyProvidersEdgesAddressvalidation(ValidateAddressRequest body) throws IOException, ApiException { return postTelephonyProvidersEdgesAddressvalidation(createPostTelephonyProvidersEdgesAddressvalidationRequest(body)); } /** * Validates a street address * * @param body Address (required) * @return ValidateAddressResponse * @throws IOException if the request fails to be processed */ public ApiResponse<ValidateAddressResponse> postTelephonyProvidersEdgesAddressvalidationWithHttpInfo(ValidateAddressRequest body) throws IOException { return postTelephonyProvidersEdgesAddressvalidation(createPostTelephonyProvidersEdgesAddressvalidationRequest(body).withHttpInfo()); } private PostTelephonyProvidersEdgesAddressvalidationRequest createPostTelephonyProvidersEdgesAddressvalidationRequest(ValidateAddressRequest body) { return PostTelephonyProvidersEdgesAddressvalidationRequest.builder() .withBody(body) .build(); } /** * Validates a street address * * @param request The request object * @return ValidateAddressResponse * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public ValidateAddressResponse postTelephonyProvidersEdgesAddressvalidation(PostTelephonyProvidersEdgesAddressvalidationRequest request) throws IOException, ApiException { try { ApiResponse<ValidateAddressResponse> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<ValidateAddressResponse>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Validates a street address * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<ValidateAddressResponse> postTelephonyProvidersEdgesAddressvalidation(ApiRequest<ValidateAddressRequest> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<ValidateAddressResponse>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<ValidateAddressResponse> response = (ApiResponse<ValidateAddressResponse>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<ValidateAddressResponse> response = (ApiResponse<ValidateAddressResponse>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Create a certificate authority. * * @param body CertificateAuthority (required) * @return DomainCertificateAuthority * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public DomainCertificateAuthority postTelephonyProvidersEdgesCertificateauthorities(DomainCertificateAuthority body) throws IOException, ApiException { return postTelephonyProvidersEdgesCertificateauthorities(createPostTelephonyProvidersEdgesCertificateauthoritiesRequest(body)); } /** * Create a certificate authority. * * @param body CertificateAuthority (required) * @return DomainCertificateAuthority * @throws IOException if the request fails to be processed */ public ApiResponse<DomainCertificateAuthority> postTelephonyProvidersEdgesCertificateauthoritiesWithHttpInfo(DomainCertificateAuthority body) throws IOException { return postTelephonyProvidersEdgesCertificateauthorities(createPostTelephonyProvidersEdgesCertificateauthoritiesRequest(body).withHttpInfo()); } private PostTelephonyProvidersEdgesCertificateauthoritiesRequest createPostTelephonyProvidersEdgesCertificateauthoritiesRequest(DomainCertificateAuthority body) { return PostTelephonyProvidersEdgesCertificateauthoritiesRequest.builder() .withBody(body) .build(); } /** * Create a certificate authority. * * @param request The request object * @return DomainCertificateAuthority * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public DomainCertificateAuthority postTelephonyProvidersEdgesCertificateauthorities(PostTelephonyProvidersEdgesCertificateauthoritiesRequest request) throws IOException, ApiException { try { ApiResponse<DomainCertificateAuthority> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<DomainCertificateAuthority>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Create a certificate authority. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<DomainCertificateAuthority> postTelephonyProvidersEdgesCertificateauthorities(ApiRequest<DomainCertificateAuthority> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<DomainCertificateAuthority>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<DomainCertificateAuthority> response = (ApiResponse<DomainCertificateAuthority>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<DomainCertificateAuthority> response = (ApiResponse<DomainCertificateAuthority>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Create a new DID pool * * @param body DID pool (required) * @return DIDPool * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public DIDPool postTelephonyProvidersEdgesDidpools(DIDPool body) throws IOException, ApiException { return postTelephonyProvidersEdgesDidpools(createPostTelephonyProvidersEdgesDidpoolsRequest(body)); } /** * Create a new DID pool * * @param body DID pool (required) * @return DIDPool * @throws IOException if the request fails to be processed */ public ApiResponse<DIDPool> postTelephonyProvidersEdgesDidpoolsWithHttpInfo(DIDPool body) throws IOException { return postTelephonyProvidersEdgesDidpools(createPostTelephonyProvidersEdgesDidpoolsRequest(body).withHttpInfo()); } private PostTelephonyProvidersEdgesDidpoolsRequest createPostTelephonyProvidersEdgesDidpoolsRequest(DIDPool body) { return PostTelephonyProvidersEdgesDidpoolsRequest.builder() .withBody(body) .build(); } /** * Create a new DID pool * * @param request The request object * @return DIDPool * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public DIDPool postTelephonyProvidersEdgesDidpools(PostTelephonyProvidersEdgesDidpoolsRequest request) throws IOException, ApiException { try { ApiResponse<DIDPool> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<DIDPool>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Create a new DID pool * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<DIDPool> postTelephonyProvidersEdgesDidpools(ApiRequest<DIDPool> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<DIDPool>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<DIDPool> response = (ApiResponse<DIDPool>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<DIDPool> response = (ApiResponse<DIDPool>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Create an edge group. * * @param body EdgeGroup (required) * @return EdgeGroup * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeGroup postTelephonyProvidersEdgesEdgegroups(EdgeGroup body) throws IOException, ApiException { return postTelephonyProvidersEdgesEdgegroups(createPostTelephonyProvidersEdgesEdgegroupsRequest(body)); } /** * Create an edge group. * * @param body EdgeGroup (required) * @return EdgeGroup * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeGroup> postTelephonyProvidersEdgesEdgegroupsWithHttpInfo(EdgeGroup body) throws IOException { return postTelephonyProvidersEdgesEdgegroups(createPostTelephonyProvidersEdgesEdgegroupsRequest(body).withHttpInfo()); } private PostTelephonyProvidersEdgesEdgegroupsRequest createPostTelephonyProvidersEdgesEdgegroupsRequest(EdgeGroup body) { return PostTelephonyProvidersEdgesEdgegroupsRequest.builder() .withBody(body) .build(); } /** * Create an edge group. * * @param request The request object * @return EdgeGroup * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeGroup postTelephonyProvidersEdgesEdgegroups(PostTelephonyProvidersEdgesEdgegroupsRequest request) throws IOException, ApiException { try { ApiResponse<EdgeGroup> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<EdgeGroup>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Create an edge group. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeGroup> postTelephonyProvidersEdgesEdgegroups(ApiRequest<EdgeGroup> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<EdgeGroup>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<EdgeGroup> response = (ApiResponse<EdgeGroup>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<EdgeGroup> response = (ApiResponse<EdgeGroup>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Create a new extension pool * * @param body ExtensionPool (required) * @return ExtensionPool * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public ExtensionPool postTelephonyProvidersEdgesExtensionpools(ExtensionPool body) throws IOException, ApiException { return postTelephonyProvidersEdgesExtensionpools(createPostTelephonyProvidersEdgesExtensionpoolsRequest(body)); } /** * Create a new extension pool * * @param body ExtensionPool (required) * @return ExtensionPool * @throws IOException if the request fails to be processed */ public ApiResponse<ExtensionPool> postTelephonyProvidersEdgesExtensionpoolsWithHttpInfo(ExtensionPool body) throws IOException { return postTelephonyProvidersEdgesExtensionpools(createPostTelephonyProvidersEdgesExtensionpoolsRequest(body).withHttpInfo()); } private PostTelephonyProvidersEdgesExtensionpoolsRequest createPostTelephonyProvidersEdgesExtensionpoolsRequest(ExtensionPool body) { return PostTelephonyProvidersEdgesExtensionpoolsRequest.builder() .withBody(body) .build(); } /** * Create a new extension pool * * @param request The request object * @return ExtensionPool * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public ExtensionPool postTelephonyProvidersEdgesExtensionpools(PostTelephonyProvidersEdgesExtensionpoolsRequest request) throws IOException, ApiException { try { ApiResponse<ExtensionPool> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<ExtensionPool>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Create a new extension pool * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<ExtensionPool> postTelephonyProvidersEdgesExtensionpools(ApiRequest<ExtensionPool> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<ExtensionPool>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<ExtensionPool> response = (ApiResponse<ExtensionPool>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<ExtensionPool> response = (ApiResponse<ExtensionPool>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Create outbound rule * * @param body OutboundRoute (required) * @return OutboundRoute * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public OutboundRoute postTelephonyProvidersEdgesOutboundroutes(OutboundRoute body) throws IOException, ApiException { return postTelephonyProvidersEdgesOutboundroutes(createPostTelephonyProvidersEdgesOutboundroutesRequest(body)); } /** * Create outbound rule * * @param body OutboundRoute (required) * @return OutboundRoute * @throws IOException if the request fails to be processed */ public ApiResponse<OutboundRoute> postTelephonyProvidersEdgesOutboundroutesWithHttpInfo(OutboundRoute body) throws IOException { return postTelephonyProvidersEdgesOutboundroutes(createPostTelephonyProvidersEdgesOutboundroutesRequest(body).withHttpInfo()); } private PostTelephonyProvidersEdgesOutboundroutesRequest createPostTelephonyProvidersEdgesOutboundroutesRequest(OutboundRoute body) { return PostTelephonyProvidersEdgesOutboundroutesRequest.builder() .withBody(body) .build(); } /** * Create outbound rule * * @param request The request object * @return OutboundRoute * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public OutboundRoute postTelephonyProvidersEdgesOutboundroutes(PostTelephonyProvidersEdgesOutboundroutesRequest request) throws IOException, ApiException { try { ApiResponse<OutboundRoute> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<OutboundRoute>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Create outbound rule * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<OutboundRoute> postTelephonyProvidersEdgesOutboundroutes(ApiRequest<OutboundRoute> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<OutboundRoute>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<OutboundRoute> response = (ApiResponse<OutboundRoute>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<OutboundRoute> response = (ApiResponse<OutboundRoute>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Reboot a Phone * * @param phoneId Phone Id (required) * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public void postTelephonyProvidersEdgesPhoneReboot(String phoneId) throws IOException, ApiException { postTelephonyProvidersEdgesPhoneReboot(createPostTelephonyProvidersEdgesPhoneRebootRequest(phoneId)); } /** * Reboot a Phone * * @param phoneId Phone Id (required) * @throws IOException if the request fails to be processed */ public ApiResponse<Void> postTelephonyProvidersEdgesPhoneRebootWithHttpInfo(String phoneId) throws IOException { return postTelephonyProvidersEdgesPhoneReboot(createPostTelephonyProvidersEdgesPhoneRebootRequest(phoneId).withHttpInfo()); } private PostTelephonyProvidersEdgesPhoneRebootRequest createPostTelephonyProvidersEdgesPhoneRebootRequest(String phoneId) { return PostTelephonyProvidersEdgesPhoneRebootRequest.builder() .withPhoneId(phoneId) .build(); } /** * Reboot a Phone * * @param request The request object * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public void postTelephonyProvidersEdgesPhoneReboot(PostTelephonyProvidersEdgesPhoneRebootRequest request) throws IOException, ApiException { try { ApiResponse<Void> response = pcapiClient.invoke(request.withHttpInfo(), null); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; } } /** * Reboot a Phone * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<Void> postTelephonyProvidersEdgesPhoneReboot(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, null); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<Void> response = (ApiResponse<Void>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<Void> response = (ApiResponse<Void>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Create a new Phone Base Settings object * * @param body Phone base settings (required) * @return PhoneBase * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public PhoneBase postTelephonyProvidersEdgesPhonebasesettings(PhoneBase body) throws IOException, ApiException { return postTelephonyProvidersEdgesPhonebasesettings(createPostTelephonyProvidersEdgesPhonebasesettingsRequest(body)); } /** * Create a new Phone Base Settings object * * @param body Phone base settings (required) * @return PhoneBase * @throws IOException if the request fails to be processed */ public ApiResponse<PhoneBase> postTelephonyProvidersEdgesPhonebasesettingsWithHttpInfo(PhoneBase body) throws IOException { return postTelephonyProvidersEdgesPhonebasesettings(createPostTelephonyProvidersEdgesPhonebasesettingsRequest(body).withHttpInfo()); } private PostTelephonyProvidersEdgesPhonebasesettingsRequest createPostTelephonyProvidersEdgesPhonebasesettingsRequest(PhoneBase body) { return PostTelephonyProvidersEdgesPhonebasesettingsRequest.builder() .withBody(body) .build(); } /** * Create a new Phone Base Settings object * * @param request The request object * @return PhoneBase * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public PhoneBase postTelephonyProvidersEdgesPhonebasesettings(PostTelephonyProvidersEdgesPhonebasesettingsRequest request) throws IOException, ApiException { try { ApiResponse<PhoneBase> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<PhoneBase>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Create a new Phone Base Settings object * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<PhoneBase> postTelephonyProvidersEdgesPhonebasesettings(ApiRequest<PhoneBase> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<PhoneBase>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<PhoneBase> response = (ApiResponse<PhoneBase>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<PhoneBase> response = (ApiResponse<PhoneBase>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Create a new Phone * * @param body Phone (required) * @return Phone * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public Phone postTelephonyProvidersEdgesPhones(Phone body) throws IOException, ApiException { return postTelephonyProvidersEdgesPhones(createPostTelephonyProvidersEdgesPhonesRequest(body)); } /** * Create a new Phone * * @param body Phone (required) * @return Phone * @throws IOException if the request fails to be processed */ public ApiResponse<Phone> postTelephonyProvidersEdgesPhonesWithHttpInfo(Phone body) throws IOException { return postTelephonyProvidersEdgesPhones(createPostTelephonyProvidersEdgesPhonesRequest(body).withHttpInfo()); } private PostTelephonyProvidersEdgesPhonesRequest createPostTelephonyProvidersEdgesPhonesRequest(Phone body) { return PostTelephonyProvidersEdgesPhonesRequest.builder() .withBody(body) .build(); } /** * Create a new Phone * * @param request The request object * @return Phone * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public Phone postTelephonyProvidersEdgesPhones(PostTelephonyProvidersEdgesPhonesRequest request) throws IOException, ApiException { try { ApiResponse<Phone> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<Phone>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Create a new Phone * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<Phone> postTelephonyProvidersEdgesPhones(ApiRequest<Phone> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<Phone>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<Phone> response = (ApiResponse<Phone>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<Phone> response = (ApiResponse<Phone>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Reboot Multiple Phones * * @param body Phones (required) * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public void postTelephonyProvidersEdgesPhonesReboot(PhonesReboot body) throws IOException, ApiException { postTelephonyProvidersEdgesPhonesReboot(createPostTelephonyProvidersEdgesPhonesRebootRequest(body)); } /** * Reboot Multiple Phones * * @param body Phones (required) * @throws IOException if the request fails to be processed */ public ApiResponse<Void> postTelephonyProvidersEdgesPhonesRebootWithHttpInfo(PhonesReboot body) throws IOException { return postTelephonyProvidersEdgesPhonesReboot(createPostTelephonyProvidersEdgesPhonesRebootRequest(body).withHttpInfo()); } private PostTelephonyProvidersEdgesPhonesRebootRequest createPostTelephonyProvidersEdgesPhonesRebootRequest(PhonesReboot body) { return PostTelephonyProvidersEdgesPhonesRebootRequest.builder() .withBody(body) .build(); } /** * Reboot Multiple Phones * * @param request The request object * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public void postTelephonyProvidersEdgesPhonesReboot(PostTelephonyProvidersEdgesPhonesRebootRequest request) throws IOException, ApiException { try { ApiResponse<Void> response = pcapiClient.invoke(request.withHttpInfo(), null); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; } } /** * Reboot Multiple Phones * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<Void> postTelephonyProvidersEdgesPhonesReboot(ApiRequest<PhonesReboot> request) throws IOException { try { return pcapiClient.invoke(request, null); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<Void> response = (ApiResponse<Void>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<Void> response = (ApiResponse<Void>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Create outbound route * * @param siteId Site ID (required) * @param body OutboundRoute (required) * @return OutboundRouteBase * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public OutboundRouteBase postTelephonyProvidersEdgesSiteOutboundroutes(String siteId, OutboundRouteBase body) throws IOException, ApiException { return postTelephonyProvidersEdgesSiteOutboundroutes(createPostTelephonyProvidersEdgesSiteOutboundroutesRequest(siteId, body)); } /** * Create outbound route * * @param siteId Site ID (required) * @param body OutboundRoute (required) * @return OutboundRouteBase * @throws IOException if the request fails to be processed */ public ApiResponse<OutboundRouteBase> postTelephonyProvidersEdgesSiteOutboundroutesWithHttpInfo(String siteId, OutboundRouteBase body) throws IOException { return postTelephonyProvidersEdgesSiteOutboundroutes(createPostTelephonyProvidersEdgesSiteOutboundroutesRequest(siteId, body).withHttpInfo()); } private PostTelephonyProvidersEdgesSiteOutboundroutesRequest createPostTelephonyProvidersEdgesSiteOutboundroutesRequest(String siteId, OutboundRouteBase body) { return PostTelephonyProvidersEdgesSiteOutboundroutesRequest.builder() .withSiteId(siteId) .withBody(body) .build(); } /** * Create outbound route * * @param request The request object * @return OutboundRouteBase * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public OutboundRouteBase postTelephonyProvidersEdgesSiteOutboundroutes(PostTelephonyProvidersEdgesSiteOutboundroutesRequest request) throws IOException, ApiException { try { ApiResponse<OutboundRouteBase> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<OutboundRouteBase>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Create outbound route * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<OutboundRouteBase> postTelephonyProvidersEdgesSiteOutboundroutes(ApiRequest<OutboundRouteBase> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<OutboundRouteBase>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<OutboundRouteBase> response = (ApiResponse<OutboundRouteBase>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<OutboundRouteBase> response = (ApiResponse<OutboundRouteBase>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Triggers the rebalance operation. * * @param siteId Site ID (required) * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public void postTelephonyProvidersEdgesSiteRebalance(String siteId) throws IOException, ApiException { postTelephonyProvidersEdgesSiteRebalance(createPostTelephonyProvidersEdgesSiteRebalanceRequest(siteId)); } /** * Triggers the rebalance operation. * * @param siteId Site ID (required) * @throws IOException if the request fails to be processed */ public ApiResponse<Void> postTelephonyProvidersEdgesSiteRebalanceWithHttpInfo(String siteId) throws IOException { return postTelephonyProvidersEdgesSiteRebalance(createPostTelephonyProvidersEdgesSiteRebalanceRequest(siteId).withHttpInfo()); } private PostTelephonyProvidersEdgesSiteRebalanceRequest createPostTelephonyProvidersEdgesSiteRebalanceRequest(String siteId) { return PostTelephonyProvidersEdgesSiteRebalanceRequest.builder() .withSiteId(siteId) .build(); } /** * Triggers the rebalance operation. * * @param request The request object * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public void postTelephonyProvidersEdgesSiteRebalance(PostTelephonyProvidersEdgesSiteRebalanceRequest request) throws IOException, ApiException { try { ApiResponse<Void> response = pcapiClient.invoke(request.withHttpInfo(), null); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; } } /** * Triggers the rebalance operation. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<Void> postTelephonyProvidersEdgesSiteRebalance(ApiRequest<Void> request) throws IOException { try { return pcapiClient.invoke(request, null); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<Void> response = (ApiResponse<Void>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<Void> response = (ApiResponse<Void>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Create a Site. * * @param body Site (required) * @return Site * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public Site postTelephonyProvidersEdgesSites(Site body) throws IOException, ApiException { return postTelephonyProvidersEdgesSites(createPostTelephonyProvidersEdgesSitesRequest(body)); } /** * Create a Site. * * @param body Site (required) * @return Site * @throws IOException if the request fails to be processed */ public ApiResponse<Site> postTelephonyProvidersEdgesSitesWithHttpInfo(Site body) throws IOException { return postTelephonyProvidersEdgesSites(createPostTelephonyProvidersEdgesSitesRequest(body).withHttpInfo()); } private PostTelephonyProvidersEdgesSitesRequest createPostTelephonyProvidersEdgesSitesRequest(Site body) { return PostTelephonyProvidersEdgesSitesRequest.builder() .withBody(body) .build(); } /** * Create a Site. * * @param request The request object * @return Site * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public Site postTelephonyProvidersEdgesSites(PostTelephonyProvidersEdgesSitesRequest request) throws IOException, ApiException { try { ApiResponse<Site> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<Site>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Create a Site. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<Site> postTelephonyProvidersEdgesSites(ApiRequest<Site> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<Site>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<Site> response = (ApiResponse<Site>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<Site> response = (ApiResponse<Site>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Create a Trunk Base Settings object * * @param body Trunk base settings (required) * @return TrunkBase * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public TrunkBase postTelephonyProvidersEdgesTrunkbasesettings(TrunkBase body) throws IOException, ApiException { return postTelephonyProvidersEdgesTrunkbasesettings(createPostTelephonyProvidersEdgesTrunkbasesettingsRequest(body)); } /** * Create a Trunk Base Settings object * * @param body Trunk base settings (required) * @return TrunkBase * @throws IOException if the request fails to be processed */ public ApiResponse<TrunkBase> postTelephonyProvidersEdgesTrunkbasesettingsWithHttpInfo(TrunkBase body) throws IOException { return postTelephonyProvidersEdgesTrunkbasesettings(createPostTelephonyProvidersEdgesTrunkbasesettingsRequest(body).withHttpInfo()); } private PostTelephonyProvidersEdgesTrunkbasesettingsRequest createPostTelephonyProvidersEdgesTrunkbasesettingsRequest(TrunkBase body) { return PostTelephonyProvidersEdgesTrunkbasesettingsRequest.builder() .withBody(body) .build(); } /** * Create a Trunk Base Settings object * * @param request The request object * @return TrunkBase * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public TrunkBase postTelephonyProvidersEdgesTrunkbasesettings(PostTelephonyProvidersEdgesTrunkbasesettingsRequest request) throws IOException, ApiException { try { ApiResponse<TrunkBase> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<TrunkBase>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Create a Trunk Base Settings object * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<TrunkBase> postTelephonyProvidersEdgesTrunkbasesettings(ApiRequest<TrunkBase> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<TrunkBase>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<TrunkBase> response = (ApiResponse<TrunkBase>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<TrunkBase> response = (ApiResponse<TrunkBase>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Update a edge. * * @param edgeId Edge ID (required) * @param body Edge (required) * @return Edge * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public Edge putTelephonyProvidersEdge(String edgeId, Edge body) throws IOException, ApiException { return putTelephonyProvidersEdge(createPutTelephonyProvidersEdgeRequest(edgeId, body)); } /** * Update a edge. * * @param edgeId Edge ID (required) * @param body Edge (required) * @return Edge * @throws IOException if the request fails to be processed */ public ApiResponse<Edge> putTelephonyProvidersEdgeWithHttpInfo(String edgeId, Edge body) throws IOException { return putTelephonyProvidersEdge(createPutTelephonyProvidersEdgeRequest(edgeId, body).withHttpInfo()); } private PutTelephonyProvidersEdgeRequest createPutTelephonyProvidersEdgeRequest(String edgeId, Edge body) { return PutTelephonyProvidersEdgeRequest.builder() .withEdgeId(edgeId) .withBody(body) .build(); } /** * Update a edge. * * @param request The request object * @return Edge * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public Edge putTelephonyProvidersEdge(PutTelephonyProvidersEdgeRequest request) throws IOException, ApiException { try { ApiResponse<Edge> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<Edge>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Update a edge. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<Edge> putTelephonyProvidersEdge(ApiRequest<Edge> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<Edge>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<Edge> response = (ApiResponse<Edge>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<Edge> response = (ApiResponse<Edge>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Update a line. * * @param edgeId Edge ID (required) * @param lineId Line ID (required) * @param body Line (required) * @return EdgeLine * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeLine putTelephonyProvidersEdgeLine(String edgeId, String lineId, EdgeLine body) throws IOException, ApiException { return putTelephonyProvidersEdgeLine(createPutTelephonyProvidersEdgeLineRequest(edgeId, lineId, body)); } /** * Update a line. * * @param edgeId Edge ID (required) * @param lineId Line ID (required) * @param body Line (required) * @return EdgeLine * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeLine> putTelephonyProvidersEdgeLineWithHttpInfo(String edgeId, String lineId, EdgeLine body) throws IOException { return putTelephonyProvidersEdgeLine(createPutTelephonyProvidersEdgeLineRequest(edgeId, lineId, body).withHttpInfo()); } private PutTelephonyProvidersEdgeLineRequest createPutTelephonyProvidersEdgeLineRequest(String edgeId, String lineId, EdgeLine body) { return PutTelephonyProvidersEdgeLineRequest.builder() .withEdgeId(edgeId) .withLineId(lineId) .withBody(body) .build(); } /** * Update a line. * * @param request The request object * @return EdgeLine * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeLine putTelephonyProvidersEdgeLine(PutTelephonyProvidersEdgeLineRequest request) throws IOException, ApiException { try { ApiResponse<EdgeLine> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<EdgeLine>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Update a line. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeLine> putTelephonyProvidersEdgeLine(ApiRequest<EdgeLine> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<EdgeLine>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<EdgeLine> response = (ApiResponse<EdgeLine>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<EdgeLine> response = (ApiResponse<EdgeLine>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Update an edge logical interface. * * @param edgeId Edge ID (required) * @param interfaceId Interface ID (required) * @param body Logical interface (required) * @return DomainLogicalInterface * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public DomainLogicalInterface putTelephonyProvidersEdgeLogicalinterface(String edgeId, String interfaceId, DomainLogicalInterface body) throws IOException, ApiException { return putTelephonyProvidersEdgeLogicalinterface(createPutTelephonyProvidersEdgeLogicalinterfaceRequest(edgeId, interfaceId, body)); } /** * Update an edge logical interface. * * @param edgeId Edge ID (required) * @param interfaceId Interface ID (required) * @param body Logical interface (required) * @return DomainLogicalInterface * @throws IOException if the request fails to be processed */ public ApiResponse<DomainLogicalInterface> putTelephonyProvidersEdgeLogicalinterfaceWithHttpInfo(String edgeId, String interfaceId, DomainLogicalInterface body) throws IOException { return putTelephonyProvidersEdgeLogicalinterface(createPutTelephonyProvidersEdgeLogicalinterfaceRequest(edgeId, interfaceId, body).withHttpInfo()); } private PutTelephonyProvidersEdgeLogicalinterfaceRequest createPutTelephonyProvidersEdgeLogicalinterfaceRequest(String edgeId, String interfaceId, DomainLogicalInterface body) { return PutTelephonyProvidersEdgeLogicalinterfaceRequest.builder() .withEdgeId(edgeId) .withInterfaceId(interfaceId) .withBody(body) .build(); } /** * Update an edge logical interface. * * @param request The request object * @return DomainLogicalInterface * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public DomainLogicalInterface putTelephonyProvidersEdgeLogicalinterface(PutTelephonyProvidersEdgeLogicalinterfaceRequest request) throws IOException, ApiException { try { ApiResponse<DomainLogicalInterface> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<DomainLogicalInterface>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Update an edge logical interface. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<DomainLogicalInterface> putTelephonyProvidersEdgeLogicalinterface(ApiRequest<DomainLogicalInterface> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<DomainLogicalInterface>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<DomainLogicalInterface> response = (ApiResponse<DomainLogicalInterface>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<DomainLogicalInterface> response = (ApiResponse<DomainLogicalInterface>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Update a certificate authority. * * @param certificateId Certificate ID (required) * @param body Certificate authority (required) * @return DomainCertificateAuthority * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public DomainCertificateAuthority putTelephonyProvidersEdgesCertificateauthority(String certificateId, DomainCertificateAuthority body) throws IOException, ApiException { return putTelephonyProvidersEdgesCertificateauthority(createPutTelephonyProvidersEdgesCertificateauthorityRequest(certificateId, body)); } /** * Update a certificate authority. * * @param certificateId Certificate ID (required) * @param body Certificate authority (required) * @return DomainCertificateAuthority * @throws IOException if the request fails to be processed */ public ApiResponse<DomainCertificateAuthority> putTelephonyProvidersEdgesCertificateauthorityWithHttpInfo(String certificateId, DomainCertificateAuthority body) throws IOException { return putTelephonyProvidersEdgesCertificateauthority(createPutTelephonyProvidersEdgesCertificateauthorityRequest(certificateId, body).withHttpInfo()); } private PutTelephonyProvidersEdgesCertificateauthorityRequest createPutTelephonyProvidersEdgesCertificateauthorityRequest(String certificateId, DomainCertificateAuthority body) { return PutTelephonyProvidersEdgesCertificateauthorityRequest.builder() .withCertificateId(certificateId) .withBody(body) .build(); } /** * Update a certificate authority. * * @param request The request object * @return DomainCertificateAuthority * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public DomainCertificateAuthority putTelephonyProvidersEdgesCertificateauthority(PutTelephonyProvidersEdgesCertificateauthorityRequest request) throws IOException, ApiException { try { ApiResponse<DomainCertificateAuthority> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<DomainCertificateAuthority>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Update a certificate authority. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<DomainCertificateAuthority> putTelephonyProvidersEdgesCertificateauthority(ApiRequest<DomainCertificateAuthority> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<DomainCertificateAuthority>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<DomainCertificateAuthority> response = (ApiResponse<DomainCertificateAuthority>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<DomainCertificateAuthority> response = (ApiResponse<DomainCertificateAuthority>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Update a DID by ID. * * @param didId DID ID (required) * @param body DID (required) * @return DID * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public DID putTelephonyProvidersEdgesDid(String didId, DID body) throws IOException, ApiException { return putTelephonyProvidersEdgesDid(createPutTelephonyProvidersEdgesDidRequest(didId, body)); } /** * Update a DID by ID. * * @param didId DID ID (required) * @param body DID (required) * @return DID * @throws IOException if the request fails to be processed */ public ApiResponse<DID> putTelephonyProvidersEdgesDidWithHttpInfo(String didId, DID body) throws IOException { return putTelephonyProvidersEdgesDid(createPutTelephonyProvidersEdgesDidRequest(didId, body).withHttpInfo()); } private PutTelephonyProvidersEdgesDidRequest createPutTelephonyProvidersEdgesDidRequest(String didId, DID body) { return PutTelephonyProvidersEdgesDidRequest.builder() .withDidId(didId) .withBody(body) .build(); } /** * Update a DID by ID. * * @param request The request object * @return DID * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public DID putTelephonyProvidersEdgesDid(PutTelephonyProvidersEdgesDidRequest request) throws IOException, ApiException { try { ApiResponse<DID> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<DID>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Update a DID by ID. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<DID> putTelephonyProvidersEdgesDid(ApiRequest<DID> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<DID>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<DID> response = (ApiResponse<DID>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<DID> response = (ApiResponse<DID>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Update a DID Pool by ID. * * @param didPoolId DID pool ID (required) * @param body DID pool (required) * @return DIDPool * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public DIDPool putTelephonyProvidersEdgesDidpool(String didPoolId, DIDPool body) throws IOException, ApiException { return putTelephonyProvidersEdgesDidpool(createPutTelephonyProvidersEdgesDidpoolRequest(didPoolId, body)); } /** * Update a DID Pool by ID. * * @param didPoolId DID pool ID (required) * @param body DID pool (required) * @return DIDPool * @throws IOException if the request fails to be processed */ public ApiResponse<DIDPool> putTelephonyProvidersEdgesDidpoolWithHttpInfo(String didPoolId, DIDPool body) throws IOException { return putTelephonyProvidersEdgesDidpool(createPutTelephonyProvidersEdgesDidpoolRequest(didPoolId, body).withHttpInfo()); } private PutTelephonyProvidersEdgesDidpoolRequest createPutTelephonyProvidersEdgesDidpoolRequest(String didPoolId, DIDPool body) { return PutTelephonyProvidersEdgesDidpoolRequest.builder() .withDidPoolId(didPoolId) .withBody(body) .build(); } /** * Update a DID Pool by ID. * * @param request The request object * @return DIDPool * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public DIDPool putTelephonyProvidersEdgesDidpool(PutTelephonyProvidersEdgesDidpoolRequest request) throws IOException, ApiException { try { ApiResponse<DIDPool> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<DIDPool>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Update a DID Pool by ID. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<DIDPool> putTelephonyProvidersEdgesDidpool(ApiRequest<DIDPool> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<DIDPool>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<DIDPool> response = (ApiResponse<DIDPool>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<DIDPool> response = (ApiResponse<DIDPool>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Update an edge group. * * @param edgeGroupId Edge group ID (required) * @param body EdgeGroup (required) * @return EdgeGroup * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeGroup putTelephonyProvidersEdgesEdgegroup(String edgeGroupId, EdgeGroup body) throws IOException, ApiException { return putTelephonyProvidersEdgesEdgegroup(createPutTelephonyProvidersEdgesEdgegroupRequest(edgeGroupId, body)); } /** * Update an edge group. * * @param edgeGroupId Edge group ID (required) * @param body EdgeGroup (required) * @return EdgeGroup * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeGroup> putTelephonyProvidersEdgesEdgegroupWithHttpInfo(String edgeGroupId, EdgeGroup body) throws IOException { return putTelephonyProvidersEdgesEdgegroup(createPutTelephonyProvidersEdgesEdgegroupRequest(edgeGroupId, body).withHttpInfo()); } private PutTelephonyProvidersEdgesEdgegroupRequest createPutTelephonyProvidersEdgesEdgegroupRequest(String edgeGroupId, EdgeGroup body) { return PutTelephonyProvidersEdgesEdgegroupRequest.builder() .withEdgeGroupId(edgeGroupId) .withBody(body) .build(); } /** * Update an edge group. * * @param request The request object * @return EdgeGroup * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeGroup putTelephonyProvidersEdgesEdgegroup(PutTelephonyProvidersEdgesEdgegroupRequest request) throws IOException, ApiException { try { ApiResponse<EdgeGroup> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<EdgeGroup>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Update an edge group. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeGroup> putTelephonyProvidersEdgesEdgegroup(ApiRequest<EdgeGroup> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<EdgeGroup>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<EdgeGroup> response = (ApiResponse<EdgeGroup>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<EdgeGroup> response = (ApiResponse<EdgeGroup>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Update the edge trunk base associated with the edge group * * @param edgegroupId Edge Group ID (required) * @param edgetrunkbaseId Edge Trunk Base ID (required) * @param body EdgeTrunkBase (required) * @return EdgeTrunkBase * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeTrunkBase putTelephonyProvidersEdgesEdgegroupEdgetrunkbase(String edgegroupId, String edgetrunkbaseId, EdgeTrunkBase body) throws IOException, ApiException { return putTelephonyProvidersEdgesEdgegroupEdgetrunkbase(createPutTelephonyProvidersEdgesEdgegroupEdgetrunkbaseRequest(edgegroupId, edgetrunkbaseId, body)); } /** * Update the edge trunk base associated with the edge group * * @param edgegroupId Edge Group ID (required) * @param edgetrunkbaseId Edge Trunk Base ID (required) * @param body EdgeTrunkBase (required) * @return EdgeTrunkBase * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeTrunkBase> putTelephonyProvidersEdgesEdgegroupEdgetrunkbaseWithHttpInfo(String edgegroupId, String edgetrunkbaseId, EdgeTrunkBase body) throws IOException { return putTelephonyProvidersEdgesEdgegroupEdgetrunkbase(createPutTelephonyProvidersEdgesEdgegroupEdgetrunkbaseRequest(edgegroupId, edgetrunkbaseId, body).withHttpInfo()); } private PutTelephonyProvidersEdgesEdgegroupEdgetrunkbaseRequest createPutTelephonyProvidersEdgesEdgegroupEdgetrunkbaseRequest(String edgegroupId, String edgetrunkbaseId, EdgeTrunkBase body) { return PutTelephonyProvidersEdgesEdgegroupEdgetrunkbaseRequest.builder() .withEdgegroupId(edgegroupId) .withEdgetrunkbaseId(edgetrunkbaseId) .withBody(body) .build(); } /** * Update the edge trunk base associated with the edge group * * @param request The request object * @return EdgeTrunkBase * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public EdgeTrunkBase putTelephonyProvidersEdgesEdgegroupEdgetrunkbase(PutTelephonyProvidersEdgesEdgegroupEdgetrunkbaseRequest request) throws IOException, ApiException { try { ApiResponse<EdgeTrunkBase> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<EdgeTrunkBase>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Update the edge trunk base associated with the edge group * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<EdgeTrunkBase> putTelephonyProvidersEdgesEdgegroupEdgetrunkbase(ApiRequest<EdgeTrunkBase> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<EdgeTrunkBase>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<EdgeTrunkBase> response = (ApiResponse<EdgeTrunkBase>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<EdgeTrunkBase> response = (ApiResponse<EdgeTrunkBase>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Update an extension by ID. * * @param extensionId Extension ID (required) * @param body Extension (required) * @return Extension * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public Extension putTelephonyProvidersEdgesExtension(String extensionId, Extension body) throws IOException, ApiException { return putTelephonyProvidersEdgesExtension(createPutTelephonyProvidersEdgesExtensionRequest(extensionId, body)); } /** * Update an extension by ID. * * @param extensionId Extension ID (required) * @param body Extension (required) * @return Extension * @throws IOException if the request fails to be processed */ public ApiResponse<Extension> putTelephonyProvidersEdgesExtensionWithHttpInfo(String extensionId, Extension body) throws IOException { return putTelephonyProvidersEdgesExtension(createPutTelephonyProvidersEdgesExtensionRequest(extensionId, body).withHttpInfo()); } private PutTelephonyProvidersEdgesExtensionRequest createPutTelephonyProvidersEdgesExtensionRequest(String extensionId, Extension body) { return PutTelephonyProvidersEdgesExtensionRequest.builder() .withExtensionId(extensionId) .withBody(body) .build(); } /** * Update an extension by ID. * * @param request The request object * @return Extension * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public Extension putTelephonyProvidersEdgesExtension(PutTelephonyProvidersEdgesExtensionRequest request) throws IOException, ApiException { try { ApiResponse<Extension> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<Extension>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Update an extension by ID. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<Extension> putTelephonyProvidersEdgesExtension(ApiRequest<Extension> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<Extension>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<Extension> response = (ApiResponse<Extension>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<Extension> response = (ApiResponse<Extension>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Update an extension pool by ID * * @param extensionPoolId Extension pool ID (required) * @param body ExtensionPool (required) * @return ExtensionPool * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public ExtensionPool putTelephonyProvidersEdgesExtensionpool(String extensionPoolId, ExtensionPool body) throws IOException, ApiException { return putTelephonyProvidersEdgesExtensionpool(createPutTelephonyProvidersEdgesExtensionpoolRequest(extensionPoolId, body)); } /** * Update an extension pool by ID * * @param extensionPoolId Extension pool ID (required) * @param body ExtensionPool (required) * @return ExtensionPool * @throws IOException if the request fails to be processed */ public ApiResponse<ExtensionPool> putTelephonyProvidersEdgesExtensionpoolWithHttpInfo(String extensionPoolId, ExtensionPool body) throws IOException { return putTelephonyProvidersEdgesExtensionpool(createPutTelephonyProvidersEdgesExtensionpoolRequest(extensionPoolId, body).withHttpInfo()); } private PutTelephonyProvidersEdgesExtensionpoolRequest createPutTelephonyProvidersEdgesExtensionpoolRequest(String extensionPoolId, ExtensionPool body) { return PutTelephonyProvidersEdgesExtensionpoolRequest.builder() .withExtensionPoolId(extensionPoolId) .withBody(body) .build(); } /** * Update an extension pool by ID * * @param request The request object * @return ExtensionPool * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public ExtensionPool putTelephonyProvidersEdgesExtensionpool(PutTelephonyProvidersEdgesExtensionpoolRequest request) throws IOException, ApiException { try { ApiResponse<ExtensionPool> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<ExtensionPool>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Update an extension pool by ID * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<ExtensionPool> putTelephonyProvidersEdgesExtensionpool(ApiRequest<ExtensionPool> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<ExtensionPool>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<ExtensionPool> response = (ApiResponse<ExtensionPool>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<ExtensionPool> response = (ApiResponse<ExtensionPool>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Update outbound route * * @param outboundRouteId Outbound route ID (required) * @param body OutboundRoute (required) * @return OutboundRoute * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public OutboundRoute putTelephonyProvidersEdgesOutboundroute(String outboundRouteId, OutboundRoute body) throws IOException, ApiException { return putTelephonyProvidersEdgesOutboundroute(createPutTelephonyProvidersEdgesOutboundrouteRequest(outboundRouteId, body)); } /** * Update outbound route * * @param outboundRouteId Outbound route ID (required) * @param body OutboundRoute (required) * @return OutboundRoute * @throws IOException if the request fails to be processed */ public ApiResponse<OutboundRoute> putTelephonyProvidersEdgesOutboundrouteWithHttpInfo(String outboundRouteId, OutboundRoute body) throws IOException { return putTelephonyProvidersEdgesOutboundroute(createPutTelephonyProvidersEdgesOutboundrouteRequest(outboundRouteId, body).withHttpInfo()); } private PutTelephonyProvidersEdgesOutboundrouteRequest createPutTelephonyProvidersEdgesOutboundrouteRequest(String outboundRouteId, OutboundRoute body) { return PutTelephonyProvidersEdgesOutboundrouteRequest.builder() .withOutboundRouteId(outboundRouteId) .withBody(body) .build(); } /** * Update outbound route * * @param request The request object * @return OutboundRoute * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public OutboundRoute putTelephonyProvidersEdgesOutboundroute(PutTelephonyProvidersEdgesOutboundrouteRequest request) throws IOException, ApiException { try { ApiResponse<OutboundRoute> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<OutboundRoute>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Update outbound route * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<OutboundRoute> putTelephonyProvidersEdgesOutboundroute(ApiRequest<OutboundRoute> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<OutboundRoute>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<OutboundRoute> response = (ApiResponse<OutboundRoute>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<OutboundRoute> response = (ApiResponse<OutboundRoute>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Update a Phone by ID * * @param phoneId Phone ID (required) * @param body Phone (required) * @return Phone * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public Phone putTelephonyProvidersEdgesPhone(String phoneId, Phone body) throws IOException, ApiException { return putTelephonyProvidersEdgesPhone(createPutTelephonyProvidersEdgesPhoneRequest(phoneId, body)); } /** * Update a Phone by ID * * @param phoneId Phone ID (required) * @param body Phone (required) * @return Phone * @throws IOException if the request fails to be processed */ public ApiResponse<Phone> putTelephonyProvidersEdgesPhoneWithHttpInfo(String phoneId, Phone body) throws IOException { return putTelephonyProvidersEdgesPhone(createPutTelephonyProvidersEdgesPhoneRequest(phoneId, body).withHttpInfo()); } private PutTelephonyProvidersEdgesPhoneRequest createPutTelephonyProvidersEdgesPhoneRequest(String phoneId, Phone body) { return PutTelephonyProvidersEdgesPhoneRequest.builder() .withPhoneId(phoneId) .withBody(body) .build(); } /** * Update a Phone by ID * * @param request The request object * @return Phone * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public Phone putTelephonyProvidersEdgesPhone(PutTelephonyProvidersEdgesPhoneRequest request) throws IOException, ApiException { try { ApiResponse<Phone> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<Phone>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Update a Phone by ID * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<Phone> putTelephonyProvidersEdgesPhone(ApiRequest<Phone> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<Phone>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<Phone> response = (ApiResponse<Phone>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<Phone> response = (ApiResponse<Phone>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Update a Phone Base Settings by ID * * @param phoneBaseId Phone base ID (required) * @param body Phone base settings (required) * @return PhoneBase * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public PhoneBase putTelephonyProvidersEdgesPhonebasesetting(String phoneBaseId, PhoneBase body) throws IOException, ApiException { return putTelephonyProvidersEdgesPhonebasesetting(createPutTelephonyProvidersEdgesPhonebasesettingRequest(phoneBaseId, body)); } /** * Update a Phone Base Settings by ID * * @param phoneBaseId Phone base ID (required) * @param body Phone base settings (required) * @return PhoneBase * @throws IOException if the request fails to be processed */ public ApiResponse<PhoneBase> putTelephonyProvidersEdgesPhonebasesettingWithHttpInfo(String phoneBaseId, PhoneBase body) throws IOException { return putTelephonyProvidersEdgesPhonebasesetting(createPutTelephonyProvidersEdgesPhonebasesettingRequest(phoneBaseId, body).withHttpInfo()); } private PutTelephonyProvidersEdgesPhonebasesettingRequest createPutTelephonyProvidersEdgesPhonebasesettingRequest(String phoneBaseId, PhoneBase body) { return PutTelephonyProvidersEdgesPhonebasesettingRequest.builder() .withPhoneBaseId(phoneBaseId) .withBody(body) .build(); } /** * Update a Phone Base Settings by ID * * @param request The request object * @return PhoneBase * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public PhoneBase putTelephonyProvidersEdgesPhonebasesetting(PutTelephonyProvidersEdgesPhonebasesettingRequest request) throws IOException, ApiException { try { ApiResponse<PhoneBase> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<PhoneBase>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Update a Phone Base Settings by ID * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<PhoneBase> putTelephonyProvidersEdgesPhonebasesetting(ApiRequest<PhoneBase> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<PhoneBase>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<PhoneBase> response = (ApiResponse<PhoneBase>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<PhoneBase> response = (ApiResponse<PhoneBase>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Update a Site by ID. * * @param siteId Site ID (required) * @param body Site (required) * @return Site * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public Site putTelephonyProvidersEdgesSite(String siteId, Site body) throws IOException, ApiException { return putTelephonyProvidersEdgesSite(createPutTelephonyProvidersEdgesSiteRequest(siteId, body)); } /** * Update a Site by ID. * * @param siteId Site ID (required) * @param body Site (required) * @return Site * @throws IOException if the request fails to be processed */ public ApiResponse<Site> putTelephonyProvidersEdgesSiteWithHttpInfo(String siteId, Site body) throws IOException { return putTelephonyProvidersEdgesSite(createPutTelephonyProvidersEdgesSiteRequest(siteId, body).withHttpInfo()); } private PutTelephonyProvidersEdgesSiteRequest createPutTelephonyProvidersEdgesSiteRequest(String siteId, Site body) { return PutTelephonyProvidersEdgesSiteRequest.builder() .withSiteId(siteId) .withBody(body) .build(); } /** * Update a Site by ID. * * @param request The request object * @return Site * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public Site putTelephonyProvidersEdgesSite(PutTelephonyProvidersEdgesSiteRequest request) throws IOException, ApiException { try { ApiResponse<Site> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<Site>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Update a Site by ID. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<Site> putTelephonyProvidersEdgesSite(ApiRequest<Site> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<Site>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<Site> response = (ApiResponse<Site>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<Site> response = (ApiResponse<Site>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Update the list of Number Plans. A user can update maximum 200 number plans at a time. * * @param siteId Site ID (required) * @param body List of number plans (required) * @return List<NumberPlan> * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public List<NumberPlan> putTelephonyProvidersEdgesSiteNumberplans(String siteId, List<NumberPlan> body) throws IOException, ApiException { return putTelephonyProvidersEdgesSiteNumberplans(createPutTelephonyProvidersEdgesSiteNumberplansRequest(siteId, body)); } /** * Update the list of Number Plans. A user can update maximum 200 number plans at a time. * * @param siteId Site ID (required) * @param body List of number plans (required) * @return List<NumberPlan> * @throws IOException if the request fails to be processed */ public ApiResponse<List<NumberPlan>> putTelephonyProvidersEdgesSiteNumberplansWithHttpInfo(String siteId, List<NumberPlan> body) throws IOException { return putTelephonyProvidersEdgesSiteNumberplans(createPutTelephonyProvidersEdgesSiteNumberplansRequest(siteId, body).withHttpInfo()); } private PutTelephonyProvidersEdgesSiteNumberplansRequest createPutTelephonyProvidersEdgesSiteNumberplansRequest(String siteId, List<NumberPlan> body) { return PutTelephonyProvidersEdgesSiteNumberplansRequest.builder() .withSiteId(siteId) .withBody(body) .build(); } /** * Update the list of Number Plans. A user can update maximum 200 number plans at a time. * * @param request The request object * @return List<NumberPlan> * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public List<NumberPlan> putTelephonyProvidersEdgesSiteNumberplans(PutTelephonyProvidersEdgesSiteNumberplansRequest request) throws IOException, ApiException { try { ApiResponse<List<NumberPlan>> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<List<NumberPlan>>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Update the list of Number Plans. A user can update maximum 200 number plans at a time. * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<List<NumberPlan>> putTelephonyProvidersEdgesSiteNumberplans(ApiRequest<List<NumberPlan>> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<List<NumberPlan>>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<List<NumberPlan>> response = (ApiResponse<List<NumberPlan>>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<List<NumberPlan>> response = (ApiResponse<List<NumberPlan>>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Update outbound route * * @param siteId Site ID (required) * @param outboundRouteId Outbound route ID (required) * @param body OutboundRoute (required) * @return OutboundRouteBase * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public OutboundRouteBase putTelephonyProvidersEdgesSiteOutboundroute(String siteId, String outboundRouteId, OutboundRouteBase body) throws IOException, ApiException { return putTelephonyProvidersEdgesSiteOutboundroute(createPutTelephonyProvidersEdgesSiteOutboundrouteRequest(siteId, outboundRouteId, body)); } /** * Update outbound route * * @param siteId Site ID (required) * @param outboundRouteId Outbound route ID (required) * @param body OutboundRoute (required) * @return OutboundRouteBase * @throws IOException if the request fails to be processed */ public ApiResponse<OutboundRouteBase> putTelephonyProvidersEdgesSiteOutboundrouteWithHttpInfo(String siteId, String outboundRouteId, OutboundRouteBase body) throws IOException { return putTelephonyProvidersEdgesSiteOutboundroute(createPutTelephonyProvidersEdgesSiteOutboundrouteRequest(siteId, outboundRouteId, body).withHttpInfo()); } private PutTelephonyProvidersEdgesSiteOutboundrouteRequest createPutTelephonyProvidersEdgesSiteOutboundrouteRequest(String siteId, String outboundRouteId, OutboundRouteBase body) { return PutTelephonyProvidersEdgesSiteOutboundrouteRequest.builder() .withSiteId(siteId) .withOutboundRouteId(outboundRouteId) .withBody(body) .build(); } /** * Update outbound route * * @param request The request object * @return OutboundRouteBase * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public OutboundRouteBase putTelephonyProvidersEdgesSiteOutboundroute(PutTelephonyProvidersEdgesSiteOutboundrouteRequest request) throws IOException, ApiException { try { ApiResponse<OutboundRouteBase> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<OutboundRouteBase>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Update outbound route * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<OutboundRouteBase> putTelephonyProvidersEdgesSiteOutboundroute(ApiRequest<OutboundRouteBase> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<OutboundRouteBase>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<OutboundRouteBase> response = (ApiResponse<OutboundRouteBase>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<OutboundRouteBase> response = (ApiResponse<OutboundRouteBase>)(ApiResponse<?>)(new ApiException(exception)); return response; } } /** * Update a Trunk Base Settings object by ID * * @param trunkBaseSettingsId Trunk Base ID (required) * @param body Trunk base settings (required) * @return TrunkBase * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public TrunkBase putTelephonyProvidersEdgesTrunkbasesetting(String trunkBaseSettingsId, TrunkBase body) throws IOException, ApiException { return putTelephonyProvidersEdgesTrunkbasesetting(createPutTelephonyProvidersEdgesTrunkbasesettingRequest(trunkBaseSettingsId, body)); } /** * Update a Trunk Base Settings object by ID * * @param trunkBaseSettingsId Trunk Base ID (required) * @param body Trunk base settings (required) * @return TrunkBase * @throws IOException if the request fails to be processed */ public ApiResponse<TrunkBase> putTelephonyProvidersEdgesTrunkbasesettingWithHttpInfo(String trunkBaseSettingsId, TrunkBase body) throws IOException { return putTelephonyProvidersEdgesTrunkbasesetting(createPutTelephonyProvidersEdgesTrunkbasesettingRequest(trunkBaseSettingsId, body).withHttpInfo()); } private PutTelephonyProvidersEdgesTrunkbasesettingRequest createPutTelephonyProvidersEdgesTrunkbasesettingRequest(String trunkBaseSettingsId, TrunkBase body) { return PutTelephonyProvidersEdgesTrunkbasesettingRequest.builder() .withTrunkBaseSettingsId(trunkBaseSettingsId) .withBody(body) .build(); } /** * Update a Trunk Base Settings object by ID * * @param request The request object * @return TrunkBase * @throws ApiException if the request fails on the server * @throws IOException if the request fails to be processed */ public TrunkBase putTelephonyProvidersEdgesTrunkbasesetting(PutTelephonyProvidersEdgesTrunkbasesettingRequest request) throws IOException, ApiException { try { ApiResponse<TrunkBase> response = pcapiClient.invoke(request.withHttpInfo(), new TypeReference<TrunkBase>() {}); return response.getBody(); } catch (ApiException | IOException exception) { if (pcapiClient.getShouldThrowErrors()) throw exception; return null; } } /** * Update a Trunk Base Settings object by ID * * @param request The request object * @return the response * @throws IOException if the request fails to be processed */ public ApiResponse<TrunkBase> putTelephonyProvidersEdgesTrunkbasesetting(ApiRequest<TrunkBase> request) throws IOException { try { return pcapiClient.invoke(request, new TypeReference<TrunkBase>() {}); } catch (ApiException exception) { @SuppressWarnings("unchecked") ApiResponse<TrunkBase> response = (ApiResponse<TrunkBase>)(ApiResponse<?>)exception; return response; } catch (Throwable exception) { if (pcapiClient.getShouldThrowErrors()) { if (exception instanceof IOException) { throw (IOException)exception; } throw new RuntimeException(exception); } @SuppressWarnings("unchecked") ApiResponse<TrunkBase> response = (ApiResponse<TrunkBase>)(ApiResponse<?>)(new ApiException(exception)); return response; } } }
40.288073
412
0.738345
5846bcbf48a1db7b90eb76c7eb0a3ed069a812ea
1,668
/* * Licensed to scrutmydocs.org (the "Author") under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Author 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 org.scrutmydocs.webapp.service.settings.rivers.basic; import org.scrutmydocs.webapp.api.settings.rivers.AbstractRiverHelper; import org.scrutmydocs.webapp.api.settings.rivers.basic.data.BasicRiver; import org.scrutmydocs.webapp.api.settings.rivers.basic.helper.BasicRiverHelper; import org.scrutmydocs.webapp.service.settings.rivers.AdminRiverAbstractService; import org.springframework.stereotype.Component; /** * River Service Implementation for all Rivers * @author PILATO * */ @Component public class AdminRiverService extends AdminRiverAbstractService<BasicRiver> { private static final long serialVersionUID = 1L; @Override public AbstractRiverHelper<BasicRiver> getHelper() { return new BasicRiverHelper(); } @Override public BasicRiver buildInstance() { return new BasicRiver(); } }
34.75
81
0.757794
7df9d1825e1f5917e4a8c386d130a9c73278d109
8,002
package com.zoothii.iwbtodojava.business.concretes; import com.zoothii.iwbtodojava.business.abstracts.AuthService; import com.zoothii.iwbtodojava.business.abstracts.RoleService; import com.zoothii.iwbtodojava.business.abstracts.UserService; import com.zoothii.iwbtodojava.core.entities.Role; import com.zoothii.iwbtodojava.core.entities.User; import com.zoothii.iwbtodojava.core.utulities.constants.Messages; import com.zoothii.iwbtodojava.core.utulities.constants.Roles; import com.zoothii.iwbtodojava.core.utulities.results.*; import com.zoothii.iwbtodojava.core.utulities.security.token.AccessToken; import com.zoothii.iwbtodojava.core.utulities.security.token.jwt.JwtUtils; import com.zoothii.iwbtodojava.entities.concretes.payload.request.LoginRequest; import com.zoothii.iwbtodojava.entities.concretes.payload.request.RegisterRequest; import com.zoothii.iwbtodojava.entities.concretes.payload.response.AuthResponse; import org.springframework.context.annotation.Lazy; import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.Authentication; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.HashSet; import java.util.List; import java.util.Objects; import java.util.Set; import java.util.stream.Collectors; @Service public class AuthManager implements AuthService { final private AuthenticationManager authenticationManager; final private UserService userService; final private RoleService roleService; final private PasswordEncoder passwordEncoder; final private JwtUtils jwtUtils; @Lazy public AuthManager(AuthenticationManager authenticationManager, UserService userService, RoleService roleService, PasswordEncoder passwordEncoder, JwtUtils jwtUtils) { this.authenticationManager = authenticationManager; this.userService = userService; this.roleService = roleService; this.passwordEncoder = passwordEncoder; this.jwtUtils = jwtUtils; } @Override @Transactional public DataResult<AuthResponse> register(RegisterRequest registerRequest) { var resultUsernameExists = userService.checkIfUsernameExists(registerRequest.getUsername()); if (resultUsernameExists.isSuccess()) { return new ErrorDataResult<>(resultUsernameExists.getMessage()); } var resultEmailExists = userService.checkIfEmailExists(registerRequest.getEmail()); if (resultEmailExists.isSuccess()) { return new ErrorDataResult<>(resultEmailExists.getMessage()); } var requestedRolesString = registerRequest.getRoles(); var resultSetRequestedRolesStringToRole = setRequestedRolesStringToRole(requestedRolesString); if (!resultSetRequestedRolesStringToRole.isSuccess()) { return new ErrorDataResult<>(resultSetRequestedRolesStringToRole.getMessage()); } // Create new user's account and hash password set requested roles and save var rolesToSet = resultSetRequestedRolesStringToRole.getData(); var usernameToSet = registerRequest.getUsername(); var emailToSet = registerRequest.getEmail(); var passwordToSet = passwordEncoder.encode(registerRequest.getPassword()); User user = new User(usernameToSet, emailToSet, passwordToSet, rolesToSet); userService.createUser(user); return new SuccessDataResult<>(generateJwtResponseUsernamePassword(registerRequest.getUsername(), registerRequest.getPassword()), Messages.successRegister); } private void addDefaultRole(Set<Role> roles) { roleService.createDefaultRoleIfNotExists(Roles.ROLE_USER); roles.add(roleService.getRoleByName(Roles.ROLE_USER).getData()); } @Override @Transactional public DataResult<AuthResponse> login(LoginRequest loginRequest) { // check username exist from service var resultUserNameExists = userService.checkIfUsernameExists(loginRequest.getUsername()); if (!resultUserNameExists.isSuccess()) { return new ErrorDataResult<>(resultUserNameExists.getMessage()); } // check password true for the user var resultDataUser = userService.getUserByUsername(loginRequest.getUsername()); var resultPassword = checkIfPasswordCorrect(loginRequest.getPassword(), resultDataUser.getData().getPassword()); if (!resultPassword.isSuccess()) { return new ErrorDataResult<>(resultPassword.getMessage()); } return new SuccessDataResult<>(generateJwtResponseUsernamePassword(loginRequest.getUsername(), loginRequest.getPassword()), Messages.successLogin); } @Override public Result checkIfPasswordCorrect(String requestedPassword, String encryptedPassword) { if (!passwordEncoder.matches(requestedPassword, encryptedPassword)) { return new ErrorResult(Messages.errorPassword); } return new SuccessResult(Messages.successPassword); } @Override public DataResult<User> getAuthenticatedUserDetails() { try { Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); User userDetails = (User) authentication.getPrincipal(); return new SuccessDataResult<>(userDetails, Messages.successGetAuthenticatedUserDetails); } catch (ClassCastException classCastException) { return new ErrorDataResult<>(Messages.errorGetAuthenticatedUserDetails); } } // set requested roles checking from database for security private DataResult<Set<Role>> setRequestedRolesStringToRole(Set<String> requestedRolesString) { Set<Role> requestedRoles = new HashSet<>(); if (requestedRolesString == null) { addDefaultRole(requestedRoles); } else { // if default user role not requested add if (!requestedRolesString.contains(Roles.ROLE_USER)) { addDefaultRole(requestedRoles); } for (String role : requestedRolesString) { // if admin requested and not exists create if (Objects.equals(role, Roles.ROLE_ADMIN)) { roleService.createDefaultRoleIfNotExists(role); } var resultRoleExistsByName = roleService.checkIfRoleExistsByName(role); if (!resultRoleExistsByName.isSuccess()) { return new ErrorDataResult<>(resultRoleExistsByName.getMessage()); } var roleToAdd = roleService.getRoleByName(role).getData(); requestedRoles.add(roleToAdd); } } return new SuccessDataResult<>(requestedRoles, Messages.successSetRequestedRolesStringToRole); } // authenticate user and return jwt as response private AuthResponse generateJwtResponseUsernamePassword(String username, String password) { Authentication authentication = authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(username, password)); SecurityContextHolder.getContext().setAuthentication(authentication); AccessToken accessToken = jwtUtils.createAccessToken(SecurityContextHolder.getContext().getAuthentication()); User userDetails = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal(); List<String> roles = userDetails.getAuthorities().stream().map(GrantedAuthority::getAuthority).collect(Collectors.toList()); return new AuthResponse(accessToken, userDetails.getId(), userDetails.getUsername(), userDetails.getEmail(), roles); } }
47.916168
171
0.74194
3aae5f6494d77b9a901fcab020537364b710764c
2,467
package com.weisong.test.comm.transport.codec; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.InputStream; import java.io.OutputStream; import java.util.Collection; import java.util.zip.DeflaterOutputStream; import java.util.zip.InflaterInputStream; import com.esotericsoftware.kryo.Kryo; import com.esotericsoftware.kryo.io.Input; import com.esotericsoftware.kryo.io.Output; import com.weisong.test.comm.message.CMessage; import com.weisong.test.comm.transport.pdu.CPdu; public class CKryoCodec implements CCodec { final static public int BUFFER_SIZE = 32 * 1024; static private ThreadLocal<Kryo> kryoThreadLocal; private boolean compress; public CKryoCodec(final boolean compress, final Collection<Class<?>> classes) { this.compress = compress; synchronized (CKryoCodec.class) { if(kryoThreadLocal == null) { kryoThreadLocal = new ThreadLocal<Kryo>() { @Override protected Kryo initialValue() { Kryo kryo = new Kryo(); for(Class<?> c : classes) { // The order of Id's must be identical across JVM's! int id = Math.abs(c.getName().hashCode()); kryo.register(c, id); } return kryo; } }; } } } @Override public byte[] encode(CMessage message) { return write(message); } @Override public CMessage decodeMessage(byte[] bytes) { return decodeMessage(bytes, CMessage.class); } @Override public <T extends CMessage> T decodeMessage(byte[] bytes, Class<T> clazz) { return (T) read(bytes, clazz); } @Override public byte[] encode(CPdu pdu) { return write(pdu); } @Override public CPdu decodePdu(byte[] bytes) { return (CPdu) read(bytes); } @SuppressWarnings("unchecked") private <T> T read(byte[] bytes, Class<T> clazz) { return (T) read(bytes); } private Object read(byte[] bytes) { InputStream is = new ByteArrayInputStream(bytes); if (compress) { is = new InflaterInputStream(is); } Input input = new Input(is); Kryo kryo = kryoThreadLocal.get(); return kryo.readClassAndObject(input); } private byte[] write(Object o) { Kryo kryo = kryoThreadLocal.get(); ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); OutputStream os = compress ? new DeflaterOutputStream(byteArrayOutputStream) : byteArrayOutputStream; try(Output output = new Output(os)) { kryo.writeClassAndObject(output, o); } return byteArrayOutputStream.toByteArray(); } }
25.697917
80
0.715849
dc8ff98085caf7c6f5c07cc0ca68bb2e62bce5cf
188
package de.timmyrs.suprdiscordbot.structures; @SuppressWarnings("unused") public class EmbedImage { public String url; public String proxy_url; public int height; public int width; }
17.090909
45
0.787234
bd397d6908daa4fa8d4f93a211c1f5e825a72f07
16,828
/* * Copyright (C) 2017 Julien Viet * * 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 io.vertx.pgclient; import io.vertx.sqlclient.Row; import io.vertx.sqlclient.RowSet; import io.vertx.sqlclient.SqlConnection; import io.vertx.sqlclient.TransactionRollbackException; import io.vertx.sqlclient.Tuple; import io.vertx.core.*; import io.vertx.core.buffer.Buffer; import io.vertx.ext.unit.Async; import io.vertx.ext.unit.TestContext; import org.junit.Test; import java.util.ArrayList; import java.util.List; import java.util.concurrent.CompletableFuture; import java.util.concurrent.Executor; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; /** * @author <a href="mailto:julien@julienviet.com">Julien Viet</a> */ public abstract class PgConnectionTestBase extends PgClientTestBase<SqlConnection> { @Test public void testDisconnectAbruptly(TestContext ctx) { Async async = ctx.async(); ProxyServer proxy = ProxyServer.create(vertx, options.getPort(), options.getHost()); proxy.proxyHandler(conn -> { vertx.setTimer(200, id -> { conn.close(); }); conn.connect(); }); proxy.listen(8080, "localhost", ctx.asyncAssertSuccess(v1 -> { options.setPort(8080).setHost("localhost"); connector.accept(ctx.asyncAssertSuccess(conn -> { conn.closeHandler(v2 -> { async.complete(); }); })); })); } @Test public void testProtocolError(TestContext ctx) { Async async = ctx.async(); ProxyServer proxy = ProxyServer.create(vertx, options.getPort(), options.getHost()); CompletableFuture<Void> connected = new CompletableFuture<>(); proxy.proxyHandler(conn -> { connected.thenAccept(v -> { System.out.println("send bogus"); Buffer bogusMsg = Buffer.buffer(); bogusMsg.appendByte((byte) 'R'); // Authentication bogusMsg.appendInt(0); bogusMsg.appendInt(1); bogusMsg.setInt(1, bogusMsg.length() - 1); conn.clientSocket().write(bogusMsg); }); conn.connect(); }); proxy.listen(8080, "localhost", ctx.asyncAssertSuccess(v1 -> { options.setPort(8080).setHost("localhost"); connector.accept(ctx.asyncAssertSuccess(conn -> { AtomicInteger count = new AtomicInteger(); conn.exceptionHandler(err -> { ctx.assertEquals(err.getClass(), UnsupportedOperationException.class); count.incrementAndGet(); }); conn.closeHandler(v -> { ctx.assertEquals(1, count.get()); async.complete(); }); connected.complete(null); })); })); } @Test public void testTx(TestContext ctx) { Async async = ctx.async(); connector.accept(ctx.asyncAssertSuccess(conn -> { conn .query("BEGIN") .execute(ctx.asyncAssertSuccess(result1 -> { ctx.assertEquals(0, result1.size()); ctx.assertNotNull(result1.iterator()); conn .query("COMMIT") .execute(ctx.asyncAssertSuccess(result2 -> { ctx.assertEquals(0, result2.size()); async.complete(); })); })); })); } /* @Test public void testSQLConnection(TestContext ctx) { Async async = ctx.async(); PgClientImpl client = (PgClientImpl) PgClient.create(vertx, options); client.connect(ctx.asyncAssertSuccess(conn -> { conn.query("SELECT 1", ctx.asyncAssertSuccess(result -> { ctx.assertEquals(1, result.rowCount()); async.complete(); })); })); } @Test public void testSelectForQueryWithParams(TestContext ctx) { Async async = ctx.async(); PgClientImpl client = (PgClientImpl) PgClient.create(vertx, options); client.connect(c -> { SQLConnection conn = c.result(); conn.queryWithParams("SELECT * FROM Fortune WHERE id=$1", new JsonArray().add(1) , ctx.asyncAssertSuccess(result -> { ctx.assertEquals(1, result.rowCount()); async.complete(); })); }); } @Test public void testInsertForUpdateWithParams(TestContext ctx) { Async async = ctx.async(); PgClientImpl client = (PgClientImpl) PgClient.create(vertx, options); client.connect(c -> { SQLConnection conn = c.result(); conn.updateWithParams("INSERT INTO Fortune (id, message) VALUES ($1, $2)", new JsonArray().add(1234).add("Yes!"), ctx.asyncAssertSuccess(result -> { ctx.assertEquals(1, result.getUpdated()); async.complete(); })); }); } @Test public void testUpdateForUpdateWithParams(TestContext ctx) { Async async = ctx.async(); PgClientImpl client = (PgClientImpl) PgClient.create(vertx, options); client.connect(c -> { SQLConnection conn = c.result(); conn.updateWithParams("UPDATE Fortune SET message = $1 WHERE id = $2", new JsonArray().add("Hello").add(1), ctx.asyncAssertSuccess(result -> { ctx.assertEquals(1, result.getUpdated()); async.complete(); })); }); } @Test public void testDeleteForUpdateWithParams(TestContext ctx) { Async async = ctx.async(); PgClientImpl client = (PgClientImpl) PgClient.create(vertx, options); client.connect(c -> { SQLConnection conn = c.result(); conn.updateWithParams("DELETE FROM Fortune WHERE id = $1", new JsonArray().add(3), ctx.asyncAssertSuccess(result -> { ctx.assertEquals(1, result.getUpdated()); async.complete(); })); }); } @Test public void testGetDefaultTx(TestContext ctx) { Async async = ctx.async(); PgClientImpl client = (PgClientImpl) PgClient.create(vertx, options); client.connect(c -> { SQLConnection conn = c.result(); conn.getTransactionIsolation(ctx.asyncAssertSuccess(result -> { ctx.assertEquals(TransactionIsolation.READ_COMMITTED, result); async.complete(); })); }); } @Test public void testSetUnsupportedTx(TestContext ctx) { Async async = ctx.async(); PgClientImpl client = (PgClientImpl) PgClient.create(vertx, options); client.connect(c -> { SQLConnection conn = c.result(); conn.setTransactionIsolation(TransactionIsolation.NONE, ctx.asyncAssertFailure(result -> { ctx.assertEquals("None transaction isolation is not supported", result.getMessage()); async.complete(); })); }); } @Test public void testSetAndGetReadUncommittedTx(TestContext ctx) { Async async = ctx.async(); PgClientImpl client = (PgClientImpl) PgClient.create(vertx, options); client.connect(c -> { SQLConnection conn = c.result(); conn.setTransactionIsolation(TransactionIsolation.READ_UNCOMMITTED, ctx.asyncAssertSuccess(result -> { conn.getTransactionIsolation(ctx.asyncAssertSuccess(res -> { ctx.assertEquals(TransactionIsolation.READ_UNCOMMITTED, res); async.complete(); })); })); }); } @Test public void testSetAndGetReadCommittedTx(TestContext ctx) { Async async = ctx.async(); PgClientImpl client = (PgClientImpl) PgClient.create(vertx, options); client.connect(c -> { SQLConnection conn = c.result(); conn.setTransactionIsolation(TransactionIsolation.READ_COMMITTED, ctx.asyncAssertSuccess(result -> { conn.getTransactionIsolation(ctx.asyncAssertSuccess(res -> { ctx.assertEquals(TransactionIsolation.READ_COMMITTED, res); async.complete(); })); })); }); } @Test public void testSetAndGetRepeatableReadTx(TestContext ctx) { Async async = ctx.async(); PgClientImpl client = (PgClientImpl) PgClient.create(vertx, options); client.connect(c -> { SQLConnection conn = c.result(); conn.setTransactionIsolation(TransactionIsolation.REPEATABLE_READ, ctx.asyncAssertSuccess(result -> { conn.getTransactionIsolation(ctx.asyncAssertSuccess(res -> { ctx.assertEquals(TransactionIsolation.REPEATABLE_READ, res); async.complete(); })); })); }); } @Test public void testSetAndGetSerializableTx(TestContext ctx) { Async async = ctx.async(); PgClientImpl client = (PgClientImpl) PgClient.create(vertx, options); client.connect(c -> { SQLConnection conn = c.result(); conn.setTransactionIsolation(TransactionIsolation.SERIALIZABLE, ctx.asyncAssertSuccess(result -> { conn.getTransactionIsolation(ctx.asyncAssertSuccess(res -> { ctx.assertEquals(TransactionIsolation.SERIALIZABLE, res); async.complete(); })); })); }); } */ @Test public void testUpdateError(TestContext ctx) { Async async = ctx.async(); connector.accept(ctx.asyncAssertSuccess(conn -> { conn .query("INSERT INTO Fortune (id, message) VALUES (1, 'Duplicate')") .execute(ctx.asyncAssertFailure(err -> { ctx.assertEquals("23505", ((PgException) err).getCode()); conn .query("SELECT 1000") .execute(ctx.asyncAssertSuccess(result -> { ctx.assertEquals(1, result.size()); ctx.assertEquals(1000, result.iterator().next().getInteger(0)); async.complete(); })); })); })); } @Test public void testBatchInsertError(TestContext ctx) throws Exception { Async async = ctx.async(); connector.accept(ctx.asyncAssertSuccess(conn -> { int id = randomWorld(); List<Tuple> batch = new ArrayList<>(); batch.add(Tuple.of(id, 3)); conn .preparedQuery("INSERT INTO World (id, randomnumber) VALUES ($1, $2)") .executeBatch(batch, ctx.asyncAssertFailure(err -> { ctx.assertEquals("23505", ((PgException) err).getCode()); conn .preparedQuery("SELECT 1000") .execute(ctx.asyncAssertSuccess(result -> { ctx.assertEquals(1, result.size()); ctx.assertEquals(1000, result.iterator().next().getInteger(0)); async.complete(); })); })); })); } @Test public void testCloseOnUndeploy(TestContext ctx) { Async done = ctx.async(); vertx.deployVerticle(new AbstractVerticle() { @Override public void start(Promise<Void> startPromise) throws Exception { connector.accept(ctx.asyncAssertSuccess(conn -> { conn.closeHandler(v -> { done.complete(); }); startPromise.complete(); })); } }, ctx.asyncAssertSuccess(id -> { vertx.undeploy(id); })); } @Test public void testTransactionCommit(TestContext ctx) { testTransactionCommit(ctx, Runnable::run); } @Test public void testTransactionCommitFromAnotherThread(TestContext ctx) { testTransactionCommit(ctx, t -> new Thread(t).start()); } private void testTransactionCommit(TestContext ctx, Executor exec) { Async done = ctx.async(); connector.accept(ctx.asyncAssertSuccess(conn -> { deleteFromTestTable(ctx, conn, () -> { exec.execute(() -> { conn.begin().onComplete(ctx.asyncAssertSuccess(tx -> { AtomicInteger u1 = new AtomicInteger(); AtomicInteger u2 = new AtomicInteger(); tx.completion().onComplete(ctx.asyncAssertSuccess(v -> { // })); conn .query("INSERT INTO Test (id, val) VALUES (1, 'val-1')") .execute(ctx.asyncAssertSuccess(res1 -> { u1.addAndGet(res1.rowCount()); exec.execute(() -> { conn .query("INSERT INTO Test (id, val) VALUES (2, 'val-2')") .execute(ctx.asyncAssertSuccess(res2 -> { u2.addAndGet(res2.rowCount()); exec.execute(() -> { tx.commit(ctx.asyncAssertSuccess(v -> { ctx.assertEquals(1, u1.get()); ctx.assertEquals(1, u2.get()); conn .query("SELECT id FROM Test WHERE id=1 OR id=2") .execute(ctx.asyncAssertSuccess(result -> { ctx.assertEquals(2, result.size()); done.complete(); })); })); }); })); }); })); })); }); }); })); } @Test public void testTransactionRollback(TestContext ctx) { testTransactionRollback(ctx, Runnable::run); } @Test public void testTransactionRollbackFromAnotherThread(TestContext ctx) { testTransactionRollback(ctx, t -> new Thread(t).start()); } private void testTransactionRollback(TestContext ctx, Executor exec) { Async done = ctx.async(); connector.accept(ctx.asyncAssertSuccess(conn -> { deleteFromTestTable(ctx, conn, () -> { exec.execute(() -> { conn.begin().onComplete(ctx.asyncAssertSuccess(tx -> { AtomicInteger u1 = new AtomicInteger(); AtomicInteger u2 = new AtomicInteger(); tx.completion().onComplete(ctx.asyncAssertFailure(err -> { ctx.assertEquals(TransactionRollbackException.INSTANCE, err); })); conn .query("INSERT INTO Test (id, val) VALUES (1, 'val-1')") .execute(ctx.asyncAssertSuccess(res1 -> { u1.addAndGet(res1.rowCount()); exec.execute(() -> { }); conn .query("INSERT INTO Test (id, val) VALUES (2, 'val-2')") .execute(ctx.asyncAssertSuccess(res2 -> { u2.addAndGet(res2.rowCount()); exec.execute(() -> { tx.rollback(ctx.asyncAssertSuccess(v -> { ctx.assertEquals(1, u1.get()); ctx.assertEquals(1, u2.get()); conn .query("SELECT id FROM Test WHERE id=1 OR id=2") .execute(ctx.asyncAssertSuccess(result -> { ctx.assertEquals(0, result.size()); done.complete(); })); })); }); })); })); })); }); }); })); } @Test public void testTransactionAbort(TestContext ctx) { Async done = ctx.async(2); connector.accept(ctx.asyncAssertSuccess(conn -> { deleteFromTestTable(ctx, conn, () -> { conn.begin().onComplete(ctx.asyncAssertSuccess(tx -> { tx.completion().onComplete(ctx.asyncAssertFailure(err -> { ctx.assertEquals(TransactionRollbackException.INSTANCE, err); done.countDown(); })); AtomicReference<AsyncResult<RowSet<Row>>> queryAfterFailed = new AtomicReference<>(); AtomicReference<AsyncResult<Void>> commit = new AtomicReference<>(); conn.query("INSERT INTO Test (id, val) VALUES (1, 'val-1')").execute(ar1 -> { }); conn.query("INSERT INTO Test (id, val) VALUES (1, 'val-2')").execute(ar2 -> { ctx.assertNull(queryAfterFailed.get()); ctx.assertNull(commit.get()); ctx.assertTrue(ar2.failed()); }); conn.query("SELECT id FROM Test").execute(abc -> { queryAfterFailed.set(abc); // This query won't be made in the same TX conn.query("SELECT id FROM Test WHERE id=1").execute(ctx.asyncAssertSuccess(result -> { ctx.assertEquals(0, result.size()); done.countDown(); })); }); tx.commit(ar -> { commit.set(ar); }); })); }); })); } @Test public void testCloseConnectionFromDifferentContext(TestContext ctx) { Async done = ctx.async(1); connector.accept(ctx.asyncAssertSuccess(conn -> { conn.query("SELECT 1").execute(ctx.asyncAssertSuccess(res -> { ctx.assertEquals(1, res.size()); // schedule from another context new Thread(() -> { conn.close(v2 -> { done.complete(); }); }).start(); })); })); } }
34.768595
119
0.595971
0d18d89d7553108f4713da6c38df8e7bcb507d86
433
package introspection.rules; public class QueriesInCorrectPackageRule extends ClassStrategyRule { @Override protected boolean classIsIncludedInRule(final Class<?> clazz) { return clazz.getSimpleName().endsWith("Query") || clazz.getSimpleName().endsWith("Get"); } @Override protected boolean isRuleConform(final Class<?> clazz) { return clazz.getPackage().getName().endsWith(".queries"); } }
30.928571
96
0.711316
4d4f50c6301c6c4964ca75ddf39c6d8f1ece4e96
2,920
package io.kestra.core.serializers.ion; import com.amazon.ion.IonReader; import com.amazon.ion.IonType; import com.amazon.ion.Timestamp; import com.fasterxml.jackson.core.JsonToken; import com.fasterxml.jackson.core.io.IOContext; import java.io.IOException; import java.time.*; import java.time.temporal.ChronoUnit; import java.util.Calendar; public class IonParser extends com.fasterxml.jackson.dataformat.ion.IonParser { @SuppressWarnings("deprecation") public IonParser(IonReader r, IOContext ctxt) { super(r, ctxt); } protected JsonToken _tokenFromType(IonType type) { String[] typeAnnotations = _reader.getTypeAnnotations(); if (typeAnnotations.length > 0) { return JsonToken.VALUE_EMBEDDED_OBJECT; } else { return super._tokenFromType(type); } } @Override public Object getEmbeddedObject() throws IOException { if (this.getTypeId() != null) { if (this.getTypeId().equals(Instant.class.getSimpleName())) { return Instant.parse(_reader.stringValue()); } else if (this.getTypeId().equals(OffsetDateTime.class.getSimpleName())) { return OffsetDateTime.parse(_reader.stringValue()); } else if (this.getTypeId().equals(ZonedDateTime.class.getSimpleName())) { return ZonedDateTime.parse(_reader.stringValue()); } else if (this.getTypeId().equals(LocalDateTime.class.getSimpleName())) { return LocalDateTime.parse(_reader.stringValue()); } else if (this.getTypeId().equals(LocalDate.class.getSimpleName())) { return LocalDate.parse(_reader.stringValue()); } else if (this.getTypeId().equals(OffsetTime.class.getSimpleName())) { return OffsetTime.parse(_reader.stringValue()); } else if (this.getTypeId().equals(LocalTime.class.getSimpleName())) { return LocalTime.parse(_reader.stringValue()); } } if (_currToken == JsonToken.VALUE_EMBEDDED_OBJECT) { if (_reader.getType() == IonType.TIMESTAMP) { Timestamp timestamp = _reader.timestampValue(); Calendar calendar = timestamp.calendarValue(); Instant instant = calendar.toInstant(); ZoneOffset zoneOffset = timestamp.getLocalOffset() == null ? null : ZoneOffset.ofTotalSeconds(timestamp.getLocalOffset() * 60); if (zoneOffset == null || zoneOffset.getId().equals("Z")) { if (instant.truncatedTo(ChronoUnit.DAYS) == instant) { return LocalDate.ofInstant(instant, ZoneId.of("UTC")); } return instant; } return instant.atOffset(zoneOffset).toZonedDateTime(); } } return super.getEmbeddedObject(); } }
40.555556
143
0.622945
053d4b0ec266db5fef91df20769d103dd7b9d700
869
//package com.silklee.video.config; // //import com.silklee.video.service.OmsPortalOrderService; //import org.slf4j.Logger; //import org.slf4j.LoggerFactory; //import org.springframework.amqp.rabbit.annotation.RabbitHandler; //import org.springframework.amqp.rabbit.annotation.RabbitListener; //import org.springframework.stereotype.Component; // //import javax.annotation.Resource; // ///** // * 取消订单消息的处理者 // */ //@Component //@RabbitListener(queues = "edu.order.cancel") //public class CancelOrderReceiver { // private static Logger LOGGER = LoggerFactory.getLogger(CancelOrderReceiver.class); // // @Resource // private OmsPortalOrderService portalOrderService; // // @RabbitHandler // public void handle(Long orderId){ // LOGGER.info("receive delay message orderId:{}",orderId); // portalOrderService.cancelOrder(orderId); // } //}
29.965517
88
0.734177
cefdfc457acbccacb23da987ed9d199578be30bf
1,639
package de.refactoringbot.model.github.shared; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({ "admin", "push", "pull" }) public class Permissions { @JsonProperty("admin") private Boolean admin; @JsonProperty("push") private Boolean push; @JsonProperty("pull") private Boolean pull; @JsonIgnore private Map<String, Object> additionalProperties = new HashMap<>(); @JsonProperty("admin") public Boolean getAdmin() { return admin; } @JsonProperty("admin") public void setAdmin(Boolean admin) { this.admin = admin; } @JsonProperty("push") public Boolean getPush() { return push; } @JsonProperty("push") public void setPush(Boolean push) { this.push = push; } @JsonProperty("pull") public Boolean getPull() { return pull; } @JsonProperty("pull") public void setPull(Boolean pull) { this.pull = pull; } @JsonAnyGetter public Map<String, Object> getAdditionalProperties() { return this.additionalProperties; } @JsonAnySetter public void setAdditionalProperty(String name, Object value) { this.additionalProperties.put(name, value); } }
22.763889
71
0.683954
3df2908c19a95f0cc25b1343ad9c6478471e4d77
145
package io.automatiko.engine.api.decision; import java.util.List; public interface DecisionEventListenerConfig<T> { List<T> listeners(); }
13.181818
49
0.765517
78aecb950f731915b9ab4cde186441ba085877d9
5,847
package org.apache.maven.scm.provider.svn.svnexe.command.export; /* * Licensed to 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. */ import java.io.File; import org.apache.maven.scm.ScmBranch; import org.apache.maven.scm.ScmException; import org.apache.maven.scm.ScmFileSet; import org.apache.maven.scm.ScmRevision; import org.apache.maven.scm.ScmTag; import org.apache.maven.scm.ScmVersion; import org.apache.maven.scm.command.export.AbstractExportCommand; import org.apache.maven.scm.command.export.ExportScmResult; import org.apache.maven.scm.command.export.ExportScmResultWithRevision; import org.apache.maven.scm.provider.ScmProviderRepository; import org.apache.maven.scm.provider.svn.SvnCommandUtils; import org.apache.maven.scm.provider.svn.SvnTagBranchUtils; import org.apache.maven.scm.provider.svn.command.SvnCommand; import org.apache.maven.scm.provider.svn.repository.SvnScmProviderRepository; import org.apache.maven.scm.provider.svn.svnexe.command.SvnCommandLineUtils; import org.apache.maven.scm.provider.svn.svnexe.command.update.SvnUpdateConsumer; import org.codehaus.plexus.util.Os; import org.codehaus.plexus.util.StringUtils; import org.codehaus.plexus.util.cli.CommandLineException; import org.codehaus.plexus.util.cli.CommandLineUtils; import org.codehaus.plexus.util.cli.Commandline; /** * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a> * */ public class SvnExeExportCommand extends AbstractExportCommand implements SvnCommand { /** {@inheritDoc} */ protected ExportScmResult executeExportCommand( ScmProviderRepository repo, ScmFileSet fileSet, ScmVersion version, String outputDirectory ) throws ScmException { if ( outputDirectory == null ) { outputDirectory = fileSet.getBasedir().getAbsolutePath(); } SvnScmProviderRepository repository = (SvnScmProviderRepository) repo; String url = repository.getUrl(); if ( version != null && StringUtils.isNotEmpty( version.getName() ) ) { if ( version instanceof ScmTag ) { url = SvnTagBranchUtils.resolveTagUrl( repository, (ScmTag) version ); } else if ( version instanceof ScmBranch ) { url = SvnTagBranchUtils.resolveBranchUrl( repository, (ScmBranch) version ); } } url = SvnCommandUtils.fixUrl( url, repository.getUser() ); Commandline cl = createCommandLine( (SvnScmProviderRepository) repo, fileSet.getBasedir(), version, url, outputDirectory ); SvnUpdateConsumer consumer = new SvnUpdateConsumer( getLogger(), fileSet.getBasedir() ); CommandLineUtils.StringStreamConsumer stderr = new CommandLineUtils.StringStreamConsumer(); if ( getLogger().isInfoEnabled() ) { getLogger().info( "Executing: " + SvnCommandLineUtils.cryptPassword( cl ) ); if ( cl.getWorkingDirectory() != null && Os.isFamily( Os.FAMILY_WINDOWS ) ) { getLogger().info( "Working directory: " + cl.getWorkingDirectory().getAbsolutePath() ); } } int exitCode; try { exitCode = SvnCommandLineUtils.execute( cl, consumer, stderr, getLogger() ); } catch ( CommandLineException ex ) { throw new ScmException( "Error while executing command.", ex ); } if ( exitCode != 0 ) { return new ExportScmResult( cl.toString(), "The svn command failed.", stderr.getOutput(), false ); } return new ExportScmResultWithRevision( cl.toString(), consumer.getUpdatedFiles(), String.valueOf( consumer.getRevision() ) ); } // ---------------------------------------------------------------------- // // ---------------------------------------------------------------------- public static Commandline createCommandLine( SvnScmProviderRepository repository, File workingDirectory, ScmVersion version, String url, String outputSirectory ) { if ( version != null && StringUtils.isEmpty( version.getName() ) ) { version = null; } Commandline cl = SvnCommandLineUtils.getBaseSvnCommandLine( workingDirectory, repository ); cl.createArg().setValue( "export" ); if ( version != null && StringUtils.isNotEmpty( version.getName() ) ) { if ( version instanceof ScmRevision ) { cl.createArg().setValue( "-r" ); cl.createArg().setValue( version.getName() ); } } //support exporting to an existing directory cl.createArg().setValue( "--force" ); cl.createArg().setValue( url + "@" ); if ( StringUtils.isNotEmpty( outputSirectory ) ) { cl.createArg().setValue( outputSirectory + "@" ); } return cl; } }
36.773585
119
0.638789
dade7383c83e2263a59c89eac785cb0a441d2b3e
5,158
package com.demo.repository; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; import com.demo.DemoApplication; import com.demo.model.Partida; import com.demo.model.Puntos; import com.demo.model.Usuario; @Repository public class PuntosRepo { private List<Puntos> puntos_ = new ArrayList<>(); @Autowired UsuarioRepo usuarioRepo; public boolean votadoGracioso(int idPartida, String identificador) { for (Puntos p : puntos_) { if(p.getIdPartida_()==idPartida && p.getIdUsuario_().getMail().equals(identificador)) { return p.isVotadoGracioso(); } } return false; } public boolean votadoListo(int idPartida, String identificador) { for (Puntos p : puntos_) { if(p.getIdPartida_()==idPartida && p.getIdUsuario_().getMail().equals(identificador)) { return p.isVotadoListo(); } } return false; } public boolean votadoDibujo(int idPartida, String identificador) { for (Puntos p : puntos_) { if(p.getIdPartida_()==idPartida && p.getIdUsuario_().getMail().equals(identificador)) { return p.isVotadoDibujo(); } } return false; } public boolean addPuntosDibujo(int idPartida, String idUsuario, String identificador) { int bien = 0; Puntos p1 = null,p2 = null; for (Puntos p : puntos_) { if(p.getIdPartida_()==idPartida && p.getIdUsuario_().getMail().equals(idUsuario)) { p1 = p; bien++; }if(p.getIdPartida_()==idPartida && p.getIdUsuario_().getMail().equals(identificador)){ p2 = p; bien++; } if (bien==2) { System.out.println("añado dibujo"); p1.sumarPDibujo(1); p2.setVotadoDibujo(true); return true; } } return false; } public boolean addPuntosListo(int idPartida, String idUsuario, String identificador) { int bien = 0; Puntos p1 = null,p2 = null; for (Puntos p : puntos_) { if(p.getIdPartida_()==idPartida && p.getIdUsuario_().getMail().equals(idUsuario)) { p1 = p; bien++; }if(p.getIdPartida_()==idPartida && p.getIdUsuario_().getMail().equals(identificador)){ p2 = p; bien++; } if (bien==2) { p1.sumarPListo(1); p2.setVotadoListo(true); return true; } } return false; } public boolean addPuntosGracioso(int idPartida, String idUsuario, String identificador) { int bien = 0; Puntos p1 = null,p2 = null; for (Puntos p : puntos_) { if(p.getIdPartida_()==idPartida && p.getIdUsuario_().getMail().equals(idUsuario)) { p1 = p; bien++; }if(p.getIdPartida_()==idPartida && p.getIdUsuario_().getMail().equals(identificador)){ p2 = p; bien++; } if (bien==2) { System.out.println("añado gracioso"); p1.sumarPGracioso(1); p2.setVotadoGracioso(true); return true; } } return false; } public List<Puntos> getPuntosPartida(int idPartida,String identificador){ List<Puntos> respuesta = new ArrayList<>(); Usuario u = new Usuario(); for(Puntos p : puntos_) { if(p.getIdPartida_()==idPartida) { u = usuarioRepo.findByMail(p.getIdUsuario_().getMail()); u.setNull(); p.setIdUsuario_(u); respuesta.add(p); } } return respuesta; } public Puntos getPuntosJugador(int idPartida, String idUsuario) { //Usuario u = new Usuario(); for (Puntos p : puntos_) { if(p.getIdPartida_()==idPartida && p.getIdUsuario_().getMail().equals(idUsuario)) { //u = usuarioRepo.findByMail(p.getIdUsuario_().getMail()); //u.setNull(); //p.setIdUsuario_(u); return p; } } return null; } public void ini(Partida p) { int idPartida = p.getId(); List<Usuario> jugadores = p.getJugadores_(); for(Usuario u : jugadores) { Puntos puntos = new Puntos(idPartida,u); puntos_.add(puntos); } } public boolean todosVotado (int idPartida) { for(Puntos p : puntos_) { if(p.getIdPartida_()==idPartida) { if(!p.votadoTodo()) { return false; } } } System.out.println("Toca funar"); return true; } public boolean todosConsultado(int idPartida) { for(Puntos p : puntos_) { if(p.getIdPartida_()==idPartida) { if(!p.isConsultado()) { return false; } } } System.out.println("Todos han consultado"); return true; } public void delete(int idPartida) { List<Puntos> borrados = new ArrayList<Puntos>(); for(Puntos p : puntos_) { if(p.getIdPartida_()==idPartida) { //Usuario u = usuarioRepo.findByMail(p.getIdUsuario_().getMail()); /* u.setpGracioso(u.getpGracioso()+p.getpGracioso_()); u.setpListo(u.getpListo()+p.getpListo_()); u.setpDibujo(u.getpDibujo()+p.getpDibujo_()); u.setEstrellas(u.getEstrellas()+p.calcularEstrellas()); u.setMonedas(u.getMonedas()+p.calcularMonedas()); usuarioRepo.save(u);*/ borrados.add(p); } } puntos_.removeAll(borrados); } public boolean votadoJugador(int idPartida, String identificador) { for(Puntos p : puntos_) { if(p.getIdPartida_()==idPartida&&p.getIdUsuario_().getMail().equals(identificador)) { return p.votadoTodo(); } } return false; } }
24.215962
90
0.657813
f2777a2f63bc140c6a7c022c8ae0e68aca3dd390
3,565
package uk.bl.monitrix.database.cassandra.ingest; import java.util.Date; import com.datastax.driver.core.BoundStatement; import com.datastax.driver.core.PreparedStatement; import com.datastax.driver.core.ResultSet; import com.datastax.driver.core.Row; import com.datastax.driver.core.Session; import uk.bl.monitrix.database.cassandra.CassandraProperties; import uk.bl.monitrix.database.cassandra.model.CassandraCrawlLog; import uk.bl.monitrix.heritrix.LogFileEntry; /** * An extended version of {@link CassandraCrawlLog} that adds insert capability. * @author Rainer Simon <rainer.simon@ait.ac.at> */ class CassandraCrawlLogImporter extends CassandraCrawlLog { private PreparedStatement crawlLogStatement = null; public CassandraCrawlLogImporter(Session db) { super(db); this.crawlLogStatement = session.prepare( "INSERT INTO crawl_uris.crawl_log (" + "log_id, timestamp, long_timestamp, coarse_timestamp, status_code, downloaded_bytes, uri, host, " + "discovery_path, referer, content_type, worker_thread, fetch_ts, hash, annotations, ip_address, " + "compressability, line) " + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);"); } public void updateCrawlInfo(String crawl_id, long timeOfFirstLogEntryInPatch, long timeOfLastLogEntryInPatch ) { ResultSet results = session.execute("SELECT * FROM " + TABLE_INGEST_SCHEDULE + " WHERE " + CassandraProperties.FIELD_INGEST_CRAWL_ID + "='" + crawl_id + "';"); Row r = results.one(); long startTs = r.getLong(CassandraProperties.FIELD_INGEST_START_TS); long endTs = r.getLong(CassandraProperties.FIELD_INGEST_END_TS); if (startTs == 0 || timeOfFirstLogEntryInPatch < startTs) startTs = timeOfFirstLogEntryInPatch; if (timeOfLastLogEntryInPatch > endTs ) endTs = timeOfLastLogEntryInPatch; session.execute("UPDATE " + TABLE_INGEST_SCHEDULE + " SET " + CassandraProperties.FIELD_INGEST_START_TS + "=" + startTs + ", " + CassandraProperties.FIELD_INGEST_END_TS + "=" + endTs + " WHERE " + CassandraProperties.FIELD_INGEST_CRAWL_ID + "='" + crawl_id + "';"); } public void insert(LogFileEntry l) { // Check timestamp - should be the discovery/queue timestamp: Date log_ts = l.getLogTimestamp(); Date fetch_ts = l.getFetchTimestamp(); if (fetch_ts == null) fetch_ts = log_ts; Date coarse_ts = getCoarseTimestamp(log_ts); BoundStatement boundStatement = new BoundStatement(crawlLogStatement); session.execute(boundStatement.bind( l.getLogId(), log_ts.toString(), log_ts.getTime(), coarse_ts.getTime(), l.getHTTPCode(), l.getDownloadSize(), l.getURL(), l.getHost(), l.getBreadcrumbCodes(), l.getReferrer(), l.getContentType(), l.getWorkerThread(), fetch_ts.getTime(), l.getSHA1Hash(), l.getAnnotations(), l.getAnnotations(), l.getCompressability(), l.toString())); // Update URL compressability histogram int compressabilityBucket = (int) Math.round(l.getCompressability() * 1000); String query = "SELECT * FROM " + TABLE_COMPRESSABILITY_HISTOGRAM + " WHERE " + CassandraProperties.FIELD_COMPRESSABILITY_BUCKET + "=" + compressabilityBucket + ";"; Row r = session.execute(query).one(); long count = r.getLong(CassandraProperties.FIELD_COMPRESSABILITY_COUNT); session.execute("UPDATE " + TABLE_COMPRESSABILITY_HISTOGRAM + " SET " + CassandraProperties.FIELD_COMPRESSABILITY_COUNT + "=" + (count + 1) + " WHERE " + CassandraProperties.FIELD_COMPRESSABILITY_BUCKET + "=" + compressabilityBucket + ";"); } }
38.333333
168
0.720898
8c19c3961cc1ac70c0e275ba77e0ba1e5515c0cc
4,135
/******************************************************************************* * Copyright 2016 ContainX and OpenStack4j * * 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 com.huawei.openstack4j.openstack.networking.internal.ext; import static com.google.common.base.Preconditions.checkNotNull; import java.util.List; import java.util.Map; import com.huawei.openstack4j.api.networking.ext.FirewallRuleService; import com.huawei.openstack4j.core.transport.ExecutionOptions; import com.huawei.openstack4j.core.transport.propagation.PropagateOnStatus; import com.huawei.openstack4j.model.common.ActionResponse; import com.huawei.openstack4j.model.network.ext.FirewallRule; import com.huawei.openstack4j.model.network.ext.FirewallRuleUpdate; import com.huawei.openstack4j.openstack.compute.functions.ToActionResponseFunction; import com.huawei.openstack4j.openstack.networking.domain.ext.NeutronFirewallRule; import com.huawei.openstack4j.openstack.networking.domain.ext.NeutronFirewallRule.FirewallRules; import com.huawei.openstack4j.openstack.networking.internal.BaseNetworkingServices; /** * Networking (Neutron) FwaaS FirewallRule Rule Extension API * * @author Vishvesh Deshmukh */ public class FirewallRuleServiceImpl extends BaseNetworkingServices implements FirewallRuleService { /** * {@inheritDoc} */ @Override public List<? extends FirewallRule> list() { return get(FirewallRules.class, uri("/fw/firewall_rules")).execute().getList(); } /** * {@inheritDoc} */ @Override public List<? extends FirewallRule> list(Map<String, String> filteringParams) { Invocation<FirewallRules> req = get(FirewallRules.class, uri("/fw/firewall_rules")); if (filteringParams != null) { for (Map.Entry<String, String> entry : filteringParams.entrySet()) { req = req.param(entry.getKey(), entry.getValue()); } } return req.execute().getList(); } /** * {@inheritDoc} */ @Override public FirewallRule get(String firewallRuleId) { checkNotNull(firewallRuleId); return get(NeutronFirewallRule.class, uri("/fw/firewall_rules/%s", firewallRuleId)).execute(); } /** * {@inheritDoc} */ @Override public ActionResponse delete(String firewallRuleId) { checkNotNull(firewallRuleId); return ToActionResponseFunction.INSTANCE.apply(delete(Void.class, uri("/fw/firewall_rules/%s", firewallRuleId)).executeWithResponse()); } /** * {@inheritDoc} */ @Override public FirewallRule create(FirewallRule firewall) { return post(NeutronFirewallRule.class, uri("/fw/firewall_rules")).entity(firewall) .execute(ExecutionOptions.<NeutronFirewallRule>create(PropagateOnStatus.on(404))); } /** * {@inheritDoc} */ @Override public FirewallRule update(String firewallRuleId, FirewallRuleUpdate firewallRuleUpdate) { checkNotNull(firewallRuleId); checkNotNull(firewallRuleUpdate); return put(NeutronFirewallRule.class, uri("/fw/firewall_rules/%s", firewallRuleId)).entity(firewallRuleUpdate).execute(); } }
40.539216
129
0.63289
59006e738f5a258810befc7ce198d86ab39e2571
5,002
/** * */ package com.perforce.p4java.tests.dev.unit.feature.admin; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import java.util.ArrayList; import java.util.List; import java.util.Map; import com.perforce.p4java.tests.dev.UnitTestDevServerManager; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; import com.perforce.p4java.admin.IDbSchema; import com.perforce.p4java.server.IServer; import com.perforce.p4java.tests.dev.annotations.TestId; import com.perforce.p4java.tests.dev.unit.P4JavaTestCase; /** * Simple dbschema tests. */ @TestId("DBSchemaTest01") public class DBSchemaTest extends P4JavaTestCase { // p4ic4idea: use local server @BeforeClass public static void oneTimeSetUp() { UnitTestDevServerManager.INSTANCE.startTestClass(); } @AfterClass public static void oneTimeTearDown() { UnitTestDevServerManager.INSTANCE.endTestClass(); } /** * Simple dbschema test. Not intended to be extensive or anything more * than basic sanity checks at the moment (dbschema is not a front-line * feature, to put it mildly). */ @Test public void testDbSchema() throws Exception { String[] args = {null, "db.fixrev:1", "xyz"}; IServer server = getServerAsSuper(); assertNotNull("Null server returned getServerAsSuper", server); for (String arg : args) { List<String> argList = null; if (arg != null) { argList = new ArrayList<String>(); argList.add(arg); } String[] argArray = null; if (arg != null) { argArray = new String[]{"dbschema", arg}; } else { argArray = new String[]{"dbschema"}; } List<IDbSchema> schemaList = server.getDbSchema(argList); assertNotNull("Null db schema list returned by getDbSchema()", schemaList); List<Map<String, Object>> taggedList = doTaggedP4Cmd(argArray, null, null, true); assertNotNull("null schema list returned by p4 command", taggedList); assertEquals("p4j schema list size not same as p4 command list", schemaList.size(), taggedList.size()); for (IDbSchema schema : schemaList) { assertNotNull("Null schema in schema list", schema); assertNotNull("Null table name", schema.getName()); for (Map<String, Object> map : taggedList) { boolean found = false; assertNotNull("Null schema detail map returned by p4 command", map); if (map.containsKey("table")) { String name = (String) map.get("table"); if ((name != null) && name.equals(schema.getName())) { found = true; compareFields(map, schema); } } else { fail("Map does not contain a table key"); } if (found) { break; } } } } } private void compareFields(Map<String, Object> tagMap, IDbSchema schema) { List<Map<String, String>> columnList = schema.getColumnMetadata(); assertNotNull("Null column metadata list", columnList); for (String key : tagMap.keySet()) { assertNotNull(key); int indx = getIndexSuffix(key); String sKey = stripTrailingNums(key); if (indx >= 0) { assertTrue(indx <= columnList.size()); Map<String, String> colMap = columnList.get(indx); assertNotNull(colMap); assertTrue("Missing schema column key: " + key, colMap.containsKey(sKey)); assertEquals("Non-matching column value; key: " + key, tagMap.get(key), colMap.get(sKey)); } } } private int getIndexSuffix(String key) { if (key != null) { int i = 1; String retStr = ""; while (Character.isDigit(key.charAt(key.length() - i))) { retStr = key.charAt(key.length() - i) + retStr; i++; } if (i > 1) { return new Integer(retStr); } } return -1; } private String stripTrailingNums(String key) { String newKey = key; if (newKey != null) { // Dumb, dumb, dumb... (and error-prone). while (Character.isDigit(newKey.charAt(newKey.length() - 1))) { assertTrue(newKey.length() > 0); newKey = newKey.substring(0, newKey.length() - 1); } } return newKey; } }
34.027211
93
0.554178
1083f046a859c555b0d5ac033cde4d52ef56b23f
436
package com.google.android.gms.internal.ads; import android.content.DialogInterface; import android.webkit.JsPromptResult; final class zzaqs implements DialogInterface.OnCancelListener { private final /* synthetic */ JsPromptResult zzdbl; zzaqs(JsPromptResult jsPromptResult) { this.zzdbl = jsPromptResult; } public final void onCancel(DialogInterface dialogInterface) { this.zzdbl.cancel(); } }
25.647059
65
0.745413
129ac6e6b36847dc26e78d380d65de5f129b24ec
4,300
package com.keeps.utils; import java.io.IOException; import java.io.Writer; import java.util.Iterator; import java.util.Map; import javax.servlet.http.HttpServletRequest; import org.apache.velocity.context.InternalContextAdapter; import org.apache.velocity.exception.MethodInvocationException; import org.apache.velocity.exception.ParseErrorException; import org.apache.velocity.exception.ResourceNotFoundException; import org.apache.velocity.runtime.directive.Directive; import org.apache.velocity.runtime.parser.node.Node; import org.apache.velocity.runtime.parser.node.SimpleNode; import org.apache.velocity.tools.view.ViewToolContext; import com.keeps.tools.utils.StringUtils; public class PageDirective extends Directive{ /** **************样式常量******************** */ public static final String LAYUI = "layui"; private String className = LAYUI; //样式 private String url;//提交URL private Integer page;//当前页 private Integer rows;//每页显示数 private Integer total;//总页数 private Integer pagecount;//总页数 @Override public String getName() { return "pagetag"; } @Override public int getType() { return LINE; } @Override public boolean render(InternalContextAdapter internalContext, Writer writer, Node node) throws IOException, ResourceNotFoundException, ParseErrorException, MethodInvocationException { className = (String) ((SimpleNode) node.jjtGetChild(0)).value(internalContext);//样式名 page = (Integer) ((SimpleNode) node.jjtGetChild(1)).value(internalContext);//当前页 total = (Integer) ((SimpleNode) node.jjtGetChild(2)).value(internalContext);//总页数 rows = (Integer) ((SimpleNode) node.jjtGetChild(3)).value(internalContext);//每页显示数 this.pagecount = ((this.total - 1) / this.rows) + 1; ViewToolContext context = (ViewToolContext)internalContext.getInternalUserContext(); HttpServletRequest request = context.getRequest(); url = getParamUrl(request); String pagetool = pagetool(className); writer.write(pagetool); return true; } public String pagetool(String className) { StringBuffer str = new StringBuffer(); if (className.equals(LAYUI)) { str.append("<div class='layui-box layui-laypage' id='layui-laypage-0'>"); if (page==1) { str.append("<a href='javascript:;' class='layui-laypage_first' title='首页'>首页</a>"); str.append("<a href='javascript:;' class='layui-laypage-prev'>上一页</a>"); } else { str.append("<a href='"+url+"page=1&rows="+rows+"' class='laypage_first' title='首页'>首页</a>"); str.append("<a href='"+url+"page="+(page-1)+"&rows="+rows+"' class='layui-laypage-prev'>上一页</a>"); } for (int i = 1; i <= pagecount; i++) { if (page==i) { str.append("<span class='layui-laypage-curr'><em class='layui-laypage-em'></em><em>"+i+"</em></span>"); } else { str.append("<a href='"+url+"page="+i+"&rows="+rows+"'>"+i+"</a>"); } } if (page==pagecount) { str.append("<a href='javascript:;' class='layui-laypage-next'>下一页</a>"); str.append("<a href='javascript:;' class='layui-laypage-last' title='尾页'>末页</a>"); }else{ str.append("<a href='"+url+"page="+(page+1)+"&rows="+rows+"' class='layui-laypage-next'>下一页</a>"); str.append("<a href='"+url+"page="+pagecount+"&rows="+rows+"' class='layui-laypage-last' title='尾页'>末页</a>"); } str.append("</div>"); } return str.toString(); } public String getParamUrl(HttpServletRequest request) { String url = request.getContextPath()+"/"+request.getServletPath(); String totalParams = ""; Map params = request.getParameterMap();// 得到所有参数名 if(params!=null){ Iterator<Map.Entry<String, String []>> entries = params.entrySet().iterator(); while (entries.hasNext()) { Map.Entry<String, String []> entry = entries.next(); String[] vArr = entry.getValue(); for (int i = 0; i < vArr.length; i++) { String key = entry.getKey(); if (!"rows".equals(key) && !"page".equals(key)) { if (totalParams.equals("")) { totalParams = key + "=" + vArr[i]; } else { totalParams += "&" + key + "="+ vArr[i]; } } } } } if (StringUtils.hasText(totalParams)) { return url +"?"+totalParams+"&"; }else{ return url+"?"; } } }
37.068966
114
0.65
bb0c5c5e76ea4425576b192102ff4a78df6f20f4
967,244
import org.junit.FixMethodOrder; import org.junit.Test; import org.junit.runners.MethodSorters; @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class RegressionTest10 { public static boolean debug = false; @Test public void test05001() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05001"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader5 = null; org.apache.lucene.index.Terms terms6 = null; org.apache.lucene.index.Terms terms7 = null; simpleIndexQueryParserTests1.assertTermsEquals("tests.maxfailures", indexReader5, terms6, terms7, true); simpleIndexQueryParserTests1.ensureCheckIndexPassed(); org.apache.lucene.index.IndexReader indexReader12 = null; org.apache.lucene.index.PostingsEnum postingsEnum14 = null; org.apache.lucene.index.PostingsEnum postingsEnum15 = null; simpleIndexQueryParserTests1.assertPositionsSkippingEquals("tests.nightly", indexReader12, (int) '#', postingsEnum14, postingsEnum15); org.apache.lucene.index.IndexReader indexReader18 = null; org.apache.lucene.index.Terms terms19 = null; org.apache.lucene.index.Terms terms20 = null; simpleIndexQueryParserTests1.assertTermsEquals("enwiki.random.lines.txt", indexReader18, terms19, terms20, false); org.apache.lucene.index.IndexReader indexReader24 = null; org.apache.lucene.index.Terms terms25 = null; org.apache.lucene.index.Terms terms26 = null; simpleIndexQueryParserTests1.assertTermsEquals("europarl.lines.txt.gz", indexReader24, terms25, terms26, false); org.junit.Assert.assertNotSame("tests.failfast", (java.lang.Object) simpleIndexQueryParserTests1, (java.lang.Object) "tests.monster"); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testQueryString(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/query.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); } @Test public void test05002() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05002"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.junit.rules.RuleChain ruleChain7 = simpleIndexQueryParserTests0.failureAndSuccessEvents; simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("enwiki.random.lines.txt", indexReader10, (int) (short) -1, postingsEnum12, postingsEnum13); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests16 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str17 = simpleIndexQueryParserTests16.getTestName(); simpleIndexQueryParserTests16.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests16.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests16); org.junit.rules.RuleChain ruleChain21 = simpleIndexQueryParserTests16.failureAndSuccessEvents; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain21; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoBoundingBoxFilter5(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_boundingbox5.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertNull(ruleChain7); org.junit.Assert.assertEquals("'" + str17 + "' != '" + "<unknown>" + "'", str17, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain21); } @Test public void test05003() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05003"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.junit.rules.RuleChain ruleChain7 = simpleIndexQueryParserTests0.failureAndSuccessEvents; simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("europarl.lines.txt.gz", indexReader10, (int) (short) 1, postingsEnum12, postingsEnum13, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testInQuery(); 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(ruleChain7); } @Test public void test05004() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05004"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum4 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("<unknown>", postingsEnum4, postingsEnum5, false); org.apache.lucene.index.IndexReader indexReader9 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.monster", indexReader9, (int) (byte) 1, postingsEnum11, postingsEnum12); simpleIndexQueryParserTests0.ensureCleanedUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testBoolFilteredQueryBuilder(); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } } @Test public void test05005() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05005"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); org.apache.lucene.index.IndexReader indexReader8 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("<unknown>", indexReader8, (int) '4', postingsEnum10, postingsEnum11); simpleIndexQueryParserTests0.ensureCleanedUp(); org.apache.lucene.index.IndexReader indexReader15 = null; org.apache.lucene.index.PostingsEnum postingsEnum17 = null; org.apache.lucene.index.PostingsEnum postingsEnum18 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.badapples", indexReader15, 1, postingsEnum17, postingsEnum18); org.apache.lucene.index.IndexReader indexReader21 = null; org.apache.lucene.index.Fields fields22 = null; org.apache.lucene.index.Fields fields23 = null; simpleIndexQueryParserTests0.assertFieldsEquals("europarl.lines.txt.gz", indexReader21, fields22, fields23, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testProperErrorMessageWhenTwoFunctionsDefinedInQueryBody(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/function-score-query-causing-NPE.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); } @Test public void test05006() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05006"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum4 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("", postingsEnum4, postingsEnum5, true); org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("", postingsEnum9, postingsEnum10, false); org.junit.rules.TestRule testRule13 = simpleIndexQueryParserTests0.ruleChain; simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.apache.lucene.index.IndexReader indexReader16 = null; org.apache.lucene.index.Terms terms17 = null; org.apache.lucene.index.Terms terms18 = null; simpleIndexQueryParserTests0.assertTermsEquals("random", indexReader16, terms17, terms18, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testConstantScoreQueryBuilder(); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertNotNull(testRule13); } @Test public void test05007() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05007"); org.junit.Assert.assertEquals((long) 2, (long) 2); } @Test public void test05008() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05008"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.nightly", indexReader7, 100, postingsEnum9, postingsEnum10, false); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader16 = null; org.apache.lucene.index.PostingsEnum postingsEnum18 = null; org.apache.lucene.index.PostingsEnum postingsEnum19 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.slow", indexReader16, (int) (byte) 10, postingsEnum18, postingsEnum19, true); org.apache.lucene.index.IndexReader indexReader23 = null; org.apache.lucene.index.Fields fields24 = null; org.apache.lucene.index.Fields fields25 = null; simpleIndexQueryParserTests0.assertFieldsEquals("random", indexReader23, fields24, fields25, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testQueryStringTimezone(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/query-timezone.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05009() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05009"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.PostingsEnum postingsEnum6 = null; org.apache.lucene.index.PostingsEnum postingsEnum7 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.slow", indexReader4, 0, postingsEnum6, postingsEnum7, true); simpleIndexQueryParserTests0.resetCheckIndexStatus(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testFilteredQuery4(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/filtered-query4.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05010() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05010"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testRangeNamedFilteredQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/range-filter-named.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05011() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05011"); // The following exception was thrown during execution in test generation try { java.lang.String str2 = org.elasticsearch.test.ElasticsearchTestCase.randomRealisticUnicodeOfCodepointLengthBetween((-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 test05012() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05012"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.PostingsEnum postingsEnum6 = null; org.apache.lucene.index.PostingsEnum postingsEnum7 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.maxfailures", indexReader4, (int) (short) 100, postingsEnum6, postingsEnum7); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader11 = null; org.apache.lucene.index.Fields fields12 = null; org.apache.lucene.index.Fields fields13 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.failfast", 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; simpleIndexQueryParserTests0.assertTermsEquals("<unknown>", indexReader17, terms18, terms19, false); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSpanContainingQueryBuilder(); 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 test05013() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05013"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setUp(); java.lang.String str8 = simpleIndexQueryParserTests0.getTestName(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.badapples", indexReader10, (-1), postingsEnum12, postingsEnum13); org.apache.lucene.index.PostingsEnum postingsEnum16 = null; org.apache.lucene.index.PostingsEnum postingsEnum17 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.failfast", postingsEnum16, postingsEnum17, true); org.apache.lucene.index.IndexReader indexReader21 = null; org.apache.lucene.index.Terms terms22 = null; org.apache.lucene.index.Terms terms23 = null; simpleIndexQueryParserTests0.assertTermsEquals("europarl.lines.txt.gz", indexReader21, terms22, terms23, true); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.TestRule testRule28 = simpleIndexQueryParserTests0.ruleChain; // The following exception was thrown during execution in test generation try { // flaky: simpleIndexQueryParserTests0.testEmptyBooleanQuery(); // flaky: 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.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertEquals("'" + str8 + "' != '" + "<unknown>" + "'", str8, "<unknown>"); org.junit.Assert.assertNotNull(testRule28); } @Test public void test05014() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05014"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests1); org.junit.rules.RuleChain ruleChain6 = simpleIndexQueryParserTests1.failureAndSuccessEvents; org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests7 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str8 = simpleIndexQueryParserTests7.getTestName(); simpleIndexQueryParserTests7.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests7.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain11 = null; simpleIndexQueryParserTests7.failureAndSuccessEvents = ruleChain11; simpleIndexQueryParserTests7.ensureAllSearchContextsReleased(); org.junit.rules.RuleChain ruleChain14 = simpleIndexQueryParserTests7.failureAndSuccessEvents; simpleIndexQueryParserTests7.restoreIndexWriterMaxDocs(); java.lang.String str16 = simpleIndexQueryParserTests7.getTestName(); java.lang.String str17 = simpleIndexQueryParserTests7.getTestName(); org.apache.lucene.index.IndexReader indexReader19 = null; org.apache.lucene.index.PostingsEnum postingsEnum21 = null; org.apache.lucene.index.PostingsEnum postingsEnum22 = null; simpleIndexQueryParserTests7.assertDocsSkippingEquals("tests.monster", indexReader19, (int) (byte) 10, postingsEnum21, postingsEnum22, false); org.junit.Assert.assertNotSame((java.lang.Object) simpleIndexQueryParserTests1, (java.lang.Object) false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testGeoPolygonFilter2(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_polygon2.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain6); org.junit.Assert.assertEquals("'" + str8 + "' != '" + "<unknown>" + "'", str8, "<unknown>"); org.junit.Assert.assertNull(ruleChain14); org.junit.Assert.assertEquals("'" + str16 + "' != '" + "<unknown>" + "'", str16, "<unknown>"); org.junit.Assert.assertEquals("'" + str17 + "' != '" + "<unknown>" + "'", str17, "<unknown>"); } @Test public void test05015() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05015"); // The following exception was thrown during execution in test generation try { java.lang.String str2 = org.elasticsearch.test.ElasticsearchTestCase.randomUnicodeOfLengthBetween(5, (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 test05016() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05016"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader2 = null; org.apache.lucene.index.Fields fields3 = null; org.apache.lucene.index.Fields fields4 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.maxfailures", indexReader2, fields3, fields4, false); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs(0); org.apache.lucene.index.PostingsEnum postingsEnum11 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("random", postingsEnum11, postingsEnum12, false); simpleIndexQueryParserTests0.setUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testTermsFilterQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/terms-filter.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } } @Test public void test05017() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05017"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); org.apache.lucene.index.IndexReader indexReader6 = null; org.apache.lucene.index.Fields fields7 = null; org.apache.lucene.index.Fields fields8 = null; simpleIndexQueryParserTests0.assertFieldsEquals("europarl.lines.txt.gz", indexReader6, fields7, fields8, true); org.apache.lucene.index.IndexReader indexReader12 = null; org.apache.lucene.index.PostingsEnum postingsEnum14 = null; org.apache.lucene.index.PostingsEnum postingsEnum15 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.nightly", indexReader12, (int) 'a', postingsEnum14, postingsEnum15, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testCommonTermsQuery3(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/commonTerms-query3.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); } @Test public void test05018() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05018"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum4 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("", postingsEnum4, postingsEnum5, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoPolygonFilter4(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_polygon4.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } } @Test public void test05019() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05019"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain2 = simpleIndexQueryParserTests0.failureAndSuccessEvents; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSpanMultiTermPrefixQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/span-multi-term-prefix.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertNotNull(ruleChain2); } @Test public void test05020() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05020"); // The following exception was thrown during execution in test generation try { int int2 = org.elasticsearch.test.ElasticsearchTestCase.randomIntBetween((int) (byte) 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 test05021() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05021"); java.util.Locale locale3 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray4 = new java.lang.Cloneable[] { locale3 }; java.util.List<java.lang.Cloneable> cloneableList5 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray4); java.lang.Object obj6 = null; org.junit.Assert.assertNotSame((java.lang.Object) cloneableList5, obj6); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests8 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Fields fields11 = null; org.apache.lucene.index.Fields fields12 = null; simpleIndexQueryParserTests8.assertFieldsEquals("tests.maxfailures", indexReader10, fields11, fields12, false); org.junit.Assert.assertNotSame("tests.slow", obj6, (java.lang.Object) simpleIndexQueryParserTests8); simpleIndexQueryParserTests8.resetCheckIndexStatus(); simpleIndexQueryParserTests8.ensureCleanedUp(); simpleIndexQueryParserTests8.resetCheckIndexStatus(); simpleIndexQueryParserTests8.ensureCleanedUp(); org.apache.lucene.index.IndexableField indexableField21 = null; org.apache.lucene.index.IndexableField indexableField22 = null; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests8.assertStoredFieldEquals("enwiki.random.lines.txt", indexableField21, indexableField22); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale3); org.junit.Assert.assertEquals(locale3.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray4); org.junit.Assert.assertNotNull(cloneableList5); } @Test public void test05022() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05022"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; java.lang.String str6 = simpleIndexQueryParserTests0.getTestName(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testQueryStringBuilder(); 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.assertEquals("'" + str6 + "' != '" + "<unknown>" + "'", str6, "<unknown>"); } @Test public void test05023() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05023"); // The following exception was thrown during execution in test generation try { java.nio.file.Path path2 = org.apache.lucene.util.LuceneTestCase.createTempFile("enwiki.random.lines.txt", "tests.nightly"); 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 test05024() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05024"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); org.junit.rules.RuleChain ruleChain2 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain2; org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests4 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str5 = simpleIndexQueryParserTests4.getTestName(); simpleIndexQueryParserTests4.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests4.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain8 = null; simpleIndexQueryParserTests4.failureAndSuccessEvents = ruleChain8; simpleIndexQueryParserTests4.ensureAllSearchContextsReleased(); org.junit.rules.RuleChain ruleChain11 = simpleIndexQueryParserTests4.failureAndSuccessEvents; simpleIndexQueryParserTests4.restoreIndexWriterMaxDocs(); org.apache.lucene.index.IndexReader indexReader14 = null; org.apache.lucene.index.PostingsEnum postingsEnum16 = null; org.apache.lucene.index.PostingsEnum postingsEnum17 = null; simpleIndexQueryParserTests4.assertPositionsSkippingEquals("enwiki.random.lines.txt", indexReader14, (int) (short) -1, postingsEnum16, postingsEnum17); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests20 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str21 = simpleIndexQueryParserTests20.getTestName(); simpleIndexQueryParserTests20.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests20.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests20); org.junit.rules.RuleChain ruleChain25 = simpleIndexQueryParserTests20.failureAndSuccessEvents; simpleIndexQueryParserTests4.failureAndSuccessEvents = ruleChain25; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain25; simpleIndexQueryParserTests0.ensureCheckIndexPassed(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testPrefixQueryBuilder(); 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.assertEquals("'" + str5 + "' != '" + "<unknown>" + "'", str5, "<unknown>"); org.junit.Assert.assertNull(ruleChain11); org.junit.Assert.assertEquals("'" + str21 + "' != '" + "<unknown>" + "'", str21, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain25); } @Test public void test05025() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05025"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setUp(); java.lang.String str8 = simpleIndexQueryParserTests0.getTestName(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.badapples", indexReader10, (-1), postingsEnum12, postingsEnum13); org.apache.lucene.index.PostingsEnum postingsEnum16 = null; org.apache.lucene.index.PostingsEnum postingsEnum17 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.failfast", postingsEnum16, postingsEnum17, true); org.apache.lucene.index.IndexReader indexReader21 = null; org.apache.lucene.index.Terms terms22 = null; org.apache.lucene.index.Terms terms23 = null; simpleIndexQueryParserTests0.assertTermsEquals("europarl.lines.txt.gz", indexReader21, terms22, terms23, true); simpleIndexQueryParserTests0.overrideTestDefaultQueryCache(); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); java.lang.String str28 = simpleIndexQueryParserTests0.getTestName(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSpanContainingQueryBuilder(); 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.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertEquals("'" + str8 + "' != '" + "<unknown>" + "'", str8, "<unknown>"); org.junit.Assert.assertEquals("'" + str28 + "' != '" + "<unknown>" + "'", str28, "<unknown>"); } @Test public void test05026() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05026"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); org.junit.rules.RuleChain ruleChain2 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain2; org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests4 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str5 = simpleIndexQueryParserTests4.getTestName(); simpleIndexQueryParserTests4.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests4.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain8 = null; simpleIndexQueryParserTests4.failureAndSuccessEvents = ruleChain8; simpleIndexQueryParserTests4.ensureAllSearchContextsReleased(); org.junit.rules.RuleChain ruleChain11 = simpleIndexQueryParserTests4.failureAndSuccessEvents; simpleIndexQueryParserTests4.restoreIndexWriterMaxDocs(); org.apache.lucene.index.IndexReader indexReader14 = null; org.apache.lucene.index.PostingsEnum postingsEnum16 = null; org.apache.lucene.index.PostingsEnum postingsEnum17 = null; simpleIndexQueryParserTests4.assertPositionsSkippingEquals("enwiki.random.lines.txt", indexReader14, (int) (short) -1, postingsEnum16, postingsEnum17); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests20 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str21 = simpleIndexQueryParserTests20.getTestName(); simpleIndexQueryParserTests20.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests20.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests20); org.junit.rules.RuleChain ruleChain25 = simpleIndexQueryParserTests20.failureAndSuccessEvents; simpleIndexQueryParserTests4.failureAndSuccessEvents = ruleChain25; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain25; org.apache.lucene.index.IndexReader indexReader29 = null; org.apache.lucene.index.Terms terms30 = null; org.apache.lucene.index.Terms terms31 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.badapples", indexReader29, terms30, terms31, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSpanFirstQueryBuilder(); 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.assertEquals("'" + str5 + "' != '" + "<unknown>" + "'", str5, "<unknown>"); org.junit.Assert.assertNull(ruleChain11); org.junit.Assert.assertEquals("'" + str21 + "' != '" + "<unknown>" + "'", str21, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain25); } @Test public void test05027() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05027"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.nightly", indexReader7, 100, postingsEnum9, postingsEnum10, false); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader15 = null; org.apache.lucene.index.Terms terms16 = null; org.apache.lucene.index.Terms terms17 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.awaitsfix", indexReader15, terms16, terms17, false); org.apache.lucene.index.IndexReader indexReader21 = null; org.apache.lucene.index.Terms terms22 = null; org.apache.lucene.index.Terms terms23 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.failfast", indexReader21, terms22, terms23, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testNamedRegexpFilteredQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/regexp-filter-named.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05028() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05028"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.overrideTestDefaultQueryCache(); org.junit.rules.TestRule testRule2 = simpleIndexQueryParserTests0.ruleChain; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoDistanceFilter8(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_distance8.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertNotNull(testRule2); } @Test public void test05029() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05029"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.PostingsEnum postingsEnum6 = null; org.apache.lucene.index.PostingsEnum postingsEnum7 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.slow", indexReader4, 1, postingsEnum6, postingsEnum7, false); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testFQueryFilter(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/fquery-filter.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } } @Test public void test05030() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05030"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.PostingsEnum postingsEnum6 = null; org.apache.lucene.index.PostingsEnum postingsEnum7 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.maxfailures", indexReader4, (int) (short) 100, postingsEnum6, postingsEnum7); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader11 = null; org.apache.lucene.index.Fields fields12 = null; org.apache.lucene.index.Fields fields13 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.failfast", 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; simpleIndexQueryParserTests0.assertTermsEquals("<unknown>", indexReader17, terms18, terms19, false); org.elasticsearch.common.settings.Settings settings22 = null; // The following exception was thrown during execution in test generation try { org.elasticsearch.env.NodeEnvironment nodeEnvironment23 = simpleIndexQueryParserTests0.newNodeEnvironment(settings22); 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 test05031() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05031"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setUp(); java.lang.String str8 = simpleIndexQueryParserTests0.getTestName(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.badapples", indexReader10, (-1), postingsEnum12, postingsEnum13); org.apache.lucene.index.PostingsEnum postingsEnum16 = null; org.apache.lucene.index.PostingsEnum postingsEnum17 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.failfast", postingsEnum16, postingsEnum17, true); org.apache.lucene.index.IndexReader indexReader21 = null; org.apache.lucene.index.Terms terms22 = null; org.apache.lucene.index.Terms terms23 = null; simpleIndexQueryParserTests0.assertTermsEquals("europarl.lines.txt.gz", indexReader21, terms22, terms23, true); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (short) -1); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests29 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str30 = simpleIndexQueryParserTests29.getTestName(); simpleIndexQueryParserTests29.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests29.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests29); org.junit.rules.RuleChain ruleChain34 = simpleIndexQueryParserTests29.failureAndSuccessEvents; org.apache.lucene.util.LuceneTestCase.classRules = ruleChain34; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain34; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testTermsFilterQueryBuilder(); 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.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertEquals("'" + str8 + "' != '" + "<unknown>" + "'", str8, "<unknown>"); org.junit.Assert.assertEquals("'" + str30 + "' != '" + "<unknown>" + "'", str30, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain34); } @Test public void test05032() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05032"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain5 = null; simpleIndexQueryParserTests1.failureAndSuccessEvents = ruleChain5; org.apache.lucene.index.IndexReader indexReader8 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; simpleIndexQueryParserTests1.assertDocsSkippingEquals("tests.nightly", indexReader8, 100, postingsEnum10, postingsEnum11, false); simpleIndexQueryParserTests1.resetCheckIndexStatus(); simpleIndexQueryParserTests1.resetCheckIndexStatus(); org.junit.Assert.assertNotSame((java.lang.Object) (-1.0d), (java.lang.Object) simpleIndexQueryParserTests1); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testGeoBoundingBoxFilterNamed(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_boundingbox-named.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); } @Test public void test05033() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05033"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests2 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str3 = simpleIndexQueryParserTests2.getTestName(); simpleIndexQueryParserTests2.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests2.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain6 = null; simpleIndexQueryParserTests2.failureAndSuccessEvents = ruleChain6; org.apache.lucene.index.IndexReader indexReader9 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; simpleIndexQueryParserTests2.assertDocsSkippingEquals("tests.nightly", indexReader9, 100, postingsEnum11, postingsEnum12, false); simpleIndexQueryParserTests2.resetCheckIndexStatus(); simpleIndexQueryParserTests2.resetCheckIndexStatus(); org.junit.Assert.assertNotSame("tests.maxfailures", (java.lang.Object) 1L, (java.lang.Object) simpleIndexQueryParserTests2); simpleIndexQueryParserTests2.ensureCheckIndexPassed(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests2.testTermsFilterQueryBuilder(); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str3 + "' != '" + "<unknown>" + "'", str3, "<unknown>"); } @Test public void test05034() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05034"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (short) 1); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain10 = simpleIndexQueryParserTests0.failureAndSuccessEvents; simpleIndexQueryParserTests0.ensureCheckIndexPassed(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.apache.lucene.index.PostingsEnum postingsEnum14 = null; org.apache.lucene.index.PostingsEnum postingsEnum15 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.awaitsfix", postingsEnum14, postingsEnum15, true); simpleIndexQueryParserTests0.setIndexWriterMaxDocs(4); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testAndFilteredQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/and-filter.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain10); } @Test public void test05035() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05035"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests1); org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests1.assertPositionsSkippingEquals("tests.maxfailures", indexReader7, (-1), postingsEnum9, postingsEnum10); simpleIndexQueryParserTests1.resetCheckIndexStatus(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.restoreIndexWriterMaxDocs(); org.apache.lucene.index.IndexReader indexReader16 = null; org.apache.lucene.index.Fields fields17 = null; org.apache.lucene.index.Fields fields18 = null; simpleIndexQueryParserTests1.assertFieldsEquals("random", indexReader16, fields17, fields18, true); org.junit.rules.TestRule testRule21 = simpleIndexQueryParserTests1.ruleChain; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testMatchAllBuilder(); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); org.junit.Assert.assertNotNull(testRule21); } @Test public void test05036() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05036"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.nightly", indexReader7, 100, postingsEnum9, postingsEnum10, false); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader15 = null; org.apache.lucene.index.Terms terms16 = null; org.apache.lucene.index.Terms terms17 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.awaitsfix", indexReader15, terms16, terms17, false); org.apache.lucene.index.PostingsEnum postingsEnum21 = null; org.apache.lucene.index.PostingsEnum postingsEnum22 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("node_s_0", postingsEnum21, postingsEnum22, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSpanNotQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/spanNot.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05037() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05037"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.PostingsEnum postingsEnum6 = null; org.apache.lucene.index.PostingsEnum postingsEnum7 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.maxfailures", indexReader4, (int) (short) 100, postingsEnum6, postingsEnum7); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoDistanceFilter5(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_distance5.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05038() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05038"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.nightly", indexReader7, 100, postingsEnum9, postingsEnum10, false); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.junit.Assert.assertNotNull((java.lang.Object) simpleIndexQueryParserTests0); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoPolygonFilter1(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_polygon1.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05039() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05039"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setUp(); java.lang.String str8 = simpleIndexQueryParserTests0.getTestName(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.badapples", indexReader10, (-1), postingsEnum12, postingsEnum13); org.apache.lucene.index.PostingsEnum postingsEnum16 = null; org.apache.lucene.index.PostingsEnum postingsEnum17 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.failfast", postingsEnum16, postingsEnum17, true); org.apache.lucene.index.IndexReader indexReader21 = null; org.apache.lucene.index.Terms terms22 = null; org.apache.lucene.index.Terms terms23 = null; simpleIndexQueryParserTests0.assertTermsEquals("europarl.lines.txt.gz", indexReader21, terms22, terms23, true); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); 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 { simpleIndexQueryParserTests0.assertFieldInfosEquals("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.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertEquals("'" + str8 + "' != '" + "<unknown>" + "'", str8, "<unknown>"); } @Test public void test05040() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05040"); java.util.Locale locale3 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray4 = new java.lang.Cloneable[] { locale3 }; java.util.List<java.lang.Cloneable> cloneableList5 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray4); java.lang.Object obj6 = null; org.junit.Assert.assertNotSame((java.lang.Object) cloneableList5, obj6); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests8 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Fields fields11 = null; org.apache.lucene.index.Fields fields12 = null; simpleIndexQueryParserTests8.assertFieldsEquals("tests.maxfailures", indexReader10, fields11, fields12, false); org.junit.Assert.assertNotSame("tests.slow", obj6, (java.lang.Object) simpleIndexQueryParserTests8); simpleIndexQueryParserTests8.restoreIndexWriterMaxDocs(); org.apache.lucene.index.IndexReader indexReader18 = null; org.apache.lucene.index.PostingsEnum postingsEnum20 = null; org.apache.lucene.index.PostingsEnum postingsEnum21 = null; simpleIndexQueryParserTests8.assertDocsSkippingEquals("europarl.lines.txt.gz", indexReader18, 0, postingsEnum20, postingsEnum21, false); org.elasticsearch.common.unit.TimeValue timeValue24 = null; java.lang.String[] strArray28 = new java.lang.String[] { "tests.failfast", "<unknown>", "tests.maxfailures" }; // The following exception was thrown during execution in test generation try { org.elasticsearch.action.admin.cluster.health.ClusterHealthStatus clusterHealthStatus29 = simpleIndexQueryParserTests8.ensureGreen(timeValue24, strArray28); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale3); org.junit.Assert.assertEquals(locale3.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray4); org.junit.Assert.assertNotNull(cloneableList5); org.junit.Assert.assertNotNull(strArray28); } @Test public void test05041() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05041"); // The following exception was thrown during execution in test generation try { java.nio.file.Path path1 = org.apache.lucene.util.LuceneTestCase.createTempDir("tests.slow"); 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 test05042() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05042"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.overrideTestDefaultQueryCache(); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); org.apache.lucene.index.IndexReader indexReader6 = null; org.apache.lucene.index.TermsEnum termsEnum7 = null; org.apache.lucene.index.TermsEnum termsEnum8 = null; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.assertTermsEnumEquals("node_s_0", indexReader6, termsEnum7, termsEnum8, true); 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 test05043() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05043"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.apache.lucene.index.PostingsEnum postingsEnum5 = null; org.apache.lucene.index.PostingsEnum postingsEnum6 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("hi!", postingsEnum5, postingsEnum6, false); org.junit.rules.TestRule testRule9 = simpleIndexQueryParserTests0.ruleChain; org.apache.lucene.index.IndexReader indexReader11 = null; org.apache.lucene.index.Terms terms12 = null; org.apache.lucene.index.Terms terms13 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.failfast", indexReader11, terms12, terms13, false); org.apache.lucene.index.IndexReader indexReader17 = null; org.apache.lucene.index.Fields fields18 = null; org.apache.lucene.index.Fields fields19 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.failfast", indexReader17, fields18, fields19, false); simpleIndexQueryParserTests0.resetCheckIndexStatus(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testMoreLikeThisBuilder(); 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.assertNotNull(testRule9); } @Test public void test05044() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05044"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setUp(); org.junit.rules.RuleChain ruleChain8 = simpleIndexQueryParserTests0.failureAndSuccessEvents; simpleIndexQueryParserTests0.overrideTestDefaultQueryCache(); // The following exception was thrown during execution in test generation try { org.elasticsearch.env.NodeEnvironment nodeEnvironment10 = simpleIndexQueryParserTests0.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.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain8); } @Test public void test05045() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05045"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests1); org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests1.assertPositionsSkippingEquals("tests.maxfailures", indexReader7, (-1), postingsEnum9, postingsEnum10); simpleIndexQueryParserTests1.resetCheckIndexStatus(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.restoreIndexWriterMaxDocs(); org.elasticsearch.common.settings.Settings settings15 = null; // The following exception was thrown during execution in test generation try { org.elasticsearch.env.NodeEnvironment nodeEnvironment16 = simpleIndexQueryParserTests1.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.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); } @Test public void test05046() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05046"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader2 = null; org.apache.lucene.index.Fields fields3 = null; org.apache.lucene.index.Fields fields4 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.maxfailures", indexReader2, fields3, fields4, false); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests7 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str8 = simpleIndexQueryParserTests7.getTestName(); simpleIndexQueryParserTests7.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests7.ensureCleanedUp(); java.lang.String str11 = simpleIndexQueryParserTests7.getTestName(); org.apache.lucene.index.IndexReader indexReader13 = null; org.apache.lucene.index.Fields fields14 = null; org.apache.lucene.index.Fields fields15 = null; simpleIndexQueryParserTests7.assertFieldsEquals("europarl.lines.txt.gz", indexReader13, fields14, fields15, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests18 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests18.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum22 = null; org.apache.lucene.index.PostingsEnum postingsEnum23 = null; simpleIndexQueryParserTests18.assertDocsEnumEquals("", postingsEnum22, postingsEnum23, true); simpleIndexQueryParserTests18.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain27 = simpleIndexQueryParserTests18.failureAndSuccessEvents; simpleIndexQueryParserTests7.failureAndSuccessEvents = ruleChain27; java.lang.Object obj29 = null; org.junit.Assert.assertNotSame((java.lang.Object) ruleChain27, obj29); simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain27; org.apache.lucene.index.PostingsEnum postingsEnum33 = null; org.apache.lucene.index.PostingsEnum postingsEnum34 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.badapples", postingsEnum33, postingsEnum34, true); simpleIndexQueryParserTests0.setUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testProperErrorMessageWhenTwoFunctionsDefinedInQueryBody(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/function-score-query-causing-NPE.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str8 + "' != '" + "<unknown>" + "'", str8, "<unknown>"); org.junit.Assert.assertEquals("'" + str11 + "' != '" + "<unknown>" + "'", str11, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain27); } @Test public void test05047() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05047"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setUp(); java.lang.String str8 = simpleIndexQueryParserTests0.getTestName(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.badapples", indexReader10, (-1), postingsEnum12, postingsEnum13); org.apache.lucene.index.PostingsEnum postingsEnum16 = null; org.apache.lucene.index.PostingsEnum postingsEnum17 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.failfast", postingsEnum16, postingsEnum17, true); org.apache.lucene.index.IndexReader indexReader21 = null; org.apache.lucene.index.Terms terms22 = null; org.apache.lucene.index.Terms terms23 = null; simpleIndexQueryParserTests0.assertTermsEquals("europarl.lines.txt.gz", indexReader21, terms22, terms23, true); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.TestRule testRule28 = simpleIndexQueryParserTests0.ruleChain; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoDistanceFilter7(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_distance7.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertEquals("'" + str8 + "' != '" + "<unknown>" + "'", str8, "<unknown>"); org.junit.Assert.assertNotNull(testRule28); } @Test public void test05048() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05048"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.overrideTestDefaultQueryCache(); simpleIndexQueryParserTests0.setUp(); 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 { simpleIndexQueryParserTests0.assertFieldInfosEquals("<unknown>", 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.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05049() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05049"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum4 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("", postingsEnum4, postingsEnum5, true); org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("", postingsEnum9, postingsEnum10, false); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testTermsQueryBuilder(); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } } @Test public void test05050() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05050"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); java.lang.String str5 = simpleIndexQueryParserTests1.getTestName(); org.junit.Assert.assertNotNull("tests.slow", (java.lang.Object) simpleIndexQueryParserTests1); org.junit.rules.TestRule testRule7 = simpleIndexQueryParserTests1.ruleChain; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testBoostingQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/boosting-query.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); org.junit.Assert.assertEquals("'" + str5 + "' != '" + "<unknown>" + "'", str5, "<unknown>"); org.junit.Assert.assertNotNull(testRule7); } @Test public void test05051() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05051"); java.util.Locale locale3 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray4 = new java.lang.Cloneable[] { locale3 }; java.util.List<java.lang.Cloneable> cloneableList5 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray4); java.lang.Object obj6 = null; org.junit.Assert.assertNotSame((java.lang.Object) cloneableList5, obj6); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests8 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Fields fields11 = null; org.apache.lucene.index.Fields fields12 = null; simpleIndexQueryParserTests8.assertFieldsEquals("tests.maxfailures", indexReader10, fields11, fields12, false); org.junit.Assert.assertNotSame("tests.slow", obj6, (java.lang.Object) simpleIndexQueryParserTests8); simpleIndexQueryParserTests8.resetCheckIndexStatus(); simpleIndexQueryParserTests8.ensureCleanedUp(); simpleIndexQueryParserTests8.resetCheckIndexStatus(); simpleIndexQueryParserTests8.ensureCleanedUp(); org.junit.Assert.assertNotNull((java.lang.Object) simpleIndexQueryParserTests8); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests22 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str23 = simpleIndexQueryParserTests22.getTestName(); simpleIndexQueryParserTests22.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests22.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests22); org.apache.lucene.index.IndexReader indexReader28 = null; org.apache.lucene.index.PostingsEnum postingsEnum30 = null; org.apache.lucene.index.PostingsEnum postingsEnum31 = null; simpleIndexQueryParserTests22.assertPositionsSkippingEquals("tests.maxfailures", indexReader28, (-1), postingsEnum30, postingsEnum31); simpleIndexQueryParserTests22.resetCheckIndexStatus(); simpleIndexQueryParserTests22.ensureCheckIndexPassed(); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests35 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str36 = simpleIndexQueryParserTests35.getTestName(); simpleIndexQueryParserTests35.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader39 = null; org.apache.lucene.index.Terms terms40 = null; org.apache.lucene.index.Terms terms41 = null; simpleIndexQueryParserTests35.assertTermsEquals("tests.maxfailures", indexReader39, terms40, terms41, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests44 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str45 = simpleIndexQueryParserTests44.getTestName(); simpleIndexQueryParserTests44.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests44.ensureCleanedUp(); java.lang.String str48 = simpleIndexQueryParserTests44.getTestName(); org.apache.lucene.index.IndexReader indexReader50 = null; org.apache.lucene.index.Fields fields51 = null; org.apache.lucene.index.Fields fields52 = null; simpleIndexQueryParserTests44.assertFieldsEquals("europarl.lines.txt.gz", indexReader50, fields51, fields52, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests55 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests55.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum59 = null; org.apache.lucene.index.PostingsEnum postingsEnum60 = null; simpleIndexQueryParserTests55.assertDocsEnumEquals("", postingsEnum59, postingsEnum60, true); simpleIndexQueryParserTests55.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain64 = simpleIndexQueryParserTests55.failureAndSuccessEvents; simpleIndexQueryParserTests44.failureAndSuccessEvents = ruleChain64; simpleIndexQueryParserTests35.failureAndSuccessEvents = ruleChain64; simpleIndexQueryParserTests22.failureAndSuccessEvents = ruleChain64; org.apache.lucene.util.LuceneTestCase.classRules = ruleChain64; simpleIndexQueryParserTests8.failureAndSuccessEvents = ruleChain64; org.apache.lucene.index.IndexReader indexReader71 = null; org.apache.lucene.index.IndexReader indexReader72 = null; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests8.assertFieldInfosEquals("hi!", indexReader71, indexReader72); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale3); org.junit.Assert.assertEquals(locale3.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray4); org.junit.Assert.assertNotNull(cloneableList5); org.junit.Assert.assertEquals("'" + str23 + "' != '" + "<unknown>" + "'", str23, "<unknown>"); org.junit.Assert.assertEquals("'" + str36 + "' != '" + "<unknown>" + "'", str36, "<unknown>"); org.junit.Assert.assertEquals("'" + str45 + "' != '" + "<unknown>" + "'", str45, "<unknown>"); org.junit.Assert.assertEquals("'" + str48 + "' != '" + "<unknown>" + "'", str48, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain64); } @Test public void test05052() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05052"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Fields fields5 = null; org.apache.lucene.index.Fields fields6 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.awaitsfix", indexReader4, fields5, fields6, false); org.apache.lucene.index.PostingsEnum postingsEnum10 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.weekly", postingsEnum10, postingsEnum11, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testCustomBoostFactorQueryBuilder_withFunctionScore(); 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 test05053() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05053"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests1); org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests1.assertPositionsSkippingEquals("tests.maxfailures", indexReader7, (-1), postingsEnum9, postingsEnum10); simpleIndexQueryParserTests1.resetCheckIndexStatus(); simpleIndexQueryParserTests1.ensureCheckIndexPassed(); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests14 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str15 = simpleIndexQueryParserTests14.getTestName(); simpleIndexQueryParserTests14.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader18 = null; org.apache.lucene.index.Terms terms19 = null; org.apache.lucene.index.Terms terms20 = null; simpleIndexQueryParserTests14.assertTermsEquals("tests.maxfailures", indexReader18, terms19, terms20, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests23 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str24 = simpleIndexQueryParserTests23.getTestName(); simpleIndexQueryParserTests23.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests23.ensureCleanedUp(); java.lang.String str27 = simpleIndexQueryParserTests23.getTestName(); org.apache.lucene.index.IndexReader indexReader29 = null; org.apache.lucene.index.Fields fields30 = null; org.apache.lucene.index.Fields fields31 = null; simpleIndexQueryParserTests23.assertFieldsEquals("europarl.lines.txt.gz", indexReader29, fields30, fields31, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests34 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests34.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum38 = null; org.apache.lucene.index.PostingsEnum postingsEnum39 = null; simpleIndexQueryParserTests34.assertDocsEnumEquals("", postingsEnum38, postingsEnum39, true); simpleIndexQueryParserTests34.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain43 = simpleIndexQueryParserTests34.failureAndSuccessEvents; simpleIndexQueryParserTests23.failureAndSuccessEvents = ruleChain43; simpleIndexQueryParserTests14.failureAndSuccessEvents = ruleChain43; simpleIndexQueryParserTests1.failureAndSuccessEvents = ruleChain43; org.apache.lucene.index.IndexReader indexReader48 = null; org.apache.lucene.index.Fields fields49 = null; org.apache.lucene.index.Fields fields50 = null; simpleIndexQueryParserTests1.assertFieldsEquals("tests.badapples", indexReader48, fields49, fields50, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testPrefiFilteredQueryBuilder(); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); org.junit.Assert.assertEquals("'" + str15 + "' != '" + "<unknown>" + "'", str15, "<unknown>"); org.junit.Assert.assertEquals("'" + str24 + "' != '" + "<unknown>" + "'", str24, "<unknown>"); org.junit.Assert.assertEquals("'" + str27 + "' != '" + "<unknown>" + "'", str27, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain43); } @Test public void test05054() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05054"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); org.junit.rules.RuleChain ruleChain2 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain2; org.apache.lucene.index.IndexReader indexReader5 = null; org.apache.lucene.index.Fields fields6 = null; org.apache.lucene.index.Fields fields7 = null; simpleIndexQueryParserTests0.assertFieldsEquals("<unknown>", indexReader5, fields6, fields7, false); org.junit.rules.TestRule testRule10 = simpleIndexQueryParserTests0.ruleChain; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testQueryStringFieldsMatch(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/query-fields-match.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertNotNull(testRule10); } @Test public void test05055() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05055"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (short) 1); simpleIndexQueryParserTests0.setUp(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); java.lang.String str11 = simpleIndexQueryParserTests0.getTestName(); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests12 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str13 = simpleIndexQueryParserTests12.getTestName(); simpleIndexQueryParserTests12.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests12.ensureCleanedUp(); java.lang.String str16 = simpleIndexQueryParserTests12.getTestName(); org.apache.lucene.index.IndexReader indexReader18 = null; org.apache.lucene.index.Fields fields19 = null; org.apache.lucene.index.Fields fields20 = null; simpleIndexQueryParserTests12.assertFieldsEquals("europarl.lines.txt.gz", indexReader18, fields19, fields20, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests23 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests23.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum27 = null; org.apache.lucene.index.PostingsEnum postingsEnum28 = null; simpleIndexQueryParserTests23.assertDocsEnumEquals("", postingsEnum27, postingsEnum28, true); simpleIndexQueryParserTests23.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain32 = simpleIndexQueryParserTests23.failureAndSuccessEvents; simpleIndexQueryParserTests12.failureAndSuccessEvents = ruleChain32; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain32; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testFilteredQuery3(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/filtered-query3.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertEquals("'" + str11 + "' != '" + "<unknown>" + "'", str11, "<unknown>"); org.junit.Assert.assertEquals("'" + str13 + "' != '" + "<unknown>" + "'", str13, "<unknown>"); org.junit.Assert.assertEquals("'" + str16 + "' != '" + "<unknown>" + "'", str16, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain32); } @Test public void test05056() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05056"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.nightly", indexReader7, 100, postingsEnum9, postingsEnum10, false); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader16 = null; org.apache.lucene.index.PostingsEnum postingsEnum18 = null; org.apache.lucene.index.PostingsEnum postingsEnum19 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.slow", indexReader16, (int) (byte) 10, postingsEnum18, postingsEnum19, true); simpleIndexQueryParserTests0.setUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.tearDown(); org.junit.Assert.fail("Expected exception of type java.lang.RuntimeException; message: The rule is not currently executing."); } catch (java.lang.RuntimeException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05057() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05057"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests1); org.junit.rules.RuleChain ruleChain6 = simpleIndexQueryParserTests1.failureAndSuccessEvents; simpleIndexQueryParserTests1.resetCheckIndexStatus(); simpleIndexQueryParserTests1.restoreIndexWriterMaxDocs(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testQueryString(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/query.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain6); } @Test public void test05058() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05058"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum4 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("<unknown>", postingsEnum4, postingsEnum5, false); org.apache.lucene.index.IndexReader indexReader9 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.monster", indexReader9, (int) (byte) 1, postingsEnum11, postingsEnum12); simpleIndexQueryParserTests0.ensureCleanedUp(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader17 = null; org.apache.lucene.index.Terms terms18 = null; org.apache.lucene.index.Terms terms19 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.slow", indexReader17, terms18, terms19, true); org.apache.lucene.index.TermsEnum termsEnum23 = null; org.apache.lucene.index.TermsEnum termsEnum24 = null; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.assertTermStatsEquals("random", termsEnum23, termsEnum24); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } } @Test public void test05059() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05059"); java.util.Locale locale3 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray4 = new java.lang.Cloneable[] { locale3 }; java.util.List<java.lang.Cloneable> cloneableList5 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray4); java.lang.Object obj6 = null; org.junit.Assert.assertNotSame((java.lang.Object) cloneableList5, obj6); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests8 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Fields fields11 = null; org.apache.lucene.index.Fields fields12 = null; simpleIndexQueryParserTests8.assertFieldsEquals("tests.maxfailures", indexReader10, fields11, fields12, false); org.junit.Assert.assertNotSame("tests.slow", obj6, (java.lang.Object) simpleIndexQueryParserTests8); simpleIndexQueryParserTests8.resetCheckIndexStatus(); simpleIndexQueryParserTests8.ensureCleanedUp(); simpleIndexQueryParserTests8.resetCheckIndexStatus(); simpleIndexQueryParserTests8.ensureCleanedUp(); org.junit.Assert.assertNotNull((java.lang.Object) simpleIndexQueryParserTests8); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests22 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str23 = simpleIndexQueryParserTests22.getTestName(); simpleIndexQueryParserTests22.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests22.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests22); org.apache.lucene.index.IndexReader indexReader28 = null; org.apache.lucene.index.PostingsEnum postingsEnum30 = null; org.apache.lucene.index.PostingsEnum postingsEnum31 = null; simpleIndexQueryParserTests22.assertPositionsSkippingEquals("tests.maxfailures", indexReader28, (-1), postingsEnum30, postingsEnum31); simpleIndexQueryParserTests22.resetCheckIndexStatus(); simpleIndexQueryParserTests22.ensureCheckIndexPassed(); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests35 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str36 = simpleIndexQueryParserTests35.getTestName(); simpleIndexQueryParserTests35.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader39 = null; org.apache.lucene.index.Terms terms40 = null; org.apache.lucene.index.Terms terms41 = null; simpleIndexQueryParserTests35.assertTermsEquals("tests.maxfailures", indexReader39, terms40, terms41, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests44 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str45 = simpleIndexQueryParserTests44.getTestName(); simpleIndexQueryParserTests44.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests44.ensureCleanedUp(); java.lang.String str48 = simpleIndexQueryParserTests44.getTestName(); org.apache.lucene.index.IndexReader indexReader50 = null; org.apache.lucene.index.Fields fields51 = null; org.apache.lucene.index.Fields fields52 = null; simpleIndexQueryParserTests44.assertFieldsEquals("europarl.lines.txt.gz", indexReader50, fields51, fields52, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests55 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests55.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum59 = null; org.apache.lucene.index.PostingsEnum postingsEnum60 = null; simpleIndexQueryParserTests55.assertDocsEnumEquals("", postingsEnum59, postingsEnum60, true); simpleIndexQueryParserTests55.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain64 = simpleIndexQueryParserTests55.failureAndSuccessEvents; simpleIndexQueryParserTests44.failureAndSuccessEvents = ruleChain64; simpleIndexQueryParserTests35.failureAndSuccessEvents = ruleChain64; simpleIndexQueryParserTests22.failureAndSuccessEvents = ruleChain64; org.apache.lucene.util.LuceneTestCase.classRules = ruleChain64; simpleIndexQueryParserTests8.failureAndSuccessEvents = ruleChain64; org.apache.lucene.index.IndexReader indexReader71 = null; org.apache.lucene.index.Fields fields72 = null; org.apache.lucene.index.Fields fields73 = null; simpleIndexQueryParserTests8.assertFieldsEquals("tests.slow", indexReader71, fields72, fields73, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests8.testTermQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/term.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale3); org.junit.Assert.assertEquals(locale3.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray4); org.junit.Assert.assertNotNull(cloneableList5); org.junit.Assert.assertEquals("'" + str23 + "' != '" + "<unknown>" + "'", str23, "<unknown>"); org.junit.Assert.assertEquals("'" + str36 + "' != '" + "<unknown>" + "'", str36, "<unknown>"); org.junit.Assert.assertEquals("'" + str45 + "' != '" + "<unknown>" + "'", str45, "<unknown>"); org.junit.Assert.assertEquals("'" + str48 + "' != '" + "<unknown>" + "'", str48, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain64); } @Test public void test05060() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05060"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.junit.rules.RuleChain ruleChain7 = simpleIndexQueryParserTests0.failureAndSuccessEvents; simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testEmptyBooleanQueryInsideFQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/fquery-with-empty-bool-query.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertNull(ruleChain7); } @Test public void test05061() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05061"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (short) 1); simpleIndexQueryParserTests0.setUp(); org.apache.lucene.index.IndexReader indexReader11 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; org.apache.lucene.index.PostingsEnum postingsEnum14 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.badapples", indexReader11, 100, postingsEnum13, postingsEnum14, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testNotFilteredQueryBuilder(); 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.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); } @Test public void test05062() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05062"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.nightly", indexReader7, 100, postingsEnum9, postingsEnum10, false); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testAndFilteredQueryBuilder(); 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 test05063() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05063"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); org.junit.rules.TestRule testRule2 = simpleIndexQueryParserTests0.ruleChain; org.apache.lucene.index.PostingsEnum postingsEnum4 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.maxfailures", postingsEnum4, postingsEnum5, false); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSpanTermQueryBuilder(); 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.assertNotNull(testRule2); } @Test public void test05064() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05064"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Terms terms11 = null; org.apache.lucene.index.Terms terms12 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.failfast", indexReader10, terms11, terms12, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSpanNotQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/spanNot.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05065() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05065"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests9 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str10 = simpleIndexQueryParserTests9.getTestName(); simpleIndexQueryParserTests9.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests9.ensureCleanedUp(); java.lang.String str13 = simpleIndexQueryParserTests9.getTestName(); org.apache.lucene.index.IndexReader indexReader15 = null; org.apache.lucene.index.Fields fields16 = null; org.apache.lucene.index.Fields fields17 = null; simpleIndexQueryParserTests9.assertFieldsEquals("europarl.lines.txt.gz", indexReader15, fields16, fields17, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests20 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests20.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum24 = null; org.apache.lucene.index.PostingsEnum postingsEnum25 = null; simpleIndexQueryParserTests20.assertDocsEnumEquals("", postingsEnum24, postingsEnum25, true); simpleIndexQueryParserTests20.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain29 = simpleIndexQueryParserTests20.failureAndSuccessEvents; simpleIndexQueryParserTests9.failureAndSuccessEvents = ruleChain29; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain29; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testConstantScoreParsesFilter(); 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.assertEquals("'" + str10 + "' != '" + "<unknown>" + "'", str10, "<unknown>"); org.junit.Assert.assertEquals("'" + str13 + "' != '" + "<unknown>" + "'", str13, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain29); } @Test public void test05066() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05066"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests2 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str3 = simpleIndexQueryParserTests2.getTestName(); simpleIndexQueryParserTests2.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests2.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain6 = null; simpleIndexQueryParserTests2.failureAndSuccessEvents = ruleChain6; org.apache.lucene.index.IndexReader indexReader9 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; simpleIndexQueryParserTests2.assertDocsSkippingEquals("tests.nightly", indexReader9, 100, postingsEnum11, postingsEnum12, false); simpleIndexQueryParserTests2.resetCheckIndexStatus(); simpleIndexQueryParserTests2.resetCheckIndexStatus(); org.junit.Assert.assertNotSame("tests.maxfailures", (java.lang.Object) 1L, (java.lang.Object) simpleIndexQueryParserTests2); simpleIndexQueryParserTests2.overrideTestDefaultQueryCache(); simpleIndexQueryParserTests2.ensureAllSearchContextsReleased(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests2.testFilteredQuery3(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/filtered-query3.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str3 + "' != '" + "<unknown>" + "'", str3, "<unknown>"); } @Test public void test05067() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05067"); // The following exception was thrown during execution in test generation try { java.lang.String str1 = org.elasticsearch.test.ElasticsearchTestCase.randomRealisticUnicodeOfLength((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 test05068() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05068"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (short) 1); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain10 = simpleIndexQueryParserTests0.failureAndSuccessEvents; simpleIndexQueryParserTests0.ensureCheckIndexPassed(); simpleIndexQueryParserTests0.ensureCleanedUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testBadTypeMultiMatchQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/multiMatch-query-bad-type.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain10); } @Test public void test05069() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05069"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); org.apache.lucene.index.IndexReader indexReader8 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("<unknown>", indexReader8, (int) '4', postingsEnum10, postingsEnum11); simpleIndexQueryParserTests0.ensureCleanedUp(); org.apache.lucene.index.IndexReader indexReader15 = null; org.apache.lucene.index.PostingsEnum postingsEnum17 = null; org.apache.lucene.index.PostingsEnum postingsEnum18 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.badapples", indexReader15, 1, postingsEnum17, postingsEnum18); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testQueryStringFuzzyNumeric(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/query2.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); } @Test public void test05070() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05070"); java.util.Locale locale4 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray5 = new java.lang.Cloneable[] { locale4 }; java.util.List<java.lang.Cloneable> cloneableList6 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray5); java.lang.Object obj7 = null; org.junit.Assert.assertNotSame((java.lang.Object) cloneableList6, obj7); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests9 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader11 = null; org.apache.lucene.index.Fields fields12 = null; org.apache.lucene.index.Fields fields13 = null; simpleIndexQueryParserTests9.assertFieldsEquals("tests.maxfailures", indexReader11, fields12, fields13, false); org.junit.Assert.assertNotSame("tests.slow", obj7, (java.lang.Object) simpleIndexQueryParserTests9); simpleIndexQueryParserTests9.resetCheckIndexStatus(); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests18 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader20 = null; org.apache.lucene.index.Fields fields21 = null; org.apache.lucene.index.Fields fields22 = null; simpleIndexQueryParserTests18.assertFieldsEquals("tests.maxfailures", indexReader20, fields21, fields22, false); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests25 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str26 = simpleIndexQueryParserTests25.getTestName(); simpleIndexQueryParserTests25.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests25.ensureCleanedUp(); java.lang.String str29 = simpleIndexQueryParserTests25.getTestName(); org.apache.lucene.index.IndexReader indexReader31 = null; org.apache.lucene.index.Fields fields32 = null; org.apache.lucene.index.Fields fields33 = null; simpleIndexQueryParserTests25.assertFieldsEquals("europarl.lines.txt.gz", indexReader31, fields32, fields33, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests36 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests36.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum40 = null; org.apache.lucene.index.PostingsEnum postingsEnum41 = null; simpleIndexQueryParserTests36.assertDocsEnumEquals("", postingsEnum40, postingsEnum41, true); simpleIndexQueryParserTests36.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain45 = simpleIndexQueryParserTests36.failureAndSuccessEvents; simpleIndexQueryParserTests25.failureAndSuccessEvents = ruleChain45; java.lang.Object obj47 = null; org.junit.Assert.assertNotSame((java.lang.Object) ruleChain45, obj47); simpleIndexQueryParserTests18.failureAndSuccessEvents = ruleChain45; org.apache.lucene.util.LuceneTestCase.classRules = ruleChain45; org.junit.Assert.assertNotSame("random", (java.lang.Object) simpleIndexQueryParserTests9, (java.lang.Object) ruleChain45); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests52 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str53 = simpleIndexQueryParserTests52.getTestName(); simpleIndexQueryParserTests52.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests52.ensureCleanedUp(); java.lang.String str56 = simpleIndexQueryParserTests52.getTestName(); simpleIndexQueryParserTests52.setIndexWriterMaxDocs((int) (byte) 1); org.apache.lucene.index.IndexReader indexReader60 = null; org.apache.lucene.index.PostingsEnum postingsEnum62 = null; org.apache.lucene.index.PostingsEnum postingsEnum63 = null; simpleIndexQueryParserTests52.assertPositionsSkippingEquals("<unknown>", indexReader60, (int) '4', postingsEnum62, postingsEnum63); simpleIndexQueryParserTests52.ensureCleanedUp(); org.apache.lucene.index.IndexReader indexReader67 = null; org.apache.lucene.index.PostingsEnum postingsEnum69 = null; org.apache.lucene.index.PostingsEnum postingsEnum70 = null; simpleIndexQueryParserTests52.assertPositionsSkippingEquals("tests.badapples", indexReader67, 1, postingsEnum69, postingsEnum70); simpleIndexQueryParserTests52.setIndexWriterMaxDocs((int) (byte) 100); org.junit.Assert.assertNotSame((java.lang.Object) ruleChain45, (java.lang.Object) simpleIndexQueryParserTests52); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests52.testRegexpBoostQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/regexp-boost.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale4); org.junit.Assert.assertEquals(locale4.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray5); org.junit.Assert.assertNotNull(cloneableList6); org.junit.Assert.assertEquals("'" + str26 + "' != '" + "<unknown>" + "'", str26, "<unknown>"); org.junit.Assert.assertEquals("'" + str29 + "' != '" + "<unknown>" + "'", str29, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain45); org.junit.Assert.assertEquals("'" + str53 + "' != '" + "<unknown>" + "'", str53, "<unknown>"); org.junit.Assert.assertEquals("'" + str56 + "' != '" + "<unknown>" + "'", str56, "<unknown>"); } @Test public void test05071() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05071"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setUp(); java.lang.String str8 = simpleIndexQueryParserTests0.getTestName(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.badapples", indexReader10, (-1), postingsEnum12, postingsEnum13); java.lang.String str15 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSpanWithinQueryBuilder(); 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.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertEquals("'" + str8 + "' != '" + "<unknown>" + "'", str8, "<unknown>"); org.junit.Assert.assertEquals("'" + str15 + "' != '" + "<unknown>" + "'", str15, "<unknown>"); } @Test public void test05072() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05072"); // The following exception was thrown during execution in test generation try { java.lang.String str2 = org.elasticsearch.test.ElasticsearchTestCase.randomUnicodeOfLengthBetween((int) 'a', (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 test05073() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05073"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); org.apache.lucene.index.IndexReader indexReader11 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; org.apache.lucene.index.PostingsEnum postingsEnum14 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.nightly", indexReader11, (int) '#', postingsEnum13, postingsEnum14); org.apache.lucene.index.IndexReader indexReader17 = null; org.apache.lucene.index.Terms terms18 = null; org.apache.lucene.index.Terms terms19 = null; simpleIndexQueryParserTests0.assertTermsEquals("enwiki.random.lines.txt", indexReader17, terms18, terms19, false); simpleIndexQueryParserTests0.overrideTestDefaultQueryCache(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoBoundingBoxFilterNamed(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_boundingbox-named.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05074() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05074"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Terms terms11 = null; org.apache.lucene.index.Terms terms12 = null; simpleIndexQueryParserTests0.assertTermsEquals("hi!", indexReader10, terms11, terms12, false); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 0); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testBoolQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/bool.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05075() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05075"); java.util.Locale locale3 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray4 = new java.lang.Cloneable[] { locale3 }; java.util.List<java.lang.Cloneable> cloneableList5 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray4); java.lang.Object obj6 = null; org.junit.Assert.assertNotSame((java.lang.Object) cloneableList5, obj6); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests8 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Fields fields11 = null; org.apache.lucene.index.Fields fields12 = null; simpleIndexQueryParserTests8.assertFieldsEquals("tests.maxfailures", indexReader10, fields11, fields12, false); org.junit.Assert.assertNotSame("tests.slow", obj6, (java.lang.Object) simpleIndexQueryParserTests8); simpleIndexQueryParserTests8.restoreIndexWriterMaxDocs(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests8.testOrFilteredQueryBuilder(); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale3); org.junit.Assert.assertEquals(locale3.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray4); org.junit.Assert.assertNotNull(cloneableList5); } @Test public void test05076() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05076"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); 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 { simpleIndexQueryParserTests0.assertTermVectorsEquals("tests.badapples", 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.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05077() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05077"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); org.apache.lucene.index.IndexReader indexReader6 = null; org.apache.lucene.index.Fields fields7 = null; org.apache.lucene.index.Fields fields8 = null; simpleIndexQueryParserTests0.assertFieldsEquals("europarl.lines.txt.gz", indexReader6, fields7, fields8, true); 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 { simpleIndexQueryParserTests0.assertTermsEnumEquals("tests.slow", 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.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); } @Test public void test05078() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05078"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Fields fields5 = null; org.apache.lucene.index.Fields fields6 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.monster", indexReader4, fields5, fields6, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testTermsWithNameFilterQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/terms-filter-named.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } } @Test public void test05079() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05079"); java.util.Locale locale2 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray3 = new java.lang.Cloneable[] { locale2 }; java.util.List<java.lang.Cloneable> cloneableList4 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray3); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests5 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests5.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain7 = simpleIndexQueryParserTests5.failureAndSuccessEvents; org.junit.Assert.assertNotSame((java.lang.Object) cloneableArray3, (java.lang.Object) simpleIndexQueryParserTests5); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Terms terms11 = null; org.apache.lucene.index.Terms terms12 = null; simpleIndexQueryParserTests5.assertTermsEquals("", indexReader10, terms11, terms12, true); simpleIndexQueryParserTests5.setUp(); org.junit.rules.TestRule testRule16 = simpleIndexQueryParserTests5.ruleChain; java.lang.String[] strArray22 = new java.lang.String[] { "", "tests.failfast", "node_s_0", "random" }; java.util.List<java.lang.Comparable<java.lang.String>> strComparableList23 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, (java.lang.Comparable<java.lang.String>[]) strArray22); // The following exception was thrown during execution in test generation try { org.elasticsearch.action.admin.cluster.health.ClusterHealthStatus clusterHealthStatus24 = simpleIndexQueryParserTests5.ensureGreen(strArray22); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale2); org.junit.Assert.assertEquals(locale2.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray3); org.junit.Assert.assertNotNull(cloneableList4); org.junit.Assert.assertNotNull(ruleChain7); org.junit.Assert.assertNotNull(testRule16); org.junit.Assert.assertNotNull(strArray22); org.junit.Assert.assertNotNull(strComparableList23); } @Test public void test05080() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05080"); java.util.Locale locale4 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray5 = new java.lang.Cloneable[] { locale4 }; java.util.List<java.lang.Cloneable> cloneableList6 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray5); java.lang.Object obj7 = null; org.junit.Assert.assertNotSame((java.lang.Object) cloneableList6, obj7); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests9 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader11 = null; org.apache.lucene.index.Fields fields12 = null; org.apache.lucene.index.Fields fields13 = null; simpleIndexQueryParserTests9.assertFieldsEquals("tests.maxfailures", indexReader11, fields12, fields13, false); org.junit.Assert.assertNotSame("tests.slow", obj7, (java.lang.Object) simpleIndexQueryParserTests9); simpleIndexQueryParserTests9.resetCheckIndexStatus(); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests18 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader20 = null; org.apache.lucene.index.Fields fields21 = null; org.apache.lucene.index.Fields fields22 = null; simpleIndexQueryParserTests18.assertFieldsEquals("tests.maxfailures", indexReader20, fields21, fields22, false); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests25 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str26 = simpleIndexQueryParserTests25.getTestName(); simpleIndexQueryParserTests25.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests25.ensureCleanedUp(); java.lang.String str29 = simpleIndexQueryParserTests25.getTestName(); org.apache.lucene.index.IndexReader indexReader31 = null; org.apache.lucene.index.Fields fields32 = null; org.apache.lucene.index.Fields fields33 = null; simpleIndexQueryParserTests25.assertFieldsEquals("europarl.lines.txt.gz", indexReader31, fields32, fields33, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests36 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests36.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum40 = null; org.apache.lucene.index.PostingsEnum postingsEnum41 = null; simpleIndexQueryParserTests36.assertDocsEnumEquals("", postingsEnum40, postingsEnum41, true); simpleIndexQueryParserTests36.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain45 = simpleIndexQueryParserTests36.failureAndSuccessEvents; simpleIndexQueryParserTests25.failureAndSuccessEvents = ruleChain45; java.lang.Object obj47 = null; org.junit.Assert.assertNotSame((java.lang.Object) ruleChain45, obj47); simpleIndexQueryParserTests18.failureAndSuccessEvents = ruleChain45; org.apache.lucene.util.LuceneTestCase.classRules = ruleChain45; org.junit.Assert.assertNotSame("random", (java.lang.Object) simpleIndexQueryParserTests9, (java.lang.Object) ruleChain45); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests52 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str53 = simpleIndexQueryParserTests52.getTestName(); simpleIndexQueryParserTests52.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests52.ensureCleanedUp(); java.lang.String str56 = simpleIndexQueryParserTests52.getTestName(); simpleIndexQueryParserTests52.setIndexWriterMaxDocs((int) (byte) 1); org.apache.lucene.index.IndexReader indexReader60 = null; org.apache.lucene.index.PostingsEnum postingsEnum62 = null; org.apache.lucene.index.PostingsEnum postingsEnum63 = null; simpleIndexQueryParserTests52.assertPositionsSkippingEquals("<unknown>", indexReader60, (int) '4', postingsEnum62, postingsEnum63); simpleIndexQueryParserTests52.ensureCleanedUp(); org.apache.lucene.index.IndexReader indexReader67 = null; org.apache.lucene.index.PostingsEnum postingsEnum69 = null; org.apache.lucene.index.PostingsEnum postingsEnum70 = null; simpleIndexQueryParserTests52.assertPositionsSkippingEquals("tests.badapples", indexReader67, 1, postingsEnum69, postingsEnum70); simpleIndexQueryParserTests52.setIndexWriterMaxDocs((int) (byte) 100); org.junit.Assert.assertNotSame((java.lang.Object) ruleChain45, (java.lang.Object) simpleIndexQueryParserTests52); java.lang.String str75 = simpleIndexQueryParserTests52.getTestName(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests52.testFieldMaskingSpanQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/spanFieldMaskingTerm.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale4); org.junit.Assert.assertEquals(locale4.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray5); org.junit.Assert.assertNotNull(cloneableList6); org.junit.Assert.assertEquals("'" + str26 + "' != '" + "<unknown>" + "'", str26, "<unknown>"); org.junit.Assert.assertEquals("'" + str29 + "' != '" + "<unknown>" + "'", str29, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain45); org.junit.Assert.assertEquals("'" + str53 + "' != '" + "<unknown>" + "'", str53, "<unknown>"); org.junit.Assert.assertEquals("'" + str56 + "' != '" + "<unknown>" + "'", str56, "<unknown>"); org.junit.Assert.assertEquals("'" + str75 + "' != '" + "<unknown>" + "'", str75, "<unknown>"); } @Test public void test05081() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05081"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (short) 1); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain10 = simpleIndexQueryParserTests0.failureAndSuccessEvents; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testDisMax2(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/disMax2.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain10); } @Test public void test05082() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05082"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.junit.rules.RuleChain ruleChain7 = simpleIndexQueryParserTests0.failureAndSuccessEvents; simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); java.lang.String str9 = simpleIndexQueryParserTests0.getTestName(); org.junit.Assert.assertNotNull((java.lang.Object) simpleIndexQueryParserTests0); org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("<unknown>", postingsEnum12, postingsEnum13, true); org.junit.Assert.assertNotNull((java.lang.Object) "<unknown>"); org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertNull(ruleChain7); org.junit.Assert.assertEquals("'" + str9 + "' != '" + "<unknown>" + "'", str9, "<unknown>"); } @Test public void test05083() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05083"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests2 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str3 = simpleIndexQueryParserTests2.getTestName(); simpleIndexQueryParserTests2.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests2.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain6 = null; simpleIndexQueryParserTests2.failureAndSuccessEvents = ruleChain6; org.apache.lucene.index.IndexReader indexReader9 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; simpleIndexQueryParserTests2.assertDocsSkippingEquals("tests.nightly", indexReader9, 100, postingsEnum11, postingsEnum12, false); simpleIndexQueryParserTests2.resetCheckIndexStatus(); simpleIndexQueryParserTests2.resetCheckIndexStatus(); org.junit.Assert.assertNotSame("tests.maxfailures", (java.lang.Object) 1L, (java.lang.Object) simpleIndexQueryParserTests2); simpleIndexQueryParserTests2.overrideTestDefaultQueryCache(); java.lang.String str19 = simpleIndexQueryParserTests2.getTestName(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests2.testOrFilteredQuery2(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/or-filter2.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str3 + "' != '" + "<unknown>" + "'", str3, "<unknown>"); org.junit.Assert.assertEquals("'" + str19 + "' != '" + "<unknown>" + "'", str19, "<unknown>"); } @Test public void test05084() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05084"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.apache.lucene.index.PostingsEnum postingsEnum5 = null; org.apache.lucene.index.PostingsEnum postingsEnum6 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("hi!", postingsEnum5, postingsEnum6, false); org.junit.rules.TestRule testRule9 = simpleIndexQueryParserTests0.ruleChain; org.apache.lucene.index.IndexReader indexReader11 = null; org.apache.lucene.index.Terms terms12 = null; org.apache.lucene.index.Terms terms13 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.failfast", indexReader11, terms12, terms13, false); org.apache.lucene.index.IndexReader indexReader17 = null; org.apache.lucene.index.Fields fields18 = null; org.apache.lucene.index.Fields fields19 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.failfast", indexReader17, fields18, fields19, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testQueryString(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/query.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertNotNull(testRule9); } @Test public void test05085() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05085"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.PostingsEnum postingsEnum6 = null; org.apache.lucene.index.PostingsEnum postingsEnum7 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.maxfailures", indexReader4, (int) (short) 100, postingsEnum6, postingsEnum7); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs(0); simpleIndexQueryParserTests0.resetCheckIndexStatus(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testAndNamedFilteredQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/and-filter-named.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05086() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05086"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.PostingsEnum postingsEnum6 = null; org.apache.lucene.index.PostingsEnum postingsEnum7 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.slow", indexReader4, 0, postingsEnum6, postingsEnum7, true); simpleIndexQueryParserTests0.ensureCleanedUp(); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests11 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str12 = simpleIndexQueryParserTests11.getTestName(); simpleIndexQueryParserTests11.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests11.ensureCleanedUp(); java.lang.String str15 = simpleIndexQueryParserTests11.getTestName(); org.apache.lucene.index.IndexReader indexReader17 = null; org.apache.lucene.index.Fields fields18 = null; org.apache.lucene.index.Fields fields19 = null; simpleIndexQueryParserTests11.assertFieldsEquals("europarl.lines.txt.gz", indexReader17, fields18, fields19, true); org.apache.lucene.index.PostingsEnum postingsEnum23 = null; org.apache.lucene.index.PostingsEnum postingsEnum24 = null; simpleIndexQueryParserTests11.assertDocsEnumEquals("tests.nightly", postingsEnum23, postingsEnum24, true); org.apache.lucene.index.IndexReader indexReader28 = null; org.apache.lucene.index.Terms terms29 = null; org.apache.lucene.index.Terms terms30 = null; simpleIndexQueryParserTests11.assertTermsEquals("hi!", indexReader28, terms29, terms30, false); org.junit.Assert.assertNotSame((java.lang.Object) simpleIndexQueryParserTests0, (java.lang.Object) "hi!"); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testMLTMinimumShouldMatch(); 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.assertEquals("'" + str12 + "' != '" + "<unknown>" + "'", str12, "<unknown>"); org.junit.Assert.assertEquals("'" + str15 + "' != '" + "<unknown>" + "'", str15, "<unknown>"); } @Test public void test05087() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05087"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain5 = null; simpleIndexQueryParserTests1.failureAndSuccessEvents = ruleChain5; org.apache.lucene.index.IndexReader indexReader8 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; simpleIndexQueryParserTests1.assertDocsSkippingEquals("tests.nightly", indexReader8, 100, postingsEnum10, postingsEnum11, false); simpleIndexQueryParserTests1.resetCheckIndexStatus(); org.junit.Assert.assertNotNull("tests.slow", (java.lang.Object) simpleIndexQueryParserTests1); org.apache.lucene.index.PostingsEnum postingsEnum17 = null; org.apache.lucene.index.PostingsEnum postingsEnum18 = null; simpleIndexQueryParserTests1.assertDocsEnumEquals("tests.badapples", postingsEnum17, postingsEnum18, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testFuzzyQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/fuzzy.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); } @Test public void test05088() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05088"); java.util.Locale locale3 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray4 = new java.lang.Cloneable[] { locale3 }; java.util.List<java.lang.Cloneable> cloneableList5 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray4); java.lang.Object obj6 = null; org.junit.Assert.assertNotSame((java.lang.Object) cloneableList5, obj6); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests8 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Fields fields11 = null; org.apache.lucene.index.Fields fields12 = null; simpleIndexQueryParserTests8.assertFieldsEquals("tests.maxfailures", indexReader10, fields11, fields12, false); org.junit.Assert.assertNotSame("tests.slow", obj6, (java.lang.Object) simpleIndexQueryParserTests8); org.junit.rules.RuleChain ruleChain16 = simpleIndexQueryParserTests8.failureAndSuccessEvents; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests8.tearDown(); org.junit.Assert.fail("Expected exception of type java.lang.RuntimeException; message: The rule is not currently executing."); } catch (java.lang.RuntimeException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale3); org.junit.Assert.assertEquals(locale3.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray4); org.junit.Assert.assertNotNull(cloneableList5); org.junit.Assert.assertNotNull(ruleChain16); } @Test public void test05089() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05089"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); java.lang.String str5 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests1.setIndexWriterMaxDocs((int) (short) 1); org.junit.Assert.assertNotSame("europarl.lines.txt.gz", (java.lang.Object) simpleIndexQueryParserTests1, (java.lang.Object) 2); org.apache.lucene.index.IndexReader indexReader13 = null; org.apache.lucene.index.Fields fields14 = null; org.apache.lucene.index.Fields fields15 = null; simpleIndexQueryParserTests1.assertFieldsEquals("tests.maxfailures", indexReader13, fields14, fields15, true); 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 { simpleIndexQueryParserTests1.assertReaderStatisticsEquals("tests.slow", 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.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); org.junit.Assert.assertEquals("'" + str5 + "' != '" + "<unknown>" + "'", str5, "<unknown>"); } @Test public void test05090() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05090"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.PostingsEnum postingsEnum6 = null; org.apache.lucene.index.PostingsEnum postingsEnum7 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.slow", indexReader4, 1, postingsEnum6, postingsEnum7, false); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testMatchAllEmpty2(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/match_all_empty2.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } } @Test public void test05091() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05091"); java.util.Locale locale3 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray4 = new java.lang.Cloneable[] { locale3 }; java.util.List<java.lang.Cloneable> cloneableList5 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray4); java.lang.Object obj6 = null; org.junit.Assert.assertNotSame((java.lang.Object) cloneableList5, obj6); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests8 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Fields fields11 = null; org.apache.lucene.index.Fields fields12 = null; simpleIndexQueryParserTests8.assertFieldsEquals("tests.maxfailures", indexReader10, fields11, fields12, false); org.junit.Assert.assertNotSame("tests.slow", obj6, (java.lang.Object) simpleIndexQueryParserTests8); simpleIndexQueryParserTests8.resetCheckIndexStatus(); simpleIndexQueryParserTests8.ensureCleanedUp(); simpleIndexQueryParserTests8.resetCheckIndexStatus(); simpleIndexQueryParserTests8.ensureCleanedUp(); org.junit.Assert.assertNotNull((java.lang.Object) simpleIndexQueryParserTests8); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests22 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str23 = simpleIndexQueryParserTests22.getTestName(); simpleIndexQueryParserTests22.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests22.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests22); org.apache.lucene.index.IndexReader indexReader28 = null; org.apache.lucene.index.PostingsEnum postingsEnum30 = null; org.apache.lucene.index.PostingsEnum postingsEnum31 = null; simpleIndexQueryParserTests22.assertPositionsSkippingEquals("tests.maxfailures", indexReader28, (-1), postingsEnum30, postingsEnum31); simpleIndexQueryParserTests22.resetCheckIndexStatus(); simpleIndexQueryParserTests22.ensureCheckIndexPassed(); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests35 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str36 = simpleIndexQueryParserTests35.getTestName(); simpleIndexQueryParserTests35.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader39 = null; org.apache.lucene.index.Terms terms40 = null; org.apache.lucene.index.Terms terms41 = null; simpleIndexQueryParserTests35.assertTermsEquals("tests.maxfailures", indexReader39, terms40, terms41, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests44 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str45 = simpleIndexQueryParserTests44.getTestName(); simpleIndexQueryParserTests44.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests44.ensureCleanedUp(); java.lang.String str48 = simpleIndexQueryParserTests44.getTestName(); org.apache.lucene.index.IndexReader indexReader50 = null; org.apache.lucene.index.Fields fields51 = null; org.apache.lucene.index.Fields fields52 = null; simpleIndexQueryParserTests44.assertFieldsEquals("europarl.lines.txt.gz", indexReader50, fields51, fields52, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests55 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests55.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum59 = null; org.apache.lucene.index.PostingsEnum postingsEnum60 = null; simpleIndexQueryParserTests55.assertDocsEnumEquals("", postingsEnum59, postingsEnum60, true); simpleIndexQueryParserTests55.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain64 = simpleIndexQueryParserTests55.failureAndSuccessEvents; simpleIndexQueryParserTests44.failureAndSuccessEvents = ruleChain64; simpleIndexQueryParserTests35.failureAndSuccessEvents = ruleChain64; simpleIndexQueryParserTests22.failureAndSuccessEvents = ruleChain64; org.apache.lucene.util.LuceneTestCase.classRules = ruleChain64; simpleIndexQueryParserTests8.failureAndSuccessEvents = ruleChain64; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests8.testNotFilteredQuery3(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/not-filter3.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale3); org.junit.Assert.assertEquals(locale3.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray4); org.junit.Assert.assertNotNull(cloneableList5); org.junit.Assert.assertEquals("'" + str23 + "' != '" + "<unknown>" + "'", str23, "<unknown>"); org.junit.Assert.assertEquals("'" + str36 + "' != '" + "<unknown>" + "'", str36, "<unknown>"); org.junit.Assert.assertEquals("'" + str45 + "' != '" + "<unknown>" + "'", str45, "<unknown>"); org.junit.Assert.assertEquals("'" + str48 + "' != '" + "<unknown>" + "'", str48, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain64); } @Test public void test05092() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05092"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.overrideTestDefaultQueryCache(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSpanContainingQueryParser(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/spanContaining.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } } @Test public void test05093() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05093"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests1); org.junit.rules.RuleChain ruleChain6 = simpleIndexQueryParserTests1.failureAndSuccessEvents; org.apache.lucene.index.IndexReader indexReader8 = null; org.apache.lucene.index.Fields fields9 = null; org.apache.lucene.index.Fields fields10 = null; simpleIndexQueryParserTests1.assertFieldsEquals("enwiki.random.lines.txt", indexReader8, fields9, fields10, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testQueryStringRegexpTooManyDeterminizedStates(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/query-regexp-too-many-determinized-states.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain6); } @Test public void test05094() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05094"); // The following exception was thrown during execution in test generation try { int int2 = org.elasticsearch.test.ElasticsearchTestCase.between((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 test05095() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05095"); 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.awaitsfix", ""); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } } @Test public void test05096() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05096"); java.util.Locale locale3 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray4 = new java.lang.Cloneable[] { locale3 }; java.util.List<java.lang.Cloneable> cloneableList5 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray4); java.lang.Object obj6 = null; org.junit.Assert.assertNotSame((java.lang.Object) cloneableList5, obj6); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests8 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Fields fields11 = null; org.apache.lucene.index.Fields fields12 = null; simpleIndexQueryParserTests8.assertFieldsEquals("tests.maxfailures", indexReader10, fields11, fields12, false); org.junit.Assert.assertNotSame("tests.slow", obj6, (java.lang.Object) simpleIndexQueryParserTests8); simpleIndexQueryParserTests8.resetCheckIndexStatus(); simpleIndexQueryParserTests8.ensureCleanedUp(); simpleIndexQueryParserTests8.resetCheckIndexStatus(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests8.testNamedRegexpFilteredQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/regexp-filter-named.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale3); org.junit.Assert.assertEquals(locale3.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray4); org.junit.Assert.assertNotNull(cloneableList5); } @Test public void test05097() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05097"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); org.apache.lucene.index.IndexReader indexReader8 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("<unknown>", indexReader8, (int) '4', postingsEnum10, postingsEnum11); simpleIndexQueryParserTests0.ensureCleanedUp(); org.apache.lucene.index.IndexReader indexReader15 = null; org.apache.lucene.index.PostingsEnum postingsEnum17 = null; org.apache.lucene.index.PostingsEnum postingsEnum18 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.badapples", indexReader15, 1, postingsEnum17, postingsEnum18); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 100); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testAndFilteredQueryBuilder(); 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.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); } @Test public void test05098() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05098"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum4 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("", postingsEnum4, postingsEnum5, true); org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("", postingsEnum9, postingsEnum10, false); org.junit.rules.TestRule testRule13 = simpleIndexQueryParserTests0.ruleChain; simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.apache.lucene.index.IndexReader indexReader16 = null; org.apache.lucene.index.Terms terms17 = null; org.apache.lucene.index.Terms terms18 = null; simpleIndexQueryParserTests0.assertTermsEquals("random", indexReader16, terms17, terms18, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testAndFilteredQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/and-filter.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertNotNull(testRule13); } @Test public void test05099() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05099"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); java.lang.String str5 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests1.setIndexWriterMaxDocs((int) (short) 1); simpleIndexQueryParserTests1.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain11 = simpleIndexQueryParserTests1.failureAndSuccessEvents; simpleIndexQueryParserTests1.ensureCheckIndexPassed(); simpleIndexQueryParserTests1.ensureCleanedUp(); java.util.Locale locale15 = org.apache.lucene.util.LuceneTestCase.localeForName("tests.monster"); org.junit.Assert.assertNotSame("tests.slow", (java.lang.Object) simpleIndexQueryParserTests1, (java.lang.Object) locale15); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testEmptyBoolSubClausesIsMatchAll(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/bool-query-with-empty-clauses-for-parsing.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); org.junit.Assert.assertEquals("'" + str5 + "' != '" + "<unknown>" + "'", str5, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain11); org.junit.Assert.assertNotNull(locale15); org.junit.Assert.assertEquals(locale15.toString(), "tests.monster"); } @Test public void test05100() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05100"); // The following exception was thrown during execution in test generation try { java.lang.String str2 = org.elasticsearch.test.ElasticsearchTestCase.randomUnicodeOfLengthBetween((int) (byte) 100, 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 test05101() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05101"); // The following exception was thrown during execution in test generation try { int int2 = org.elasticsearch.test.ElasticsearchTestCase.between(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 test05102() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05102"); // The following exception was thrown during execution in test generation try { java.lang.String str2 = org.elasticsearch.test.ElasticsearchTestCase.randomUnicodeOfCodepointLengthBetween(100, 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 test05103() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05103"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.overrideTestDefaultQueryCache(); org.junit.rules.TestRule testRule2 = simpleIndexQueryParserTests0.ruleChain; org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests3 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str4 = simpleIndexQueryParserTests3.getTestName(); simpleIndexQueryParserTests3.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests3.ensureCleanedUp(); java.lang.String str7 = simpleIndexQueryParserTests3.getTestName(); simpleIndexQueryParserTests3.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests3.setIndexWriterMaxDocs((int) (short) 1); simpleIndexQueryParserTests3.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain13 = simpleIndexQueryParserTests3.failureAndSuccessEvents; simpleIndexQueryParserTests3.ensureCheckIndexPassed(); simpleIndexQueryParserTests3.ensureCleanedUp(); org.junit.Assert.assertNotSame((java.lang.Object) simpleIndexQueryParserTests0, (java.lang.Object) simpleIndexQueryParserTests3); simpleIndexQueryParserTests3.resetCheckIndexStatus(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests3.testCommonTermsQuery3(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/commonTerms-query3.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertNotNull(testRule2); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertEquals("'" + str7 + "' != '" + "<unknown>" + "'", str7, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain13); } @Test public void test05104() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05104"); // The following exception was thrown during execution in test generation try { java.lang.String[] strArray3 = org.elasticsearch.test.ElasticsearchTestCase.generateRandomStringArray((int) (short) 100, (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 test05105() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05105"); java.util.Locale locale3 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray4 = new java.lang.Cloneable[] { locale3 }; java.util.List<java.lang.Cloneable> cloneableList5 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray4); java.lang.Object obj6 = null; org.junit.Assert.assertNotSame((java.lang.Object) cloneableList5, obj6); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests8 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Fields fields11 = null; org.apache.lucene.index.Fields fields12 = null; simpleIndexQueryParserTests8.assertFieldsEquals("tests.maxfailures", indexReader10, fields11, fields12, false); org.junit.Assert.assertNotSame("tests.slow", obj6, (java.lang.Object) simpleIndexQueryParserTests8); simpleIndexQueryParserTests8.resetCheckIndexStatus(); simpleIndexQueryParserTests8.ensureCleanedUp(); simpleIndexQueryParserTests8.resetCheckIndexStatus(); simpleIndexQueryParserTests8.ensureCleanedUp(); org.junit.Assert.assertNotNull((java.lang.Object) simpleIndexQueryParserTests8); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests22 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str23 = simpleIndexQueryParserTests22.getTestName(); simpleIndexQueryParserTests22.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests22.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests22); org.apache.lucene.index.IndexReader indexReader28 = null; org.apache.lucene.index.PostingsEnum postingsEnum30 = null; org.apache.lucene.index.PostingsEnum postingsEnum31 = null; simpleIndexQueryParserTests22.assertPositionsSkippingEquals("tests.maxfailures", indexReader28, (-1), postingsEnum30, postingsEnum31); simpleIndexQueryParserTests22.resetCheckIndexStatus(); simpleIndexQueryParserTests22.ensureCheckIndexPassed(); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests35 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str36 = simpleIndexQueryParserTests35.getTestName(); simpleIndexQueryParserTests35.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader39 = null; org.apache.lucene.index.Terms terms40 = null; org.apache.lucene.index.Terms terms41 = null; simpleIndexQueryParserTests35.assertTermsEquals("tests.maxfailures", indexReader39, terms40, terms41, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests44 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str45 = simpleIndexQueryParserTests44.getTestName(); simpleIndexQueryParserTests44.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests44.ensureCleanedUp(); java.lang.String str48 = simpleIndexQueryParserTests44.getTestName(); org.apache.lucene.index.IndexReader indexReader50 = null; org.apache.lucene.index.Fields fields51 = null; org.apache.lucene.index.Fields fields52 = null; simpleIndexQueryParserTests44.assertFieldsEquals("europarl.lines.txt.gz", indexReader50, fields51, fields52, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests55 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests55.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum59 = null; org.apache.lucene.index.PostingsEnum postingsEnum60 = null; simpleIndexQueryParserTests55.assertDocsEnumEquals("", postingsEnum59, postingsEnum60, true); simpleIndexQueryParserTests55.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain64 = simpleIndexQueryParserTests55.failureAndSuccessEvents; simpleIndexQueryParserTests44.failureAndSuccessEvents = ruleChain64; simpleIndexQueryParserTests35.failureAndSuccessEvents = ruleChain64; simpleIndexQueryParserTests22.failureAndSuccessEvents = ruleChain64; org.apache.lucene.util.LuceneTestCase.classRules = ruleChain64; simpleIndexQueryParserTests8.failureAndSuccessEvents = ruleChain64; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests8.testGeoDistanceFilter7(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_distance7.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale3); org.junit.Assert.assertEquals(locale3.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray4); org.junit.Assert.assertNotNull(cloneableList5); org.junit.Assert.assertEquals("'" + str23 + "' != '" + "<unknown>" + "'", str23, "<unknown>"); org.junit.Assert.assertEquals("'" + str36 + "' != '" + "<unknown>" + "'", str36, "<unknown>"); org.junit.Assert.assertEquals("'" + str45 + "' != '" + "<unknown>" + "'", str45, "<unknown>"); org.junit.Assert.assertEquals("'" + str48 + "' != '" + "<unknown>" + "'", str48, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain64); } @Test public void test05106() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05106"); 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", "<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 test05107() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05107"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setUp(); java.lang.String str8 = simpleIndexQueryParserTests0.getTestName(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.badapples", indexReader10, (-1), postingsEnum12, postingsEnum13); org.apache.lucene.index.PostingsEnum postingsEnum16 = null; org.apache.lucene.index.PostingsEnum postingsEnum17 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.failfast", postingsEnum16, postingsEnum17, true); org.apache.lucene.index.IndexReader indexReader21 = null; org.apache.lucene.index.Terms terms22 = null; org.apache.lucene.index.Terms terms23 = null; simpleIndexQueryParserTests0.assertTermsEquals("europarl.lines.txt.gz", indexReader21, terms22, terms23, true); org.junit.rules.TestRule testRule26 = simpleIndexQueryParserTests0.ruleChain; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoBoundingBoxFilter1(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_boundingbox1.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertEquals("'" + str8 + "' != '" + "<unknown>" + "'", str8, "<unknown>"); org.junit.Assert.assertNotNull(testRule26); } @Test public void test05108() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05108"); java.util.Locale locale5 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray6 = new java.lang.Cloneable[] { locale5 }; java.util.List<java.lang.Cloneable> cloneableList7 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray6); java.lang.Object obj8 = null; org.junit.Assert.assertNotSame((java.lang.Object) cloneableList7, obj8); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests10 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader12 = null; org.apache.lucene.index.Fields fields13 = null; org.apache.lucene.index.Fields fields14 = null; simpleIndexQueryParserTests10.assertFieldsEquals("tests.maxfailures", indexReader12, fields13, fields14, false); org.junit.Assert.assertNotSame("tests.slow", obj8, (java.lang.Object) simpleIndexQueryParserTests10); simpleIndexQueryParserTests10.restoreIndexWriterMaxDocs(); org.junit.Assert.assertNotSame("tests.slow", (java.lang.Object) (byte) 1, (java.lang.Object) simpleIndexQueryParserTests10); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests10.testGeoPolygonFilter2(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_polygon2.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale5); org.junit.Assert.assertEquals(locale5.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray6); org.junit.Assert.assertNotNull(cloneableList7); } @Test public void test05109() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05109"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); org.apache.lucene.index.IndexReader indexReader8 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("<unknown>", indexReader8, (int) '4', postingsEnum10, postingsEnum11); simpleIndexQueryParserTests0.ensureCleanedUp(); org.apache.lucene.index.IndexReader indexReader15 = null; org.apache.lucene.index.PostingsEnum postingsEnum17 = null; org.apache.lucene.index.PostingsEnum postingsEnum18 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.badapples", indexReader15, 1, postingsEnum17, postingsEnum18); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testTermWithBoostQueryBuilder(); 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.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); } @Test public void test05110() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05110"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.nightly", indexReader7, 100, postingsEnum9, postingsEnum10, false); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader16 = null; org.apache.lucene.index.PostingsEnum postingsEnum18 = null; org.apache.lucene.index.PostingsEnum postingsEnum19 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.slow", indexReader16, (int) (byte) 10, postingsEnum18, postingsEnum19, true); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); // The following exception was thrown during execution in test generation try { // flaky: simpleIndexQueryParserTests0.testTermsFilterWithMultipleFields(); // flaky: 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 test05111() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05111"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.PostingsEnum postingsEnum6 = null; org.apache.lucene.index.PostingsEnum postingsEnum7 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.slow", indexReader4, 1, postingsEnum6, postingsEnum7, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoDistanceFilter11(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_distance11.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } } @Test public void test05112() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05112"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); org.apache.lucene.index.IndexReader indexReader11 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; org.apache.lucene.index.PostingsEnum postingsEnum14 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.nightly", indexReader11, (int) '#', postingsEnum13, postingsEnum14); org.apache.lucene.index.IndexReader indexReader17 = null; org.apache.lucene.index.Terms terms18 = null; org.apache.lucene.index.Terms terms19 = null; simpleIndexQueryParserTests0.assertTermsEquals("enwiki.random.lines.txt", indexReader17, terms18, terms19, false); org.apache.lucene.index.IndexReader indexReader23 = null; org.apache.lucene.index.Terms terms24 = null; org.apache.lucene.index.Terms terms25 = null; simpleIndexQueryParserTests0.assertTermsEquals("europarl.lines.txt.gz", indexReader23, terms24, terms25, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSpanOrQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/spanOr.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05113() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05113"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader2 = null; org.apache.lucene.index.Fields fields3 = null; org.apache.lucene.index.Fields fields4 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.maxfailures", indexReader2, fields3, fields4, false); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs(0); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testRegexpQueryBuilder(); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } } @Test public void test05114() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05114"); 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!", "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 test05115() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05115"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setUp(); java.lang.String str8 = simpleIndexQueryParserTests0.getTestName(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.badapples", indexReader10, (-1), postingsEnum12, postingsEnum13); java.lang.String str15 = simpleIndexQueryParserTests0.getTestName(); org.junit.Assert.assertNotNull((java.lang.Object) simpleIndexQueryParserTests0); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoBoundingBoxFilter2(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_boundingbox2.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertEquals("'" + str8 + "' != '" + "<unknown>" + "'", str8, "<unknown>"); org.junit.Assert.assertEquals("'" + str15 + "' != '" + "<unknown>" + "'", str15, "<unknown>"); } @Test public void test05116() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05116"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.apache.lucene.index.PostingsEnum postingsEnum6 = null; org.apache.lucene.index.PostingsEnum postingsEnum7 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("node_s_0", postingsEnum6, postingsEnum7, false); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests11 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str12 = simpleIndexQueryParserTests11.getTestName(); simpleIndexQueryParserTests11.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests11.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests11); org.junit.rules.RuleChain ruleChain16 = simpleIndexQueryParserTests11.failureAndSuccessEvents; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain16; simpleIndexQueryParserTests0.setUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testConstantScoreQueryBuilder(); 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.assertEquals("'" + str12 + "' != '" + "<unknown>" + "'", str12, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain16); } @Test public void test05117() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05117"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (short) 1); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.setUp(); org.junit.rules.RuleChain ruleChain11 = simpleIndexQueryParserTests0.failureAndSuccessEvents; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testPrefixQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/prefix.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain11); } @Test public void test05118() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05118"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum4 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("", postingsEnum4, postingsEnum5, true); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain9 = simpleIndexQueryParserTests0.failureAndSuccessEvents; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testQueryStringFields2(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/query-fields2.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertNotNull(ruleChain9); } @Test public void test05119() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05119"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testAndFilteredQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/and-filter.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05120() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05120"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests1); org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.Terms terms8 = null; org.apache.lucene.index.Terms terms9 = null; simpleIndexQueryParserTests1.assertTermsEquals("tests.slow", indexReader7, terms8, terms9, true); org.apache.lucene.index.IndexReader indexReader13 = null; org.apache.lucene.index.PostingsEnum postingsEnum15 = null; org.apache.lucene.index.PostingsEnum postingsEnum16 = null; simpleIndexQueryParserTests1.assertDocsSkippingEquals("tests.monster", indexReader13, 0, postingsEnum15, postingsEnum16, false); simpleIndexQueryParserTests1.ensureCleanedUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testGeoDistanceFilter6(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_distance6.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); } @Test public void test05121() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05121"); java.util.Locale locale4 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray5 = new java.lang.Cloneable[] { locale4 }; java.util.List<java.lang.Cloneable> cloneableList6 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray5); java.lang.Object obj7 = null; org.junit.Assert.assertNotSame((java.lang.Object) cloneableList6, obj7); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests9 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader11 = null; org.apache.lucene.index.Fields fields12 = null; org.apache.lucene.index.Fields fields13 = null; simpleIndexQueryParserTests9.assertFieldsEquals("tests.maxfailures", indexReader11, fields12, fields13, false); org.junit.Assert.assertNotSame("tests.slow", obj7, (java.lang.Object) simpleIndexQueryParserTests9); simpleIndexQueryParserTests9.resetCheckIndexStatus(); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests18 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader20 = null; org.apache.lucene.index.Fields fields21 = null; org.apache.lucene.index.Fields fields22 = null; simpleIndexQueryParserTests18.assertFieldsEquals("tests.maxfailures", indexReader20, fields21, fields22, false); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests25 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str26 = simpleIndexQueryParserTests25.getTestName(); simpleIndexQueryParserTests25.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests25.ensureCleanedUp(); java.lang.String str29 = simpleIndexQueryParserTests25.getTestName(); org.apache.lucene.index.IndexReader indexReader31 = null; org.apache.lucene.index.Fields fields32 = null; org.apache.lucene.index.Fields fields33 = null; simpleIndexQueryParserTests25.assertFieldsEquals("europarl.lines.txt.gz", indexReader31, fields32, fields33, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests36 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests36.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum40 = null; org.apache.lucene.index.PostingsEnum postingsEnum41 = null; simpleIndexQueryParserTests36.assertDocsEnumEquals("", postingsEnum40, postingsEnum41, true); simpleIndexQueryParserTests36.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain45 = simpleIndexQueryParserTests36.failureAndSuccessEvents; simpleIndexQueryParserTests25.failureAndSuccessEvents = ruleChain45; java.lang.Object obj47 = null; org.junit.Assert.assertNotSame((java.lang.Object) ruleChain45, obj47); simpleIndexQueryParserTests18.failureAndSuccessEvents = ruleChain45; org.apache.lucene.util.LuceneTestCase.classRules = ruleChain45; org.junit.Assert.assertNotSame("random", (java.lang.Object) simpleIndexQueryParserTests9, (java.lang.Object) ruleChain45); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests52 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str53 = simpleIndexQueryParserTests52.getTestName(); simpleIndexQueryParserTests52.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests52.ensureCleanedUp(); java.lang.String str56 = simpleIndexQueryParserTests52.getTestName(); simpleIndexQueryParserTests52.setIndexWriterMaxDocs((int) (byte) 1); org.apache.lucene.index.IndexReader indexReader60 = null; org.apache.lucene.index.PostingsEnum postingsEnum62 = null; org.apache.lucene.index.PostingsEnum postingsEnum63 = null; simpleIndexQueryParserTests52.assertPositionsSkippingEquals("<unknown>", indexReader60, (int) '4', postingsEnum62, postingsEnum63); simpleIndexQueryParserTests52.ensureCleanedUp(); org.apache.lucene.index.IndexReader indexReader67 = null; org.apache.lucene.index.PostingsEnum postingsEnum69 = null; org.apache.lucene.index.PostingsEnum postingsEnum70 = null; simpleIndexQueryParserTests52.assertPositionsSkippingEquals("tests.badapples", indexReader67, 1, postingsEnum69, postingsEnum70); simpleIndexQueryParserTests52.setIndexWriterMaxDocs((int) (byte) 100); org.junit.Assert.assertNotSame((java.lang.Object) ruleChain45, (java.lang.Object) simpleIndexQueryParserTests52); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests52.testNamedAndCachedRegexpWithFlagsFilteredQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/regexp-filter-flags-named-cached.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale4); org.junit.Assert.assertEquals(locale4.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray5); org.junit.Assert.assertNotNull(cloneableList6); org.junit.Assert.assertEquals("'" + str26 + "' != '" + "<unknown>" + "'", str26, "<unknown>"); org.junit.Assert.assertEquals("'" + str29 + "' != '" + "<unknown>" + "'", str29, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain45); org.junit.Assert.assertEquals("'" + str53 + "' != '" + "<unknown>" + "'", str53, "<unknown>"); org.junit.Assert.assertEquals("'" + str56 + "' != '" + "<unknown>" + "'", str56, "<unknown>"); } @Test public void test05122() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05122"); 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.weekly", "europarl.lines.txt.gz", 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 test05123() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05123"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testFilteredQuery3(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/filtered-query3.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05124() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05124"); java.util.Locale locale3 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray4 = new java.lang.Cloneable[] { locale3 }; java.util.List<java.lang.Cloneable> cloneableList5 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray4); java.util.Locale locale9 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray10 = new java.lang.Cloneable[] { locale9 }; java.util.List<java.lang.Cloneable> cloneableList11 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray10); java.util.Locale locale14 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray15 = new java.lang.Cloneable[] { locale14 }; java.util.List<java.lang.Cloneable> cloneableList16 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray15); org.junit.Assert.assertArrayEquals((java.lang.Object[]) cloneableArray10, (java.lang.Object[]) cloneableArray15); org.junit.Assert.assertNotSame("tests.maxfailures", (java.lang.Object) cloneableArray10, (java.lang.Object) 0.0f); org.junit.Assert.assertEquals((java.lang.Object[]) cloneableArray4, (java.lang.Object[]) cloneableArray10); java.io.PrintStream printStream21 = null; // The following exception was thrown during execution in test generation try { org.apache.lucene.util.LuceneTestCase.dumpArray("tests.slow", (java.lang.Object[]) cloneableArray10, printStream21); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale3); org.junit.Assert.assertEquals(locale3.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray4); org.junit.Assert.assertNotNull(cloneableList5); org.junit.Assert.assertNotNull(locale9); org.junit.Assert.assertEquals(locale9.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray10); org.junit.Assert.assertNotNull(cloneableList11); org.junit.Assert.assertNotNull(locale14); org.junit.Assert.assertEquals(locale14.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray15); org.junit.Assert.assertNotNull(cloneableList16); } @Test public void test05125() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05125"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.PostingsEnum postingsEnum6 = null; org.apache.lucene.index.PostingsEnum postingsEnum7 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.maxfailures", indexReader4, (int) (short) 100, postingsEnum6, postingsEnum7); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.junit.rules.TestRule testRule10 = simpleIndexQueryParserTests0.ruleChain; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testRangeQueryBuilder(); 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.assertNotNull(testRule10); } @Test public void test05126() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05126"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum4 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("", postingsEnum4, postingsEnum5, true); org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("", postingsEnum9, postingsEnum10, false); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests14 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str15 = simpleIndexQueryParserTests14.getTestName(); simpleIndexQueryParserTests14.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests14.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests14); org.junit.rules.RuleChain ruleChain19 = simpleIndexQueryParserTests14.failureAndSuccessEvents; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain19; simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testBadTypeMultiMatchQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/multiMatch-query-bad-type.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str15 + "' != '" + "<unknown>" + "'", str15, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain19); } @Test public void test05127() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05127"); 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.ElasticsearchTestCase.assertBusy(runnable0, (long) 'a', timeUnit2); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } } @Test public void test05128() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05128"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.junit.rules.RuleChain ruleChain7 = simpleIndexQueryParserTests0.failureAndSuccessEvents; simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("enwiki.random.lines.txt", indexReader10, (int) (short) -1, postingsEnum12, postingsEnum13); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests16 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str17 = simpleIndexQueryParserTests16.getTestName(); simpleIndexQueryParserTests16.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests16.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests16); org.junit.rules.RuleChain ruleChain21 = simpleIndexQueryParserTests16.failureAndSuccessEvents; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain21; org.apache.lucene.index.IndexReader indexReader24 = null; org.apache.lucene.index.PostingsEnum postingsEnum26 = null; org.apache.lucene.index.PostingsEnum postingsEnum27 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("enwiki.random.lines.txt", indexReader24, (int) ' ', postingsEnum26, postingsEnum27); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testQueryFilter(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/query-filter.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertNull(ruleChain7); org.junit.Assert.assertEquals("'" + str17 + "' != '" + "<unknown>" + "'", str17, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain21); } @Test public void test05129() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05129"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum4 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("", postingsEnum4, postingsEnum5, true); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testDisMax(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/disMax.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } } @Test public void test05130() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05130"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader2 = null; org.apache.lucene.index.PostingsEnum postingsEnum4 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.awaitsfix", indexReader2, (int) (short) 0, postingsEnum4, postingsEnum5, true); org.apache.lucene.index.IndexReader indexReader9 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("europarl.lines.txt.gz", indexReader9, (int) (byte) -1, postingsEnum11, postingsEnum12, false); org.apache.lucene.index.IndexReader indexReader16 = null; org.apache.lucene.index.Fields fields17 = null; org.apache.lucene.index.Fields fields18 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.slow", indexReader16, fields17, fields18, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testDisMax(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/disMax.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } } @Test public void test05131() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05131"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.nightly", indexReader7, 100, postingsEnum9, postingsEnum10, false); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.junit.Assert.assertNotNull((java.lang.Object) simpleIndexQueryParserTests0); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testTermNamedFilterQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/term-filter-named.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05132() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05132"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests1); org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests1.assertPositionsSkippingEquals("tests.maxfailures", indexReader7, (-1), postingsEnum9, postingsEnum10); // The following exception was thrown during execution in test generation try { // flaky: simpleIndexQueryParserTests1.testWeight1fStillProducesWeighFunction(); // flaky: org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); } @Test public void test05133() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05133"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.junit.rules.RuleChain ruleChain7 = simpleIndexQueryParserTests0.failureAndSuccessEvents; simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("enwiki.random.lines.txt", indexReader10, (int) (short) -1, postingsEnum12, postingsEnum13); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSpanOrQueryBuilder(); 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(ruleChain7); } @Test public void test05134() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05134"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); org.apache.lucene.index.IndexReader indexReader6 = null; org.apache.lucene.index.Fields fields7 = null; org.apache.lucene.index.Fields fields8 = null; simpleIndexQueryParserTests0.assertFieldsEquals("europarl.lines.txt.gz", indexReader6, fields7, fields8, true); org.apache.lucene.index.IndexReader indexReader12 = null; org.apache.lucene.index.PostingsEnum postingsEnum14 = null; org.apache.lucene.index.PostingsEnum postingsEnum15 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.nightly", indexReader12, (int) 'a', postingsEnum14, postingsEnum15, false); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testMLTMinimumShouldMatch(); 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.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); } @Test public void test05135() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05135"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader2 = null; org.apache.lucene.index.Fields fields3 = null; org.apache.lucene.index.Fields fields4 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.maxfailures", indexReader2, fields3, fields4, false); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests7 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str8 = simpleIndexQueryParserTests7.getTestName(); simpleIndexQueryParserTests7.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests7.ensureCleanedUp(); java.lang.String str11 = simpleIndexQueryParserTests7.getTestName(); org.apache.lucene.index.IndexReader indexReader13 = null; org.apache.lucene.index.Fields fields14 = null; org.apache.lucene.index.Fields fields15 = null; simpleIndexQueryParserTests7.assertFieldsEquals("europarl.lines.txt.gz", indexReader13, fields14, fields15, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests18 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests18.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum22 = null; org.apache.lucene.index.PostingsEnum postingsEnum23 = null; simpleIndexQueryParserTests18.assertDocsEnumEquals("", postingsEnum22, postingsEnum23, true); simpleIndexQueryParserTests18.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain27 = simpleIndexQueryParserTests18.failureAndSuccessEvents; simpleIndexQueryParserTests7.failureAndSuccessEvents = ruleChain27; java.lang.Object obj29 = null; org.junit.Assert.assertNotSame((java.lang.Object) ruleChain27, obj29); simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain27; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testQueryStringBoostsBuilder(); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str8 + "' != '" + "<unknown>" + "'", str8, "<unknown>"); org.junit.Assert.assertEquals("'" + str11 + "' != '" + "<unknown>" + "'", str11, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain27); } @Test public void test05136() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05136"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setUp(); java.lang.String str8 = simpleIndexQueryParserTests0.getTestName(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.badapples", indexReader10, (-1), postingsEnum12, postingsEnum13); org.apache.lucene.index.PostingsEnum postingsEnum16 = null; org.apache.lucene.index.PostingsEnum postingsEnum17 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.failfast", postingsEnum16, postingsEnum17, true); org.apache.lucene.index.IndexReader indexReader21 = null; org.apache.lucene.index.Terms terms22 = null; org.apache.lucene.index.Terms terms23 = null; simpleIndexQueryParserTests0.assertTermsEquals("europarl.lines.txt.gz", indexReader21, terms22, terms23, true); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (short) -1); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testPrefixQueryWithUnknownField(); 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.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertEquals("'" + str8 + "' != '" + "<unknown>" + "'", str8, "<unknown>"); } @Test public void test05137() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05137"); org.junit.Assert.assertEquals((double) 1, (double) 1, (double) (byte) 0); } @Test public void test05138() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05138"); java.util.Locale locale2 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray3 = new java.lang.Cloneable[] { locale2 }; java.util.List<java.lang.Cloneable> cloneableList4 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray3); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests5 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests5.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain7 = simpleIndexQueryParserTests5.failureAndSuccessEvents; org.junit.Assert.assertNotSame((java.lang.Object) cloneableArray3, (java.lang.Object) simpleIndexQueryParserTests5); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests5.testGeoBoundingBoxFilter6(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_boundingbox6.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale2); org.junit.Assert.assertEquals(locale2.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray3); org.junit.Assert.assertNotNull(cloneableList4); org.junit.Assert.assertNotNull(ruleChain7); } @Test public void test05139() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05139"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.ensureCleanedUp(); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); org.apache.lucene.index.PostingsEnum postingsEnum4 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.badapples", postingsEnum4, postingsEnum5, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoPolygonFilter2(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_polygon2.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } } @Test public void test05140() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05140"); // The following exception was thrown during execution in test generation try { int int2 = org.elasticsearch.test.ElasticsearchTestCase.iterations((int) (byte) -1, (int) (byte) 1); 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 test05141() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05141"); java.util.Locale locale2 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray3 = new java.lang.Cloneable[] { locale2 }; java.util.List<java.lang.Cloneable> cloneableList4 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray3); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests5 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests5.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain7 = simpleIndexQueryParserTests5.failureAndSuccessEvents; org.junit.Assert.assertNotSame((java.lang.Object) cloneableArray3, (java.lang.Object) simpleIndexQueryParserTests5); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Terms terms11 = null; org.apache.lucene.index.Terms terms12 = null; simpleIndexQueryParserTests5.assertTermsEquals("", indexReader10, terms11, terms12, true); simpleIndexQueryParserTests5.setUp(); org.junit.rules.TestRule testRule16 = simpleIndexQueryParserTests5.ruleChain; org.junit.rules.TestRule testRule17 = simpleIndexQueryParserTests5.ruleChain; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests5.testBadTypeMultiMatchQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/multiMatch-query-bad-type.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale2); org.junit.Assert.assertEquals(locale2.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray3); org.junit.Assert.assertNotNull(cloneableList4); org.junit.Assert.assertNotNull(ruleChain7); org.junit.Assert.assertNotNull(testRule16); org.junit.Assert.assertNotNull(testRule17); } @Test public void test05142() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05142"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader2 = null; org.apache.lucene.index.PostingsEnum postingsEnum4 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.awaitsfix", indexReader2, (int) (short) 0, postingsEnum4, postingsEnum5, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSpanMultiTermTermRangeQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/span-multi-term-range-term.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } } @Test public void test05143() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05143"); java.util.Locale locale3 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray4 = new java.lang.Cloneable[] { locale3 }; java.util.List<java.lang.Cloneable> cloneableList5 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray4); java.lang.Object obj6 = null; org.junit.Assert.assertNotSame((java.lang.Object) cloneableList5, obj6); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests8 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Fields fields11 = null; org.apache.lucene.index.Fields fields12 = null; simpleIndexQueryParserTests8.assertFieldsEquals("tests.maxfailures", indexReader10, fields11, fields12, false); org.junit.Assert.assertNotSame("tests.slow", obj6, (java.lang.Object) simpleIndexQueryParserTests8); org.junit.rules.RuleChain ruleChain16 = simpleIndexQueryParserTests8.failureAndSuccessEvents; // The following exception was thrown during execution in test generation try { // flaky: simpleIndexQueryParserTests8.testWeight1fStillProducesWeighFunction(); // flaky: org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale3); org.junit.Assert.assertEquals(locale3.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray4); org.junit.Assert.assertNotNull(cloneableList5); org.junit.Assert.assertNotNull(ruleChain16); } @Test public void test05144() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05144"); java.util.Locale locale3 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray4 = new java.lang.Cloneable[] { locale3 }; java.util.List<java.lang.Cloneable> cloneableList5 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray4); java.lang.Object obj6 = null; org.junit.Assert.assertNotSame((java.lang.Object) cloneableList5, obj6); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests8 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Fields fields11 = null; org.apache.lucene.index.Fields fields12 = null; simpleIndexQueryParserTests8.assertFieldsEquals("tests.maxfailures", indexReader10, fields11, fields12, false); org.junit.Assert.assertNotSame("tests.slow", obj6, (java.lang.Object) simpleIndexQueryParserTests8); simpleIndexQueryParserTests8.resetCheckIndexStatus(); simpleIndexQueryParserTests8.ensureCleanedUp(); org.apache.lucene.index.IndexReader indexReader19 = null; org.apache.lucene.index.Fields fields20 = null; org.apache.lucene.index.Fields fields21 = null; simpleIndexQueryParserTests8.assertFieldsEquals("tests.badapples", indexReader19, fields20, fields21, true); org.apache.lucene.index.IndexReader indexReader25 = null; org.apache.lucene.index.PostingsEnum postingsEnum27 = null; org.apache.lucene.index.PostingsEnum postingsEnum28 = null; simpleIndexQueryParserTests8.assertPositionsSkippingEquals("tests.badapples", indexReader25, 2, postingsEnum27, postingsEnum28); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests8.testGeoBoundingBoxFilter5(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_boundingbox5.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale3); org.junit.Assert.assertEquals(locale3.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray4); org.junit.Assert.assertNotNull(cloneableList5); } @Test public void test05145() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05145"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum4 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("<unknown>", postingsEnum4, postingsEnum5, false); org.apache.lucene.index.IndexReader indexReader9 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.monster", indexReader9, (int) (byte) 1, postingsEnum11, postingsEnum12); org.apache.lucene.index.IndexReader indexReader15 = null; org.apache.lucene.index.PostingsEnum postingsEnum17 = null; org.apache.lucene.index.PostingsEnum postingsEnum18 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("random", indexReader15, 4, postingsEnum17, postingsEnum18, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testMatchAllEmpty1(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/match_all_empty1.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } } @Test public void test05146() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05146"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); org.apache.lucene.index.IndexReader indexReader6 = null; org.apache.lucene.index.Fields fields7 = null; org.apache.lucene.index.Fields fields8 = null; simpleIndexQueryParserTests0.assertFieldsEquals("europarl.lines.txt.gz", indexReader6, fields7, fields8, true); org.apache.lucene.index.IndexReader indexReader12 = null; org.apache.lucene.index.PostingsEnum postingsEnum14 = null; org.apache.lucene.index.PostingsEnum postingsEnum15 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.nightly", indexReader12, (int) 'a', postingsEnum14, postingsEnum15, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testFuzzyQueryWithFields(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/fuzzy-with-fields.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); } @Test public void test05147() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05147"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.junit.rules.RuleChain ruleChain7 = simpleIndexQueryParserTests0.failureAndSuccessEvents; simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("enwiki.random.lines.txt", indexReader10, (int) (short) -1, postingsEnum12, postingsEnum13); org.junit.rules.RuleChain ruleChain15 = simpleIndexQueryParserTests0.failureAndSuccessEvents; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testTermNamedFilterQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/term-filter-named.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertNull(ruleChain7); org.junit.Assert.assertNull(ruleChain15); } @Test public void test05148() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05148"); // The following exception was thrown during execution in test generation try { java.lang.String[] strArray3 = org.elasticsearch.test.ElasticsearchTestCase.generateRandomStringArray((-1), 2, 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 test05149() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05149"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); simpleIndexQueryParserTests0.overrideTestDefaultQueryCache(); 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 { simpleIndexQueryParserTests0.assertNormsEquals("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>"); } @Test public void test05150() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05150"); java.util.Locale locale2 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray3 = new java.lang.Cloneable[] { locale2 }; java.util.List<java.lang.Cloneable> cloneableList4 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray3); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests5 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests5.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain7 = simpleIndexQueryParserTests5.failureAndSuccessEvents; org.junit.Assert.assertNotSame((java.lang.Object) cloneableArray3, (java.lang.Object) simpleIndexQueryParserTests5); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Terms terms11 = null; org.apache.lucene.index.Terms terms12 = null; simpleIndexQueryParserTests5.assertTermsEquals("", indexReader10, terms11, terms12, true); simpleIndexQueryParserTests5.setUp(); org.junit.rules.TestRule testRule16 = simpleIndexQueryParserTests5.ruleChain; simpleIndexQueryParserTests5.ensureCheckIndexPassed(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests5.testQueryStringBuilder(); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale2); org.junit.Assert.assertEquals(locale2.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray3); org.junit.Assert.assertNotNull(cloneableList4); org.junit.Assert.assertNotNull(ruleChain7); org.junit.Assert.assertNotNull(testRule16); } @Test public void test05151() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05151"); // The following exception was thrown during execution in test generation try { int int2 = org.elasticsearch.test.ElasticsearchTestCase.randomIntBetween(5, (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 test05152() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05152"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests9 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str10 = simpleIndexQueryParserTests9.getTestName(); simpleIndexQueryParserTests9.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests9.ensureCleanedUp(); java.lang.String str13 = simpleIndexQueryParserTests9.getTestName(); org.apache.lucene.index.IndexReader indexReader15 = null; org.apache.lucene.index.Fields fields16 = null; org.apache.lucene.index.Fields fields17 = null; simpleIndexQueryParserTests9.assertFieldsEquals("europarl.lines.txt.gz", indexReader15, fields16, fields17, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests20 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests20.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum24 = null; org.apache.lucene.index.PostingsEnum postingsEnum25 = null; simpleIndexQueryParserTests20.assertDocsEnumEquals("", postingsEnum24, postingsEnum25, true); simpleIndexQueryParserTests20.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain29 = simpleIndexQueryParserTests20.failureAndSuccessEvents; simpleIndexQueryParserTests9.failureAndSuccessEvents = ruleChain29; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain29; org.apache.lucene.index.IndexReader indexReader33 = null; org.apache.lucene.index.Fields fields34 = null; org.apache.lucene.index.Fields fields35 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.weekly", indexReader33, fields34, fields35, false); simpleIndexQueryParserTests0.setUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testRegexpQueryBuilder(); 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.assertEquals("'" + str10 + "' != '" + "<unknown>" + "'", str10, "<unknown>"); org.junit.Assert.assertEquals("'" + str13 + "' != '" + "<unknown>" + "'", str13, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain29); } @Test public void test05153() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05153"); java.util.Locale locale3 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray4 = new java.lang.Cloneable[] { locale3 }; java.util.List<java.lang.Cloneable> cloneableList5 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray4); java.lang.Object obj6 = null; org.junit.Assert.assertNotSame((java.lang.Object) cloneableList5, obj6); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests8 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Fields fields11 = null; org.apache.lucene.index.Fields fields12 = null; simpleIndexQueryParserTests8.assertFieldsEquals("tests.maxfailures", indexReader10, fields11, fields12, false); org.junit.Assert.assertNotSame("tests.slow", obj6, (java.lang.Object) simpleIndexQueryParserTests8); simpleIndexQueryParserTests8.resetCheckIndexStatus(); simpleIndexQueryParserTests8.resetCheckIndexStatus(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests8.testSpanMultiTermWildcardQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/span-multi-term-wildcard.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale3); org.junit.Assert.assertEquals(locale3.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray4); org.junit.Assert.assertNotNull(cloneableList5); } @Test public void test05154() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05154"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); org.apache.lucene.index.IndexReader indexReader11 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; org.apache.lucene.index.PostingsEnum postingsEnum14 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.nightly", indexReader11, (int) '#', postingsEnum13, postingsEnum14); org.apache.lucene.index.IndexReader indexReader17 = null; org.apache.lucene.index.Terms terms18 = null; org.apache.lucene.index.Terms terms19 = null; simpleIndexQueryParserTests0.assertTermsEquals("enwiki.random.lines.txt", indexReader17, terms18, terms19, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testRange2Query(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/range2.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05155() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05155"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests1); org.junit.rules.RuleChain ruleChain6 = simpleIndexQueryParserTests1.failureAndSuccessEvents; org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests7 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str8 = simpleIndexQueryParserTests7.getTestName(); simpleIndexQueryParserTests7.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests7.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain11 = null; simpleIndexQueryParserTests7.failureAndSuccessEvents = ruleChain11; simpleIndexQueryParserTests7.ensureAllSearchContextsReleased(); org.junit.rules.RuleChain ruleChain14 = simpleIndexQueryParserTests7.failureAndSuccessEvents; simpleIndexQueryParserTests7.restoreIndexWriterMaxDocs(); java.lang.String str16 = simpleIndexQueryParserTests7.getTestName(); java.lang.String str17 = simpleIndexQueryParserTests7.getTestName(); org.apache.lucene.index.IndexReader indexReader19 = null; org.apache.lucene.index.PostingsEnum postingsEnum21 = null; org.apache.lucene.index.PostingsEnum postingsEnum22 = null; simpleIndexQueryParserTests7.assertDocsSkippingEquals("tests.monster", indexReader19, (int) (byte) 10, postingsEnum21, postingsEnum22, false); org.junit.Assert.assertNotSame((java.lang.Object) simpleIndexQueryParserTests1, (java.lang.Object) false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testCommonTermsQuery3(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/commonTerms-query3.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain6); org.junit.Assert.assertEquals("'" + str8 + "' != '" + "<unknown>" + "'", str8, "<unknown>"); org.junit.Assert.assertNull(ruleChain14); org.junit.Assert.assertEquals("'" + str16 + "' != '" + "<unknown>" + "'", str16, "<unknown>"); org.junit.Assert.assertEquals("'" + str17 + "' != '" + "<unknown>" + "'", str17, "<unknown>"); } @Test public void test05156() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05156"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (short) 1); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.setUp(); org.junit.rules.RuleChain ruleChain11 = simpleIndexQueryParserTests0.failureAndSuccessEvents; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testTermsWithNameFilterQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/terms-filter-named.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain11); } @Test public void test05157() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05157"); java.util.Locale locale2 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray3 = new java.lang.Cloneable[] { locale2 }; java.util.List<java.lang.Cloneable> cloneableList4 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray3); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests5 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests5.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain7 = simpleIndexQueryParserTests5.failureAndSuccessEvents; org.junit.Assert.assertNotSame((java.lang.Object) cloneableArray3, (java.lang.Object) simpleIndexQueryParserTests5); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Terms terms11 = null; org.apache.lucene.index.Terms terms12 = null; simpleIndexQueryParserTests5.assertTermsEquals("", indexReader10, terms11, terms12, true); simpleIndexQueryParserTests5.resetCheckIndexStatus(); // The following exception was thrown during execution in test generation try { // flaky: simpleIndexQueryParserTests5.testTermQueryBuilder(); // flaky: org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale2); org.junit.Assert.assertEquals(locale2.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray3); org.junit.Assert.assertNotNull(cloneableList4); org.junit.Assert.assertNotNull(ruleChain7); } @Test public void test05158() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05158"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.junit.rules.RuleChain ruleChain7 = simpleIndexQueryParserTests0.failureAndSuccessEvents; simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); java.lang.String str9 = simpleIndexQueryParserTests0.getTestName(); org.junit.Assert.assertNotNull((java.lang.Object) simpleIndexQueryParserTests0); org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("<unknown>", postingsEnum12, postingsEnum13, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testRegexpQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/regexp.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertNull(ruleChain7); org.junit.Assert.assertEquals("'" + str9 + "' != '" + "<unknown>" + "'", str9, "<unknown>"); } @Test public void test05159() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05159"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); org.apache.lucene.index.IndexReader indexReader11 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; org.apache.lucene.index.PostingsEnum postingsEnum14 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.nightly", indexReader11, (int) '#', postingsEnum13, postingsEnum14); org.apache.lucene.index.IndexReader indexReader17 = null; org.apache.lucene.index.Terms terms18 = null; org.apache.lucene.index.Terms terms19 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.weekly", indexReader17, terms18, terms19, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testDisMaxBuilder(); 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 test05160() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05160"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.junit.rules.RuleChain ruleChain7 = simpleIndexQueryParserTests0.failureAndSuccessEvents; simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); java.lang.String str9 = simpleIndexQueryParserTests0.getTestName(); java.lang.String str10 = simpleIndexQueryParserTests0.getTestName(); org.apache.lucene.index.IndexReader indexReader12 = null; org.apache.lucene.index.PostingsEnum postingsEnum14 = null; org.apache.lucene.index.PostingsEnum postingsEnum15 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.monster", indexReader12, (int) (byte) 10, postingsEnum14, postingsEnum15, false); simpleIndexQueryParserTests0.ensureCleanedUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testMultiMatchQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/multiMatch-query-simple.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertNull(ruleChain7); org.junit.Assert.assertEquals("'" + str9 + "' != '" + "<unknown>" + "'", str9, "<unknown>"); org.junit.Assert.assertEquals("'" + str10 + "' != '" + "<unknown>" + "'", str10, "<unknown>"); } @Test public void test05161() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05161"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testWildcardBoostQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/wildcard-boost.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05162() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05162"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests1); org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests1.assertPositionsSkippingEquals("tests.maxfailures", indexReader7, (-1), postingsEnum9, postingsEnum10); simpleIndexQueryParserTests1.resetCheckIndexStatus(); simpleIndexQueryParserTests1.ensureCleanedUp(); simpleIndexQueryParserTests1.resetCheckIndexStatus(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testFilteredQuery3(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/filtered-query3.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); } @Test public void test05163() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05163"); // The following exception was thrown during execution in test generation try { org.apache.lucene.index.MergePolicy mergePolicy1 = org.apache.lucene.util.LuceneTestCase.newLogMergePolicy((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 test05164() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05164"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.apache.lucene.index.PostingsEnum postingsEnum5 = null; org.apache.lucene.index.PostingsEnum postingsEnum6 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("hi!", postingsEnum5, postingsEnum6, false); org.junit.rules.TestRule testRule9 = simpleIndexQueryParserTests0.ruleChain; org.apache.lucene.index.IndexReader indexReader11 = null; org.apache.lucene.index.Terms terms12 = null; org.apache.lucene.index.Terms terms13 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.failfast", indexReader11, terms12, terms13, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSpanOrQueryBuilder(); 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.assertNotNull(testRule9); } @Test public void test05165() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05165"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests2 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str3 = simpleIndexQueryParserTests2.getTestName(); simpleIndexQueryParserTests2.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests2.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain6 = null; simpleIndexQueryParserTests2.failureAndSuccessEvents = ruleChain6; org.apache.lucene.index.IndexReader indexReader9 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; simpleIndexQueryParserTests2.assertDocsSkippingEquals("tests.nightly", indexReader9, 100, postingsEnum11, postingsEnum12, false); simpleIndexQueryParserTests2.resetCheckIndexStatus(); simpleIndexQueryParserTests2.resetCheckIndexStatus(); org.junit.Assert.assertNotSame("tests.maxfailures", (java.lang.Object) 1L, (java.lang.Object) simpleIndexQueryParserTests2); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests2.testGeoPolygonFilter4(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_polygon4.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str3 + "' != '" + "<unknown>" + "'", str3, "<unknown>"); } @Test public void test05166() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05166"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.nightly", indexReader7, 100, postingsEnum9, postingsEnum10, false); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader16 = null; org.apache.lucene.index.PostingsEnum postingsEnum18 = null; org.apache.lucene.index.PostingsEnum postingsEnum19 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.slow", indexReader16, (int) (byte) 10, postingsEnum18, postingsEnum19, true); simpleIndexQueryParserTests0.setUp(); org.apache.lucene.index.IndexReader indexReader24 = null; org.apache.lucene.index.Fields fields25 = null; org.apache.lucene.index.Fields fields26 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.failfast", indexReader24, fields25, fields26, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testDisMax2(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/disMax2.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05167() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05167"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); org.apache.lucene.index.IndexReader indexReader11 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; org.apache.lucene.index.PostingsEnum postingsEnum14 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.nightly", indexReader11, (int) '#', postingsEnum13, postingsEnum14); org.apache.lucene.index.IndexReader indexReader17 = null; org.apache.lucene.index.Terms terms18 = null; org.apache.lucene.index.Terms terms19 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.weekly", indexReader17, terms18, terms19, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoDistanceFilter6(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_distance6.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05168() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05168"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum4 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("", postingsEnum4, postingsEnum5, true); org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("", postingsEnum9, postingsEnum10, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoDistanceFilter9(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_distance9.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } } @Test public void test05169() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05169"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader2 = null; org.apache.lucene.index.Fields fields3 = null; org.apache.lucene.index.Fields fields4 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.maxfailures", indexReader2, fields3, fields4, false); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); simpleIndexQueryParserTests0.setUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSpanWithinQueryParser(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/spanWithin.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } } @Test public void test05170() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05170"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.apache.lucene.index.PostingsEnum postingsEnum6 = null; org.apache.lucene.index.PostingsEnum postingsEnum7 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("node_s_0", postingsEnum6, postingsEnum7, false); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests10 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str11 = simpleIndexQueryParserTests10.getTestName(); simpleIndexQueryParserTests10.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests10.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain14 = null; simpleIndexQueryParserTests10.failureAndSuccessEvents = ruleChain14; org.apache.lucene.index.IndexReader indexReader17 = null; org.apache.lucene.index.PostingsEnum postingsEnum19 = null; org.apache.lucene.index.PostingsEnum postingsEnum20 = null; simpleIndexQueryParserTests10.assertDocsSkippingEquals("tests.nightly", indexReader17, 100, postingsEnum19, postingsEnum20, false); simpleIndexQueryParserTests10.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader25 = null; org.apache.lucene.index.Terms terms26 = null; org.apache.lucene.index.Terms terms27 = null; simpleIndexQueryParserTests10.assertTermsEquals("tests.awaitsfix", indexReader25, terms26, terms27, false); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests30 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests30.overrideTestDefaultQueryCache(); org.junit.rules.RuleChain ruleChain32 = simpleIndexQueryParserTests30.failureAndSuccessEvents; simpleIndexQueryParserTests10.failureAndSuccessEvents = ruleChain32; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain32; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testQueryStringFields3(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/query-fields3.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str11 + "' != '" + "<unknown>" + "'", str11, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain32); } @Test public void test05171() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05171"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); simpleIndexQueryParserTests0.ensureCleanedUp(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests6 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str7 = simpleIndexQueryParserTests6.getTestName(); simpleIndexQueryParserTests6.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests6.ensureCleanedUp(); java.lang.String str10 = simpleIndexQueryParserTests6.getTestName(); simpleIndexQueryParserTests6.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests6.setUp(); java.lang.String str14 = simpleIndexQueryParserTests6.getTestName(); org.apache.lucene.index.IndexReader indexReader16 = null; org.apache.lucene.index.PostingsEnum postingsEnum18 = null; org.apache.lucene.index.PostingsEnum postingsEnum19 = null; simpleIndexQueryParserTests6.assertPositionsSkippingEquals("tests.badapples", indexReader16, (-1), postingsEnum18, postingsEnum19); org.apache.lucene.index.PostingsEnum postingsEnum22 = null; org.apache.lucene.index.PostingsEnum postingsEnum23 = null; simpleIndexQueryParserTests6.assertDocsEnumEquals("tests.failfast", postingsEnum22, postingsEnum23, true); org.junit.Assert.assertNotSame((java.lang.Object) simpleIndexQueryParserTests0, (java.lang.Object) "tests.failfast"); org.junit.rules.TestRule testRule27 = simpleIndexQueryParserTests0.ruleChain; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testCommonTermsQuery3(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/commonTerms-query3.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str7 + "' != '" + "<unknown>" + "'", str7, "<unknown>"); org.junit.Assert.assertEquals("'" + str10 + "' != '" + "<unknown>" + "'", str10, "<unknown>"); org.junit.Assert.assertEquals("'" + str14 + "' != '" + "<unknown>" + "'", str14, "<unknown>"); org.junit.Assert.assertNotNull(testRule27); } @Test public void test05172() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05172"); java.util.Locale locale3 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray4 = new java.lang.Cloneable[] { locale3 }; java.util.List<java.lang.Cloneable> cloneableList5 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray4); java.lang.Object obj6 = null; org.junit.Assert.assertNotSame((java.lang.Object) cloneableList5, obj6); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests8 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Fields fields11 = null; org.apache.lucene.index.Fields fields12 = null; simpleIndexQueryParserTests8.assertFieldsEquals("tests.maxfailures", indexReader10, fields11, fields12, false); org.junit.Assert.assertNotSame("tests.slow", obj6, (java.lang.Object) simpleIndexQueryParserTests8); simpleIndexQueryParserTests8.resetCheckIndexStatus(); simpleIndexQueryParserTests8.ensureCleanedUp(); org.apache.lucene.index.IndexReader indexReader19 = null; org.apache.lucene.index.Fields fields20 = null; org.apache.lucene.index.Fields fields21 = null; simpleIndexQueryParserTests8.assertFieldsEquals("tests.badapples", indexReader19, fields20, fields21, true); org.apache.lucene.index.IndexReader indexReader25 = null; org.apache.lucene.index.PostingsEnum postingsEnum27 = null; org.apache.lucene.index.PostingsEnum postingsEnum28 = null; simpleIndexQueryParserTests8.assertPositionsSkippingEquals("tests.badapples", indexReader25, 2, postingsEnum27, postingsEnum28); org.apache.lucene.index.PostingsEnum postingsEnum31 = null; org.apache.lucene.index.PostingsEnum postingsEnum32 = null; simpleIndexQueryParserTests8.assertDocsEnumEquals("europarl.lines.txt.gz", postingsEnum31, postingsEnum32, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests8.testGeoDistanceFilter8(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_distance8.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale3); org.junit.Assert.assertEquals(locale3.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray4); org.junit.Assert.assertNotNull(cloneableList5); } @Test public void test05173() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05173"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.junit.rules.RuleChain ruleChain7 = simpleIndexQueryParserTests0.failureAndSuccessEvents; org.junit.rules.RuleChain ruleChain8 = simpleIndexQueryParserTests0.failureAndSuccessEvents; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.badapples", postingsEnum10, postingsEnum11, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testFilteredQuery4(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/filtered-query4.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertNull(ruleChain7); org.junit.Assert.assertNull(ruleChain8); } @Test public void test05174() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05174"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests2 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str3 = simpleIndexQueryParserTests2.getTestName(); simpleIndexQueryParserTests2.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests2.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain6 = null; simpleIndexQueryParserTests2.failureAndSuccessEvents = ruleChain6; org.apache.lucene.index.IndexReader indexReader9 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; simpleIndexQueryParserTests2.assertDocsSkippingEquals("tests.nightly", indexReader9, 100, postingsEnum11, postingsEnum12, false); simpleIndexQueryParserTests2.resetCheckIndexStatus(); simpleIndexQueryParserTests2.resetCheckIndexStatus(); org.junit.Assert.assertNotSame("tests.maxfailures", (java.lang.Object) 1L, (java.lang.Object) simpleIndexQueryParserTests2); simpleIndexQueryParserTests2.overrideTestDefaultQueryCache(); simpleIndexQueryParserTests2.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests2.ensureAllSearchContextsReleased(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests2.assureMalformedThrowsException(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/faulty-function-score-query.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str3 + "' != '" + "<unknown>" + "'", str3, "<unknown>"); } @Test public void test05175() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05175"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); org.junit.rules.RuleChain ruleChain2 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain2; org.apache.lucene.index.IndexReader indexReader5 = null; org.apache.lucene.index.Fields fields6 = null; org.apache.lucene.index.Fields fields7 = null; simpleIndexQueryParserTests0.assertFieldsEquals("<unknown>", indexReader5, fields6, fields7, false); org.apache.lucene.index.PostingsEnum postingsEnum11 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.monster", postingsEnum11, postingsEnum12, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testConstantScoreQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/constantScore-query.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05176() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05176"); // The following exception was thrown during execution in test generation try { java.lang.String str1 = org.elasticsearch.test.ElasticsearchTestCase.randomUnicodeOfLength(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 test05177() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05177"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests9 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str10 = simpleIndexQueryParserTests9.getTestName(); simpleIndexQueryParserTests9.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests9.ensureCleanedUp(); java.lang.String str13 = simpleIndexQueryParserTests9.getTestName(); org.apache.lucene.index.IndexReader indexReader15 = null; org.apache.lucene.index.Fields fields16 = null; org.apache.lucene.index.Fields fields17 = null; simpleIndexQueryParserTests9.assertFieldsEquals("europarl.lines.txt.gz", indexReader15, fields16, fields17, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests20 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests20.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum24 = null; org.apache.lucene.index.PostingsEnum postingsEnum25 = null; simpleIndexQueryParserTests20.assertDocsEnumEquals("", postingsEnum24, postingsEnum25, true); simpleIndexQueryParserTests20.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain29 = simpleIndexQueryParserTests20.failureAndSuccessEvents; simpleIndexQueryParserTests9.failureAndSuccessEvents = ruleChain29; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain29; org.apache.lucene.index.IndexReader indexReader33 = null; org.apache.lucene.index.Fields fields34 = null; org.apache.lucene.index.Fields fields35 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.weekly", indexReader33, fields34, fields35, false); simpleIndexQueryParserTests0.setUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSpanOrQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/spanOr.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str10 + "' != '" + "<unknown>" + "'", str10, "<unknown>"); org.junit.Assert.assertEquals("'" + str13 + "' != '" + "<unknown>" + "'", str13, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain29); } @Test public void test05178() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05178"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.junit.rules.RuleChain ruleChain7 = simpleIndexQueryParserTests0.failureAndSuccessEvents; simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("europarl.lines.txt.gz", indexReader10, (int) (short) 1, postingsEnum12, postingsEnum13, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSpanMultiTermNumericRangeQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/span-multi-term-range-numeric.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertNull(ruleChain7); } @Test public void test05179() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05179"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum4 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("<unknown>", postingsEnum4, postingsEnum5, false); org.apache.lucene.index.IndexReader indexReader9 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.monster", indexReader9, (int) (byte) 1, postingsEnum11, postingsEnum12); simpleIndexQueryParserTests0.ensureCleanedUp(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); java.lang.String[] strArray21 = new java.lang.String[] { "", "tests.failfast", "node_s_0", "random" }; java.util.List<java.lang.Comparable<java.lang.String>> strComparableList22 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, (java.lang.Comparable<java.lang.String>[]) strArray21); // The following exception was thrown during execution in test generation try { org.elasticsearch.action.admin.cluster.health.ClusterHealthStatus clusterHealthStatus23 = simpleIndexQueryParserTests0.ensureGreen(strArray21); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertNotNull(strArray21); org.junit.Assert.assertNotNull(strComparableList22); } @Test public void test05180() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05180"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader2 = null; org.apache.lucene.index.PostingsEnum postingsEnum4 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.awaitsfix", indexReader2, (int) (short) 0, postingsEnum4, postingsEnum5, true); org.apache.lucene.index.IndexReader indexReader9 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("europarl.lines.txt.gz", indexReader9, (int) (byte) -1, postingsEnum11, postingsEnum12, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSpanOrQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/spanOr.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } } @Test public void test05181() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05181"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.apache.lucene.index.PostingsEnum postingsEnum5 = null; org.apache.lucene.index.PostingsEnum postingsEnum6 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("hi!", postingsEnum5, postingsEnum6, false); org.junit.rules.TestRule testRule9 = simpleIndexQueryParserTests0.ruleChain; org.apache.lucene.index.IndexReader indexReader11 = null; org.apache.lucene.index.Terms terms12 = null; org.apache.lucene.index.Terms terms13 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.failfast", indexReader11, terms12, terms13, false); org.apache.lucene.index.IndexReader indexReader17 = null; org.apache.lucene.index.Fields fields18 = null; org.apache.lucene.index.Fields fields19 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.failfast", indexReader17, fields18, fields19, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoBoundingBoxFilter5(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_boundingbox5.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertNotNull(testRule9); } @Test public void test05182() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05182"); java.util.Locale locale4 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray5 = new java.lang.Cloneable[] { locale4 }; java.util.List<java.lang.Cloneable> cloneableList6 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray5); java.lang.Object obj7 = null; org.junit.Assert.assertNotSame((java.lang.Object) cloneableList6, obj7); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests9 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader11 = null; org.apache.lucene.index.Fields fields12 = null; org.apache.lucene.index.Fields fields13 = null; simpleIndexQueryParserTests9.assertFieldsEquals("tests.maxfailures", indexReader11, fields12, fields13, false); org.junit.Assert.assertNotSame("tests.slow", obj7, (java.lang.Object) simpleIndexQueryParserTests9); simpleIndexQueryParserTests9.resetCheckIndexStatus(); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests18 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader20 = null; org.apache.lucene.index.Fields fields21 = null; org.apache.lucene.index.Fields fields22 = null; simpleIndexQueryParserTests18.assertFieldsEquals("tests.maxfailures", indexReader20, fields21, fields22, false); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests25 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str26 = simpleIndexQueryParserTests25.getTestName(); simpleIndexQueryParserTests25.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests25.ensureCleanedUp(); java.lang.String str29 = simpleIndexQueryParserTests25.getTestName(); org.apache.lucene.index.IndexReader indexReader31 = null; org.apache.lucene.index.Fields fields32 = null; org.apache.lucene.index.Fields fields33 = null; simpleIndexQueryParserTests25.assertFieldsEquals("europarl.lines.txt.gz", indexReader31, fields32, fields33, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests36 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests36.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum40 = null; org.apache.lucene.index.PostingsEnum postingsEnum41 = null; simpleIndexQueryParserTests36.assertDocsEnumEquals("", postingsEnum40, postingsEnum41, true); simpleIndexQueryParserTests36.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain45 = simpleIndexQueryParserTests36.failureAndSuccessEvents; simpleIndexQueryParserTests25.failureAndSuccessEvents = ruleChain45; java.lang.Object obj47 = null; org.junit.Assert.assertNotSame((java.lang.Object) ruleChain45, obj47); simpleIndexQueryParserTests18.failureAndSuccessEvents = ruleChain45; org.apache.lucene.util.LuceneTestCase.classRules = ruleChain45; org.junit.Assert.assertNotSame("random", (java.lang.Object) simpleIndexQueryParserTests9, (java.lang.Object) ruleChain45); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests52 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str53 = simpleIndexQueryParserTests52.getTestName(); simpleIndexQueryParserTests52.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests52.ensureCleanedUp(); java.lang.String str56 = simpleIndexQueryParserTests52.getTestName(); simpleIndexQueryParserTests52.setIndexWriterMaxDocs((int) (byte) 1); org.apache.lucene.index.IndexReader indexReader60 = null; org.apache.lucene.index.PostingsEnum postingsEnum62 = null; org.apache.lucene.index.PostingsEnum postingsEnum63 = null; simpleIndexQueryParserTests52.assertPositionsSkippingEquals("<unknown>", indexReader60, (int) '4', postingsEnum62, postingsEnum63); simpleIndexQueryParserTests52.ensureCleanedUp(); org.apache.lucene.index.IndexReader indexReader67 = null; org.apache.lucene.index.PostingsEnum postingsEnum69 = null; org.apache.lucene.index.PostingsEnum postingsEnum70 = null; simpleIndexQueryParserTests52.assertPositionsSkippingEquals("tests.badapples", indexReader67, 1, postingsEnum69, postingsEnum70); simpleIndexQueryParserTests52.setIndexWriterMaxDocs((int) (byte) 100); org.junit.Assert.assertNotSame((java.lang.Object) ruleChain45, (java.lang.Object) simpleIndexQueryParserTests52); java.lang.String str75 = simpleIndexQueryParserTests52.getTestName(); java.lang.String str76 = simpleIndexQueryParserTests52.getTestName(); // The following exception was thrown during execution in test generation try { // flaky: simpleIndexQueryParserTests52.testTermsFilterWithMultipleFields(); // flaky: org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale4); org.junit.Assert.assertEquals(locale4.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray5); org.junit.Assert.assertNotNull(cloneableList6); org.junit.Assert.assertEquals("'" + str26 + "' != '" + "<unknown>" + "'", str26, "<unknown>"); org.junit.Assert.assertEquals("'" + str29 + "' != '" + "<unknown>" + "'", str29, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain45); org.junit.Assert.assertEquals("'" + str53 + "' != '" + "<unknown>" + "'", str53, "<unknown>"); org.junit.Assert.assertEquals("'" + str56 + "' != '" + "<unknown>" + "'", str56, "<unknown>"); org.junit.Assert.assertEquals("'" + str75 + "' != '" + "<unknown>" + "'", str75, "<unknown>"); org.junit.Assert.assertEquals("'" + str76 + "' != '" + "<unknown>" + "'", str76, "<unknown>"); } @Test public void test05183() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05183"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests2 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str3 = simpleIndexQueryParserTests2.getTestName(); simpleIndexQueryParserTests2.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests2.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain6 = null; simpleIndexQueryParserTests2.failureAndSuccessEvents = ruleChain6; org.apache.lucene.index.IndexReader indexReader9 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; simpleIndexQueryParserTests2.assertDocsSkippingEquals("tests.nightly", indexReader9, 100, postingsEnum11, postingsEnum12, false); simpleIndexQueryParserTests2.resetCheckIndexStatus(); simpleIndexQueryParserTests2.resetCheckIndexStatus(); org.junit.Assert.assertNotSame("tests.maxfailures", (java.lang.Object) 1L, (java.lang.Object) simpleIndexQueryParserTests2); simpleIndexQueryParserTests2.overrideTestDefaultQueryCache(); org.apache.lucene.index.IndexReader indexReader20 = null; org.apache.lucene.index.PostingsEnum postingsEnum22 = null; org.apache.lucene.index.PostingsEnum postingsEnum23 = null; simpleIndexQueryParserTests2.assertDocsSkippingEquals("tests.monster", indexReader20, (int) (short) 0, postingsEnum22, postingsEnum23, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests2.testFilteredQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/filtered-query.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str3 + "' != '" + "<unknown>" + "'", str3, "<unknown>"); } @Test public void test05184() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05184"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); org.apache.lucene.index.IndexReader indexReader11 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; org.apache.lucene.index.PostingsEnum postingsEnum14 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.nightly", indexReader11, (int) '#', postingsEnum13, postingsEnum14); org.apache.lucene.index.IndexReader indexReader17 = null; org.apache.lucene.index.Terms terms18 = null; org.apache.lucene.index.Terms terms19 = null; simpleIndexQueryParserTests0.assertTermsEquals("enwiki.random.lines.txt", indexReader17, terms18, terms19, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testBadTypeMultiMatchQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/multiMatch-query-bad-type.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05185() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05185"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum4 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("", postingsEnum4, postingsEnum5, true); org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("", postingsEnum9, postingsEnum10, false); org.junit.rules.TestRule testRule13 = simpleIndexQueryParserTests0.ruleChain; simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testAndFilteredQuery2(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/and-filter2.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertNotNull(testRule13); } @Test public void test05186() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05186"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); java.lang.String str5 = simpleIndexQueryParserTests1.getTestName(); org.junit.Assert.assertNotNull("tests.slow", (java.lang.Object) simpleIndexQueryParserTests1); // The following exception was thrown during execution in test generation try { java.nio.file.Path path8 = simpleIndexQueryParserTests1.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.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); org.junit.Assert.assertEquals("'" + str5 + "' != '" + "<unknown>" + "'", str5, "<unknown>"); } @Test public void test05187() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05187"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); simpleIndexQueryParserTests0.ensureCleanedUp(); simpleIndexQueryParserTests0.ensureCleanedUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testFilterParsing(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/function-filter-score-query.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05188() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05188"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.PostingsEnum postingsEnum6 = null; org.apache.lucene.index.PostingsEnum postingsEnum7 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.slow", indexReader4, 0, postingsEnum6, postingsEnum7, true); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.ensureCleanedUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoDistanceFilter4(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_distance4.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05189() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05189"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setUp(); java.lang.String str8 = simpleIndexQueryParserTests0.getTestName(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.badapples", indexReader10, (-1), postingsEnum12, postingsEnum13); java.lang.String str15 = simpleIndexQueryParserTests0.getTestName(); org.junit.rules.RuleChain ruleChain16 = simpleIndexQueryParserTests0.failureAndSuccessEvents; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSpanNotQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/spanNot.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertEquals("'" + str8 + "' != '" + "<unknown>" + "'", str8, "<unknown>"); org.junit.Assert.assertEquals("'" + str15 + "' != '" + "<unknown>" + "'", str15, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain16); } @Test public void test05190() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05190"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.apache.lucene.index.PostingsEnum postingsEnum5 = null; org.apache.lucene.index.PostingsEnum postingsEnum6 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("hi!", postingsEnum5, postingsEnum6, false); org.junit.rules.TestRule testRule9 = simpleIndexQueryParserTests0.ruleChain; org.elasticsearch.common.unit.TimeValue timeValue10 = null; java.lang.String[] strArray16 = new java.lang.String[] { "", "tests.failfast", "node_s_0", "random" }; java.util.List<java.lang.Comparable<java.lang.String>> strComparableList17 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, (java.lang.Comparable<java.lang.String>[]) strArray16); // The following exception was thrown during execution in test generation try { org.elasticsearch.action.admin.cluster.health.ClusterHealthStatus clusterHealthStatus18 = simpleIndexQueryParserTests0.ensureGreen(timeValue10, strArray16); 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.assertNotNull(testRule9); org.junit.Assert.assertNotNull(strArray16); org.junit.Assert.assertNotNull(strComparableList17); } @Test public void test05191() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05191"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); org.junit.rules.TestRule testRule2 = simpleIndexQueryParserTests0.ruleChain; org.apache.lucene.index.PostingsEnum postingsEnum4 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.maxfailures", postingsEnum4, postingsEnum5, false); 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 { simpleIndexQueryParserTests0.assertDeletedDocsEquals("", 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.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertNotNull(testRule2); } @Test public void test05192() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05192"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader2 = null; org.apache.lucene.index.Fields fields3 = null; org.apache.lucene.index.Fields fields4 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.maxfailures", indexReader2, fields3, fields4, false); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests7 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str8 = simpleIndexQueryParserTests7.getTestName(); simpleIndexQueryParserTests7.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests7.ensureCleanedUp(); java.lang.String str11 = simpleIndexQueryParserTests7.getTestName(); org.apache.lucene.index.IndexReader indexReader13 = null; org.apache.lucene.index.Fields fields14 = null; org.apache.lucene.index.Fields fields15 = null; simpleIndexQueryParserTests7.assertFieldsEquals("europarl.lines.txt.gz", indexReader13, fields14, fields15, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests18 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests18.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum22 = null; org.apache.lucene.index.PostingsEnum postingsEnum23 = null; simpleIndexQueryParserTests18.assertDocsEnumEquals("", postingsEnum22, postingsEnum23, true); simpleIndexQueryParserTests18.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain27 = simpleIndexQueryParserTests18.failureAndSuccessEvents; simpleIndexQueryParserTests7.failureAndSuccessEvents = ruleChain27; java.lang.Object obj29 = null; org.junit.Assert.assertNotSame((java.lang.Object) ruleChain27, obj29); simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain27; org.apache.lucene.index.PostingsEnum postingsEnum33 = null; org.apache.lucene.index.PostingsEnum postingsEnum34 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.badapples", postingsEnum33, postingsEnum34, true); simpleIndexQueryParserTests0.setUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoDistanceFilter4(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_distance4.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str8 + "' != '" + "<unknown>" + "'", str8, "<unknown>"); org.junit.Assert.assertEquals("'" + str11 + "' != '" + "<unknown>" + "'", str11, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain27); } @Test public void test05193() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05193"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); java.lang.String str5 = simpleIndexQueryParserTests1.getTestName(); org.junit.Assert.assertNotNull("tests.slow", (java.lang.Object) simpleIndexQueryParserTests1); org.junit.rules.TestRule testRule7 = simpleIndexQueryParserTests1.ruleChain; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testRegexpWithFlagsFilteredQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/regexp-filter-flags.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); org.junit.Assert.assertEquals("'" + str5 + "' != '" + "<unknown>" + "'", str5, "<unknown>"); org.junit.Assert.assertNotNull(testRule7); } @Test public void test05194() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05194"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum4 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("<unknown>", postingsEnum4, postingsEnum5, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testConstantScoreQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/constantScore-query.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } } @Test public void test05195() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05195"); java.lang.CharSequence[] charSequenceArray7 = new java.lang.CharSequence[] { "tests.maxfailures", "hi!", "tests.weekly", "tests.badapples", "", "tests.slow" }; java.util.List<java.lang.CharSequence> charSequenceList8 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (short) 1, charSequenceArray7); // The following exception was thrown during execution in test generation try { java.lang.Object obj9 = org.elasticsearch.test.ElasticsearchTestCase.randomFrom((java.lang.Object[]) charSequenceArray7); 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.assertNotNull(charSequenceList8); } @Test public void test05196() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05196"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); org.junit.rules.TestRule testRule2 = simpleIndexQueryParserTests0.ruleChain; org.apache.lucene.index.PostingsEnum postingsEnum4 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.maxfailures", postingsEnum4, postingsEnum5, false); org.junit.rules.TestRule testRule8 = simpleIndexQueryParserTests0.ruleChain; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testRegexpQueryWithMaxDeterminizedStates(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/regexp-max-determinized-states.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertNotNull(testRule2); org.junit.Assert.assertNotNull(testRule8); } @Test public void test05197() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05197"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests1); org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests1.assertPositionsSkippingEquals("tests.maxfailures", indexReader7, (-1), postingsEnum9, postingsEnum10); simpleIndexQueryParserTests1.resetCheckIndexStatus(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.restoreIndexWriterMaxDocs(); org.apache.lucene.index.IndexReader indexReader16 = null; org.apache.lucene.index.Fields fields17 = null; org.apache.lucene.index.Fields fields18 = null; simpleIndexQueryParserTests1.assertFieldsEquals("random", indexReader16, fields17, fields18, true); // The following exception was thrown during execution in test generation try { // flaky: simpleIndexQueryParserTests1.testTermsFilterWithMultipleFields(); // flaky: org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); } @Test public void test05198() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05198"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain5 = null; simpleIndexQueryParserTests1.failureAndSuccessEvents = ruleChain5; org.apache.lucene.index.IndexReader indexReader8 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; simpleIndexQueryParserTests1.assertDocsSkippingEquals("tests.nightly", indexReader8, 100, postingsEnum10, postingsEnum11, false); simpleIndexQueryParserTests1.resetCheckIndexStatus(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests1); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testQueryStringRegexp(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/query-regexp-max-determinized-states.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); } @Test public void test05199() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05199"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); org.junit.rules.RuleChain ruleChain2 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain2; org.apache.lucene.index.IndexReader indexReader5 = null; org.apache.lucene.index.Fields fields6 = null; org.apache.lucene.index.Fields fields7 = null; simpleIndexQueryParserTests0.assertFieldsEquals("<unknown>", indexReader5, fields6, fields7, false); java.lang.String str10 = simpleIndexQueryParserTests0.getTestName(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testCustomBoostFactorQueryBuilder_withFunctionScore(); 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.assertEquals("'" + str10 + "' != '" + "<unknown>" + "'", str10, "<unknown>"); } @Test public void test05200() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05200"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; org.junit.rules.RuleChain ruleChain6 = simpleIndexQueryParserTests0.failureAndSuccessEvents; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testRegexpQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/regexp.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertNull(ruleChain6); } @Test public void test05201() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05201"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.nightly", indexReader7, 100, postingsEnum9, postingsEnum10, false); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testTermWithBoostQueryBuilder(); 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 test05202() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05202"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests1); org.junit.rules.RuleChain ruleChain6 = simpleIndexQueryParserTests1.failureAndSuccessEvents; simpleIndexQueryParserTests1.resetCheckIndexStatus(); simpleIndexQueryParserTests1.restoreIndexWriterMaxDocs(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testRegexpQueryWithMaxDeterminizedStates(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/regexp-max-determinized-states.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain6); } @Test public void test05203() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05203"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); org.apache.lucene.index.IndexReader indexReader11 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; org.apache.lucene.index.PostingsEnum postingsEnum14 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.nightly", indexReader11, (int) '#', postingsEnum13, postingsEnum14); org.apache.lucene.index.IndexReader indexReader17 = null; org.apache.lucene.index.Terms terms18 = null; org.apache.lucene.index.Terms terms19 = null; simpleIndexQueryParserTests0.assertTermsEquals("enwiki.random.lines.txt", indexReader17, terms18, terms19, false); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); // The following exception was thrown during execution in test generation try { // flaky: simpleIndexQueryParserTests0.testWeight1fStillProducesWeighFunction(); // flaky: 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 test05204() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05204"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.nightly", indexReader10, (int) (byte) 10, postingsEnum12, postingsEnum13, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSimpleQueryString(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/simple-query-string.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05205() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05205"); java.util.Locale locale2 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray3 = new java.lang.Cloneable[] { locale2 }; java.util.List<java.lang.Cloneable> cloneableList4 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray3); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests5 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests5.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain7 = simpleIndexQueryParserTests5.failureAndSuccessEvents; org.junit.Assert.assertNotSame((java.lang.Object) cloneableArray3, (java.lang.Object) simpleIndexQueryParserTests5); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Terms terms11 = null; org.apache.lucene.index.Terms terms12 = null; simpleIndexQueryParserTests5.assertTermsEquals("", indexReader10, terms11, terms12, true); simpleIndexQueryParserTests5.setUp(); org.junit.rules.TestRule testRule16 = simpleIndexQueryParserTests5.ruleChain; org.junit.rules.TestRule testRule17 = simpleIndexQueryParserTests5.ruleChain; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests5.testFilteredQuery4(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/filtered-query4.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale2); org.junit.Assert.assertEquals(locale2.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray3); org.junit.Assert.assertNotNull(cloneableList4); org.junit.Assert.assertNotNull(ruleChain7); org.junit.Assert.assertNotNull(testRule16); org.junit.Assert.assertNotNull(testRule17); } @Test public void test05206() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05206"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests1); org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests1.assertPositionsSkippingEquals("tests.maxfailures", indexReader7, (-1), postingsEnum9, postingsEnum10); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testMoreLikeThis(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/mlt.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); } @Test public void test05207() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05207"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.apache.lucene.index.PostingsEnum postingsEnum5 = null; org.apache.lucene.index.PostingsEnum postingsEnum6 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("hi!", postingsEnum5, postingsEnum6, false); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); 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 { simpleIndexQueryParserTests0.assertReaderStatisticsEquals("tests.badapples", 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.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05208() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05208"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.PostingsEnum postingsEnum6 = null; org.apache.lucene.index.PostingsEnum postingsEnum7 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.maxfailures", indexReader4, (int) (short) 100, postingsEnum6, postingsEnum7); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs(0); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testAndFilteredQuery2(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/and-filter2.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05209() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05209"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.overrideTestDefaultQueryCache(); org.junit.rules.TestRule testRule2 = simpleIndexQueryParserTests0.ruleChain; simpleIndexQueryParserTests0.ensureCheckIndexPassed(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs(1); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testRegexpQueryWithMaxDeterminizedStates(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/regexp-max-determinized-states.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertNotNull(testRule2); } @Test public void test05210() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05210"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests1); org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.Terms terms8 = null; org.apache.lucene.index.Terms terms9 = null; simpleIndexQueryParserTests1.assertTermsEquals("tests.slow", indexReader7, terms8, terms9, true); org.apache.lucene.index.IndexReader indexReader13 = null; org.apache.lucene.index.PostingsEnum postingsEnum15 = null; org.apache.lucene.index.PostingsEnum postingsEnum16 = null; simpleIndexQueryParserTests1.assertDocsSkippingEquals("tests.monster", indexReader13, 0, postingsEnum15, postingsEnum16, false); simpleIndexQueryParserTests1.ensureCleanedUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testGeoDistanceFilter7(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_distance7.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); } @Test public void test05211() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05211"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests6 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str7 = simpleIndexQueryParserTests6.getTestName(); simpleIndexQueryParserTests6.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests6.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests6); org.junit.rules.RuleChain ruleChain11 = simpleIndexQueryParserTests6.failureAndSuccessEvents; org.apache.lucene.util.LuceneTestCase.classRules = ruleChain11; org.junit.Assert.assertNotSame((java.lang.Object) simpleIndexQueryParserTests0, (java.lang.Object) ruleChain11); org.junit.rules.TestRule testRule14 = simpleIndexQueryParserTests0.ruleChain; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoShapeFilter(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geoShape-filter.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str7 + "' != '" + "<unknown>" + "'", str7, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain11); org.junit.Assert.assertNotNull(testRule14); } @Test public void test05212() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05212"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); org.apache.lucene.index.IndexReader indexReader11 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; org.apache.lucene.index.PostingsEnum postingsEnum14 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.nightly", indexReader11, (int) '#', postingsEnum13, postingsEnum14); org.apache.lucene.index.IndexReader indexReader17 = null; org.apache.lucene.index.Terms terms18 = null; org.apache.lucene.index.Terms terms19 = null; simpleIndexQueryParserTests0.assertTermsEquals("enwiki.random.lines.txt", indexReader17, terms18, terms19, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testPrefixBoostQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/prefix-boost.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05213() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05213"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.nightly", indexReader7, 100, postingsEnum9, postingsEnum10, false); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader15 = null; org.apache.lucene.index.Terms terms16 = null; org.apache.lucene.index.Terms terms17 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.awaitsfix", indexReader15, terms16, terms17, false); org.apache.lucene.index.PostingsEnum postingsEnum21 = null; org.apache.lucene.index.PostingsEnum postingsEnum22 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("node_s_0", postingsEnum21, postingsEnum22, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.setup(); 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 test05214() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05214"); java.util.Locale locale3 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray4 = new java.lang.Cloneable[] { locale3 }; java.util.List<java.lang.Cloneable> cloneableList5 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray4); java.util.Locale locale8 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray9 = new java.lang.Cloneable[] { locale8 }; java.util.List<java.lang.Cloneable> cloneableList10 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray9); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests11 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests11.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain13 = simpleIndexQueryParserTests11.failureAndSuccessEvents; org.junit.Assert.assertNotSame((java.lang.Object) cloneableArray9, (java.lang.Object) simpleIndexQueryParserTests11); java.util.Locale locale17 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray18 = new java.lang.Cloneable[] { locale17 }; java.util.List<java.lang.Cloneable> cloneableList19 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray18); java.util.Locale locale22 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray23 = new java.lang.Cloneable[] { locale22 }; java.util.List<java.lang.Cloneable> cloneableList24 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray23); org.junit.Assert.assertArrayEquals((java.lang.Object[]) cloneableArray18, (java.lang.Object[]) cloneableArray23); java.util.Locale locale29 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray30 = new java.lang.Cloneable[] { locale29 }; java.util.List<java.lang.Cloneable> cloneableList31 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray30); java.util.Locale locale34 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray35 = new java.lang.Cloneable[] { locale34 }; java.util.List<java.lang.Cloneable> cloneableList36 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray35); org.junit.Assert.assertArrayEquals((java.lang.Object[]) cloneableArray30, (java.lang.Object[]) cloneableArray35); java.util.Locale locale40 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray41 = new java.lang.Cloneable[] { locale40 }; java.util.List<java.lang.Cloneable> cloneableList42 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray41); java.util.Locale locale45 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray46 = new java.lang.Cloneable[] { locale45 }; java.util.List<java.lang.Cloneable> cloneableList47 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray46); org.junit.Assert.assertArrayEquals((java.lang.Object[]) cloneableArray41, (java.lang.Object[]) cloneableArray46); org.junit.Assert.assertEquals("tests.slow", (java.lang.Object[]) cloneableArray30, (java.lang.Object[]) cloneableArray46); org.junit.Assert.assertEquals((java.lang.Object[]) cloneableArray23, (java.lang.Object[]) cloneableArray46); java.util.Locale locale53 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray54 = new java.lang.Cloneable[] { locale53 }; java.util.List<java.lang.Cloneable> cloneableList55 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray54); java.util.Locale locale58 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray59 = new java.lang.Cloneable[] { locale58 }; java.util.List<java.lang.Cloneable> cloneableList60 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray59); org.junit.Assert.assertArrayEquals((java.lang.Object[]) cloneableArray54, (java.lang.Object[]) cloneableArray59); java.util.Locale locale65 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray66 = new java.lang.Cloneable[] { locale65 }; java.util.List<java.lang.Cloneable> cloneableList67 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray66); java.util.Locale locale70 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray71 = new java.lang.Cloneable[] { locale70 }; java.util.List<java.lang.Cloneable> cloneableList72 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray71); org.junit.Assert.assertArrayEquals((java.lang.Object[]) cloneableArray66, (java.lang.Object[]) cloneableArray71); java.util.Locale locale76 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray77 = new java.lang.Cloneable[] { locale76 }; java.util.List<java.lang.Cloneable> cloneableList78 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray77); java.util.Locale locale81 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray82 = new java.lang.Cloneable[] { locale81 }; java.util.List<java.lang.Cloneable> cloneableList83 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray82); org.junit.Assert.assertArrayEquals((java.lang.Object[]) cloneableArray77, (java.lang.Object[]) cloneableArray82); org.junit.Assert.assertEquals("tests.slow", (java.lang.Object[]) cloneableArray66, (java.lang.Object[]) cloneableArray82); org.junit.Assert.assertEquals((java.lang.Object[]) cloneableArray59, (java.lang.Object[]) cloneableArray82); org.junit.Assert.assertArrayEquals((java.lang.Object[]) cloneableArray23, (java.lang.Object[]) cloneableArray59); org.junit.Assert.assertEquals((java.lang.Object[]) cloneableArray9, (java.lang.Object[]) cloneableArray59); org.junit.Assert.assertArrayEquals((java.lang.Object[]) cloneableArray4, (java.lang.Object[]) cloneableArray9); java.io.PrintStream printStream90 = null; // The following exception was thrown during execution in test generation try { org.apache.lucene.util.LuceneTestCase.dumpArray("tests.monster", (java.lang.Object[]) cloneableArray4, printStream90); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale3); org.junit.Assert.assertEquals(locale3.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray4); org.junit.Assert.assertNotNull(cloneableList5); org.junit.Assert.assertNotNull(locale8); org.junit.Assert.assertEquals(locale8.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray9); org.junit.Assert.assertNotNull(cloneableList10); org.junit.Assert.assertNotNull(ruleChain13); org.junit.Assert.assertNotNull(locale17); org.junit.Assert.assertEquals(locale17.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray18); org.junit.Assert.assertNotNull(cloneableList19); org.junit.Assert.assertNotNull(locale22); org.junit.Assert.assertEquals(locale22.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray23); org.junit.Assert.assertNotNull(cloneableList24); org.junit.Assert.assertNotNull(locale29); org.junit.Assert.assertEquals(locale29.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray30); org.junit.Assert.assertNotNull(cloneableList31); org.junit.Assert.assertNotNull(locale34); org.junit.Assert.assertEquals(locale34.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray35); org.junit.Assert.assertNotNull(cloneableList36); org.junit.Assert.assertNotNull(locale40); org.junit.Assert.assertEquals(locale40.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray41); org.junit.Assert.assertNotNull(cloneableList42); org.junit.Assert.assertNotNull(locale45); org.junit.Assert.assertEquals(locale45.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray46); org.junit.Assert.assertNotNull(cloneableList47); org.junit.Assert.assertNotNull(locale53); org.junit.Assert.assertEquals(locale53.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray54); org.junit.Assert.assertNotNull(cloneableList55); org.junit.Assert.assertNotNull(locale58); org.junit.Assert.assertEquals(locale58.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray59); org.junit.Assert.assertNotNull(cloneableList60); org.junit.Assert.assertNotNull(locale65); org.junit.Assert.assertEquals(locale65.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray66); org.junit.Assert.assertNotNull(cloneableList67); org.junit.Assert.assertNotNull(locale70); org.junit.Assert.assertEquals(locale70.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray71); org.junit.Assert.assertNotNull(cloneableList72); org.junit.Assert.assertNotNull(locale76); org.junit.Assert.assertEquals(locale76.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray77); org.junit.Assert.assertNotNull(cloneableList78); org.junit.Assert.assertNotNull(locale81); org.junit.Assert.assertEquals(locale81.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray82); org.junit.Assert.assertNotNull(cloneableList83); } @Test public void test05215() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05215"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); simpleIndexQueryParserTests0.ensureCleanedUp(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests6 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str7 = simpleIndexQueryParserTests6.getTestName(); simpleIndexQueryParserTests6.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests6.ensureCleanedUp(); java.lang.String str10 = simpleIndexQueryParserTests6.getTestName(); simpleIndexQueryParserTests6.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests6.setUp(); java.lang.String str14 = simpleIndexQueryParserTests6.getTestName(); org.apache.lucene.index.IndexReader indexReader16 = null; org.apache.lucene.index.PostingsEnum postingsEnum18 = null; org.apache.lucene.index.PostingsEnum postingsEnum19 = null; simpleIndexQueryParserTests6.assertPositionsSkippingEquals("tests.badapples", indexReader16, (-1), postingsEnum18, postingsEnum19); org.apache.lucene.index.PostingsEnum postingsEnum22 = null; org.apache.lucene.index.PostingsEnum postingsEnum23 = null; simpleIndexQueryParserTests6.assertDocsEnumEquals("tests.failfast", postingsEnum22, postingsEnum23, true); org.junit.Assert.assertNotSame((java.lang.Object) simpleIndexQueryParserTests0, (java.lang.Object) "tests.failfast"); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testOrFilteredQueryBuilder(); 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.assertEquals("'" + str7 + "' != '" + "<unknown>" + "'", str7, "<unknown>"); org.junit.Assert.assertEquals("'" + str10 + "' != '" + "<unknown>" + "'", str10, "<unknown>"); org.junit.Assert.assertEquals("'" + str14 + "' != '" + "<unknown>" + "'", str14, "<unknown>"); } @Test public void test05216() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05216"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.nightly", indexReader7, 100, postingsEnum9, postingsEnum10, false); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader15 = null; org.apache.lucene.index.Terms terms16 = null; org.apache.lucene.index.Terms terms17 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.awaitsfix", indexReader15, terms16, terms17, false); org.apache.lucene.index.PostingsEnum postingsEnum21 = null; org.apache.lucene.index.PostingsEnum postingsEnum22 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("node_s_0", postingsEnum21, postingsEnum22, true); // The following exception was thrown during execution in test generation try { java.lang.String[] strArray25 = simpleIndexQueryParserTests0.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>"); } @Test public void test05217() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05217"); 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 test05218() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05218"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests1); org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests1.assertPositionsSkippingEquals("tests.maxfailures", indexReader7, (-1), postingsEnum9, postingsEnum10); simpleIndexQueryParserTests1.resetCheckIndexStatus(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testWildcardQueryBuilder(); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); } @Test public void test05219() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05219"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum4 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("", postingsEnum4, postingsEnum5, true); simpleIndexQueryParserTests0.resetCheckIndexStatus(); java.lang.String str9 = simpleIndexQueryParserTests0.getTestName(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testBadTypeMultiMatchQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/multiMatch-query-bad-type.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str9 + "' != '" + "<unknown>" + "'", str9, "<unknown>"); } @Test public void test05220() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05220"); java.util.Locale locale3 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray4 = new java.lang.Cloneable[] { locale3 }; java.util.List<java.lang.Cloneable> cloneableList5 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray4); java.lang.Object obj6 = null; org.junit.Assert.assertNotSame((java.lang.Object) cloneableList5, obj6); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests8 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Fields fields11 = null; org.apache.lucene.index.Fields fields12 = null; simpleIndexQueryParserTests8.assertFieldsEquals("tests.maxfailures", indexReader10, fields11, fields12, false); org.junit.Assert.assertNotSame("tests.slow", obj6, (java.lang.Object) simpleIndexQueryParserTests8); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests8.testGeoPolygonFilter1(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_polygon1.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale3); org.junit.Assert.assertEquals(locale3.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray4); org.junit.Assert.assertNotNull(cloneableList5); } @Test public void test05221() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05221"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.overrideTestDefaultQueryCache(); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSpanMultiTermTermRangeQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/span-multi-term-range-term.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05222() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05222"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader2 = null; org.apache.lucene.index.Fields fields3 = null; org.apache.lucene.index.Fields fields4 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.maxfailures", indexReader2, fields3, fields4, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoBoundingBoxFilter3(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_boundingbox3.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } } @Test public void test05223() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05223"); java.util.Locale locale4 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray5 = new java.lang.Cloneable[] { locale4 }; java.util.List<java.lang.Cloneable> cloneableList6 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray5); java.lang.Object obj7 = null; org.junit.Assert.assertNotSame((java.lang.Object) cloneableList6, obj7); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests9 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader11 = null; org.apache.lucene.index.Fields fields12 = null; org.apache.lucene.index.Fields fields13 = null; simpleIndexQueryParserTests9.assertFieldsEquals("tests.maxfailures", indexReader11, fields12, fields13, false); org.junit.Assert.assertNotSame("tests.slow", obj7, (java.lang.Object) simpleIndexQueryParserTests9); simpleIndexQueryParserTests9.resetCheckIndexStatus(); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests18 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader20 = null; org.apache.lucene.index.Fields fields21 = null; org.apache.lucene.index.Fields fields22 = null; simpleIndexQueryParserTests18.assertFieldsEquals("tests.maxfailures", indexReader20, fields21, fields22, false); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests25 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str26 = simpleIndexQueryParserTests25.getTestName(); simpleIndexQueryParserTests25.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests25.ensureCleanedUp(); java.lang.String str29 = simpleIndexQueryParserTests25.getTestName(); org.apache.lucene.index.IndexReader indexReader31 = null; org.apache.lucene.index.Fields fields32 = null; org.apache.lucene.index.Fields fields33 = null; simpleIndexQueryParserTests25.assertFieldsEquals("europarl.lines.txt.gz", indexReader31, fields32, fields33, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests36 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests36.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum40 = null; org.apache.lucene.index.PostingsEnum postingsEnum41 = null; simpleIndexQueryParserTests36.assertDocsEnumEquals("", postingsEnum40, postingsEnum41, true); simpleIndexQueryParserTests36.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain45 = simpleIndexQueryParserTests36.failureAndSuccessEvents; simpleIndexQueryParserTests25.failureAndSuccessEvents = ruleChain45; java.lang.Object obj47 = null; org.junit.Assert.assertNotSame((java.lang.Object) ruleChain45, obj47); simpleIndexQueryParserTests18.failureAndSuccessEvents = ruleChain45; org.apache.lucene.util.LuceneTestCase.classRules = ruleChain45; org.junit.Assert.assertNotSame("random", (java.lang.Object) simpleIndexQueryParserTests9, (java.lang.Object) ruleChain45); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests52 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str53 = simpleIndexQueryParserTests52.getTestName(); simpleIndexQueryParserTests52.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests52.ensureCleanedUp(); java.lang.String str56 = simpleIndexQueryParserTests52.getTestName(); simpleIndexQueryParserTests52.setIndexWriterMaxDocs((int) (byte) 1); org.apache.lucene.index.IndexReader indexReader60 = null; org.apache.lucene.index.PostingsEnum postingsEnum62 = null; org.apache.lucene.index.PostingsEnum postingsEnum63 = null; simpleIndexQueryParserTests52.assertPositionsSkippingEquals("<unknown>", indexReader60, (int) '4', postingsEnum62, postingsEnum63); simpleIndexQueryParserTests52.ensureCleanedUp(); org.apache.lucene.index.IndexReader indexReader67 = null; org.apache.lucene.index.PostingsEnum postingsEnum69 = null; org.apache.lucene.index.PostingsEnum postingsEnum70 = null; simpleIndexQueryParserTests52.assertPositionsSkippingEquals("tests.badapples", indexReader67, 1, postingsEnum69, postingsEnum70); simpleIndexQueryParserTests52.setIndexWriterMaxDocs((int) (byte) 100); org.junit.Assert.assertNotSame((java.lang.Object) ruleChain45, (java.lang.Object) simpleIndexQueryParserTests52); org.apache.lucene.index.IndexReader indexReader76 = null; org.apache.lucene.index.IndexReader indexReader77 = null; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests52.assertStoredFieldsEquals("tests.monster", indexReader76, indexReader77); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale4); org.junit.Assert.assertEquals(locale4.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray5); org.junit.Assert.assertNotNull(cloneableList6); org.junit.Assert.assertEquals("'" + str26 + "' != '" + "<unknown>" + "'", str26, "<unknown>"); org.junit.Assert.assertEquals("'" + str29 + "' != '" + "<unknown>" + "'", str29, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain45); org.junit.Assert.assertEquals("'" + str53 + "' != '" + "<unknown>" + "'", str53, "<unknown>"); org.junit.Assert.assertEquals("'" + str56 + "' != '" + "<unknown>" + "'", str56, "<unknown>"); } @Test public void test05224() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05224"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests1); org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests1.assertPositionsSkippingEquals("tests.maxfailures", indexReader7, (-1), postingsEnum9, postingsEnum10); simpleIndexQueryParserTests1.resetCheckIndexStatus(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.restoreIndexWriterMaxDocs(); org.apache.lucene.index.IndexReader indexReader16 = null; org.apache.lucene.index.Fields fields17 = null; org.apache.lucene.index.Fields fields18 = null; simpleIndexQueryParserTests1.assertFieldsEquals("random", indexReader16, fields17, fields18, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testQueryStringFields2(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/query-fields2.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); } @Test public void test05225() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05225"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); 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 { simpleIndexQueryParserTests0.assertDeletedDocsEquals("tests.monster", 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.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); } @Test public void test05226() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05226"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader2 = null; org.apache.lucene.index.Fields fields3 = null; org.apache.lucene.index.Fields fields4 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.maxfailures", indexReader2, fields3, fields4, false); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs(0); org.apache.lucene.index.PostingsEnum postingsEnum11 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("random", postingsEnum11, postingsEnum12, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoPolygonFilter3(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_polygon3.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } } @Test public void test05227() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05227"); java.util.Locale locale2 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); org.junit.Assert.assertNotNull("tests.weekly", (java.lang.Object) locale2); org.junit.Assert.assertNotNull(locale2); org.junit.Assert.assertEquals(locale2.toString(), "hi!"); } @Test public void test05228() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05228"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setUp(); java.lang.String str8 = simpleIndexQueryParserTests0.getTestName(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.badapples", indexReader10, (-1), postingsEnum12, postingsEnum13); org.apache.lucene.index.PostingsEnum postingsEnum16 = null; org.apache.lucene.index.PostingsEnum postingsEnum17 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.failfast", postingsEnum16, postingsEnum17, true); org.apache.lucene.index.IndexReader indexReader21 = null; org.apache.lucene.index.Terms terms22 = null; org.apache.lucene.index.Terms terms23 = null; simpleIndexQueryParserTests0.assertTermsEquals("europarl.lines.txt.gz", indexReader21, terms22, terms23, true); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.TestRule testRule28 = simpleIndexQueryParserTests0.ruleChain; simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoShapeQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geoShape-query.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertEquals("'" + str8 + "' != '" + "<unknown>" + "'", str8, "<unknown>"); org.junit.Assert.assertNotNull(testRule28); } @Test public void test05229() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05229"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests1); org.junit.rules.RuleChain ruleChain6 = simpleIndexQueryParserTests1.failureAndSuccessEvents; org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests7 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str8 = simpleIndexQueryParserTests7.getTestName(); simpleIndexQueryParserTests7.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests7.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain11 = null; simpleIndexQueryParserTests7.failureAndSuccessEvents = ruleChain11; simpleIndexQueryParserTests7.ensureAllSearchContextsReleased(); org.junit.rules.RuleChain ruleChain14 = simpleIndexQueryParserTests7.failureAndSuccessEvents; simpleIndexQueryParserTests7.restoreIndexWriterMaxDocs(); java.lang.String str16 = simpleIndexQueryParserTests7.getTestName(); java.lang.String str17 = simpleIndexQueryParserTests7.getTestName(); org.apache.lucene.index.IndexReader indexReader19 = null; org.apache.lucene.index.PostingsEnum postingsEnum21 = null; org.apache.lucene.index.PostingsEnum postingsEnum22 = null; simpleIndexQueryParserTests7.assertDocsSkippingEquals("tests.monster", indexReader19, (int) (byte) 10, postingsEnum21, postingsEnum22, false); org.junit.Assert.assertNotSame((java.lang.Object) simpleIndexQueryParserTests1, (java.lang.Object) false); org.apache.lucene.index.PostingsEnum postingsEnum27 = null; org.apache.lucene.index.PostingsEnum postingsEnum28 = null; simpleIndexQueryParserTests1.assertDocsEnumEquals("tests.slow", postingsEnum27, postingsEnum28, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testQueryStringTimezone(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/query-timezone.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain6); org.junit.Assert.assertEquals("'" + str8 + "' != '" + "<unknown>" + "'", str8, "<unknown>"); org.junit.Assert.assertNull(ruleChain14); org.junit.Assert.assertEquals("'" + str16 + "' != '" + "<unknown>" + "'", str16, "<unknown>"); org.junit.Assert.assertEquals("'" + str17 + "' != '" + "<unknown>" + "'", str17, "<unknown>"); } @Test public void test05230() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05230"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum4 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("<unknown>", postingsEnum4, postingsEnum5, false); org.apache.lucene.index.IndexReader indexReader9 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.monster", indexReader9, (int) (byte) 1, postingsEnum11, postingsEnum12); org.apache.lucene.index.IndexReader indexReader15 = null; org.apache.lucene.index.PostingsEnum postingsEnum17 = null; org.apache.lucene.index.PostingsEnum postingsEnum18 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("random", indexReader15, 4, postingsEnum17, postingsEnum18, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoDistanceFilter4(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_distance4.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } } @Test public void test05231() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05231"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.junit.rules.RuleChain ruleChain7 = simpleIndexQueryParserTests0.failureAndSuccessEvents; simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("enwiki.random.lines.txt", indexReader10, (int) (short) -1, postingsEnum12, postingsEnum13); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests16 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str17 = simpleIndexQueryParserTests16.getTestName(); simpleIndexQueryParserTests16.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests16.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests16); org.junit.rules.RuleChain ruleChain21 = simpleIndexQueryParserTests16.failureAndSuccessEvents; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain21; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testDefaultBooleanQueryMinShouldMatch(); 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(ruleChain7); org.junit.Assert.assertEquals("'" + str17 + "' != '" + "<unknown>" + "'", str17, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain21); } @Test public void test05232() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05232"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests1); org.junit.rules.RuleChain ruleChain6 = simpleIndexQueryParserTests1.failureAndSuccessEvents; org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests7 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str8 = simpleIndexQueryParserTests7.getTestName(); simpleIndexQueryParserTests7.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests7.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain11 = null; simpleIndexQueryParserTests7.failureAndSuccessEvents = ruleChain11; simpleIndexQueryParserTests7.ensureAllSearchContextsReleased(); org.junit.rules.RuleChain ruleChain14 = simpleIndexQueryParserTests7.failureAndSuccessEvents; simpleIndexQueryParserTests7.restoreIndexWriterMaxDocs(); java.lang.String str16 = simpleIndexQueryParserTests7.getTestName(); java.lang.String str17 = simpleIndexQueryParserTests7.getTestName(); org.apache.lucene.index.IndexReader indexReader19 = null; org.apache.lucene.index.PostingsEnum postingsEnum21 = null; org.apache.lucene.index.PostingsEnum postingsEnum22 = null; simpleIndexQueryParserTests7.assertDocsSkippingEquals("tests.monster", indexReader19, (int) (byte) 10, postingsEnum21, postingsEnum22, false); org.junit.Assert.assertNotSame((java.lang.Object) simpleIndexQueryParserTests1, (java.lang.Object) false); org.apache.lucene.index.PostingsEnum postingsEnum27 = null; org.apache.lucene.index.PostingsEnum postingsEnum28 = null; simpleIndexQueryParserTests1.assertDocsEnumEquals("tests.slow", postingsEnum27, postingsEnum28, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testMoreLikeThisBuilder(); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain6); org.junit.Assert.assertEquals("'" + str8 + "' != '" + "<unknown>" + "'", str8, "<unknown>"); org.junit.Assert.assertNull(ruleChain14); org.junit.Assert.assertEquals("'" + str16 + "' != '" + "<unknown>" + "'", str16, "<unknown>"); org.junit.Assert.assertEquals("'" + str17 + "' != '" + "<unknown>" + "'", str17, "<unknown>"); } @Test public void test05233() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05233"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain5 = null; simpleIndexQueryParserTests1.failureAndSuccessEvents = ruleChain5; org.apache.lucene.index.IndexReader indexReader8 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; simpleIndexQueryParserTests1.assertDocsSkippingEquals("tests.nightly", indexReader8, 100, postingsEnum10, postingsEnum11, false); simpleIndexQueryParserTests1.resetCheckIndexStatus(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests1); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testSimpleQueryString(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/simple-query-string.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); } @Test public void test05234() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05234"); // The following exception was thrown during execution in test generation try { int int1 = org.apache.lucene.util.LuceneTestCase.atLeast((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 test05235() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05235"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader2 = null; org.apache.lucene.index.PostingsEnum postingsEnum4 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.awaitsfix", indexReader2, (int) (short) 0, postingsEnum4, postingsEnum5, true); org.apache.lucene.index.IndexReader indexReader9 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("europarl.lines.txt.gz", indexReader9, (int) (byte) -1, postingsEnum11, postingsEnum12, false); org.apache.lucene.index.IndexReader indexReader16 = null; org.apache.lucene.index.Fields fields17 = null; org.apache.lucene.index.Fields fields18 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.slow", indexReader16, fields17, fields18, true); org.apache.lucene.index.IndexReader indexReader22 = null; org.apache.lucene.index.PostingsEnum postingsEnum24 = null; org.apache.lucene.index.PostingsEnum postingsEnum25 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.awaitsfix", indexReader22, 1, postingsEnum24, postingsEnum25); org.apache.lucene.index.TermsEnum termsEnum28 = null; org.apache.lucene.index.TermsEnum termsEnum29 = null; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.assertTermStatsEquals("enwiki.random.lines.txt", termsEnum28, termsEnum29); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } } @Test public void test05236() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05236"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Fields fields5 = null; org.apache.lucene.index.Fields fields6 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.monster", indexReader4, fields5, fields6, true); simpleIndexQueryParserTests0.ensureCleanedUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoPolygonFilter1(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_polygon1.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } } @Test public void test05237() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05237"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; org.junit.rules.RuleChain ruleChain6 = simpleIndexQueryParserTests0.failureAndSuccessEvents; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSpanOrQuery2(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/spanOr2.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertNull(ruleChain6); } @Test public void test05238() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05238"); float[] floatArray2 = new float[] {}; float[] floatArray3 = new float[] {}; org.junit.Assert.assertArrayEquals(floatArray2, floatArray3, (float) 100L); float[] floatArray6 = new float[] {}; float[] floatArray7 = new float[] {}; org.junit.Assert.assertArrayEquals(floatArray6, floatArray7, (float) 100L); org.junit.Assert.assertArrayEquals(floatArray2, floatArray7, (float) (short) 100); float[] floatArray12 = new float[] {}; float[] floatArray13 = new float[] {}; org.junit.Assert.assertArrayEquals(floatArray12, floatArray13, (float) 100L); float[] floatArray16 = new float[] {}; float[] floatArray17 = new float[] {}; org.junit.Assert.assertArrayEquals(floatArray16, floatArray17, (float) 100L); org.junit.Assert.assertArrayEquals(floatArray12, floatArray17, (float) (short) 100); org.junit.Assert.assertArrayEquals("hi!", floatArray7, floatArray17, (float) 'a'); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests24 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests24.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum28 = null; org.apache.lucene.index.PostingsEnum postingsEnum29 = null; simpleIndexQueryParserTests24.assertDocsEnumEquals("", postingsEnum28, postingsEnum29, true); org.apache.lucene.index.PostingsEnum postingsEnum33 = null; org.apache.lucene.index.PostingsEnum postingsEnum34 = null; simpleIndexQueryParserTests24.assertDocsEnumEquals("", postingsEnum33, postingsEnum34, false); simpleIndexQueryParserTests24.ensureAllSearchContextsReleased(); org.junit.Assert.assertNotSame("<unknown>", (java.lang.Object) "hi!", (java.lang.Object) simpleIndexQueryParserTests24); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests24.testQueryStringTimezone(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/query-timezone.json] not found in classpath"); } catch (java.io.FileNotFoundException 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), "[]"); org.junit.Assert.assertNotNull(floatArray16); org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray16), "[]"); org.junit.Assert.assertNotNull(floatArray17); org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray17), "[]"); } @Test public void test05239() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05239"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.PostingsEnum postingsEnum6 = null; org.apache.lucene.index.PostingsEnum postingsEnum7 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.slow", indexReader4, 0, postingsEnum6, postingsEnum7, true); org.apache.lucene.index.IndexReader indexReader11 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; org.apache.lucene.index.PostingsEnum postingsEnum14 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.awaitsfix", indexReader11, (int) (short) 1, postingsEnum13, postingsEnum14); org.apache.lucene.index.IndexReader indexReader17 = null; org.apache.lucene.index.Terms terms18 = null; org.apache.lucene.index.Terms terms19 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.nightly", indexReader17, terms18, terms19, false); org.apache.lucene.index.IndexReader indexReader23 = null; org.apache.lucene.index.Fields fields24 = null; org.apache.lucene.index.Fields fields25 = null; simpleIndexQueryParserTests0.assertFieldsEquals("europarl.lines.txt.gz", indexReader23, fields24, fields25, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoDistanceFilterNamed(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_distance-named.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05240() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05240"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests1); org.junit.rules.RuleChain ruleChain6 = simpleIndexQueryParserTests1.failureAndSuccessEvents; simpleIndexQueryParserTests1.resetCheckIndexStatus(); simpleIndexQueryParserTests1.restoreIndexWriterMaxDocs(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testQueryStringFields2(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/query-fields2.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain6); } @Test public void test05241() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05241"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.nightly", indexReader7, 100, postingsEnum9, postingsEnum10, false); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader15 = null; org.apache.lucene.index.Terms terms16 = null; org.apache.lucene.index.Terms terms17 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.awaitsfix", indexReader15, terms16, terms17, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoDistanceFilter11(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_distance11.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05242() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05242"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); org.apache.lucene.index.IndexReader indexReader11 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; org.apache.lucene.index.PostingsEnum postingsEnum14 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.nightly", indexReader11, (int) '#', postingsEnum13, postingsEnum14); org.apache.lucene.index.IndexReader indexReader17 = null; org.apache.lucene.index.Terms terms18 = null; org.apache.lucene.index.Terms terms19 = null; simpleIndexQueryParserTests0.assertTermsEquals("enwiki.random.lines.txt", indexReader17, terms18, terms19, false); simpleIndexQueryParserTests0.overrideTestDefaultQueryCache(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testWildcardQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/wildcard.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05243() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05243"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); org.apache.lucene.index.IndexReader indexReader11 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; org.apache.lucene.index.PostingsEnum postingsEnum14 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.nightly", indexReader11, (int) '#', postingsEnum13, postingsEnum14); java.lang.String str16 = simpleIndexQueryParserTests0.getTestName(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testTermWithBoostQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/term-with-boost.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str16 + "' != '" + "<unknown>" + "'", str16, "<unknown>"); } @Test public void test05244() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05244"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader3 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; org.apache.lucene.index.PostingsEnum postingsEnum6 = null; simpleIndexQueryParserTests1.assertDocsSkippingEquals("tests.awaitsfix", indexReader3, (int) (short) 0, postingsEnum5, postingsEnum6, true); org.junit.Assert.assertNotNull("", (java.lang.Object) simpleIndexQueryParserTests1); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testNotFilteredQuery2(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/not-filter2.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } } @Test public void test05245() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05245"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests1); org.junit.rules.RuleChain ruleChain6 = simpleIndexQueryParserTests1.failureAndSuccessEvents; org.apache.lucene.index.IndexReader indexReader8 = null; org.apache.lucene.index.Fields fields9 = null; org.apache.lucene.index.Fields fields10 = null; simpleIndexQueryParserTests1.assertFieldsEquals("enwiki.random.lines.txt", indexReader8, fields9, fields10, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testRegexpBoostQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/regexp-boost.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain6); } @Test public void test05246() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05246"); 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.maxfailures", "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 test05247() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05247"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); org.apache.lucene.index.IndexReader indexReader11 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; org.apache.lucene.index.PostingsEnum postingsEnum14 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.nightly", indexReader11, (int) '#', postingsEnum13, postingsEnum14); org.apache.lucene.index.IndexReader indexReader17 = null; org.apache.lucene.index.Terms terms18 = null; org.apache.lucene.index.Terms terms19 = null; simpleIndexQueryParserTests0.assertTermsEquals("enwiki.random.lines.txt", indexReader17, terms18, terms19, false); org.apache.lucene.index.IndexReader indexReader23 = null; org.apache.lucene.index.Terms terms24 = null; org.apache.lucene.index.Terms terms25 = null; simpleIndexQueryParserTests0.assertTermsEquals("europarl.lines.txt.gz", indexReader23, terms24, terms25, false); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testQueryStringFieldsMatch(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/query-fields-match.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05248() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05248"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader2 = null; org.apache.lucene.index.Fields fields3 = null; org.apache.lucene.index.Fields fields4 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.maxfailures", indexReader2, fields3, fields4, false); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testMatchWithFuzzyTranspositions(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/match-with-fuzzy-transpositions.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } } @Test public void test05249() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05249"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setUp(); java.lang.String str8 = simpleIndexQueryParserTests0.getTestName(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.badapples", indexReader10, (-1), postingsEnum12, postingsEnum13); org.apache.lucene.index.IndexReader indexReader16 = null; org.apache.lucene.index.Fields fields17 = null; org.apache.lucene.index.Fields fields18 = null; simpleIndexQueryParserTests0.assertFieldsEquals("hi!", indexReader16, fields17, fields18, false); org.apache.lucene.index.PostingsEnum postingsEnum22 = null; org.apache.lucene.index.PostingsEnum postingsEnum23 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("random", postingsEnum22, postingsEnum23, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSpanOrQueryBuilder(); 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.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertEquals("'" + str8 + "' != '" + "<unknown>" + "'", str8, "<unknown>"); } @Test public void test05250() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05250"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.apache.lucene.index.PostingsEnum postingsEnum6 = null; org.apache.lucene.index.PostingsEnum postingsEnum7 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("node_s_0", postingsEnum6, postingsEnum7, false); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests11 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str12 = simpleIndexQueryParserTests11.getTestName(); simpleIndexQueryParserTests11.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests11.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests11); org.junit.rules.RuleChain ruleChain16 = simpleIndexQueryParserTests11.failureAndSuccessEvents; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain16; simpleIndexQueryParserTests0.setUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSpanTermQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/spanTerm.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str12 + "' != '" + "<unknown>" + "'", str12, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain16); } @Test public void test05251() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05251"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testCustomBoostFactorQueryBuilder_withFunctionScoreWithoutQueryGiven(); 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 test05252() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05252"); org.junit.Assert.assertEquals("", 10L, (long) 10); } @Test public void test05253() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05253"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Terms terms11 = null; org.apache.lucene.index.Terms terms12 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.failfast", indexReader10, terms11, terms12, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoDistanceFilter3(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_distance3.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05254() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05254"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.PostingsEnum postingsEnum6 = null; org.apache.lucene.index.PostingsEnum postingsEnum7 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.slow", indexReader4, 0, postingsEnum6, postingsEnum7, true); simpleIndexQueryParserTests0.resetCheckIndexStatus(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSpanContainingQueryParser(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/spanContaining.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05255() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05255"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.nightly", indexReader7, 100, postingsEnum9, postingsEnum10, false); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader16 = null; org.apache.lucene.index.PostingsEnum postingsEnum18 = null; org.apache.lucene.index.PostingsEnum postingsEnum19 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.slow", indexReader16, (int) (byte) 10, postingsEnum18, postingsEnum19, true); simpleIndexQueryParserTests0.setUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testTermsQueryBuilder(); 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 test05256() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05256"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader2 = null; org.apache.lucene.index.Fields fields3 = null; org.apache.lucene.index.Fields fields4 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.maxfailures", indexReader2, fields3, fields4, false); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testDefaultBooleanQueryMinShouldMatch(); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } } @Test public void test05257() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05257"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum4 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("<unknown>", postingsEnum4, postingsEnum5, false); org.apache.lucene.index.IndexReader indexReader9 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.monster", indexReader9, (int) (byte) 1, postingsEnum11, postingsEnum12); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testRegexpFilteredQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/regexp-filter.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } } @Test public void test05258() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05258"); // The following exception was thrown during execution in test generation try { java.lang.String str2 = org.elasticsearch.test.ElasticsearchTestCase.randomRealisticUnicodeOfLengthBetween(100, (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 test05259() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05259"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader5 = null; org.apache.lucene.index.Terms terms6 = null; org.apache.lucene.index.Terms terms7 = null; simpleIndexQueryParserTests1.assertTermsEquals("tests.maxfailures", indexReader5, terms6, terms7, true); simpleIndexQueryParserTests1.ensureCheckIndexPassed(); org.apache.lucene.index.IndexReader indexReader12 = null; org.apache.lucene.index.PostingsEnum postingsEnum14 = null; org.apache.lucene.index.PostingsEnum postingsEnum15 = null; simpleIndexQueryParserTests1.assertPositionsSkippingEquals("tests.nightly", indexReader12, (int) '#', postingsEnum14, postingsEnum15); org.apache.lucene.index.IndexReader indexReader18 = null; org.apache.lucene.index.Terms terms19 = null; org.apache.lucene.index.Terms terms20 = null; simpleIndexQueryParserTests1.assertTermsEquals("enwiki.random.lines.txt", indexReader18, terms19, terms20, false); org.apache.lucene.index.IndexReader indexReader24 = null; org.apache.lucene.index.Terms terms25 = null; org.apache.lucene.index.Terms terms26 = null; simpleIndexQueryParserTests1.assertTermsEquals("europarl.lines.txt.gz", indexReader24, terms25, terms26, false); org.junit.Assert.assertNotSame("tests.failfast", (java.lang.Object) simpleIndexQueryParserTests1, (java.lang.Object) "tests.monster"); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testOrFilteredQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/or-filter.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); } @Test public void test05260() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05260"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setUp(); java.lang.String str8 = simpleIndexQueryParserTests0.getTestName(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.badapples", indexReader10, (-1), postingsEnum12, postingsEnum13); org.apache.lucene.index.PostingsEnum postingsEnum16 = null; org.apache.lucene.index.PostingsEnum postingsEnum17 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.failfast", postingsEnum16, postingsEnum17, true); org.apache.lucene.index.IndexReader indexReader21 = null; org.apache.lucene.index.Terms terms22 = null; org.apache.lucene.index.Terms terms23 = null; simpleIndexQueryParserTests0.assertTermsEquals("europarl.lines.txt.gz", indexReader21, terms22, terms23, true); simpleIndexQueryParserTests0.overrideTestDefaultQueryCache(); java.lang.String str27 = simpleIndexQueryParserTests0.getTestName(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testTermsFilterQueryBuilder(); 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.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertEquals("'" + str8 + "' != '" + "<unknown>" + "'", str8, "<unknown>"); org.junit.Assert.assertEquals("'" + str27 + "' != '" + "<unknown>" + "'", str27, "<unknown>"); } @Test public void test05261() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05261"); java.util.Locale locale3 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray4 = new java.lang.Cloneable[] { locale3 }; java.util.List<java.lang.Cloneable> cloneableList5 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray4); java.lang.Object obj6 = null; org.junit.Assert.assertNotSame((java.lang.Object) cloneableList5, obj6); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests8 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Fields fields11 = null; org.apache.lucene.index.Fields fields12 = null; simpleIndexQueryParserTests8.assertFieldsEquals("tests.maxfailures", indexReader10, fields11, fields12, false); org.junit.Assert.assertNotSame("tests.slow", obj6, (java.lang.Object) simpleIndexQueryParserTests8); simpleIndexQueryParserTests8.resetCheckIndexStatus(); simpleIndexQueryParserTests8.ensureCleanedUp(); org.apache.lucene.index.IndexReader indexReader19 = null; org.apache.lucene.index.Fields fields20 = null; org.apache.lucene.index.Fields fields21 = null; simpleIndexQueryParserTests8.assertFieldsEquals("tests.badapples", indexReader19, fields20, fields21, true); org.apache.lucene.index.IndexReader indexReader25 = null; org.apache.lucene.index.PostingsEnum postingsEnum27 = null; org.apache.lucene.index.PostingsEnum postingsEnum28 = null; simpleIndexQueryParserTests8.assertPositionsSkippingEquals("tests.badapples", indexReader25, 2, postingsEnum27, postingsEnum28); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests8.testSpanMultiTermTermRangeQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/span-multi-term-range-term.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale3); org.junit.Assert.assertEquals(locale3.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray4); org.junit.Assert.assertNotNull(cloneableList5); } @Test public void test05262() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05262"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; simpleIndexQueryParserTests0.overrideTestDefaultQueryCache(); org.apache.lucene.index.IndexReader indexReader8 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.monster", indexReader8, (int) (byte) 10, postingsEnum10, postingsEnum11); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoPolygonFilter3(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_polygon3.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05263() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05263"); 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.badapples", "tests.maxfailures"); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } } @Test public void test05264() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05264"); java.util.Locale locale4 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray5 = new java.lang.Cloneable[] { locale4 }; java.util.List<java.lang.Cloneable> cloneableList6 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray5); java.lang.Object obj7 = null; org.junit.Assert.assertNotSame((java.lang.Object) cloneableList6, obj7); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests9 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader11 = null; org.apache.lucene.index.Fields fields12 = null; org.apache.lucene.index.Fields fields13 = null; simpleIndexQueryParserTests9.assertFieldsEquals("tests.maxfailures", indexReader11, fields12, fields13, false); org.junit.Assert.assertNotSame("tests.slow", obj7, (java.lang.Object) simpleIndexQueryParserTests9); simpleIndexQueryParserTests9.resetCheckIndexStatus(); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests18 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader20 = null; org.apache.lucene.index.Fields fields21 = null; org.apache.lucene.index.Fields fields22 = null; simpleIndexQueryParserTests18.assertFieldsEquals("tests.maxfailures", indexReader20, fields21, fields22, false); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests25 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str26 = simpleIndexQueryParserTests25.getTestName(); simpleIndexQueryParserTests25.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests25.ensureCleanedUp(); java.lang.String str29 = simpleIndexQueryParserTests25.getTestName(); org.apache.lucene.index.IndexReader indexReader31 = null; org.apache.lucene.index.Fields fields32 = null; org.apache.lucene.index.Fields fields33 = null; simpleIndexQueryParserTests25.assertFieldsEquals("europarl.lines.txt.gz", indexReader31, fields32, fields33, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests36 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests36.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum40 = null; org.apache.lucene.index.PostingsEnum postingsEnum41 = null; simpleIndexQueryParserTests36.assertDocsEnumEquals("", postingsEnum40, postingsEnum41, true); simpleIndexQueryParserTests36.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain45 = simpleIndexQueryParserTests36.failureAndSuccessEvents; simpleIndexQueryParserTests25.failureAndSuccessEvents = ruleChain45; java.lang.Object obj47 = null; org.junit.Assert.assertNotSame((java.lang.Object) ruleChain45, obj47); simpleIndexQueryParserTests18.failureAndSuccessEvents = ruleChain45; org.apache.lucene.util.LuceneTestCase.classRules = ruleChain45; org.junit.Assert.assertNotSame("random", (java.lang.Object) simpleIndexQueryParserTests9, (java.lang.Object) ruleChain45); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests52 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str53 = simpleIndexQueryParserTests52.getTestName(); simpleIndexQueryParserTests52.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests52.ensureCleanedUp(); java.lang.String str56 = simpleIndexQueryParserTests52.getTestName(); simpleIndexQueryParserTests52.setIndexWriterMaxDocs((int) (byte) 1); org.apache.lucene.index.IndexReader indexReader60 = null; org.apache.lucene.index.PostingsEnum postingsEnum62 = null; org.apache.lucene.index.PostingsEnum postingsEnum63 = null; simpleIndexQueryParserTests52.assertPositionsSkippingEquals("<unknown>", indexReader60, (int) '4', postingsEnum62, postingsEnum63); simpleIndexQueryParserTests52.ensureCleanedUp(); org.apache.lucene.index.IndexReader indexReader67 = null; org.apache.lucene.index.PostingsEnum postingsEnum69 = null; org.apache.lucene.index.PostingsEnum postingsEnum70 = null; simpleIndexQueryParserTests52.assertPositionsSkippingEquals("tests.badapples", indexReader67, 1, postingsEnum69, postingsEnum70); simpleIndexQueryParserTests52.setIndexWriterMaxDocs((int) (byte) 100); org.junit.Assert.assertNotSame((java.lang.Object) ruleChain45, (java.lang.Object) simpleIndexQueryParserTests52); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests76 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str77 = simpleIndexQueryParserTests76.getTestName(); simpleIndexQueryParserTests76.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests76.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests76); org.junit.rules.RuleChain ruleChain81 = simpleIndexQueryParserTests76.failureAndSuccessEvents; simpleIndexQueryParserTests52.failureAndSuccessEvents = ruleChain81; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests52.testNotFilteredQueryBuilder(); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale4); org.junit.Assert.assertEquals(locale4.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray5); org.junit.Assert.assertNotNull(cloneableList6); org.junit.Assert.assertEquals("'" + str26 + "' != '" + "<unknown>" + "'", str26, "<unknown>"); org.junit.Assert.assertEquals("'" + str29 + "' != '" + "<unknown>" + "'", str29, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain45); org.junit.Assert.assertEquals("'" + str53 + "' != '" + "<unknown>" + "'", str53, "<unknown>"); org.junit.Assert.assertEquals("'" + str56 + "' != '" + "<unknown>" + "'", str56, "<unknown>"); org.junit.Assert.assertEquals("'" + str77 + "' != '" + "<unknown>" + "'", str77, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain81); } @Test public void test05265() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05265"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.apache.lucene.index.PostingsEnum postingsEnum5 = null; org.apache.lucene.index.PostingsEnum postingsEnum6 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("hi!", postingsEnum5, postingsEnum6, false); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testNotFilteredQuery3(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/not-filter3.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05266() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05266"); java.util.Locale locale2 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray3 = new java.lang.Cloneable[] { locale2 }; java.util.List<java.lang.Cloneable> cloneableList4 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray3); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests5 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests5.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain7 = simpleIndexQueryParserTests5.failureAndSuccessEvents; org.junit.Assert.assertNotSame((java.lang.Object) cloneableArray3, (java.lang.Object) simpleIndexQueryParserTests5); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests9 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests9.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum13 = null; org.apache.lucene.index.PostingsEnum postingsEnum14 = null; simpleIndexQueryParserTests9.assertDocsEnumEquals("", postingsEnum13, postingsEnum14, true); simpleIndexQueryParserTests9.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain18 = simpleIndexQueryParserTests9.failureAndSuccessEvents; simpleIndexQueryParserTests5.failureAndSuccessEvents = ruleChain18; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests5.testRegexpQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/regexp.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale2); org.junit.Assert.assertEquals(locale2.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray3); org.junit.Assert.assertNotNull(cloneableList4); org.junit.Assert.assertNotNull(ruleChain7); org.junit.Assert.assertNotNull(ruleChain18); } @Test public void test05267() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05267"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.junit.rules.RuleChain ruleChain7 = simpleIndexQueryParserTests0.failureAndSuccessEvents; simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("europarl.lines.txt.gz", indexReader10, (int) (short) 1, postingsEnum12, postingsEnum13, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testWildcardQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/wildcard.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertNull(ruleChain7); } @Test public void test05268() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05268"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum4 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("", postingsEnum4, postingsEnum5, true); org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("", postingsEnum9, postingsEnum10, false); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); // The following exception was thrown during execution in test generation try { // flaky: simpleIndexQueryParserTests0.testFuzzyQueryWithFieldsBuilder(); // flaky: org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } } @Test public void test05269() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05269"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.TestRule testRule4 = simpleIndexQueryParserTests0.ruleChain; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testCommonTermsQuery3(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/commonTerms-query3.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertNotNull(testRule4); } @Test public void test05270() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05270"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setUp(); java.lang.String str8 = simpleIndexQueryParserTests0.getTestName(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.badapples", indexReader10, (-1), postingsEnum12, postingsEnum13); org.apache.lucene.index.PostingsEnum postingsEnum16 = null; org.apache.lucene.index.PostingsEnum postingsEnum17 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.failfast", postingsEnum16, postingsEnum17, true); org.apache.lucene.index.IndexReader indexReader21 = null; org.apache.lucene.index.Terms terms22 = null; org.apache.lucene.index.Terms terms23 = null; simpleIndexQueryParserTests0.assertTermsEquals("europarl.lines.txt.gz", indexReader21, terms22, terms23, true); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.TestRule testRule28 = simpleIndexQueryParserTests0.ruleChain; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testOrFilteredQuery2(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/or-filter2.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertEquals("'" + str8 + "' != '" + "<unknown>" + "'", str8, "<unknown>"); org.junit.Assert.assertNotNull(testRule28); } @Test public void test05271() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05271"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); org.junit.rules.TestRule testRule4 = simpleIndexQueryParserTests0.ruleChain; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoDistanceFilter12(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_distance12.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertNotNull(testRule4); } @Test public void test05272() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05272"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); org.apache.lucene.index.IndexReader indexReader11 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; org.apache.lucene.index.PostingsEnum postingsEnum14 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.nightly", indexReader11, (int) '#', postingsEnum13, postingsEnum14); java.lang.String str16 = simpleIndexQueryParserTests0.getTestName(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testQueryStringFields2Builder(); 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.assertEquals("'" + str16 + "' != '" + "<unknown>" + "'", str16, "<unknown>"); } @Test public void test05273() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05273"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setUp(); org.junit.rules.RuleChain ruleChain8 = simpleIndexQueryParserTests0.failureAndSuccessEvents; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testQueryStringFuzzyNumeric(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/query2.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain8); } @Test public void test05274() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05274"); // The following exception was thrown during execution in test generation try { java.lang.String str2 = org.elasticsearch.test.ElasticsearchTestCase.randomUnicodeOfCodepointLengthBetween(2, (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 test05275() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05275"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; simpleIndexQueryParserTests0.overrideTestDefaultQueryCache(); org.apache.lucene.index.IndexReader indexReader8 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.monster", indexReader8, (int) (byte) 10, postingsEnum10, postingsEnum11); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testQueryStringFields3(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/query-fields3.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05276() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05276"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.junit.rules.RuleChain ruleChain7 = simpleIndexQueryParserTests0.failureAndSuccessEvents; simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); java.lang.String str9 = simpleIndexQueryParserTests0.getTestName(); java.lang.String str10 = simpleIndexQueryParserTests0.getTestName(); org.apache.lucene.index.IndexReader indexReader12 = null; org.apache.lucene.index.PostingsEnum postingsEnum14 = null; org.apache.lucene.index.PostingsEnum postingsEnum15 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.monster", indexReader12, (int) (byte) 10, postingsEnum14, postingsEnum15, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoBoundingBoxFilter4(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_boundingbox4.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertNull(ruleChain7); org.junit.Assert.assertEquals("'" + str9 + "' != '" + "<unknown>" + "'", str9, "<unknown>"); org.junit.Assert.assertEquals("'" + str10 + "' != '" + "<unknown>" + "'", str10, "<unknown>"); } @Test public void test05277() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05277"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.apache.lucene.index.PostingsEnum postingsEnum6 = null; org.apache.lucene.index.PostingsEnum postingsEnum7 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("node_s_0", postingsEnum6, postingsEnum7, false); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests11 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str12 = simpleIndexQueryParserTests11.getTestName(); simpleIndexQueryParserTests11.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests11.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests11); org.junit.rules.RuleChain ruleChain16 = simpleIndexQueryParserTests11.failureAndSuccessEvents; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain16; simpleIndexQueryParserTests0.setUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSpanNotQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/spanNot.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str12 + "' != '" + "<unknown>" + "'", str12, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain16); } @Test public void test05278() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05278"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setUp(); java.lang.String str8 = simpleIndexQueryParserTests0.getTestName(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.badapples", indexReader10, (-1), postingsEnum12, postingsEnum13); org.apache.lucene.index.PostingsEnum postingsEnum16 = null; org.apache.lucene.index.PostingsEnum postingsEnum17 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.failfast", postingsEnum16, postingsEnum17, true); org.apache.lucene.index.IndexReader indexReader21 = null; org.apache.lucene.index.Terms terms22 = null; org.apache.lucene.index.Terms terms23 = null; simpleIndexQueryParserTests0.assertTermsEquals("europarl.lines.txt.gz", indexReader21, terms22, terms23, true); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoPolygonFilter1(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_polygon1.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertEquals("'" + str8 + "' != '" + "<unknown>" + "'", str8, "<unknown>"); } @Test public void test05279() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05279"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.overrideTestDefaultQueryCache(); org.junit.Assert.assertNotNull((java.lang.Object) simpleIndexQueryParserTests0); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testFieldMaskingSpanQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/spanFieldMaskingTerm.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05280() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05280"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.apache.lucene.index.PostingsEnum postingsEnum5 = null; org.apache.lucene.index.PostingsEnum postingsEnum6 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("hi!", postingsEnum5, postingsEnum6, false); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); // The following exception was thrown during execution in test generation try { org.elasticsearch.env.NodeEnvironment nodeEnvironment10 = simpleIndexQueryParserTests0.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.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05281() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05281"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); java.lang.String str5 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests1.setIndexWriterMaxDocs((int) (short) 1); simpleIndexQueryParserTests1.resetCheckIndexStatus(); org.junit.Assert.assertNotNull("tests.weekly", (java.lang.Object) simpleIndexQueryParserTests1); org.elasticsearch.common.unit.TimeValue timeValue12 = null; java.lang.String[] strArray19 = new java.lang.String[] { "", "tests.failfast", "node_s_0", "random" }; java.util.List<java.lang.Comparable<java.lang.String>> strComparableList20 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, (java.lang.Comparable<java.lang.String>[]) strArray19); java.util.List<java.lang.String> strList21 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf(2, strArray19); // The following exception was thrown during execution in test generation try { org.elasticsearch.action.admin.cluster.health.ClusterHealthStatus clusterHealthStatus22 = simpleIndexQueryParserTests1.ensureGreen(timeValue12, strArray19); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); org.junit.Assert.assertEquals("'" + str5 + "' != '" + "<unknown>" + "'", str5, "<unknown>"); org.junit.Assert.assertNotNull(strArray19); org.junit.Assert.assertNotNull(strComparableList20); org.junit.Assert.assertNotNull(strList21); } @Test public void test05282() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05282"); java.util.Locale locale2 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray3 = new java.lang.Cloneable[] { locale2 }; java.util.List<java.lang.Cloneable> cloneableList4 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray3); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests5 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests5.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain7 = simpleIndexQueryParserTests5.failureAndSuccessEvents; org.junit.Assert.assertNotSame((java.lang.Object) cloneableArray3, (java.lang.Object) simpleIndexQueryParserTests5); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Terms terms11 = null; org.apache.lucene.index.Terms terms12 = null; simpleIndexQueryParserTests5.assertTermsEquals("", indexReader10, terms11, terms12, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests5.testRangeFilteredQueryBuilder(); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale2); org.junit.Assert.assertEquals(locale2.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray3); org.junit.Assert.assertNotNull(cloneableList4); org.junit.Assert.assertNotNull(ruleChain7); } @Test public void test05283() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05283"); java.util.List<java.lang.Cloneable> cloneableList0 = null; // The following exception was thrown during execution in test generation try { java.lang.Cloneable cloneable1 = org.elasticsearch.test.ElasticsearchTestCase.randomFrom(cloneableList0); 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 test05284() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05284"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); org.apache.lucene.index.IndexReader indexReader8 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("<unknown>", indexReader8, (int) '4', postingsEnum10, postingsEnum11); simpleIndexQueryParserTests0.ensureCleanedUp(); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoPolygonFilter3(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_polygon3.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); } @Test public void test05285() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05285"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.nightly", indexReader7, 100, postingsEnum9, postingsEnum10, false); 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 { simpleIndexQueryParserTests0.assertTermsStatisticsEquals("enwiki.random.lines.txt", 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.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05286() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05286"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.overrideTestDefaultQueryCache(); org.junit.rules.TestRule testRule2 = simpleIndexQueryParserTests0.ruleChain; org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests3 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str4 = simpleIndexQueryParserTests3.getTestName(); simpleIndexQueryParserTests3.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests3.ensureCleanedUp(); java.lang.String str7 = simpleIndexQueryParserTests3.getTestName(); simpleIndexQueryParserTests3.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests3.setIndexWriterMaxDocs((int) (short) 1); simpleIndexQueryParserTests3.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain13 = simpleIndexQueryParserTests3.failureAndSuccessEvents; simpleIndexQueryParserTests3.ensureCheckIndexPassed(); simpleIndexQueryParserTests3.ensureCleanedUp(); org.junit.Assert.assertNotSame((java.lang.Object) simpleIndexQueryParserTests0, (java.lang.Object) simpleIndexQueryParserTests3); org.apache.lucene.index.IndexReader indexReader18 = null; org.apache.lucene.index.PostingsEnum postingsEnum20 = null; org.apache.lucene.index.PostingsEnum postingsEnum21 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.maxfailures", indexReader18, (int) (byte) 1, postingsEnum20, postingsEnum21, false); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoDistanceFilter9(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_distance9.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertNotNull(testRule2); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertEquals("'" + str7 + "' != '" + "<unknown>" + "'", str7, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain13); } @Test public void test05287() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05287"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests1); org.junit.rules.RuleChain ruleChain6 = simpleIndexQueryParserTests1.failureAndSuccessEvents; org.apache.lucene.index.IndexReader indexReader8 = null; org.apache.lucene.index.Fields fields9 = null; org.apache.lucene.index.Fields fields10 = null; simpleIndexQueryParserTests1.assertFieldsEquals("enwiki.random.lines.txt", indexReader8, fields9, fields10, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testProperErrorMessageWhenTwoFunctionsDefinedInQueryBody(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/function-score-query-causing-NPE.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain6); } @Test public void test05288() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05288"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain5 = null; simpleIndexQueryParserTests1.failureAndSuccessEvents = ruleChain5; org.apache.lucene.index.IndexReader indexReader8 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; simpleIndexQueryParserTests1.assertDocsSkippingEquals("tests.nightly", indexReader8, 100, postingsEnum10, postingsEnum11, false); simpleIndexQueryParserTests1.resetCheckIndexStatus(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests1); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testMLTMinimumShouldMatch(); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); } @Test public void test05289() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05289"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.PostingsEnum postingsEnum6 = null; org.apache.lucene.index.PostingsEnum postingsEnum7 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.maxfailures", indexReader4, (int) (short) 100, postingsEnum6, postingsEnum7); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader11 = null; org.apache.lucene.index.Fields fields12 = null; org.apache.lucene.index.Fields fields13 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.failfast", 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; simpleIndexQueryParserTests0.assertTermsEquals("<unknown>", indexReader17, terms18, terms19, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testRegexpWithFlagsFilteredQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/regexp-filter-flags.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05290() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05290"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.apache.lucene.index.PostingsEnum postingsEnum6 = null; org.apache.lucene.index.PostingsEnum postingsEnum7 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("node_s_0", postingsEnum6, postingsEnum7, false); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests11 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str12 = simpleIndexQueryParserTests11.getTestName(); simpleIndexQueryParserTests11.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests11.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests11); org.junit.rules.RuleChain ruleChain16 = simpleIndexQueryParserTests11.failureAndSuccessEvents; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain16; simpleIndexQueryParserTests0.setUp(); 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 { simpleIndexQueryParserTests0.assertStoredFieldsEquals("<unknown>", 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.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str12 + "' != '" + "<unknown>" + "'", str12, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain16); } @Test public void test05291() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05291"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testCommonTermsQuery2(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/commonTerms-query2.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); } @Test public void test05292() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05292"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setUp(); java.lang.String str8 = simpleIndexQueryParserTests0.getTestName(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.badapples", indexReader10, (-1), postingsEnum12, postingsEnum13); org.apache.lucene.index.PostingsEnum postingsEnum16 = null; org.apache.lucene.index.PostingsEnum postingsEnum17 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.failfast", postingsEnum16, postingsEnum17, true); org.apache.lucene.index.IndexReader indexReader21 = null; org.apache.lucene.index.Terms terms22 = null; org.apache.lucene.index.Terms terms23 = null; simpleIndexQueryParserTests0.assertTermsEquals("europarl.lines.txt.gz", indexReader21, terms22, terms23, true); simpleIndexQueryParserTests0.overrideTestDefaultQueryCache(); java.lang.String str27 = simpleIndexQueryParserTests0.getTestName(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSpanTermQueryBuilder(); 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.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertEquals("'" + str8 + "' != '" + "<unknown>" + "'", str8, "<unknown>"); org.junit.Assert.assertEquals("'" + str27 + "' != '" + "<unknown>" + "'", str27, "<unknown>"); } @Test public void test05293() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05293"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (short) 1); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testFilterParsing(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/function-filter-score-query.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); } @Test public void test05294() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05294"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); java.lang.String str5 = simpleIndexQueryParserTests1.getTestName(); org.junit.Assert.assertNotNull("", (java.lang.Object) simpleIndexQueryParserTests1); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testNamedRegexpFilteredQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/regexp-filter-named.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); org.junit.Assert.assertEquals("'" + str5 + "' != '" + "<unknown>" + "'", str5, "<unknown>"); } @Test public void test05295() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05295"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); java.lang.String str5 = simpleIndexQueryParserTests1.getTestName(); org.junit.Assert.assertNotNull("", (java.lang.Object) simpleIndexQueryParserTests1); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testFilteredQuery3(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/filtered-query3.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); org.junit.Assert.assertEquals("'" + str5 + "' != '" + "<unknown>" + "'", str5, "<unknown>"); } @Test public void test05296() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05296"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader2 = null; org.apache.lucene.index.Fields fields3 = null; org.apache.lucene.index.Fields fields4 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.maxfailures", indexReader2, fields3, fields4, false); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs(0); 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 { simpleIndexQueryParserTests0.assertTermVectorsEquals("random", indexReader11, indexReader12); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } } @Test public void test05297() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05297"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setUp(); java.lang.String str8 = simpleIndexQueryParserTests0.getTestName(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.badapples", indexReader10, (-1), postingsEnum12, postingsEnum13); org.apache.lucene.index.IndexReader indexReader16 = null; org.apache.lucene.index.Fields fields17 = null; org.apache.lucene.index.Fields fields18 = null; simpleIndexQueryParserTests0.assertFieldsEquals("hi!", indexReader16, fields17, fields18, false); org.apache.lucene.index.PostingsEnum postingsEnum22 = null; org.apache.lucene.index.PostingsEnum postingsEnum23 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("random", postingsEnum22, postingsEnum23, true); org.apache.lucene.index.IndexReader indexReader27 = null; org.apache.lucene.index.PostingsEnum postingsEnum29 = null; org.apache.lucene.index.PostingsEnum postingsEnum30 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("random", indexReader27, (-1), postingsEnum29, postingsEnum30, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testQueryStringFields1Builder(); 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.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertEquals("'" + str8 + "' != '" + "<unknown>" + "'", str8, "<unknown>"); } @Test public void test05298() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05298"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); org.junit.rules.TestRule testRule4 = simpleIndexQueryParserTests0.ruleChain; simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testRegexpBoostQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/regexp-boost.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertNotNull(testRule4); } @Test public void test05299() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05299"); 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!", "random", 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 test05300() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05300"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.junit.rules.RuleChain ruleChain7 = simpleIndexQueryParserTests0.failureAndSuccessEvents; simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); java.lang.String str9 = simpleIndexQueryParserTests0.getTestName(); org.junit.Assert.assertNotNull((java.lang.Object) simpleIndexQueryParserTests0); 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 { simpleIndexQueryParserTests0.assertTermsEnumEquals("tests.maxfailures", indexReader12, termsEnum13, termsEnum14, true); 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(ruleChain7); org.junit.Assert.assertEquals("'" + str9 + "' != '" + "<unknown>" + "'", str9, "<unknown>"); } @Test public void test05301() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05301"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); org.apache.lucene.index.IndexReader indexReader8 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("<unknown>", indexReader8, (int) '4', postingsEnum10, postingsEnum11); simpleIndexQueryParserTests0.ensureCleanedUp(); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testDefaultBooleanQueryMinShouldMatch(); 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.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); } @Test public void test05302() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05302"); java.util.Locale locale4 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray5 = new java.lang.Cloneable[] { locale4 }; java.util.List<java.lang.Cloneable> cloneableList6 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray5); java.lang.Object obj7 = null; org.junit.Assert.assertNotSame((java.lang.Object) cloneableList6, obj7); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests9 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader11 = null; org.apache.lucene.index.Fields fields12 = null; org.apache.lucene.index.Fields fields13 = null; simpleIndexQueryParserTests9.assertFieldsEquals("tests.maxfailures", indexReader11, fields12, fields13, false); org.junit.Assert.assertNotSame("tests.slow", obj7, (java.lang.Object) simpleIndexQueryParserTests9); simpleIndexQueryParserTests9.resetCheckIndexStatus(); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests18 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader20 = null; org.apache.lucene.index.Fields fields21 = null; org.apache.lucene.index.Fields fields22 = null; simpleIndexQueryParserTests18.assertFieldsEquals("tests.maxfailures", indexReader20, fields21, fields22, false); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests25 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str26 = simpleIndexQueryParserTests25.getTestName(); simpleIndexQueryParserTests25.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests25.ensureCleanedUp(); java.lang.String str29 = simpleIndexQueryParserTests25.getTestName(); org.apache.lucene.index.IndexReader indexReader31 = null; org.apache.lucene.index.Fields fields32 = null; org.apache.lucene.index.Fields fields33 = null; simpleIndexQueryParserTests25.assertFieldsEquals("europarl.lines.txt.gz", indexReader31, fields32, fields33, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests36 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests36.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum40 = null; org.apache.lucene.index.PostingsEnum postingsEnum41 = null; simpleIndexQueryParserTests36.assertDocsEnumEquals("", postingsEnum40, postingsEnum41, true); simpleIndexQueryParserTests36.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain45 = simpleIndexQueryParserTests36.failureAndSuccessEvents; simpleIndexQueryParserTests25.failureAndSuccessEvents = ruleChain45; java.lang.Object obj47 = null; org.junit.Assert.assertNotSame((java.lang.Object) ruleChain45, obj47); simpleIndexQueryParserTests18.failureAndSuccessEvents = ruleChain45; org.apache.lucene.util.LuceneTestCase.classRules = ruleChain45; org.junit.Assert.assertNotSame("random", (java.lang.Object) simpleIndexQueryParserTests9, (java.lang.Object) ruleChain45); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests52 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str53 = simpleIndexQueryParserTests52.getTestName(); simpleIndexQueryParserTests52.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests52.ensureCleanedUp(); java.lang.String str56 = simpleIndexQueryParserTests52.getTestName(); simpleIndexQueryParserTests52.setIndexWriterMaxDocs((int) (byte) 1); org.apache.lucene.index.IndexReader indexReader60 = null; org.apache.lucene.index.PostingsEnum postingsEnum62 = null; org.apache.lucene.index.PostingsEnum postingsEnum63 = null; simpleIndexQueryParserTests52.assertPositionsSkippingEquals("<unknown>", indexReader60, (int) '4', postingsEnum62, postingsEnum63); simpleIndexQueryParserTests52.ensureCleanedUp(); org.apache.lucene.index.IndexReader indexReader67 = null; org.apache.lucene.index.PostingsEnum postingsEnum69 = null; org.apache.lucene.index.PostingsEnum postingsEnum70 = null; simpleIndexQueryParserTests52.assertPositionsSkippingEquals("tests.badapples", indexReader67, 1, postingsEnum69, postingsEnum70); simpleIndexQueryParserTests52.setIndexWriterMaxDocs((int) (byte) 100); org.junit.Assert.assertNotSame((java.lang.Object) ruleChain45, (java.lang.Object) simpleIndexQueryParserTests52); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests76 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str77 = simpleIndexQueryParserTests76.getTestName(); simpleIndexQueryParserTests76.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests76.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests76); org.junit.rules.RuleChain ruleChain81 = simpleIndexQueryParserTests76.failureAndSuccessEvents; simpleIndexQueryParserTests52.failureAndSuccessEvents = ruleChain81; org.apache.lucene.index.IndexReader indexReader84 = null; org.apache.lucene.index.PostingsEnum postingsEnum86 = null; org.apache.lucene.index.PostingsEnum postingsEnum87 = null; simpleIndexQueryParserTests52.assertPositionsSkippingEquals("random", indexReader84, (int) (short) 10, postingsEnum86, postingsEnum87); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests52.testGeoDistanceFilterNamed(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_distance-named.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale4); org.junit.Assert.assertEquals(locale4.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray5); org.junit.Assert.assertNotNull(cloneableList6); org.junit.Assert.assertEquals("'" + str26 + "' != '" + "<unknown>" + "'", str26, "<unknown>"); org.junit.Assert.assertEquals("'" + str29 + "' != '" + "<unknown>" + "'", str29, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain45); org.junit.Assert.assertEquals("'" + str53 + "' != '" + "<unknown>" + "'", str53, "<unknown>"); org.junit.Assert.assertEquals("'" + str56 + "' != '" + "<unknown>" + "'", str56, "<unknown>"); org.junit.Assert.assertEquals("'" + str77 + "' != '" + "<unknown>" + "'", str77, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain81); } @Test public void test05303() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05303"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader2 = null; org.apache.lucene.index.Fields fields3 = null; org.apache.lucene.index.Fields fields4 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.maxfailures", indexReader2, fields3, fields4, false); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Terms terms11 = null; org.apache.lucene.index.Terms terms12 = null; simpleIndexQueryParserTests0.assertTermsEquals("europarl.lines.txt.gz", indexReader10, terms11, terms12, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testFuzzyQueryWithFields2(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/fuzzy-with-fields2.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } } @Test public void test05304() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05304"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests1); org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.Terms terms8 = null; org.apache.lucene.index.Terms terms9 = null; simpleIndexQueryParserTests1.assertTermsEquals("tests.slow", indexReader7, terms8, terms9, true); org.apache.lucene.index.IndexReader indexReader13 = null; org.apache.lucene.index.PostingsEnum postingsEnum15 = null; org.apache.lucene.index.PostingsEnum postingsEnum16 = null; simpleIndexQueryParserTests1.assertDocsSkippingEquals("tests.monster", indexReader13, 0, postingsEnum15, postingsEnum16, false); simpleIndexQueryParserTests1.ensureCleanedUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testCommonTermsQuery2(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/commonTerms-query2.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); } @Test public void test05305() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05305"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum4 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("", postingsEnum4, postingsEnum5, true); simpleIndexQueryParserTests0.resetCheckIndexStatus(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testConstantScoreQueryBuilder(); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } } @Test public void test05306() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05306"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testAndFilteredQuery2(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/and-filter2.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); } @Test public void test05307() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05307"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (short) 1); simpleIndexQueryParserTests0.setUp(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.setUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testNotFilteredQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/not-filter.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); } @Test public void test05308() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05308"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.PostingsEnum postingsEnum6 = null; org.apache.lucene.index.PostingsEnum postingsEnum7 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.slow", indexReader4, 0, postingsEnum6, postingsEnum7, true); simpleIndexQueryParserTests0.resetCheckIndexStatus(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSpanWithinQueryBuilder(); 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 test05309() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05309"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.nightly", indexReader10, (int) (byte) 10, postingsEnum12, postingsEnum13, true); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testTermQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/term.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05310() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05310"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum4 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("", postingsEnum4, postingsEnum5, true); org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("", postingsEnum9, postingsEnum10, false); org.junit.rules.TestRule testRule13 = simpleIndexQueryParserTests0.ruleChain; org.junit.rules.TestRule testRule14 = simpleIndexQueryParserTests0.ruleChain; simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (short) -1); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSpanNotQueryBuilder(); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertNotNull(testRule13); org.junit.Assert.assertNotNull(testRule14); } @Test public void test05311() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05311"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); simpleIndexQueryParserTests0.ensureCleanedUp(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests6 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str7 = simpleIndexQueryParserTests6.getTestName(); simpleIndexQueryParserTests6.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests6.ensureCleanedUp(); java.lang.String str10 = simpleIndexQueryParserTests6.getTestName(); simpleIndexQueryParserTests6.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests6.setUp(); java.lang.String str14 = simpleIndexQueryParserTests6.getTestName(); org.apache.lucene.index.IndexReader indexReader16 = null; org.apache.lucene.index.PostingsEnum postingsEnum18 = null; org.apache.lucene.index.PostingsEnum postingsEnum19 = null; simpleIndexQueryParserTests6.assertPositionsSkippingEquals("tests.badapples", indexReader16, (-1), postingsEnum18, postingsEnum19); org.apache.lucene.index.PostingsEnum postingsEnum22 = null; org.apache.lucene.index.PostingsEnum postingsEnum23 = null; simpleIndexQueryParserTests6.assertDocsEnumEquals("tests.failfast", postingsEnum22, postingsEnum23, true); org.junit.Assert.assertNotSame((java.lang.Object) simpleIndexQueryParserTests0, (java.lang.Object) "tests.failfast"); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testDisMaxBuilder(); 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.assertEquals("'" + str7 + "' != '" + "<unknown>" + "'", str7, "<unknown>"); org.junit.Assert.assertEquals("'" + str10 + "' != '" + "<unknown>" + "'", str10, "<unknown>"); org.junit.Assert.assertEquals("'" + str14 + "' != '" + "<unknown>" + "'", str14, "<unknown>"); } @Test public void test05312() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05312"); java.util.Locale locale3 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray4 = new java.lang.Cloneable[] { locale3 }; java.util.List<java.lang.Cloneable> cloneableList5 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray4); java.lang.Object obj6 = null; org.junit.Assert.assertNotSame((java.lang.Object) cloneableList5, obj6); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests8 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Fields fields11 = null; org.apache.lucene.index.Fields fields12 = null; simpleIndexQueryParserTests8.assertFieldsEquals("tests.maxfailures", indexReader10, fields11, fields12, false); org.junit.Assert.assertNotSame("tests.slow", obj6, (java.lang.Object) simpleIndexQueryParserTests8); simpleIndexQueryParserTests8.resetCheckIndexStatus(); simpleIndexQueryParserTests8.ensureCleanedUp(); simpleIndexQueryParserTests8.resetCheckIndexStatus(); simpleIndexQueryParserTests8.ensureCleanedUp(); org.junit.Assert.assertNotNull((java.lang.Object) simpleIndexQueryParserTests8); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests22 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str23 = simpleIndexQueryParserTests22.getTestName(); simpleIndexQueryParserTests22.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests22.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests22); org.apache.lucene.index.IndexReader indexReader28 = null; org.apache.lucene.index.PostingsEnum postingsEnum30 = null; org.apache.lucene.index.PostingsEnum postingsEnum31 = null; simpleIndexQueryParserTests22.assertPositionsSkippingEquals("tests.maxfailures", indexReader28, (-1), postingsEnum30, postingsEnum31); simpleIndexQueryParserTests22.resetCheckIndexStatus(); simpleIndexQueryParserTests22.ensureCheckIndexPassed(); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests35 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str36 = simpleIndexQueryParserTests35.getTestName(); simpleIndexQueryParserTests35.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader39 = null; org.apache.lucene.index.Terms terms40 = null; org.apache.lucene.index.Terms terms41 = null; simpleIndexQueryParserTests35.assertTermsEquals("tests.maxfailures", indexReader39, terms40, terms41, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests44 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str45 = simpleIndexQueryParserTests44.getTestName(); simpleIndexQueryParserTests44.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests44.ensureCleanedUp(); java.lang.String str48 = simpleIndexQueryParserTests44.getTestName(); org.apache.lucene.index.IndexReader indexReader50 = null; org.apache.lucene.index.Fields fields51 = null; org.apache.lucene.index.Fields fields52 = null; simpleIndexQueryParserTests44.assertFieldsEquals("europarl.lines.txt.gz", indexReader50, fields51, fields52, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests55 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests55.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum59 = null; org.apache.lucene.index.PostingsEnum postingsEnum60 = null; simpleIndexQueryParserTests55.assertDocsEnumEquals("", postingsEnum59, postingsEnum60, true); simpleIndexQueryParserTests55.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain64 = simpleIndexQueryParserTests55.failureAndSuccessEvents; simpleIndexQueryParserTests44.failureAndSuccessEvents = ruleChain64; simpleIndexQueryParserTests35.failureAndSuccessEvents = ruleChain64; simpleIndexQueryParserTests22.failureAndSuccessEvents = ruleChain64; org.apache.lucene.util.LuceneTestCase.classRules = ruleChain64; simpleIndexQueryParserTests8.failureAndSuccessEvents = ruleChain64; org.apache.lucene.index.IndexReader indexReader71 = null; org.apache.lucene.index.Fields fields72 = null; org.apache.lucene.index.Fields fields73 = null; simpleIndexQueryParserTests8.assertFieldsEquals("tests.slow", indexReader71, fields72, fields73, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests8.setup(); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale3); org.junit.Assert.assertEquals(locale3.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray4); org.junit.Assert.assertNotNull(cloneableList5); org.junit.Assert.assertEquals("'" + str23 + "' != '" + "<unknown>" + "'", str23, "<unknown>"); org.junit.Assert.assertEquals("'" + str36 + "' != '" + "<unknown>" + "'", str36, "<unknown>"); org.junit.Assert.assertEquals("'" + str45 + "' != '" + "<unknown>" + "'", str45, "<unknown>"); org.junit.Assert.assertEquals("'" + str48 + "' != '" + "<unknown>" + "'", str48, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain64); } @Test public void test05313() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05313"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); org.apache.lucene.index.IndexReader indexReader11 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; org.apache.lucene.index.PostingsEnum postingsEnum14 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.nightly", indexReader11, (int) '#', postingsEnum13, postingsEnum14); org.apache.lucene.index.IndexReader indexReader17 = null; org.apache.lucene.index.Terms terms18 = null; org.apache.lucene.index.Terms terms19 = null; simpleIndexQueryParserTests0.assertTermsEquals("enwiki.random.lines.txt", indexReader17, terms18, terms19, false); org.apache.lucene.index.IndexReader indexReader23 = null; org.apache.lucene.index.Terms terms24 = null; org.apache.lucene.index.Terms terms25 = null; simpleIndexQueryParserTests0.assertTermsEquals("europarl.lines.txt.gz", indexReader23, terms24, terms25, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testConstantScoreQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/constantScore-query.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05314() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05314"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.junit.rules.RuleChain ruleChain7 = simpleIndexQueryParserTests0.failureAndSuccessEvents; simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("enwiki.random.lines.txt", indexReader10, (int) (short) -1, postingsEnum12, postingsEnum13); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testPrefixQueryBoostQueryBuilder(); 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(ruleChain7); } @Test public void test05315() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05315"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests1); org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests1.assertPositionsSkippingEquals("tests.maxfailures", indexReader7, (-1), postingsEnum9, postingsEnum10); simpleIndexQueryParserTests1.resetCheckIndexStatus(); simpleIndexQueryParserTests1.ensureCheckIndexPassed(); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests14 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str15 = simpleIndexQueryParserTests14.getTestName(); simpleIndexQueryParserTests14.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader18 = null; org.apache.lucene.index.Terms terms19 = null; org.apache.lucene.index.Terms terms20 = null; simpleIndexQueryParserTests14.assertTermsEquals("tests.maxfailures", indexReader18, terms19, terms20, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests23 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str24 = simpleIndexQueryParserTests23.getTestName(); simpleIndexQueryParserTests23.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests23.ensureCleanedUp(); java.lang.String str27 = simpleIndexQueryParserTests23.getTestName(); org.apache.lucene.index.IndexReader indexReader29 = null; org.apache.lucene.index.Fields fields30 = null; org.apache.lucene.index.Fields fields31 = null; simpleIndexQueryParserTests23.assertFieldsEquals("europarl.lines.txt.gz", indexReader29, fields30, fields31, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests34 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests34.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum38 = null; org.apache.lucene.index.PostingsEnum postingsEnum39 = null; simpleIndexQueryParserTests34.assertDocsEnumEquals("", postingsEnum38, postingsEnum39, true); simpleIndexQueryParserTests34.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain43 = simpleIndexQueryParserTests34.failureAndSuccessEvents; simpleIndexQueryParserTests23.failureAndSuccessEvents = ruleChain43; simpleIndexQueryParserTests14.failureAndSuccessEvents = ruleChain43; simpleIndexQueryParserTests1.failureAndSuccessEvents = ruleChain43; simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.overrideTestDefaultQueryCache(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testMatchWithFuzzyTranspositions(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/match-with-fuzzy-transpositions.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); org.junit.Assert.assertEquals("'" + str15 + "' != '" + "<unknown>" + "'", str15, "<unknown>"); org.junit.Assert.assertEquals("'" + str24 + "' != '" + "<unknown>" + "'", str24, "<unknown>"); org.junit.Assert.assertEquals("'" + str27 + "' != '" + "<unknown>" + "'", str27, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain43); } @Test public void test05316() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05316"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests1); org.junit.rules.RuleChain ruleChain6 = simpleIndexQueryParserTests1.failureAndSuccessEvents; simpleIndexQueryParserTests1.resetCheckIndexStatus(); simpleIndexQueryParserTests1.setIndexWriterMaxDocs((-1)); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testRegexpQueryWithMaxDeterminizedStates(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/regexp-max-determinized-states.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain6); } @Test public void test05317() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05317"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.PostingsEnum postingsEnum6 = null; org.apache.lucene.index.PostingsEnum postingsEnum7 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.slow", indexReader4, 0, postingsEnum6, postingsEnum7, true); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testQueryFilter(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/query-filter.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05318() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05318"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain2 = simpleIndexQueryParserTests0.failureAndSuccessEvents; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testQueryStringFields1(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/query-fields1.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertNotNull(ruleChain2); } @Test public void test05319() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05319"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.PostingsEnum postingsEnum6 = null; org.apache.lucene.index.PostingsEnum postingsEnum7 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.maxfailures", indexReader4, (int) (short) 100, postingsEnum6, postingsEnum7); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.junit.rules.TestRule testRule10 = simpleIndexQueryParserTests0.ruleChain; simpleIndexQueryParserTests0.ensureCheckIndexPassed(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoDistanceFilter6(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_distance6.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertNotNull(testRule10); } @Test public void test05320() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05320"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.apache.lucene.index.PostingsEnum postingsEnum5 = null; org.apache.lucene.index.PostingsEnum postingsEnum6 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("hi!", postingsEnum5, postingsEnum6, false); org.junit.rules.TestRule testRule9 = simpleIndexQueryParserTests0.ruleChain; org.apache.lucene.index.IndexReader indexReader11 = null; org.apache.lucene.index.Terms terms12 = null; org.apache.lucene.index.Terms terms13 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.failfast", indexReader11, terms12, terms13, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testQueryStringRegexpTooManyDeterminizedStates(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/query-regexp-too-many-determinized-states.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertNotNull(testRule9); } @Test public void test05321() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05321"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum4 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("", postingsEnum4, postingsEnum5, true); org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("", postingsEnum9, postingsEnum10, false); org.junit.rules.TestRule testRule13 = simpleIndexQueryParserTests0.ruleChain; simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.apache.lucene.index.IndexReader indexReader16 = null; org.apache.lucene.index.PostingsEnum postingsEnum18 = null; org.apache.lucene.index.PostingsEnum postingsEnum19 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.weekly", indexReader16, (int) (byte) 100, postingsEnum18, postingsEnum19); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSpanFirstQueryBuilder(); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertNotNull(testRule13); } @Test public void test05322() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05322"); // The following exception was thrown during execution in test generation try { int int2 = org.elasticsearch.test.ElasticsearchTestCase.iterations((int) 'a', 1); org.junit.Assert.fail("Expected exception of type java.lang.IllegalArgumentException; message: max must be >= min: 97, 1"); } catch (java.lang.IllegalArgumentException e) { // Expected exception. } } @Test public void test05323() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05323"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests1); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testGeoDistanceFilterNamed(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_distance-named.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); } @Test public void test05324() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05324"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.PostingsEnum postingsEnum6 = null; org.apache.lucene.index.PostingsEnum postingsEnum7 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.slow", indexReader4, 0, postingsEnum6, postingsEnum7, true); simpleIndexQueryParserTests0.ensureCleanedUp(); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests11 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str12 = simpleIndexQueryParserTests11.getTestName(); simpleIndexQueryParserTests11.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests11.ensureCleanedUp(); java.lang.String str15 = simpleIndexQueryParserTests11.getTestName(); org.apache.lucene.index.IndexReader indexReader17 = null; org.apache.lucene.index.Fields fields18 = null; org.apache.lucene.index.Fields fields19 = null; simpleIndexQueryParserTests11.assertFieldsEquals("europarl.lines.txt.gz", indexReader17, fields18, fields19, true); org.apache.lucene.index.PostingsEnum postingsEnum23 = null; org.apache.lucene.index.PostingsEnum postingsEnum24 = null; simpleIndexQueryParserTests11.assertDocsEnumEquals("tests.nightly", postingsEnum23, postingsEnum24, true); org.apache.lucene.index.IndexReader indexReader28 = null; org.apache.lucene.index.Terms terms29 = null; org.apache.lucene.index.Terms terms30 = null; simpleIndexQueryParserTests11.assertTermsEquals("hi!", indexReader28, terms29, terms30, false); org.junit.Assert.assertNotSame((java.lang.Object) simpleIndexQueryParserTests0, (java.lang.Object) "hi!"); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoBoundingBoxFilter6(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_boundingbox6.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str12 + "' != '" + "<unknown>" + "'", str12, "<unknown>"); org.junit.Assert.assertEquals("'" + str15 + "' != '" + "<unknown>" + "'", str15, "<unknown>"); } @Test public void test05325() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05325"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (short) 1); simpleIndexQueryParserTests0.setUp(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("random", postingsEnum12, postingsEnum13, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoPolygonFilter3(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_polygon3.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); } @Test public void test05326() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05326"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.nightly", indexReader7, 100, postingsEnum9, postingsEnum10, false); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader15 = null; org.apache.lucene.index.Terms terms16 = null; org.apache.lucene.index.Terms terms17 = null; simpleIndexQueryParserTests0.assertTermsEquals("enwiki.random.lines.txt", indexReader15, terms16, terms17, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testTermsQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/terms-query.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05327() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05327"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); 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 { simpleIndexQueryParserTests0.assertReaderStatisticsEquals("tests.slow", 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.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); } @Test public void test05328() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05328"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests9 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str10 = simpleIndexQueryParserTests9.getTestName(); simpleIndexQueryParserTests9.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests9.ensureCleanedUp(); java.lang.String str13 = simpleIndexQueryParserTests9.getTestName(); org.apache.lucene.index.IndexReader indexReader15 = null; org.apache.lucene.index.Fields fields16 = null; org.apache.lucene.index.Fields fields17 = null; simpleIndexQueryParserTests9.assertFieldsEquals("europarl.lines.txt.gz", indexReader15, fields16, fields17, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests20 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests20.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum24 = null; org.apache.lucene.index.PostingsEnum postingsEnum25 = null; simpleIndexQueryParserTests20.assertDocsEnumEquals("", postingsEnum24, postingsEnum25, true); simpleIndexQueryParserTests20.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain29 = simpleIndexQueryParserTests20.failureAndSuccessEvents; simpleIndexQueryParserTests9.failureAndSuccessEvents = ruleChain29; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain29; org.apache.lucene.index.IndexReader indexReader33 = null; org.apache.lucene.index.Fields fields34 = null; org.apache.lucene.index.Fields fields35 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.weekly", indexReader33, fields34, fields35, false); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoDistanceFilter5(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_distance5.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str10 + "' != '" + "<unknown>" + "'", str10, "<unknown>"); org.junit.Assert.assertEquals("'" + str13 + "' != '" + "<unknown>" + "'", str13, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain29); } @Test public void test05329() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05329"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.setup(); 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 test05330() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05330"); java.util.Random random0 = null; org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests2 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str3 = simpleIndexQueryParserTests2.getTestName(); simpleIndexQueryParserTests2.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests2.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain6 = null; simpleIndexQueryParserTests2.failureAndSuccessEvents = ruleChain6; simpleIndexQueryParserTests2.ensureAllSearchContextsReleased(); org.junit.rules.RuleChain ruleChain9 = simpleIndexQueryParserTests2.failureAndSuccessEvents; simpleIndexQueryParserTests2.restoreIndexWriterMaxDocs(); java.lang.String str11 = simpleIndexQueryParserTests2.getTestName(); java.lang.String str12 = simpleIndexQueryParserTests2.getTestName(); java.lang.String str13 = simpleIndexQueryParserTests2.getTestName(); 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, "tests.nightly", (java.lang.Object) simpleIndexQueryParserTests2, fieldType14); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str3 + "' != '" + "<unknown>" + "'", str3, "<unknown>"); org.junit.Assert.assertNull(ruleChain9); org.junit.Assert.assertEquals("'" + str11 + "' != '" + "<unknown>" + "'", str11, "<unknown>"); org.junit.Assert.assertEquals("'" + str12 + "' != '" + "<unknown>" + "'", str12, "<unknown>"); org.junit.Assert.assertEquals("'" + str13 + "' != '" + "<unknown>" + "'", str13, "<unknown>"); } @Test public void test05331() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05331"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests1); org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.Terms terms8 = null; org.apache.lucene.index.Terms terms9 = null; simpleIndexQueryParserTests1.assertTermsEquals("tests.slow", indexReader7, terms8, terms9, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testSpanContainingQueryParser(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/spanContaining.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); } @Test public void test05332() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05332"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.apache.lucene.index.PostingsEnum postingsEnum5 = null; org.apache.lucene.index.PostingsEnum postingsEnum6 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("hi!", postingsEnum5, postingsEnum6, false); org.junit.rules.TestRule testRule9 = simpleIndexQueryParserTests0.ruleChain; simpleIndexQueryParserTests0.ensureCheckIndexPassed(); org.elasticsearch.common.unit.TimeValue timeValue11 = null; java.lang.String[] strArray12 = new java.lang.String[] {}; // The following exception was thrown during execution in test generation try { org.elasticsearch.action.admin.cluster.health.ClusterHealthStatus clusterHealthStatus13 = simpleIndexQueryParserTests0.ensureGreen(timeValue11, strArray12); 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.assertNotNull(testRule9); org.junit.Assert.assertNotNull(strArray12); } @Test public void test05333() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05333"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum4 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("", postingsEnum4, postingsEnum5, true); org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("", postingsEnum9, postingsEnum10, false); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests14 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str15 = simpleIndexQueryParserTests14.getTestName(); simpleIndexQueryParserTests14.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests14.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests14); org.junit.rules.RuleChain ruleChain19 = simpleIndexQueryParserTests14.failureAndSuccessEvents; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain19; org.apache.lucene.index.PostingsEnum postingsEnum22 = null; org.apache.lucene.index.PostingsEnum postingsEnum23 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("", postingsEnum22, postingsEnum23, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testFilteredQuery4(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/filtered-query4.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str15 + "' != '" + "<unknown>" + "'", str15, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain19); } @Test public void test05334() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05334"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests1); org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests1.assertPositionsSkippingEquals("tests.maxfailures", indexReader7, (-1), postingsEnum9, postingsEnum10); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testFilteredQueryBuilder(); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); } @Test public void test05335() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05335"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setUp(); java.lang.String str8 = simpleIndexQueryParserTests0.getTestName(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.badapples", indexReader10, (-1), postingsEnum12, postingsEnum13); org.apache.lucene.index.PostingsEnum postingsEnum16 = null; org.apache.lucene.index.PostingsEnum postingsEnum17 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.failfast", postingsEnum16, postingsEnum17, true); org.apache.lucene.index.IndexReader indexReader21 = null; org.apache.lucene.index.Terms terms22 = null; org.apache.lucene.index.Terms terms23 = null; simpleIndexQueryParserTests0.assertTermsEquals("europarl.lines.txt.gz", indexReader21, terms22, terms23, true); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (short) -1); org.apache.lucene.index.IndexReader indexReader29 = null; org.apache.lucene.index.IndexReader indexReader30 = null; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.assertNormsEquals("", indexReader29, indexReader30); 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.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertEquals("'" + str8 + "' != '" + "<unknown>" + "'", str8, "<unknown>"); } @Test public void test05336() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05336"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Fields fields5 = null; org.apache.lucene.index.Fields fields6 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.awaitsfix", indexReader4, fields5, fields6, false); org.apache.lucene.index.PostingsEnum postingsEnum10 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.weekly", postingsEnum10, postingsEnum11, false); 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 { simpleIndexQueryParserTests0.assertNormsEquals("tests.maxfailures", 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.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05337() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05337"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests1); org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.Terms terms8 = null; org.apache.lucene.index.Terms terms9 = null; simpleIndexQueryParserTests1.assertTermsEquals("node_s_0", indexReader7, terms8, terms9, false); simpleIndexQueryParserTests1.restoreIndexWriterMaxDocs(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testEmptyBoolSubClausesIsMatchAll(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/bool-query-with-empty-clauses-for-parsing.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); } @Test public void test05338() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05338"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); org.junit.rules.TestRule testRule2 = simpleIndexQueryParserTests0.ruleChain; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSpanMultiTermWildcardQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/span-multi-term-wildcard.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertNotNull(testRule2); } @Test public void test05339() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05339"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.ensureCleanedUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testTermsFilterQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/terms-filter.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05340() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05340"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); simpleIndexQueryParserTests0.overrideTestDefaultQueryCache(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testRangeQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/range.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05341() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05341"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Terms terms11 = null; org.apache.lucene.index.Terms terms12 = null; simpleIndexQueryParserTests0.assertTermsEquals("hi!", indexReader10, terms11, terms12, false); org.apache.lucene.index.IndexReader indexReader16 = null; org.apache.lucene.index.Terms terms17 = null; org.apache.lucene.index.Terms terms18 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.badapples", indexReader16, terms17, terms18, true); java.lang.String str21 = simpleIndexQueryParserTests0.getTestName(); // The following exception was thrown during execution in test generation try { // flaky: simpleIndexQueryParserTests0.testTermsQueryWithMultipleFields(); // flaky: 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.assertEquals("'" + str21 + "' != '" + "<unknown>" + "'", str21, "<unknown>"); } @Test public void test05342() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05342"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Terms terms11 = null; org.apache.lucene.index.Terms terms12 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.failfast", indexReader10, terms11, terms12, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testCommonTermsQuery3(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/commonTerms-query3.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05343() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05343"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain5 = null; simpleIndexQueryParserTests1.failureAndSuccessEvents = ruleChain5; org.apache.lucene.index.IndexReader indexReader8 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; simpleIndexQueryParserTests1.assertDocsSkippingEquals("tests.nightly", indexReader8, 100, postingsEnum10, postingsEnum11, false); simpleIndexQueryParserTests1.resetCheckIndexStatus(); org.junit.Assert.assertNotNull("tests.slow", (java.lang.Object) simpleIndexQueryParserTests1); org.junit.rules.RuleChain ruleChain16 = simpleIndexQueryParserTests1.failureAndSuccessEvents; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testSpanWithinQueryBuilder(); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); org.junit.Assert.assertNull(ruleChain16); } @Test public void test05344() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05344"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); simpleIndexQueryParserTests0.ensureCleanedUp(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests6 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str7 = simpleIndexQueryParserTests6.getTestName(); simpleIndexQueryParserTests6.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests6.ensureCleanedUp(); java.lang.String str10 = simpleIndexQueryParserTests6.getTestName(); simpleIndexQueryParserTests6.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests6.setUp(); java.lang.String str14 = simpleIndexQueryParserTests6.getTestName(); org.apache.lucene.index.IndexReader indexReader16 = null; org.apache.lucene.index.PostingsEnum postingsEnum18 = null; org.apache.lucene.index.PostingsEnum postingsEnum19 = null; simpleIndexQueryParserTests6.assertPositionsSkippingEquals("tests.badapples", indexReader16, (-1), postingsEnum18, postingsEnum19); org.apache.lucene.index.PostingsEnum postingsEnum22 = null; org.apache.lucene.index.PostingsEnum postingsEnum23 = null; simpleIndexQueryParserTests6.assertDocsEnumEquals("tests.failfast", postingsEnum22, postingsEnum23, true); org.junit.Assert.assertNotSame((java.lang.Object) simpleIndexQueryParserTests0, (java.lang.Object) "tests.failfast"); org.junit.rules.TestRule testRule27 = simpleIndexQueryParserTests0.ruleChain; // The following exception was thrown during execution in test generation try { // flaky: simpleIndexQueryParserTests0.testWeight1fStillProducesWeighFunction(); // flaky: 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.assertEquals("'" + str7 + "' != '" + "<unknown>" + "'", str7, "<unknown>"); org.junit.Assert.assertEquals("'" + str10 + "' != '" + "<unknown>" + "'", str10, "<unknown>"); org.junit.Assert.assertEquals("'" + str14 + "' != '" + "<unknown>" + "'", str14, "<unknown>"); org.junit.Assert.assertNotNull(testRule27); } @Test public void test05345() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05345"); // The following exception was thrown during execution in test generation try { java.lang.String str2 = org.elasticsearch.test.ElasticsearchTestCase.randomRealisticUnicodeOfLengthBetween(2, (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 test05346() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05346"); java.util.Locale locale2 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray3 = new java.lang.Cloneable[] { locale2 }; java.util.List<java.lang.Cloneable> cloneableList4 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray3); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests5 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests5.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain7 = simpleIndexQueryParserTests5.failureAndSuccessEvents; org.junit.Assert.assertNotSame((java.lang.Object) cloneableArray3, (java.lang.Object) simpleIndexQueryParserTests5); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests5.assertDocsSkippingEquals("tests.failfast", indexReader10, (int) (byte) 100, postingsEnum12, postingsEnum13, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests5.testSpanContainingQueryBuilder(); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale2); org.junit.Assert.assertEquals(locale2.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray3); org.junit.Assert.assertNotNull(cloneableList4); org.junit.Assert.assertNotNull(ruleChain7); } @Test public void test05347() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05347"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testFilteredQuery3(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/filtered-query3.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); } @Test public void test05348() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05348"); // The following exception was thrown during execution in test generation try { org.apache.lucene.util.LuceneTestCase.assumeFalse("enwiki.random.lines.txt", true); org.junit.Assert.fail("Expected exception of type com.carrotsearch.randomizedtesting.InternalAssumptionViolatedException; message: enwiki.random.lines.txt"); } catch (org.junit.internal.AssumptionViolatedException e) { // Expected exception. } } @Test public void test05349() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05349"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setUp(); java.lang.String str8 = simpleIndexQueryParserTests0.getTestName(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.badapples", indexReader10, (-1), postingsEnum12, postingsEnum13); org.apache.lucene.index.PostingsEnum postingsEnum16 = null; org.apache.lucene.index.PostingsEnum postingsEnum17 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.failfast", postingsEnum16, postingsEnum17, true); org.apache.lucene.index.IndexReader indexReader21 = null; org.apache.lucene.index.Terms terms22 = null; org.apache.lucene.index.Terms terms23 = null; simpleIndexQueryParserTests0.assertTermsEquals("europarl.lines.txt.gz", indexReader21, terms22, terms23, true); simpleIndexQueryParserTests0.overrideTestDefaultQueryCache(); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); java.lang.String str28 = simpleIndexQueryParserTests0.getTestName(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testFuzzyQueryWithFields2(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/fuzzy-with-fields2.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertEquals("'" + str8 + "' != '" + "<unknown>" + "'", str8, "<unknown>"); org.junit.Assert.assertEquals("'" + str28 + "' != '" + "<unknown>" + "'", str28, "<unknown>"); } @Test public void test05350() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05350"); java.util.Locale locale3 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray4 = new java.lang.Cloneable[] { locale3 }; java.util.List<java.lang.Cloneable> cloneableList5 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray4); java.lang.Object obj6 = null; org.junit.Assert.assertNotSame((java.lang.Object) cloneableList5, obj6); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests8 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Fields fields11 = null; org.apache.lucene.index.Fields fields12 = null; simpleIndexQueryParserTests8.assertFieldsEquals("tests.maxfailures", indexReader10, fields11, fields12, false); org.junit.Assert.assertNotSame("tests.slow", obj6, (java.lang.Object) simpleIndexQueryParserTests8); simpleIndexQueryParserTests8.resetCheckIndexStatus(); simpleIndexQueryParserTests8.ensureCleanedUp(); simpleIndexQueryParserTests8.resetCheckIndexStatus(); simpleIndexQueryParserTests8.ensureCleanedUp(); org.junit.Assert.assertNotNull((java.lang.Object) simpleIndexQueryParserTests8); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests8.testCommonTermsQuery1(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/commonTerms-query1.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale3); org.junit.Assert.assertEquals(locale3.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray4); org.junit.Assert.assertNotNull(cloneableList5); } @Test public void test05351() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05351"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Terms terms11 = null; org.apache.lucene.index.Terms terms12 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.failfast", indexReader10, terms11, terms12, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testBoolFilteredQueryBuilder(); 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 test05352() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05352"); // 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 test05353() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05353"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; java.lang.String str6 = simpleIndexQueryParserTests0.getTestName(); org.apache.lucene.index.IndexReader indexReader8 = null; org.apache.lucene.index.Fields fields9 = null; org.apache.lucene.index.Fields fields10 = null; simpleIndexQueryParserTests0.assertFieldsEquals("hi!", indexReader8, fields9, fields10, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoDistanceFilter7(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_distance7.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str6 + "' != '" + "<unknown>" + "'", str6, "<unknown>"); } @Test public void test05354() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05354"); // The following exception was thrown during execution in test generation try { int int2 = org.elasticsearch.test.ElasticsearchTestCase.between((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 test05355() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05355"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests9 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str10 = simpleIndexQueryParserTests9.getTestName(); simpleIndexQueryParserTests9.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests9.ensureCleanedUp(); java.lang.String str13 = simpleIndexQueryParserTests9.getTestName(); org.apache.lucene.index.IndexReader indexReader15 = null; org.apache.lucene.index.Fields fields16 = null; org.apache.lucene.index.Fields fields17 = null; simpleIndexQueryParserTests9.assertFieldsEquals("europarl.lines.txt.gz", indexReader15, fields16, fields17, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests20 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests20.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum24 = null; org.apache.lucene.index.PostingsEnum postingsEnum25 = null; simpleIndexQueryParserTests20.assertDocsEnumEquals("", postingsEnum24, postingsEnum25, true); simpleIndexQueryParserTests20.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain29 = simpleIndexQueryParserTests20.failureAndSuccessEvents; simpleIndexQueryParserTests9.failureAndSuccessEvents = ruleChain29; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain29; org.apache.lucene.index.IndexReader indexReader33 = null; org.apache.lucene.index.Fields fields34 = null; org.apache.lucene.index.Fields fields35 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.weekly", indexReader33, fields34, fields35, false); simpleIndexQueryParserTests0.setUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSpanNotQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/spanNot.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str10 + "' != '" + "<unknown>" + "'", str10, "<unknown>"); org.junit.Assert.assertEquals("'" + str13 + "' != '" + "<unknown>" + "'", str13, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain29); } @Test public void test05356() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05356"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setUp(); java.lang.String str8 = simpleIndexQueryParserTests0.getTestName(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.badapples", indexReader10, (-1), postingsEnum12, postingsEnum13); org.apache.lucene.index.PostingsEnum postingsEnum16 = null; org.apache.lucene.index.PostingsEnum postingsEnum17 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.failfast", postingsEnum16, postingsEnum17, true); org.apache.lucene.index.IndexReader indexReader21 = null; org.apache.lucene.index.Terms terms22 = null; org.apache.lucene.index.Terms terms23 = null; simpleIndexQueryParserTests0.assertTermsEquals("europarl.lines.txt.gz", indexReader21, terms22, terms23, true); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.TestRule testRule28 = simpleIndexQueryParserTests0.ruleChain; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testRange2Query(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/range2.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertEquals("'" + str8 + "' != '" + "<unknown>" + "'", str8, "<unknown>"); org.junit.Assert.assertNotNull(testRule28); } @Test public void test05357() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05357"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); java.lang.String str5 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests1.setIndexWriterMaxDocs((int) (short) 1); simpleIndexQueryParserTests1.resetCheckIndexStatus(); org.junit.Assert.assertNotNull("tests.weekly", (java.lang.Object) simpleIndexQueryParserTests1); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testMatchWithoutFuzzyTranspositions(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/match-without-fuzzy-transpositions.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); org.junit.Assert.assertEquals("'" + str5 + "' != '" + "<unknown>" + "'", str5, "<unknown>"); } @Test public void test05358() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05358"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.junit.rules.RuleChain ruleChain7 = simpleIndexQueryParserTests0.failureAndSuccessEvents; simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); java.lang.String str9 = simpleIndexQueryParserTests0.getTestName(); org.junit.Assert.assertNotNull((java.lang.Object) simpleIndexQueryParserTests0); java.lang.Class<?> wildcardClass11 = simpleIndexQueryParserTests0.getClass(); org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertNull(ruleChain7); org.junit.Assert.assertEquals("'" + str9 + "' != '" + "<unknown>" + "'", str9, "<unknown>"); org.junit.Assert.assertNotNull(wildcardClass11); } @Test public void test05359() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05359"); 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.slow"); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } } @Test public void test05360() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05360"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.junit.rules.RuleChain ruleChain7 = simpleIndexQueryParserTests0.failureAndSuccessEvents; simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); java.lang.String str9 = simpleIndexQueryParserTests0.getTestName(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSpanWithinQueryParser(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/spanWithin.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertNull(ruleChain7); org.junit.Assert.assertEquals("'" + str9 + "' != '" + "<unknown>" + "'", str9, "<unknown>"); } @Test public void test05361() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05361"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader2 = null; org.apache.lucene.index.Fields fields3 = null; org.apache.lucene.index.Fields fields4 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.maxfailures", indexReader2, fields3, fields4, false); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests7 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str8 = simpleIndexQueryParserTests7.getTestName(); simpleIndexQueryParserTests7.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests7.ensureCleanedUp(); java.lang.String str11 = simpleIndexQueryParserTests7.getTestName(); org.apache.lucene.index.IndexReader indexReader13 = null; org.apache.lucene.index.Fields fields14 = null; org.apache.lucene.index.Fields fields15 = null; simpleIndexQueryParserTests7.assertFieldsEquals("europarl.lines.txt.gz", indexReader13, fields14, fields15, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests18 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests18.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum22 = null; org.apache.lucene.index.PostingsEnum postingsEnum23 = null; simpleIndexQueryParserTests18.assertDocsEnumEquals("", postingsEnum22, postingsEnum23, true); simpleIndexQueryParserTests18.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain27 = simpleIndexQueryParserTests18.failureAndSuccessEvents; simpleIndexQueryParserTests7.failureAndSuccessEvents = ruleChain27; java.lang.Object obj29 = null; org.junit.Assert.assertNotSame((java.lang.Object) ruleChain27, obj29); simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain27; org.apache.lucene.index.PostingsEnum postingsEnum33 = null; org.apache.lucene.index.PostingsEnum postingsEnum34 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.badapples", postingsEnum33, postingsEnum34, true); simpleIndexQueryParserTests0.setUp(); org.apache.lucene.index.TermsEnum termsEnum39 = null; org.apache.lucene.index.TermsEnum termsEnum40 = null; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.assertTermStatsEquals("tests.weekly", termsEnum39, termsEnum40); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str8 + "' != '" + "<unknown>" + "'", str8, "<unknown>"); org.junit.Assert.assertEquals("'" + str11 + "' != '" + "<unknown>" + "'", str11, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain27); } @Test public void test05362() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05362"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.overrideTestDefaultQueryCache(); org.junit.rules.RuleChain ruleChain2 = simpleIndexQueryParserTests0.failureAndSuccessEvents; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testFilterParsing(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/function-filter-score-query.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertNotNull(ruleChain2); } @Test public void test05363() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05363"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum4 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("", postingsEnum4, postingsEnum5, true); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Fields fields11 = null; org.apache.lucene.index.Fields fields12 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.failfast", indexReader10, fields11, fields12, true); org.apache.lucene.index.IndexReader indexReader16 = null; org.apache.lucene.index.PostingsEnum postingsEnum18 = null; org.apache.lucene.index.PostingsEnum postingsEnum19 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("random", indexReader16, (int) (byte) 1, postingsEnum18, postingsEnum19); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.setup(); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } } @Test public void test05364() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05364"); org.apache.lucene.util.LuceneTestCase.assumeFalse("tests.monster", false); } @Test public void test05365() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05365"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum4 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("<unknown>", postingsEnum4, postingsEnum5, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testFilteredQuery3(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/filtered-query3.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } } @Test public void test05366() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05366"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); org.junit.rules.TestRule testRule4 = simpleIndexQueryParserTests0.ruleChain; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testMatchAllEmpty2(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/match_all_empty2.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertNotNull(testRule4); } @Test public void test05367() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05367"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.junit.rules.RuleChain ruleChain7 = simpleIndexQueryParserTests0.failureAndSuccessEvents; simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Terms terms11 = null; org.apache.lucene.index.Terms terms12 = null; simpleIndexQueryParserTests0.assertTermsEquals("node_s_0", indexReader10, terms11, terms12, false); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testAndFilteredQuery2(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/and-filter2.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertNull(ruleChain7); } @Test public void test05368() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05368"); float[] floatArray0 = new float[] {}; float[] floatArray1 = new float[] {}; org.junit.Assert.assertArrayEquals(floatArray0, floatArray1, (float) 100L); float[] floatArray5 = new float[] {}; float[] floatArray6 = new float[] {}; org.junit.Assert.assertArrayEquals(floatArray5, floatArray6, (float) 100L); float[] floatArray9 = new float[] {}; float[] floatArray10 = new float[] {}; org.junit.Assert.assertArrayEquals(floatArray9, floatArray10, (float) 100L); org.junit.Assert.assertArrayEquals(floatArray5, floatArray10, (float) (short) 100); float[] floatArray15 = new float[] {}; float[] floatArray16 = new float[] {}; org.junit.Assert.assertArrayEquals(floatArray15, floatArray16, (float) 100L); org.junit.Assert.assertArrayEquals("", floatArray10, floatArray16, 10.0f); float[] floatArray21 = new float[] {}; float[] floatArray22 = new float[] {}; org.junit.Assert.assertArrayEquals(floatArray21, floatArray22, (float) 100L); org.junit.Assert.assertArrayEquals(floatArray16, floatArray21, 10.0f); org.junit.Assert.assertArrayEquals(floatArray0, floatArray16, (float) (short) 10); float[] floatArray30 = new float[] {}; float[] floatArray31 = new float[] {}; org.junit.Assert.assertArrayEquals(floatArray30, floatArray31, (float) 100L); float[] floatArray34 = new float[] {}; float[] floatArray35 = new float[] {}; org.junit.Assert.assertArrayEquals(floatArray34, floatArray35, (float) 100L); org.junit.Assert.assertArrayEquals(floatArray30, floatArray35, (float) (short) 100); float[] floatArray40 = new float[] {}; float[] floatArray41 = new float[] {}; org.junit.Assert.assertArrayEquals(floatArray40, floatArray41, (float) 100L); org.junit.Assert.assertArrayEquals("node_s_0", floatArray30, floatArray41, (float) 3); org.junit.Assert.assertArrayEquals(floatArray16, floatArray30, 10.0f); float[] floatArray48 = new float[] {}; float[] floatArray49 = new float[] {}; org.junit.Assert.assertArrayEquals(floatArray48, floatArray49, (float) 100L); float[] floatArray52 = new float[] {}; float[] floatArray53 = new float[] {}; org.junit.Assert.assertArrayEquals(floatArray52, floatArray53, (float) 100L); org.junit.Assert.assertArrayEquals(floatArray48, floatArray53, (float) (short) -1); float[] floatArray59 = new float[] {}; float[] floatArray60 = new float[] {}; org.junit.Assert.assertArrayEquals(floatArray59, floatArray60, (float) 100L); float[] floatArray63 = new float[] {}; float[] floatArray64 = new float[] {}; org.junit.Assert.assertArrayEquals(floatArray63, floatArray64, (float) 100L); org.junit.Assert.assertArrayEquals(floatArray59, floatArray64, (float) (short) 100); float[] floatArray69 = new float[] {}; float[] floatArray70 = new float[] {}; org.junit.Assert.assertArrayEquals(floatArray69, floatArray70, (float) 100L); org.junit.Assert.assertArrayEquals("", floatArray64, floatArray70, 10.0f); org.junit.Assert.assertArrayEquals(floatArray53, floatArray64, (-1.0f)); org.junit.Assert.assertArrayEquals(floatArray16, floatArray53, 100.0f); org.junit.Assert.assertNotNull(floatArray0); org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray0), "[]"); org.junit.Assert.assertNotNull(floatArray1); org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray1), "[]"); 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(floatArray9); org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray9), "[]"); org.junit.Assert.assertNotNull(floatArray10); org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray10), "[]"); 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(floatArray48); org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray48), "[]"); org.junit.Assert.assertNotNull(floatArray49); org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray49), "[]"); 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(floatArray59); org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray59), "[]"); org.junit.Assert.assertNotNull(floatArray60); org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray60), "[]"); org.junit.Assert.assertNotNull(floatArray63); org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray63), "[]"); org.junit.Assert.assertNotNull(floatArray64); org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray64), "[]"); org.junit.Assert.assertNotNull(floatArray69); org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray69), "[]"); org.junit.Assert.assertNotNull(floatArray70); org.junit.Assert.assertEquals(java.util.Arrays.toString(floatArray70), "[]"); } @Test public void test05369() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05369"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setUp(); java.lang.String str8 = simpleIndexQueryParserTests0.getTestName(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.badapples", indexReader10, (-1), postingsEnum12, postingsEnum13); org.apache.lucene.index.PostingsEnum postingsEnum16 = null; org.apache.lucene.index.PostingsEnum postingsEnum17 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.failfast", postingsEnum16, postingsEnum17, true); org.apache.lucene.index.IndexReader indexReader21 = null; org.apache.lucene.index.Terms terms22 = null; org.apache.lucene.index.Terms terms23 = null; simpleIndexQueryParserTests0.assertTermsEquals("europarl.lines.txt.gz", indexReader21, terms22, terms23, true); org.junit.rules.TestRule testRule26 = simpleIndexQueryParserTests0.ruleChain; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testQueryStringFields3Builder(); 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.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertEquals("'" + str8 + "' != '" + "<unknown>" + "'", str8, "<unknown>"); org.junit.Assert.assertNotNull(testRule26); } @Test public void test05370() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05370"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.overrideTestDefaultQueryCache(); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); org.apache.lucene.index.IndexReader indexReader6 = null; org.apache.lucene.index.PostingsEnum postingsEnum8 = null; org.apache.lucene.index.PostingsEnum postingsEnum9 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.awaitsfix", indexReader6, (int) (byte) -1, postingsEnum8, postingsEnum9); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testQueryStringTimezone(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/query-timezone.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05371() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05371"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); org.apache.lucene.index.IndexReader indexReader8 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("<unknown>", indexReader8, (int) '4', postingsEnum10, postingsEnum11); simpleIndexQueryParserTests0.ensureCleanedUp(); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testQueryString(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/query.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); } @Test public void test05372() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05372"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader2 = null; org.apache.lucene.index.Fields fields3 = null; org.apache.lucene.index.Fields fields4 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.maxfailures", indexReader2, fields3, fields4, false); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests7 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str8 = simpleIndexQueryParserTests7.getTestName(); simpleIndexQueryParserTests7.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests7.ensureCleanedUp(); java.lang.String str11 = simpleIndexQueryParserTests7.getTestName(); org.apache.lucene.index.IndexReader indexReader13 = null; org.apache.lucene.index.Fields fields14 = null; org.apache.lucene.index.Fields fields15 = null; simpleIndexQueryParserTests7.assertFieldsEquals("europarl.lines.txt.gz", indexReader13, fields14, fields15, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests18 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests18.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum22 = null; org.apache.lucene.index.PostingsEnum postingsEnum23 = null; simpleIndexQueryParserTests18.assertDocsEnumEquals("", postingsEnum22, postingsEnum23, true); simpleIndexQueryParserTests18.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain27 = simpleIndexQueryParserTests18.failureAndSuccessEvents; simpleIndexQueryParserTests7.failureAndSuccessEvents = ruleChain27; java.lang.Object obj29 = null; org.junit.Assert.assertNotSame((java.lang.Object) ruleChain27, obj29); simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain27; org.apache.lucene.index.PostingsEnum postingsEnum33 = null; org.apache.lucene.index.PostingsEnum postingsEnum34 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.badapples", postingsEnum33, postingsEnum34, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testFilteredQuery4(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/filtered-query4.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str8 + "' != '" + "<unknown>" + "'", str8, "<unknown>"); org.junit.Assert.assertEquals("'" + str11 + "' != '" + "<unknown>" + "'", str11, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain27); } @Test public void test05373() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05373"); // The following exception was thrown during execution in test generation try { java.lang.String str2 = org.elasticsearch.test.ElasticsearchTestCase.randomRealisticUnicodeOfCodepointLengthBetween(3, 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 test05374() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05374"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (short) 1); simpleIndexQueryParserTests0.setUp(); simpleIndexQueryParserTests0.setUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSpanMultiTermPrefixQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/span-multi-term-prefix.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); } @Test public void test05375() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05375"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests1); org.junit.rules.RuleChain ruleChain6 = simpleIndexQueryParserTests1.failureAndSuccessEvents; simpleIndexQueryParserTests1.resetCheckIndexStatus(); simpleIndexQueryParserTests1.setIndexWriterMaxDocs((-1)); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testRegexpBoostQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/regexp-boost.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain6); } @Test public void test05376() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05376"); java.util.Locale locale3 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray4 = new java.lang.Cloneable[] { locale3 }; java.util.List<java.lang.Cloneable> cloneableList5 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray4); java.lang.Object obj6 = null; org.junit.Assert.assertNotSame((java.lang.Object) cloneableList5, obj6); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests8 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Fields fields11 = null; org.apache.lucene.index.Fields fields12 = null; simpleIndexQueryParserTests8.assertFieldsEquals("tests.maxfailures", indexReader10, fields11, fields12, false); org.junit.Assert.assertNotSame("tests.slow", obj6, (java.lang.Object) simpleIndexQueryParserTests8); simpleIndexQueryParserTests8.resetCheckIndexStatus(); simpleIndexQueryParserTests8.ensureCleanedUp(); simpleIndexQueryParserTests8.resetCheckIndexStatus(); simpleIndexQueryParserTests8.ensureCleanedUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests8.testGeoDistanceFilter4(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_distance4.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale3); org.junit.Assert.assertEquals(locale3.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray4); org.junit.Assert.assertNotNull(cloneableList5); } @Test public void test05377() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05377"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests9 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str10 = simpleIndexQueryParserTests9.getTestName(); simpleIndexQueryParserTests9.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests9.ensureCleanedUp(); java.lang.String str13 = simpleIndexQueryParserTests9.getTestName(); org.apache.lucene.index.IndexReader indexReader15 = null; org.apache.lucene.index.Fields fields16 = null; org.apache.lucene.index.Fields fields17 = null; simpleIndexQueryParserTests9.assertFieldsEquals("europarl.lines.txt.gz", indexReader15, fields16, fields17, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests20 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests20.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum24 = null; org.apache.lucene.index.PostingsEnum postingsEnum25 = null; simpleIndexQueryParserTests20.assertDocsEnumEquals("", postingsEnum24, postingsEnum25, true); simpleIndexQueryParserTests20.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain29 = simpleIndexQueryParserTests20.failureAndSuccessEvents; simpleIndexQueryParserTests9.failureAndSuccessEvents = ruleChain29; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain29; org.apache.lucene.index.IndexReader indexReader33 = null; org.apache.lucene.index.Fields fields34 = null; org.apache.lucene.index.Fields fields35 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.weekly", indexReader33, fields34, fields35, false); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testRange2Query(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/range2.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str10 + "' != '" + "<unknown>" + "'", str10, "<unknown>"); org.junit.Assert.assertEquals("'" + str13 + "' != '" + "<unknown>" + "'", str13, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain29); } @Test public void test05378() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05378"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setUp(); java.lang.String str8 = simpleIndexQueryParserTests0.getTestName(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.badapples", indexReader10, (-1), postingsEnum12, postingsEnum13); org.apache.lucene.index.PostingsEnum postingsEnum16 = null; org.apache.lucene.index.PostingsEnum postingsEnum17 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.failfast", postingsEnum16, postingsEnum17, true); org.apache.lucene.index.IndexReader indexReader21 = null; org.apache.lucene.index.Terms terms22 = null; org.apache.lucene.index.Terms terms23 = null; simpleIndexQueryParserTests0.assertTermsEquals("europarl.lines.txt.gz", indexReader21, terms22, terms23, true); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.TestRule testRule28 = simpleIndexQueryParserTests0.ruleChain; simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); // The following exception was thrown during execution in test generation try { // flaky: simpleIndexQueryParserTests0.testTermsQueryWithMultipleFields(); // flaky: 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.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertEquals("'" + str8 + "' != '" + "<unknown>" + "'", str8, "<unknown>"); org.junit.Assert.assertNotNull(testRule28); } @Test public void test05379() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05379"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests1); org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests1.assertPositionsSkippingEquals("tests.maxfailures", indexReader7, (-1), postingsEnum9, postingsEnum10); simpleIndexQueryParserTests1.resetCheckIndexStatus(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testQueryStringFields3Builder(); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); } @Test public void test05380() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05380"); java.util.Random random0 = null; org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests3 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str4 = simpleIndexQueryParserTests3.getTestName(); simpleIndexQueryParserTests3.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests3.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests3); org.apache.lucene.index.IndexReader indexReader9 = null; org.apache.lucene.index.Terms terms10 = null; org.apache.lucene.index.Terms terms11 = null; simpleIndexQueryParserTests3.assertTermsEquals("tests.slow", indexReader9, terms10, terms11, true); org.apache.lucene.index.IndexReader indexReader15 = null; org.apache.lucene.index.PostingsEnum postingsEnum17 = null; org.apache.lucene.index.PostingsEnum postingsEnum18 = null; simpleIndexQueryParserTests3.assertDocsSkippingEquals("tests.monster", indexReader15, 0, postingsEnum17, postingsEnum18, false); simpleIndexQueryParserTests3.ensureCleanedUp(); org.apache.lucene.document.FieldType fieldType22 = null; // The following exception was thrown during execution in test generation try { org.apache.lucene.document.Field field23 = org.apache.lucene.util.LuceneTestCase.newField(random0, "", (java.lang.Object) simpleIndexQueryParserTests3, fieldType22); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); } @Test public void test05381() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05381"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader2 = null; org.apache.lucene.index.Fields fields3 = null; org.apache.lucene.index.Fields fields4 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.maxfailures", indexReader2, fields3, fields4, false); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs(0); org.apache.lucene.index.PostingsEnum postingsEnum11 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("random", postingsEnum11, postingsEnum12, false); simpleIndexQueryParserTests0.setUp(); org.apache.lucene.index.IndexReader indexReader17 = null; org.apache.lucene.index.PostingsEnum postingsEnum19 = null; org.apache.lucene.index.PostingsEnum postingsEnum20 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.monster", indexReader17, (int) (byte) 1, postingsEnum19, postingsEnum20, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testTermsQueryBuilder(); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } } @Test public void test05382() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05382"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain5 = null; simpleIndexQueryParserTests1.failureAndSuccessEvents = ruleChain5; org.apache.lucene.index.IndexReader indexReader8 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; simpleIndexQueryParserTests1.assertDocsSkippingEquals("tests.nightly", indexReader8, 100, postingsEnum10, postingsEnum11, false); simpleIndexQueryParserTests1.resetCheckIndexStatus(); org.junit.Assert.assertNotNull("tests.slow", (java.lang.Object) simpleIndexQueryParserTests1); org.junit.rules.RuleChain ruleChain16 = simpleIndexQueryParserTests1.failureAndSuccessEvents; simpleIndexQueryParserTests1.ensureCheckIndexPassed(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testRangeNamedFilteredQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/range-filter-named.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); org.junit.Assert.assertNull(ruleChain16); } @Test public void test05383() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05383"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.nightly", indexReader7, 100, postingsEnum9, postingsEnum10, false); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader16 = null; org.apache.lucene.index.PostingsEnum postingsEnum18 = null; org.apache.lucene.index.PostingsEnum postingsEnum19 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.slow", indexReader16, (int) (byte) 10, postingsEnum18, postingsEnum19, true); org.apache.lucene.index.IndexReader indexReader23 = null; org.apache.lucene.index.Terms terms24 = null; org.apache.lucene.index.Terms terms25 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.badapples", indexReader23, terms24, terms25, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSpanMultiTermPrefixQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/span-multi-term-prefix.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05384() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05384"); java.util.Locale locale1 = org.apache.lucene.util.LuceneTestCase.localeForName("tests.failfast"); org.junit.Assert.assertNotNull(locale1); org.junit.Assert.assertEquals(locale1.toString(), "tests.failfast"); } @Test public void test05385() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05385"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); simpleIndexQueryParserTests0.ensureCleanedUp(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests6 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str7 = simpleIndexQueryParserTests6.getTestName(); simpleIndexQueryParserTests6.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests6.ensureCleanedUp(); java.lang.String str10 = simpleIndexQueryParserTests6.getTestName(); simpleIndexQueryParserTests6.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests6.setUp(); java.lang.String str14 = simpleIndexQueryParserTests6.getTestName(); org.apache.lucene.index.IndexReader indexReader16 = null; org.apache.lucene.index.PostingsEnum postingsEnum18 = null; org.apache.lucene.index.PostingsEnum postingsEnum19 = null; simpleIndexQueryParserTests6.assertPositionsSkippingEquals("tests.badapples", indexReader16, (-1), postingsEnum18, postingsEnum19); org.apache.lucene.index.PostingsEnum postingsEnum22 = null; org.apache.lucene.index.PostingsEnum postingsEnum23 = null; simpleIndexQueryParserTests6.assertDocsEnumEquals("tests.failfast", postingsEnum22, postingsEnum23, true); org.junit.Assert.assertNotSame((java.lang.Object) simpleIndexQueryParserTests0, (java.lang.Object) "tests.failfast"); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testPrefiFilteredQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/prefix-filter.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str7 + "' != '" + "<unknown>" + "'", str7, "<unknown>"); org.junit.Assert.assertEquals("'" + str10 + "' != '" + "<unknown>" + "'", str10, "<unknown>"); org.junit.Assert.assertEquals("'" + str14 + "' != '" + "<unknown>" + "'", str14, "<unknown>"); } @Test public void test05386() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05386"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests2 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str3 = simpleIndexQueryParserTests2.getTestName(); simpleIndexQueryParserTests2.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests2.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain6 = null; simpleIndexQueryParserTests2.failureAndSuccessEvents = ruleChain6; org.apache.lucene.index.IndexReader indexReader9 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; simpleIndexQueryParserTests2.assertDocsSkippingEquals("tests.nightly", indexReader9, 100, postingsEnum11, postingsEnum12, false); simpleIndexQueryParserTests2.resetCheckIndexStatus(); simpleIndexQueryParserTests2.resetCheckIndexStatus(); org.junit.Assert.assertNotSame("tests.maxfailures", (java.lang.Object) 1L, (java.lang.Object) simpleIndexQueryParserTests2); simpleIndexQueryParserTests2.overrideTestDefaultQueryCache(); java.lang.String str19 = simpleIndexQueryParserTests2.getTestName(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests2.testSpanNotQueryBuilder(); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str3 + "' != '" + "<unknown>" + "'", str3, "<unknown>"); org.junit.Assert.assertEquals("'" + str19 + "' != '" + "<unknown>" + "'", str19, "<unknown>"); } @Test public void test05387() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05387"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (short) 1); simpleIndexQueryParserTests0.setUp(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); java.lang.String str11 = simpleIndexQueryParserTests0.getTestName(); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests12 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str13 = simpleIndexQueryParserTests12.getTestName(); simpleIndexQueryParserTests12.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests12.ensureCleanedUp(); java.lang.String str16 = simpleIndexQueryParserTests12.getTestName(); org.apache.lucene.index.IndexReader indexReader18 = null; org.apache.lucene.index.Fields fields19 = null; org.apache.lucene.index.Fields fields20 = null; simpleIndexQueryParserTests12.assertFieldsEquals("europarl.lines.txt.gz", indexReader18, fields19, fields20, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests23 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests23.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum27 = null; org.apache.lucene.index.PostingsEnum postingsEnum28 = null; simpleIndexQueryParserTests23.assertDocsEnumEquals("", postingsEnum27, postingsEnum28, true); simpleIndexQueryParserTests23.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain32 = simpleIndexQueryParserTests23.failureAndSuccessEvents; simpleIndexQueryParserTests12.failureAndSuccessEvents = ruleChain32; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain32; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoPolygonNamedFilter(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_polygon-named.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertEquals("'" + str11 + "' != '" + "<unknown>" + "'", str11, "<unknown>"); org.junit.Assert.assertEquals("'" + str13 + "' != '" + "<unknown>" + "'", str13, "<unknown>"); org.junit.Assert.assertEquals("'" + str16 + "' != '" + "<unknown>" + "'", str16, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain32); } @Test public void test05388() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05388"); // The following exception was thrown during execution in test generation try { int int2 = org.elasticsearch.test.ElasticsearchTestCase.iterations(0, 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 test05389() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05389"); java.util.Locale locale3 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray4 = new java.lang.Cloneable[] { locale3 }; java.util.List<java.lang.Cloneable> cloneableList5 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray4); java.lang.Object obj6 = null; org.junit.Assert.assertNotSame((java.lang.Object) cloneableList5, obj6); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests8 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Fields fields11 = null; org.apache.lucene.index.Fields fields12 = null; simpleIndexQueryParserTests8.assertFieldsEquals("tests.maxfailures", indexReader10, fields11, fields12, false); org.junit.Assert.assertNotSame("tests.slow", obj6, (java.lang.Object) simpleIndexQueryParserTests8); simpleIndexQueryParserTests8.resetCheckIndexStatus(); simpleIndexQueryParserTests8.ensureCleanedUp(); org.apache.lucene.index.IndexReader indexReader19 = null; org.apache.lucene.index.Fields fields20 = null; org.apache.lucene.index.Fields fields21 = null; simpleIndexQueryParserTests8.assertFieldsEquals("tests.badapples", indexReader19, fields20, fields21, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests8.testQueryStringFields1Builder(); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale3); org.junit.Assert.assertEquals(locale3.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray4); org.junit.Assert.assertNotNull(cloneableList5); } @Test public void test05390() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05390"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.nightly", indexReader7, 100, postingsEnum9, postingsEnum10, false); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testRegexpQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/regexp.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05391() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05391"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.overrideTestDefaultQueryCache(); org.junit.rules.TestRule testRule2 = simpleIndexQueryParserTests0.ruleChain; org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests3 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str4 = simpleIndexQueryParserTests3.getTestName(); simpleIndexQueryParserTests3.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests3.ensureCleanedUp(); java.lang.String str7 = simpleIndexQueryParserTests3.getTestName(); simpleIndexQueryParserTests3.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests3.setIndexWriterMaxDocs((int) (short) 1); simpleIndexQueryParserTests3.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain13 = simpleIndexQueryParserTests3.failureAndSuccessEvents; simpleIndexQueryParserTests3.ensureCheckIndexPassed(); simpleIndexQueryParserTests3.ensureCleanedUp(); org.junit.Assert.assertNotSame((java.lang.Object) simpleIndexQueryParserTests0, (java.lang.Object) simpleIndexQueryParserTests3); org.apache.lucene.index.IndexReader indexReader18 = null; org.apache.lucene.index.PostingsEnum postingsEnum20 = null; org.apache.lucene.index.PostingsEnum postingsEnum21 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.maxfailures", indexReader18, (int) (byte) 1, postingsEnum20, postingsEnum21, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testPrefixBoostQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/prefix-boost.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertNotNull(testRule2); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertEquals("'" + str7 + "' != '" + "<unknown>" + "'", str7, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain13); } @Test public void test05392() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05392"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum4 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("", postingsEnum4, postingsEnum5, true); org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("", postingsEnum9, postingsEnum10, false); org.junit.rules.TestRule testRule13 = simpleIndexQueryParserTests0.ruleChain; simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.apache.lucene.index.IndexReader indexReader16 = null; org.apache.lucene.index.PostingsEnum postingsEnum18 = null; org.apache.lucene.index.PostingsEnum postingsEnum19 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.weekly", indexReader16, (int) (byte) 100, postingsEnum18, postingsEnum19); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testPrefiFilteredQueryBuilder(); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertNotNull(testRule13); } @Test public void test05393() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05393"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.junit.rules.RuleChain ruleChain7 = simpleIndexQueryParserTests0.failureAndSuccessEvents; org.junit.rules.RuleChain ruleChain8 = simpleIndexQueryParserTests0.failureAndSuccessEvents; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.badapples", postingsEnum10, postingsEnum11, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testQueryQueryBuilder(); 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(ruleChain7); org.junit.Assert.assertNull(ruleChain8); } @Test public void test05394() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05394"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); java.lang.String str5 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests1.setIndexWriterMaxDocs((int) (short) 1); org.junit.Assert.assertNotSame("europarl.lines.txt.gz", (java.lang.Object) simpleIndexQueryParserTests1, (java.lang.Object) 2); org.apache.lucene.index.IndexReader indexReader13 = null; org.apache.lucene.index.Fields fields14 = null; org.apache.lucene.index.Fields fields15 = null; simpleIndexQueryParserTests1.assertFieldsEquals("tests.maxfailures", indexReader13, fields14, fields15, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testGeoPolygonFilter2(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_polygon2.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); org.junit.Assert.assertEquals("'" + str5 + "' != '" + "<unknown>" + "'", str5, "<unknown>"); } @Test public void test05395() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05395"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setUp(); java.lang.String str8 = simpleIndexQueryParserTests0.getTestName(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.badapples", indexReader10, (-1), postingsEnum12, postingsEnum13); org.apache.lucene.index.PostingsEnum postingsEnum16 = null; org.apache.lucene.index.PostingsEnum postingsEnum17 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.failfast", postingsEnum16, postingsEnum17, true); org.apache.lucene.index.IndexReader indexReader21 = null; org.apache.lucene.index.Terms terms22 = null; org.apache.lucene.index.Terms terms23 = null; simpleIndexQueryParserTests0.assertTermsEquals("europarl.lines.txt.gz", indexReader21, terms22, terms23, true); // The following exception was thrown during execution in test generation try { org.elasticsearch.env.NodeEnvironment nodeEnvironment26 = simpleIndexQueryParserTests0.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.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertEquals("'" + str8 + "' != '" + "<unknown>" + "'", str8, "<unknown>"); } @Test public void test05396() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05396"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum4 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("", postingsEnum4, postingsEnum5, true); org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("", postingsEnum9, postingsEnum10, false); org.junit.rules.TestRule testRule13 = simpleIndexQueryParserTests0.ruleChain; simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.apache.lucene.index.IndexReader indexReader16 = null; org.apache.lucene.index.PostingsEnum postingsEnum18 = null; org.apache.lucene.index.PostingsEnum postingsEnum19 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.weekly", indexReader16, (int) (byte) 100, postingsEnum18, postingsEnum19); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testProperErrorMessageWhenTwoFunctionsDefinedInQueryBody(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/function-score-query-causing-NPE.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertNotNull(testRule13); } @Test public void test05397() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05397"); java.util.Random random0 = null; org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests3 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str4 = simpleIndexQueryParserTests3.getTestName(); simpleIndexQueryParserTests3.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests3.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests3); org.apache.lucene.index.IndexReader indexReader9 = null; org.apache.lucene.index.Terms terms10 = null; org.apache.lucene.index.Terms terms11 = null; simpleIndexQueryParserTests3.assertTermsEquals("node_s_0", indexReader9, terms10, terms11, false); org.junit.rules.TestRule testRule14 = simpleIndexQueryParserTests3.ruleChain; org.apache.lucene.document.FieldType fieldType15 = null; // The following exception was thrown during execution in test generation try { org.apache.lucene.document.Field field16 = org.apache.lucene.util.LuceneTestCase.newField(random0, "tests.monster", (java.lang.Object) testRule14, fieldType15); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertNotNull(testRule14); } @Test public void test05398() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05398"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Terms terms11 = null; org.apache.lucene.index.Terms terms12 = null; simpleIndexQueryParserTests0.assertTermsEquals("hi!", indexReader10, terms11, terms12, false); java.lang.String str15 = simpleIndexQueryParserTests0.getTestName(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testQueryQueryBuilder(); 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.assertEquals("'" + str15 + "' != '" + "<unknown>" + "'", str15, "<unknown>"); } @Test public void test05399() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05399"); java.util.Locale locale3 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray4 = new java.lang.Cloneable[] { locale3 }; java.util.List<java.lang.Cloneable> cloneableList5 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray4); java.lang.Object obj6 = null; org.junit.Assert.assertNotSame((java.lang.Object) cloneableList5, obj6); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests8 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Fields fields11 = null; org.apache.lucene.index.Fields fields12 = null; simpleIndexQueryParserTests8.assertFieldsEquals("tests.maxfailures", indexReader10, fields11, fields12, false); org.junit.Assert.assertNotSame("tests.slow", obj6, (java.lang.Object) simpleIndexQueryParserTests8); simpleIndexQueryParserTests8.resetCheckIndexStatus(); simpleIndexQueryParserTests8.ensureCleanedUp(); simpleIndexQueryParserTests8.resetCheckIndexStatus(); simpleIndexQueryParserTests8.ensureCleanedUp(); org.junit.Assert.assertNotNull((java.lang.Object) simpleIndexQueryParserTests8); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests22 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str23 = simpleIndexQueryParserTests22.getTestName(); simpleIndexQueryParserTests22.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests22.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests22); org.apache.lucene.index.IndexReader indexReader28 = null; org.apache.lucene.index.PostingsEnum postingsEnum30 = null; org.apache.lucene.index.PostingsEnum postingsEnum31 = null; simpleIndexQueryParserTests22.assertPositionsSkippingEquals("tests.maxfailures", indexReader28, (-1), postingsEnum30, postingsEnum31); simpleIndexQueryParserTests22.resetCheckIndexStatus(); simpleIndexQueryParserTests22.ensureCheckIndexPassed(); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests35 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str36 = simpleIndexQueryParserTests35.getTestName(); simpleIndexQueryParserTests35.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader39 = null; org.apache.lucene.index.Terms terms40 = null; org.apache.lucene.index.Terms terms41 = null; simpleIndexQueryParserTests35.assertTermsEquals("tests.maxfailures", indexReader39, terms40, terms41, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests44 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str45 = simpleIndexQueryParserTests44.getTestName(); simpleIndexQueryParserTests44.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests44.ensureCleanedUp(); java.lang.String str48 = simpleIndexQueryParserTests44.getTestName(); org.apache.lucene.index.IndexReader indexReader50 = null; org.apache.lucene.index.Fields fields51 = null; org.apache.lucene.index.Fields fields52 = null; simpleIndexQueryParserTests44.assertFieldsEquals("europarl.lines.txt.gz", indexReader50, fields51, fields52, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests55 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests55.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum59 = null; org.apache.lucene.index.PostingsEnum postingsEnum60 = null; simpleIndexQueryParserTests55.assertDocsEnumEquals("", postingsEnum59, postingsEnum60, true); simpleIndexQueryParserTests55.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain64 = simpleIndexQueryParserTests55.failureAndSuccessEvents; simpleIndexQueryParserTests44.failureAndSuccessEvents = ruleChain64; simpleIndexQueryParserTests35.failureAndSuccessEvents = ruleChain64; simpleIndexQueryParserTests22.failureAndSuccessEvents = ruleChain64; org.apache.lucene.util.LuceneTestCase.classRules = ruleChain64; simpleIndexQueryParserTests8.failureAndSuccessEvents = ruleChain64; org.apache.lucene.index.IndexReader indexReader71 = null; org.apache.lucene.index.Fields fields72 = null; org.apache.lucene.index.Fields fields73 = null; simpleIndexQueryParserTests8.assertFieldsEquals("tests.slow", indexReader71, fields72, fields73, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests8.testMoreLikeThisBuilder(); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale3); org.junit.Assert.assertEquals(locale3.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray4); org.junit.Assert.assertNotNull(cloneableList5); org.junit.Assert.assertEquals("'" + str23 + "' != '" + "<unknown>" + "'", str23, "<unknown>"); org.junit.Assert.assertEquals("'" + str36 + "' != '" + "<unknown>" + "'", str36, "<unknown>"); org.junit.Assert.assertEquals("'" + str45 + "' != '" + "<unknown>" + "'", str45, "<unknown>"); org.junit.Assert.assertEquals("'" + str48 + "' != '" + "<unknown>" + "'", str48, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain64); } @Test public void test05400() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05400"); java.util.Random random0 = null; org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests2 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str3 = simpleIndexQueryParserTests2.getTestName(); simpleIndexQueryParserTests2.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests2.ensureCleanedUp(); java.lang.String str6 = simpleIndexQueryParserTests2.getTestName(); simpleIndexQueryParserTests2.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests2.setIndexWriterMaxDocs((int) (short) 1); simpleIndexQueryParserTests2.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain12 = simpleIndexQueryParserTests2.failureAndSuccessEvents; org.apache.lucene.util.LuceneTestCase.classRules = ruleChain12; org.apache.lucene.util.LuceneTestCase.classRules = ruleChain12; org.apache.lucene.document.FieldType fieldType15 = null; // The following exception was thrown during execution in test generation try { org.apache.lucene.document.Field field16 = org.apache.lucene.util.LuceneTestCase.newField(random0, "node_s_0", (java.lang.Object) ruleChain12, fieldType15); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str3 + "' != '" + "<unknown>" + "'", str3, "<unknown>"); org.junit.Assert.assertEquals("'" + str6 + "' != '" + "<unknown>" + "'", str6, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain12); } @Test public void test05401() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05401"); java.util.Random random0 = null; org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests2 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str3 = simpleIndexQueryParserTests2.getTestName(); simpleIndexQueryParserTests2.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader6 = null; org.apache.lucene.index.PostingsEnum postingsEnum8 = null; org.apache.lucene.index.PostingsEnum postingsEnum9 = null; simpleIndexQueryParserTests2.assertPositionsSkippingEquals("tests.maxfailures", indexReader6, (int) (short) 100, postingsEnum8, postingsEnum9); simpleIndexQueryParserTests2.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader13 = null; org.apache.lucene.index.Fields fields14 = null; org.apache.lucene.index.Fields fields15 = null; simpleIndexQueryParserTests2.assertFieldsEquals("tests.failfast", indexReader13, fields14, fields15, true); 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, "enwiki.random.lines.txt", (java.lang.Object) fields14, fieldType18); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str3 + "' != '" + "<unknown>" + "'", str3, "<unknown>"); } @Test public void test05402() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05402"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setUp(); java.lang.String str8 = simpleIndexQueryParserTests0.getTestName(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.badapples", indexReader10, (-1), postingsEnum12, postingsEnum13); org.apache.lucene.index.PostingsEnum postingsEnum16 = null; org.apache.lucene.index.PostingsEnum postingsEnum17 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("node_s_0", postingsEnum16, postingsEnum17, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.setup(); 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.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertEquals("'" + str8 + "' != '" + "<unknown>" + "'", str8, "<unknown>"); } @Test public void test05403() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05403"); // The following exception was thrown during execution in test generation try { int int2 = org.elasticsearch.test.ElasticsearchTestCase.between((int) (short) 10, 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 test05404() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05404"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Terms terms11 = null; org.apache.lucene.index.Terms terms12 = null; simpleIndexQueryParserTests0.assertTermsEquals("hi!", indexReader10, terms11, terms12, false); org.apache.lucene.index.IndexReader indexReader16 = null; org.apache.lucene.index.Terms terms17 = null; org.apache.lucene.index.Terms terms18 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.badapples", indexReader16, terms17, terms18, true); java.lang.String str21 = simpleIndexQueryParserTests0.getTestName(); // The following exception was thrown during execution in test generation try { // flaky: simpleIndexQueryParserTests0.testProperErrorMessagesForMisplacedWeightsAndFunctions(); // flaky: 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.assertEquals("'" + str21 + "' != '" + "<unknown>" + "'", str21, "<unknown>"); } @Test public void test05405() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05405"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum4 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("", postingsEnum4, postingsEnum5, true); org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("", postingsEnum9, postingsEnum10, false); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests14 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str15 = simpleIndexQueryParserTests14.getTestName(); simpleIndexQueryParserTests14.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests14.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests14); org.junit.rules.RuleChain ruleChain19 = simpleIndexQueryParserTests14.failureAndSuccessEvents; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain19; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testTermsFilterQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/terms-filter.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str15 + "' != '" + "<unknown>" + "'", str15, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain19); } @Test public void test05406() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05406"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (short) 1); simpleIndexQueryParserTests0.setUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testDisMax(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/disMax.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); } @Test public void test05407() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05407"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.PostingsEnum postingsEnum6 = null; org.apache.lucene.index.PostingsEnum postingsEnum7 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.maxfailures", indexReader4, (int) (short) 100, postingsEnum6, postingsEnum7); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader11 = null; org.apache.lucene.index.Fields fields12 = null; org.apache.lucene.index.Fields fields13 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.failfast", indexReader11, fields12, fields13, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testMLTMinimumShouldMatch(); 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 test05408() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05408"); java.util.Locale locale2 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray3 = new java.lang.Cloneable[] { locale2 }; java.util.List<java.lang.Cloneable> cloneableList4 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray3); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests5 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests5.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain7 = simpleIndexQueryParserTests5.failureAndSuccessEvents; org.junit.Assert.assertNotSame((java.lang.Object) cloneableArray3, (java.lang.Object) simpleIndexQueryParserTests5); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests9 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests9.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum13 = null; org.apache.lucene.index.PostingsEnum postingsEnum14 = null; simpleIndexQueryParserTests9.assertDocsEnumEquals("", postingsEnum13, postingsEnum14, true); simpleIndexQueryParserTests9.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain18 = simpleIndexQueryParserTests9.failureAndSuccessEvents; simpleIndexQueryParserTests5.failureAndSuccessEvents = ruleChain18; org.junit.Assert.assertNotNull((java.lang.Object) simpleIndexQueryParserTests5); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests5.testFilteredQuery4(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/filtered-query4.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale2); org.junit.Assert.assertEquals(locale2.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray3); org.junit.Assert.assertNotNull(cloneableList4); org.junit.Assert.assertNotNull(ruleChain7); org.junit.Assert.assertNotNull(ruleChain18); } @Test public void test05409() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05409"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); simpleIndexQueryParserTests0.ensureCleanedUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoDistanceFilter4(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_distance4.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05410() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05410"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.ensureCleanedUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoBoundingBoxFilter4(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_boundingbox4.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05411() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05411"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); org.apache.lucene.index.IndexReader indexReader6 = null; org.apache.lucene.index.Fields fields7 = null; org.apache.lucene.index.Fields fields8 = null; simpleIndexQueryParserTests0.assertFieldsEquals("europarl.lines.txt.gz", indexReader6, fields7, fields8, true); org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.nightly", postingsEnum12, postingsEnum13, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testFQueryFilter(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/fquery-filter.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); } @Test public void test05412() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05412"); java.util.Locale locale4 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray5 = new java.lang.Cloneable[] { locale4 }; java.util.List<java.lang.Cloneable> cloneableList6 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray5); java.lang.Object obj7 = null; org.junit.Assert.assertNotSame((java.lang.Object) cloneableList6, obj7); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests9 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader11 = null; org.apache.lucene.index.Fields fields12 = null; org.apache.lucene.index.Fields fields13 = null; simpleIndexQueryParserTests9.assertFieldsEquals("tests.maxfailures", indexReader11, fields12, fields13, false); org.junit.Assert.assertNotSame("tests.slow", obj7, (java.lang.Object) simpleIndexQueryParserTests9); simpleIndexQueryParserTests9.resetCheckIndexStatus(); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests18 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader20 = null; org.apache.lucene.index.Fields fields21 = null; org.apache.lucene.index.Fields fields22 = null; simpleIndexQueryParserTests18.assertFieldsEquals("tests.maxfailures", indexReader20, fields21, fields22, false); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests25 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str26 = simpleIndexQueryParserTests25.getTestName(); simpleIndexQueryParserTests25.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests25.ensureCleanedUp(); java.lang.String str29 = simpleIndexQueryParserTests25.getTestName(); org.apache.lucene.index.IndexReader indexReader31 = null; org.apache.lucene.index.Fields fields32 = null; org.apache.lucene.index.Fields fields33 = null; simpleIndexQueryParserTests25.assertFieldsEquals("europarl.lines.txt.gz", indexReader31, fields32, fields33, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests36 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests36.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum40 = null; org.apache.lucene.index.PostingsEnum postingsEnum41 = null; simpleIndexQueryParserTests36.assertDocsEnumEquals("", postingsEnum40, postingsEnum41, true); simpleIndexQueryParserTests36.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain45 = simpleIndexQueryParserTests36.failureAndSuccessEvents; simpleIndexQueryParserTests25.failureAndSuccessEvents = ruleChain45; java.lang.Object obj47 = null; org.junit.Assert.assertNotSame((java.lang.Object) ruleChain45, obj47); simpleIndexQueryParserTests18.failureAndSuccessEvents = ruleChain45; org.apache.lucene.util.LuceneTestCase.classRules = ruleChain45; org.junit.Assert.assertNotSame("random", (java.lang.Object) simpleIndexQueryParserTests9, (java.lang.Object) ruleChain45); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests52 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str53 = simpleIndexQueryParserTests52.getTestName(); simpleIndexQueryParserTests52.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests52.ensureCleanedUp(); java.lang.String str56 = simpleIndexQueryParserTests52.getTestName(); simpleIndexQueryParserTests52.setIndexWriterMaxDocs((int) (byte) 1); org.apache.lucene.index.IndexReader indexReader60 = null; org.apache.lucene.index.PostingsEnum postingsEnum62 = null; org.apache.lucene.index.PostingsEnum postingsEnum63 = null; simpleIndexQueryParserTests52.assertPositionsSkippingEquals("<unknown>", indexReader60, (int) '4', postingsEnum62, postingsEnum63); simpleIndexQueryParserTests52.ensureCleanedUp(); org.apache.lucene.index.IndexReader indexReader67 = null; org.apache.lucene.index.PostingsEnum postingsEnum69 = null; org.apache.lucene.index.PostingsEnum postingsEnum70 = null; simpleIndexQueryParserTests52.assertPositionsSkippingEquals("tests.badapples", indexReader67, 1, postingsEnum69, postingsEnum70); simpleIndexQueryParserTests52.setIndexWriterMaxDocs((int) (byte) 100); org.junit.Assert.assertNotSame((java.lang.Object) ruleChain45, (java.lang.Object) simpleIndexQueryParserTests52); java.lang.String str75 = simpleIndexQueryParserTests52.getTestName(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests52.testFilteredQueryBuilder(); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale4); org.junit.Assert.assertEquals(locale4.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray5); org.junit.Assert.assertNotNull(cloneableList6); org.junit.Assert.assertEquals("'" + str26 + "' != '" + "<unknown>" + "'", str26, "<unknown>"); org.junit.Assert.assertEquals("'" + str29 + "' != '" + "<unknown>" + "'", str29, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain45); org.junit.Assert.assertEquals("'" + str53 + "' != '" + "<unknown>" + "'", str53, "<unknown>"); org.junit.Assert.assertEquals("'" + str56 + "' != '" + "<unknown>" + "'", str56, "<unknown>"); org.junit.Assert.assertEquals("'" + str75 + "' != '" + "<unknown>" + "'", str75, "<unknown>"); } @Test public void test05413() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05413"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); java.lang.String str5 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.setIndexWriterMaxDocs((int) (byte) 1); org.junit.Assert.assertNotNull("node_s_0", (java.lang.Object) simpleIndexQueryParserTests1); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testPrefixQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/prefix.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); org.junit.Assert.assertEquals("'" + str5 + "' != '" + "<unknown>" + "'", str5, "<unknown>"); } @Test public void test05414() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05414"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Fields fields5 = null; org.apache.lucene.index.Fields fields6 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.monster", indexReader4, fields5, fields6, true); simpleIndexQueryParserTests0.ensureCleanedUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testQueryStringFields3Builder(); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } } @Test public void test05415() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05415"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.junit.rules.RuleChain ruleChain7 = simpleIndexQueryParserTests0.failureAndSuccessEvents; simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); java.lang.String str9 = simpleIndexQueryParserTests0.getTestName(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testNotFilteredQueryBuilder(); 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(ruleChain7); org.junit.Assert.assertEquals("'" + str9 + "' != '" + "<unknown>" + "'", str9, "<unknown>"); } @Test public void test05416() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05416"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; simpleIndexQueryParserTests0.resetCheckIndexStatus(); 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 { simpleIndexQueryParserTests0.assertReaderStatisticsEquals("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.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05417() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05417"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (short) 1); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.setUp(); org.junit.rules.RuleChain ruleChain11 = simpleIndexQueryParserTests0.failureAndSuccessEvents; simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testQueryStringFieldsMatch(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/query-fields-match.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain11); } @Test public void test05418() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05418"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests1); org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.Terms terms8 = null; org.apache.lucene.index.Terms terms9 = null; simpleIndexQueryParserTests1.assertTermsEquals("tests.slow", indexReader7, terms8, terms9, true); org.apache.lucene.index.IndexReader indexReader13 = null; org.apache.lucene.index.PostingsEnum postingsEnum15 = null; org.apache.lucene.index.PostingsEnum postingsEnum16 = null; simpleIndexQueryParserTests1.assertDocsSkippingEquals("tests.monster", indexReader13, 0, postingsEnum15, postingsEnum16, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testWildcardQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/wildcard.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); } @Test public void test05419() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05419"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (short) 1); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.setUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSpanMultiTermTermRangeQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/span-multi-term-range-term.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); } @Test public void test05420() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05420"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); org.junit.rules.TestRule testRule2 = simpleIndexQueryParserTests0.ruleChain; org.apache.lucene.index.PostingsEnum postingsEnum4 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.maxfailures", postingsEnum4, postingsEnum5, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoBoundingBoxFilter3(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_boundingbox3.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertNotNull(testRule2); } @Test public void test05421() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05421"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (short) 1); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain10 = simpleIndexQueryParserTests0.failureAndSuccessEvents; simpleIndexQueryParserTests0.ensureCheckIndexPassed(); simpleIndexQueryParserTests0.ensureCleanedUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testPrefixNamedFilteredQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/prefix-filter-named.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain10); } @Test public void test05422() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05422"); // The following exception was thrown during execution in test generation try { int int2 = org.elasticsearch.test.ElasticsearchTestCase.scaledRandomIntBetween((int) ' ', (int) (byte) -1); org.junit.Assert.fail("Expected exception of type java.lang.IllegalArgumentException; message: max must be >= min: 32, -1"); } catch (java.lang.IllegalArgumentException e) { // Expected exception. } } @Test public void test05423() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05423"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests2 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str3 = simpleIndexQueryParserTests2.getTestName(); simpleIndexQueryParserTests2.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests2.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain6 = null; simpleIndexQueryParserTests2.failureAndSuccessEvents = ruleChain6; org.apache.lucene.index.IndexReader indexReader9 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; simpleIndexQueryParserTests2.assertDocsSkippingEquals("tests.nightly", indexReader9, 100, postingsEnum11, postingsEnum12, false); simpleIndexQueryParserTests2.resetCheckIndexStatus(); simpleIndexQueryParserTests2.resetCheckIndexStatus(); org.junit.Assert.assertNotSame("tests.maxfailures", (java.lang.Object) 1L, (java.lang.Object) simpleIndexQueryParserTests2); simpleIndexQueryParserTests2.ensureCheckIndexPassed(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests2.testNotFilteredQueryBuilder(); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str3 + "' != '" + "<unknown>" + "'", str3, "<unknown>"); } @Test public void test05424() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05424"); java.util.Locale locale2 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray3 = new java.lang.Cloneable[] { locale2 }; java.util.List<java.lang.Cloneable> cloneableList4 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray3); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests5 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests5.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain7 = simpleIndexQueryParserTests5.failureAndSuccessEvents; org.junit.Assert.assertNotSame((java.lang.Object) cloneableArray3, (java.lang.Object) simpleIndexQueryParserTests5); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Terms terms11 = null; org.apache.lucene.index.Terms terms12 = null; simpleIndexQueryParserTests5.assertTermsEquals("", indexReader10, terms11, terms12, true); org.apache.lucene.index.IndexReader indexReader16 = null; org.apache.lucene.index.PostingsEnum postingsEnum18 = null; org.apache.lucene.index.PostingsEnum postingsEnum19 = null; simpleIndexQueryParserTests5.assertPositionsSkippingEquals("", indexReader16, 1, postingsEnum18, postingsEnum19); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests5.testInQuery(); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale2); org.junit.Assert.assertEquals(locale2.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray3); org.junit.Assert.assertNotNull(cloneableList4); org.junit.Assert.assertNotNull(ruleChain7); } @Test public void test05425() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05425"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.nightly", indexReader7, 100, postingsEnum9, postingsEnum10, false); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader15 = null; org.apache.lucene.index.Terms terms16 = null; org.apache.lucene.index.Terms terms17 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.awaitsfix", indexReader15, terms16, terms17, false); org.apache.lucene.index.PostingsEnum postingsEnum21 = null; org.apache.lucene.index.PostingsEnum postingsEnum22 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("node_s_0", postingsEnum21, postingsEnum22, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testTermsQueryFilter(); 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 test05426() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05426"); java.util.Locale locale3 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray4 = new java.lang.Cloneable[] { locale3 }; java.util.List<java.lang.Cloneable> cloneableList5 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray4); java.lang.Object obj6 = null; org.junit.Assert.assertNotSame((java.lang.Object) cloneableList5, obj6); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests8 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Fields fields11 = null; org.apache.lucene.index.Fields fields12 = null; simpleIndexQueryParserTests8.assertFieldsEquals("tests.maxfailures", indexReader10, fields11, fields12, false); org.junit.Assert.assertNotSame("tests.slow", obj6, (java.lang.Object) simpleIndexQueryParserTests8); // The following exception was thrown during execution in test generation try { java.lang.String[] strArray16 = simpleIndexQueryParserTests8.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(locale3); org.junit.Assert.assertEquals(locale3.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray4); org.junit.Assert.assertNotNull(cloneableList5); } @Test public void test05427() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05427"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (short) 1); simpleIndexQueryParserTests0.setUp(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.setUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoDistanceFilter4(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_distance4.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); } @Test public void test05428() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05428"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setUp(); java.lang.String str8 = simpleIndexQueryParserTests0.getTestName(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.badapples", indexReader10, (-1), postingsEnum12, postingsEnum13); org.apache.lucene.index.PostingsEnum postingsEnum16 = null; org.apache.lucene.index.PostingsEnum postingsEnum17 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.failfast", postingsEnum16, postingsEnum17, true); org.apache.lucene.index.IndexReader indexReader21 = null; org.apache.lucene.index.Terms terms22 = null; org.apache.lucene.index.Terms terms23 = null; simpleIndexQueryParserTests0.assertTermsEquals("europarl.lines.txt.gz", indexReader21, terms22, terms23, true); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (short) -1); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests29 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str30 = simpleIndexQueryParserTests29.getTestName(); simpleIndexQueryParserTests29.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests29.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests29); org.junit.rules.RuleChain ruleChain34 = simpleIndexQueryParserTests29.failureAndSuccessEvents; org.apache.lucene.util.LuceneTestCase.classRules = ruleChain34; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain34; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoDistanceFilter10(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_distance10.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertEquals("'" + str8 + "' != '" + "<unknown>" + "'", str8, "<unknown>"); org.junit.Assert.assertEquals("'" + str30 + "' != '" + "<unknown>" + "'", str30, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain34); } @Test public void test05429() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05429"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.PostingsEnum postingsEnum6 = null; org.apache.lucene.index.PostingsEnum postingsEnum7 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.slow", indexReader4, 0, postingsEnum6, postingsEnum7, true); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str11 = simpleIndexQueryParserTests0.getTestName(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testTermsQueryFilter(); 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.assertEquals("'" + str11 + "' != '" + "<unknown>" + "'", str11, "<unknown>"); } @Test public void test05430() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05430"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.apache.lucene.index.PostingsEnum postingsEnum13 = null; org.apache.lucene.index.PostingsEnum postingsEnum14 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("random", postingsEnum13, postingsEnum14, false); org.apache.lucene.index.IndexReader indexReader18 = null; org.apache.lucene.index.PostingsEnum postingsEnum20 = null; org.apache.lucene.index.PostingsEnum postingsEnum21 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("", indexReader18, (int) 'a', postingsEnum20, postingsEnum21); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testWildcardBoostQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/wildcard-boost.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05431() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05431"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); simpleIndexQueryParserTests0.overrideTestDefaultQueryCache(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) '4'); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testQueryStringFuzzyNumeric(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/query2.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05432() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05432"); // The following exception was thrown during execution in test generation try { java.lang.String str1 = org.elasticsearch.test.ElasticsearchTestCase.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 test05433() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05433"); // The following exception was thrown during execution in test generation try { java.lang.String[] strArray3 = org.elasticsearch.test.ElasticsearchTestCase.generateRandomStringArray((int) (byte) 100, (int) ' ', 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 test05434() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05434"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Fields fields5 = null; org.apache.lucene.index.Fields fields6 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.awaitsfix", indexReader4, fields5, fields6, false); org.junit.rules.TestRule testRule9 = simpleIndexQueryParserTests0.ruleChain; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoBoundingBoxFilter4(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_boundingbox4.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertNotNull(testRule9); } @Test public void test05435() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05435"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (short) 1); simpleIndexQueryParserTests0.setUp(); simpleIndexQueryParserTests0.setUp(); org.apache.lucene.index.IndexReader indexReader12 = null; org.apache.lucene.index.Fields fields13 = null; org.apache.lucene.index.Fields fields14 = null; simpleIndexQueryParserTests0.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; simpleIndexQueryParserTests0.assertDocsSkippingEquals("<unknown>", indexReader18, 2, postingsEnum20, postingsEnum21, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testMoreLikeThisIds(); 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.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); } @Test public void test05436() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05436"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); simpleIndexQueryParserTests0.ensureCleanedUp(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testTermsWithNameFilterQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/terms-filter-named.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05437() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05437"); 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.nightly", "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 test05438() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05438"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests1); org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests1.assertPositionsSkippingEquals("tests.maxfailures", indexReader7, (-1), postingsEnum9, postingsEnum10); simpleIndexQueryParserTests1.resetCheckIndexStatus(); simpleIndexQueryParserTests1.ensureCleanedUp(); simpleIndexQueryParserTests1.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain15 = simpleIndexQueryParserTests1.failureAndSuccessEvents; java.util.Locale locale19 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray20 = new java.lang.Cloneable[] { locale19 }; java.util.List<java.lang.Cloneable> cloneableList21 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray20); java.lang.Object obj22 = null; org.junit.Assert.assertNotSame((java.lang.Object) cloneableList21, obj22); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests24 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader26 = null; org.apache.lucene.index.Fields fields27 = null; org.apache.lucene.index.Fields fields28 = null; simpleIndexQueryParserTests24.assertFieldsEquals("tests.maxfailures", indexReader26, fields27, fields28, false); org.junit.Assert.assertNotSame("tests.slow", obj22, (java.lang.Object) simpleIndexQueryParserTests24); simpleIndexQueryParserTests24.resetCheckIndexStatus(); org.junit.Assert.assertNotSame((java.lang.Object) ruleChain15, (java.lang.Object) simpleIndexQueryParserTests24); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests24.testQueryStringBuilder(); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain15); org.junit.Assert.assertNotNull(locale19); org.junit.Assert.assertEquals(locale19.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray20); org.junit.Assert.assertNotNull(cloneableList21); } @Test public void test05439() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05439"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); org.junit.rules.TestRule testRule4 = simpleIndexQueryParserTests0.ruleChain; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testQueryStringFieldsMatch(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/query-fields-match.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertNotNull(testRule4); } @Test public void test05440() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05440"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.overrideTestDefaultQueryCache(); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testPrefixQueryBoostQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/prefix-with-boost.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05441() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05441"); // The following exception was thrown during execution in test generation try { int int2 = org.elasticsearch.test.ElasticsearchTestCase.randomIntBetween((int) (byte) 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 test05442() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05442"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.PostingsEnum postingsEnum6 = null; org.apache.lucene.index.PostingsEnum postingsEnum7 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.maxfailures", indexReader4, (int) (short) 100, postingsEnum6, postingsEnum7); simpleIndexQueryParserTests0.resetCheckIndexStatus(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testWildcardQueryBuilder(); 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 test05443() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05443"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setUp(); java.lang.String str8 = simpleIndexQueryParserTests0.getTestName(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.badapples", indexReader10, (-1), postingsEnum12, postingsEnum13); org.apache.lucene.index.PostingsEnum postingsEnum16 = null; org.apache.lucene.index.PostingsEnum postingsEnum17 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.failfast", postingsEnum16, postingsEnum17, true); org.apache.lucene.index.IndexReader indexReader21 = null; org.apache.lucene.index.Terms terms22 = null; org.apache.lucene.index.Terms terms23 = null; simpleIndexQueryParserTests0.assertTermsEquals("europarl.lines.txt.gz", indexReader21, terms22, terms23, true); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (short) -1); org.apache.lucene.index.IndexReader indexReader29 = null; org.apache.lucene.index.Fields fields30 = null; org.apache.lucene.index.Fields fields31 = null; simpleIndexQueryParserTests0.assertFieldsEquals("<unknown>", indexReader29, fields30, fields31, true); simpleIndexQueryParserTests0.resetCheckIndexStatus(); // The following exception was thrown during execution in test generation try { org.elasticsearch.env.NodeEnvironment nodeEnvironment35 = simpleIndexQueryParserTests0.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.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertEquals("'" + str8 + "' != '" + "<unknown>" + "'", str8, "<unknown>"); } @Test public void test05444() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05444"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("", indexReader10, (-1), postingsEnum12, postingsEnum13); org.junit.rules.TestRule testRule15 = simpleIndexQueryParserTests0.ruleChain; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSpanMultiTermFuzzyRangeQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/span-multi-term-fuzzy-range.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertNotNull(testRule15); } @Test public void test05445() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05445"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain5 = null; simpleIndexQueryParserTests1.failureAndSuccessEvents = ruleChain5; org.apache.lucene.index.IndexReader indexReader8 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; simpleIndexQueryParserTests1.assertDocsSkippingEquals("tests.nightly", indexReader8, 100, postingsEnum10, postingsEnum11, false); simpleIndexQueryParserTests1.resetCheckIndexStatus(); org.junit.Assert.assertNotNull("tests.slow", (java.lang.Object) simpleIndexQueryParserTests1); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testSpanNotQueryBuilder(); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); } @Test public void test05446() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05446"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); java.lang.String str5 = simpleIndexQueryParserTests1.getTestName(); org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.Fields fields8 = null; org.apache.lucene.index.Fields fields9 = null; simpleIndexQueryParserTests1.assertFieldsEquals("europarl.lines.txt.gz", indexReader7, fields8, fields9, true); org.apache.lucene.index.PostingsEnum postingsEnum13 = null; org.apache.lucene.index.PostingsEnum postingsEnum14 = null; simpleIndexQueryParserTests1.assertDocsEnumEquals("tests.nightly", postingsEnum13, postingsEnum14, true); org.apache.lucene.index.PostingsEnum postingsEnum18 = null; org.apache.lucene.index.PostingsEnum postingsEnum19 = null; simpleIndexQueryParserTests1.assertDocsEnumEquals("tests.awaitsfix", postingsEnum18, postingsEnum19, false); org.junit.Assert.assertNotSame("random", (java.lang.Object) postingsEnum19, (java.lang.Object) "tests.slow"); org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); org.junit.Assert.assertEquals("'" + str5 + "' != '" + "<unknown>" + "'", str5, "<unknown>"); } @Test public void test05447() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05447"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.nightly", indexReader7, 100, postingsEnum9, postingsEnum10, false); simpleIndexQueryParserTests0.resetCheckIndexStatus(); 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 { simpleIndexQueryParserTests0.assertFieldInfosEquals("", 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.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05448() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05448"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.Fields fields8 = null; org.apache.lucene.index.Fields fields9 = null; simpleIndexQueryParserTests0.assertFieldsEquals("node_s_0", indexReader7, fields8, fields9, false); 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 { simpleIndexQueryParserTests0.assertNormsEquals("tests.slow", 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>"); } @Test public void test05449() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05449"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); simpleIndexQueryParserTests0.ensureCleanedUp(); simpleIndexQueryParserTests0.ensureCleanedUp(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs(100); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testStarColonStar(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/starColonStar.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05450() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05450"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests9 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str10 = simpleIndexQueryParserTests9.getTestName(); simpleIndexQueryParserTests9.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests9.ensureCleanedUp(); java.lang.String str13 = simpleIndexQueryParserTests9.getTestName(); org.apache.lucene.index.IndexReader indexReader15 = null; org.apache.lucene.index.Fields fields16 = null; org.apache.lucene.index.Fields fields17 = null; simpleIndexQueryParserTests9.assertFieldsEquals("europarl.lines.txt.gz", indexReader15, fields16, fields17, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests20 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests20.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum24 = null; org.apache.lucene.index.PostingsEnum postingsEnum25 = null; simpleIndexQueryParserTests20.assertDocsEnumEquals("", postingsEnum24, postingsEnum25, true); simpleIndexQueryParserTests20.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain29 = simpleIndexQueryParserTests20.failureAndSuccessEvents; simpleIndexQueryParserTests9.failureAndSuccessEvents = ruleChain29; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain29; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testWildcardBoostQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/wildcard-boost.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str10 + "' != '" + "<unknown>" + "'", str10, "<unknown>"); org.junit.Assert.assertEquals("'" + str13 + "' != '" + "<unknown>" + "'", str13, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain29); } @Test public void test05451() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05451"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); java.lang.String str5 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests1.setIndexWriterMaxDocs((int) (short) 1); simpleIndexQueryParserTests1.resetCheckIndexStatus(); org.junit.Assert.assertNotNull("tests.weekly", (java.lang.Object) simpleIndexQueryParserTests1); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testEmptyBoolSubClausesIsMatchAll(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/bool-query-with-empty-clauses-for-parsing.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); org.junit.Assert.assertEquals("'" + str5 + "' != '" + "<unknown>" + "'", str5, "<unknown>"); } @Test public void test05452() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05452"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader3 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; org.apache.lucene.index.PostingsEnum postingsEnum6 = null; simpleIndexQueryParserTests1.assertDocsSkippingEquals("tests.awaitsfix", indexReader3, (int) (short) 0, postingsEnum5, postingsEnum6, true); org.junit.Assert.assertNotNull("", (java.lang.Object) simpleIndexQueryParserTests1); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testGeoDistanceFilter6(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_distance6.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } } @Test public void test05453() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05453"); java.util.Locale locale2 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray3 = new java.lang.Cloneable[] { locale2 }; java.util.List<java.lang.Cloneable> cloneableList4 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray3); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests5 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests5.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain7 = simpleIndexQueryParserTests5.failureAndSuccessEvents; org.junit.Assert.assertNotSame((java.lang.Object) cloneableArray3, (java.lang.Object) simpleIndexQueryParserTests5); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Terms terms11 = null; org.apache.lucene.index.Terms terms12 = null; simpleIndexQueryParserTests5.assertTermsEquals("", indexReader10, terms11, terms12, true); simpleIndexQueryParserTests5.setUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests5.testGeoPolygonNamedFilter(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_polygon-named.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale2); org.junit.Assert.assertEquals(locale2.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray3); org.junit.Assert.assertNotNull(cloneableList4); org.junit.Assert.assertNotNull(ruleChain7); } @Test public void test05454() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05454"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain8 = simpleIndexQueryParserTests0.failureAndSuccessEvents; org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Fields fields11 = null; org.apache.lucene.index.Fields fields12 = null; simpleIndexQueryParserTests0.assertFieldsEquals("hi!", indexReader10, fields11, fields12, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoDistanceFilter1(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_distance1.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertNull(ruleChain8); } @Test public void test05455() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05455"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader2 = null; org.apache.lucene.index.PostingsEnum postingsEnum4 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.awaitsfix", indexReader2, (int) (short) 0, postingsEnum4, postingsEnum5, true); org.apache.lucene.index.IndexReader indexReader9 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("europarl.lines.txt.gz", indexReader9, (int) (byte) -1, postingsEnum11, postingsEnum12, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testTermsQueryBuilder(); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } } @Test public void test05456() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05456"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); org.apache.lucene.index.IndexReader indexReader6 = null; org.apache.lucene.index.Fields fields7 = null; org.apache.lucene.index.Fields fields8 = null; simpleIndexQueryParserTests0.assertFieldsEquals("europarl.lines.txt.gz", indexReader6, fields7, fields8, true); org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.nightly", postingsEnum12, postingsEnum13, true); org.junit.rules.RuleChain ruleChain16 = simpleIndexQueryParserTests0.failureAndSuccessEvents; simpleIndexQueryParserTests0.setUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSpanContainingQueryParser(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/spanContaining.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain16); } @Test public void test05457() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05457"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (short) 1); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.setUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoShapeFilter(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geoShape-filter.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); } @Test public void test05458() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05458"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setUp(); java.lang.String str8 = simpleIndexQueryParserTests0.getTestName(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.badapples", indexReader10, (-1), postingsEnum12, postingsEnum13); org.apache.lucene.index.PostingsEnum postingsEnum16 = null; org.apache.lucene.index.PostingsEnum postingsEnum17 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.failfast", postingsEnum16, postingsEnum17, true); org.apache.lucene.index.IndexReader indexReader21 = null; org.apache.lucene.index.Terms terms22 = null; org.apache.lucene.index.Terms terms23 = null; simpleIndexQueryParserTests0.assertTermsEquals("europarl.lines.txt.gz", indexReader21, terms22, terms23, true); simpleIndexQueryParserTests0.overrideTestDefaultQueryCache(); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); java.lang.String str28 = simpleIndexQueryParserTests0.getTestName(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testPrefixQueryBuilder(); 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.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertEquals("'" + str8 + "' != '" + "<unknown>" + "'", str8, "<unknown>"); org.junit.Assert.assertEquals("'" + str28 + "' != '" + "<unknown>" + "'", str28, "<unknown>"); } @Test public void test05459() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05459"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); simpleIndexQueryParserTests0.ensureCleanedUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testCommonTermsQuery1(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/commonTerms-query1.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05460() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05460"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.ensureCleanedUp(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.junit.rules.RuleChain ruleChain3 = simpleIndexQueryParserTests0.failureAndSuccessEvents; org.apache.lucene.index.IndexReader indexReader5 = null; org.apache.lucene.index.Terms terms6 = null; org.apache.lucene.index.Terms terms7 = null; simpleIndexQueryParserTests0.assertTermsEquals("", indexReader5, terms6, terms7, false); // The following exception was thrown during execution in test generation try { // flaky: simpleIndexQueryParserTests0.testEmptyBooleanQuery(); // flaky: org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertNotNull(ruleChain3); } @Test public void test05461() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05461"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.apache.lucene.index.PostingsEnum postingsEnum13 = null; org.apache.lucene.index.PostingsEnum postingsEnum14 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("random", postingsEnum13, postingsEnum14, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testConstantScoreParsesFilter(); 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 test05462() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05462"); org.junit.Assert.assertEquals("", (double) (short) 10, 10.0d, (double) 'a'); } @Test public void test05463() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05463"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoPolygonFilterParsingExceptions(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_polygon_exception_1.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05464() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05464"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); org.junit.rules.RuleChain ruleChain2 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain2; org.apache.lucene.index.IndexReader indexReader5 = null; org.apache.lucene.index.Fields fields6 = null; org.apache.lucene.index.Fields fields7 = null; simpleIndexQueryParserTests0.assertFieldsEquals("<unknown>", indexReader5, fields6, fields7, false); org.junit.rules.TestRule testRule10 = simpleIndexQueryParserTests0.ruleChain; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testWildcardBoostQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/wildcard-boost.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertNotNull(testRule10); } @Test public void test05465() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05465"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.junit.rules.RuleChain ruleChain7 = simpleIndexQueryParserTests0.failureAndSuccessEvents; simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testCommonTermsQuery1(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/commonTerms-query1.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertNull(ruleChain7); } @Test public void test05466() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05466"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.nightly", indexReader7, 100, postingsEnum9, postingsEnum10, false); java.lang.String[] strArray19 = new java.lang.String[] { "", "tests.failfast", "node_s_0", "random" }; java.util.List<java.lang.Comparable<java.lang.String>> strComparableList20 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, (java.lang.Comparable<java.lang.String>[]) strArray19); java.util.List<java.lang.String> strList21 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf(2, strArray19); // The following exception was thrown during execution in test generation try { org.elasticsearch.action.admin.cluster.health.ClusterHealthStatus clusterHealthStatus22 = simpleIndexQueryParserTests0.ensureGreen(strArray19); 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.assertNotNull(strArray19); org.junit.Assert.assertNotNull(strComparableList20); org.junit.Assert.assertNotNull(strList21); } @Test public void test05467() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05467"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain8 = simpleIndexQueryParserTests0.failureAndSuccessEvents; org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Fields fields11 = null; org.apache.lucene.index.Fields fields12 = null; simpleIndexQueryParserTests0.assertFieldsEquals("hi!", indexReader10, fields11, fields12, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoShapeFilter(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geoShape-filter.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertNull(ruleChain8); } @Test public void test05468() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05468"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests3 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str4 = simpleIndexQueryParserTests3.getTestName(); simpleIndexQueryParserTests3.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests3.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain7 = null; simpleIndexQueryParserTests3.failureAndSuccessEvents = ruleChain7; org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests3.assertDocsSkippingEquals("tests.nightly", indexReader10, 100, postingsEnum12, postingsEnum13, false); simpleIndexQueryParserTests3.resetCheckIndexStatus(); simpleIndexQueryParserTests3.resetCheckIndexStatus(); org.junit.Assert.assertNotSame("tests.maxfailures", (java.lang.Object) 1L, (java.lang.Object) simpleIndexQueryParserTests3); simpleIndexQueryParserTests3.overrideTestDefaultQueryCache(); simpleIndexQueryParserTests3.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests3.ensureAllSearchContextsReleased(); org.junit.Assert.assertNotSame("tests.maxfailures", (java.lang.Object) simpleIndexQueryParserTests3, (java.lang.Object) 2); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests3.testSpanMultiTermPrefixQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/span-multi-term-prefix.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); } @Test public void test05469() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05469"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (short) 1); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain10 = simpleIndexQueryParserTests0.failureAndSuccessEvents; simpleIndexQueryParserTests0.ensureCheckIndexPassed(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.apache.lucene.index.PostingsEnum postingsEnum14 = null; org.apache.lucene.index.PostingsEnum postingsEnum15 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.awaitsfix", postingsEnum14, postingsEnum15, true); simpleIndexQueryParserTests0.setIndexWriterMaxDocs(4); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSpanMultiTermTermRangeQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/span-multi-term-range-term.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain10); } @Test public void test05470() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05470"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.junit.rules.RuleChain ruleChain7 = simpleIndexQueryParserTests0.failureAndSuccessEvents; org.junit.rules.RuleChain ruleChain8 = simpleIndexQueryParserTests0.failureAndSuccessEvents; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.badapples", postingsEnum10, postingsEnum11, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSpanMultiTermNumericRangeQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/span-multi-term-range-numeric.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertNull(ruleChain7); org.junit.Assert.assertNull(ruleChain8); } @Test public void test05471() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05471"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests1); org.junit.rules.RuleChain ruleChain6 = simpleIndexQueryParserTests1.failureAndSuccessEvents; org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests7 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str8 = simpleIndexQueryParserTests7.getTestName(); simpleIndexQueryParserTests7.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests7.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain11 = null; simpleIndexQueryParserTests7.failureAndSuccessEvents = ruleChain11; simpleIndexQueryParserTests7.ensureAllSearchContextsReleased(); org.junit.rules.RuleChain ruleChain14 = simpleIndexQueryParserTests7.failureAndSuccessEvents; simpleIndexQueryParserTests7.restoreIndexWriterMaxDocs(); java.lang.String str16 = simpleIndexQueryParserTests7.getTestName(); java.lang.String str17 = simpleIndexQueryParserTests7.getTestName(); org.apache.lucene.index.IndexReader indexReader19 = null; org.apache.lucene.index.PostingsEnum postingsEnum21 = null; org.apache.lucene.index.PostingsEnum postingsEnum22 = null; simpleIndexQueryParserTests7.assertDocsSkippingEquals("tests.monster", indexReader19, (int) (byte) 10, postingsEnum21, postingsEnum22, false); org.junit.Assert.assertNotSame((java.lang.Object) simpleIndexQueryParserTests1, (java.lang.Object) false); simpleIndexQueryParserTests1.ensureCleanedUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testPrefixBoostQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/prefix-boost.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain6); org.junit.Assert.assertEquals("'" + str8 + "' != '" + "<unknown>" + "'", str8, "<unknown>"); org.junit.Assert.assertNull(ruleChain14); org.junit.Assert.assertEquals("'" + str16 + "' != '" + "<unknown>" + "'", str16, "<unknown>"); org.junit.Assert.assertEquals("'" + str17 + "' != '" + "<unknown>" + "'", str17, "<unknown>"); } @Test public void test05472() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05472"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Fields fields5 = null; org.apache.lucene.index.Fields fields6 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.awaitsfix", indexReader4, fields5, fields6, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoPolygonFilter1(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_polygon1.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05473() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05473"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum4 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("", postingsEnum4, postingsEnum5, true); org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("", postingsEnum9, postingsEnum10, false); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests14 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str15 = simpleIndexQueryParserTests14.getTestName(); simpleIndexQueryParserTests14.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests14.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests14); org.junit.rules.RuleChain ruleChain19 = simpleIndexQueryParserTests14.failureAndSuccessEvents; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain19; org.apache.lucene.index.PostingsEnum postingsEnum22 = null; org.apache.lucene.index.PostingsEnum postingsEnum23 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("", postingsEnum22, postingsEnum23, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testWildcardBoostQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/wildcard-boost.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str15 + "' != '" + "<unknown>" + "'", str15, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain19); } @Test public void test05474() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05474"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); org.apache.lucene.index.IndexReader indexReader11 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; org.apache.lucene.index.PostingsEnum postingsEnum14 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.nightly", indexReader11, (int) '#', postingsEnum13, postingsEnum14); org.apache.lucene.index.IndexReader indexReader17 = null; org.apache.lucene.index.Terms terms18 = null; org.apache.lucene.index.Terms terms19 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.weekly", indexReader17, terms18, terms19, false); // The following exception was thrown during execution in test generation try { // flaky: simpleIndexQueryParserTests0.testTermQueryBuilder(); // flaky: 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 test05475() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05475"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests2 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str3 = simpleIndexQueryParserTests2.getTestName(); simpleIndexQueryParserTests2.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests2.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain6 = null; simpleIndexQueryParserTests2.failureAndSuccessEvents = ruleChain6; org.apache.lucene.index.IndexReader indexReader9 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; simpleIndexQueryParserTests2.assertDocsSkippingEquals("tests.nightly", indexReader9, 100, postingsEnum11, postingsEnum12, false); simpleIndexQueryParserTests2.resetCheckIndexStatus(); simpleIndexQueryParserTests2.resetCheckIndexStatus(); org.junit.Assert.assertNotSame("tests.maxfailures", (java.lang.Object) 1L, (java.lang.Object) simpleIndexQueryParserTests2); simpleIndexQueryParserTests2.overrideTestDefaultQueryCache(); simpleIndexQueryParserTests2.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests2.ensureAllSearchContextsReleased(); // The following exception was thrown during execution in test generation try { // flaky: simpleIndexQueryParserTests2.testFuzzyQueryWithFieldsBuilder(); // flaky: org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str3 + "' != '" + "<unknown>" + "'", str3, "<unknown>"); } @Test public void test05476() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05476"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.PostingsEnum postingsEnum6 = null; org.apache.lucene.index.PostingsEnum postingsEnum7 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.maxfailures", indexReader4, (int) (short) 100, postingsEnum6, postingsEnum7); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader11 = null; org.apache.lucene.index.Fields fields12 = null; org.apache.lucene.index.Fields fields13 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.failfast", 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; simpleIndexQueryParserTests0.assertTermsEquals("<unknown>", indexReader17, terms18, terms19, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testRegexpFilteredQueryWithMaxDeterminizedStates(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/regexp-filter-max-determinized-states.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05477() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05477"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) (short) 1); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain10 = simpleIndexQueryParserTests0.failureAndSuccessEvents; simpleIndexQueryParserTests0.ensureCheckIndexPassed(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.apache.lucene.index.PostingsEnum postingsEnum14 = null; org.apache.lucene.index.PostingsEnum postingsEnum15 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.awaitsfix", postingsEnum14, postingsEnum15, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testFQueryFilter(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/fquery-filter.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain10); } @Test public void test05478() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05478"); org.junit.Assert.assertEquals("", 0.0d, (double) 0, (double) 10); } @Test public void test05479() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05479"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); org.apache.lucene.index.IndexReader indexReader11 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; org.apache.lucene.index.PostingsEnum postingsEnum14 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.nightly", indexReader11, (int) '#', postingsEnum13, postingsEnum14); org.apache.lucene.index.IndexReader indexReader17 = null; org.apache.lucene.index.Terms terms18 = null; org.apache.lucene.index.Terms terms19 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.weekly", indexReader17, terms18, terms19, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testQueryFilter(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/query-filter.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05480() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05480"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.junit.rules.RuleChain ruleChain7 = simpleIndexQueryParserTests0.failureAndSuccessEvents; simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); java.lang.String str9 = simpleIndexQueryParserTests0.getTestName(); java.lang.String str10 = simpleIndexQueryParserTests0.getTestName(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSpanMultiTermPrefixQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/span-multi-term-prefix.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertNull(ruleChain7); org.junit.Assert.assertEquals("'" + str9 + "' != '" + "<unknown>" + "'", str9, "<unknown>"); org.junit.Assert.assertEquals("'" + str10 + "' != '" + "<unknown>" + "'", str10, "<unknown>"); } @Test public void test05481() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05481"); java.util.Locale locale2 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray3 = new java.lang.Cloneable[] { locale2 }; java.util.List<java.lang.Cloneable> cloneableList4 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray3); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests5 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests5.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain7 = simpleIndexQueryParserTests5.failureAndSuccessEvents; org.junit.Assert.assertNotSame((java.lang.Object) cloneableArray3, (java.lang.Object) simpleIndexQueryParserTests5); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests5.assertDocsSkippingEquals("tests.failfast", indexReader10, (int) (byte) 100, postingsEnum12, postingsEnum13, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests5.testOrFilteredQuery2(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/or-filter2.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale2); org.junit.Assert.assertEquals(locale2.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray3); org.junit.Assert.assertNotNull(cloneableList4); org.junit.Assert.assertNotNull(ruleChain7); } @Test public void test05482() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05482"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); org.junit.rules.TestRule testRule2 = simpleIndexQueryParserTests0.ruleChain; org.apache.lucene.index.PostingsEnum postingsEnum4 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("tests.maxfailures", postingsEnum4, postingsEnum5, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testDefaultBooleanQueryMinShouldMatch(); 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.assertNotNull(testRule2); } @Test public void test05483() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05483"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests1 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str2 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests1.ensureCleanedUp(); java.lang.String str5 = simpleIndexQueryParserTests1.getTestName(); simpleIndexQueryParserTests1.setIndexWriterMaxDocs((int) (byte) 1); simpleIndexQueryParserTests1.setIndexWriterMaxDocs((int) (short) 1); org.junit.Assert.assertNotSame("europarl.lines.txt.gz", (java.lang.Object) simpleIndexQueryParserTests1, (java.lang.Object) 2); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests1.testEmptyBooleanQueryInsideFQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/fquery-with-empty-bool-query.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str2 + "' != '" + "<unknown>" + "'", str2, "<unknown>"); org.junit.Assert.assertEquals("'" + str5 + "' != '" + "<unknown>" + "'", str5, "<unknown>"); } @Test public void test05484() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05484"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testSpanOrQuery2(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/spanOr2.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05485() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05485"); 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("node_s_0", "", 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 test05486() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05486"); // The following exception was thrown during execution in test generation try { java.nio.file.Path path2 = org.apache.lucene.util.LuceneTestCase.createTempFile("<unknown>", "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 test05487() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05487"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Terms terms11 = null; org.apache.lucene.index.Terms terms12 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.failfast", indexReader10, terms11, terms12, false); org.apache.lucene.index.IndexReader indexReader16 = null; org.apache.lucene.index.Terms terms17 = null; org.apache.lucene.index.Terms terms18 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.awaitsfix", indexReader16, terms17, terms18, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoPolygonFilter1(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_polygon1.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05488() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05488"); java.util.Locale locale3 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray4 = new java.lang.Cloneable[] { locale3 }; java.util.List<java.lang.Cloneable> cloneableList5 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray4); java.lang.Object obj6 = null; org.junit.Assert.assertNotSame((java.lang.Object) cloneableList5, obj6); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests8 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Fields fields11 = null; org.apache.lucene.index.Fields fields12 = null; simpleIndexQueryParserTests8.assertFieldsEquals("tests.maxfailures", indexReader10, fields11, fields12, false); org.junit.Assert.assertNotSame("tests.slow", obj6, (java.lang.Object) simpleIndexQueryParserTests8); simpleIndexQueryParserTests8.resetCheckIndexStatus(); simpleIndexQueryParserTests8.ensureCleanedUp(); simpleIndexQueryParserTests8.resetCheckIndexStatus(); simpleIndexQueryParserTests8.ensureCleanedUp(); org.junit.Assert.assertNotNull((java.lang.Object) simpleIndexQueryParserTests8); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests22 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str23 = simpleIndexQueryParserTests22.getTestName(); simpleIndexQueryParserTests22.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests22.ensureCleanedUp(); org.junit.Assert.assertNotNull("<unknown>", (java.lang.Object) simpleIndexQueryParserTests22); org.apache.lucene.index.IndexReader indexReader28 = null; org.apache.lucene.index.PostingsEnum postingsEnum30 = null; org.apache.lucene.index.PostingsEnum postingsEnum31 = null; simpleIndexQueryParserTests22.assertPositionsSkippingEquals("tests.maxfailures", indexReader28, (-1), postingsEnum30, postingsEnum31); simpleIndexQueryParserTests22.resetCheckIndexStatus(); simpleIndexQueryParserTests22.ensureCheckIndexPassed(); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests35 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str36 = simpleIndexQueryParserTests35.getTestName(); simpleIndexQueryParserTests35.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader39 = null; org.apache.lucene.index.Terms terms40 = null; org.apache.lucene.index.Terms terms41 = null; simpleIndexQueryParserTests35.assertTermsEquals("tests.maxfailures", indexReader39, terms40, terms41, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests44 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str45 = simpleIndexQueryParserTests44.getTestName(); simpleIndexQueryParserTests44.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests44.ensureCleanedUp(); java.lang.String str48 = simpleIndexQueryParserTests44.getTestName(); org.apache.lucene.index.IndexReader indexReader50 = null; org.apache.lucene.index.Fields fields51 = null; org.apache.lucene.index.Fields fields52 = null; simpleIndexQueryParserTests44.assertFieldsEquals("europarl.lines.txt.gz", indexReader50, fields51, fields52, true); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests55 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests55.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum59 = null; org.apache.lucene.index.PostingsEnum postingsEnum60 = null; simpleIndexQueryParserTests55.assertDocsEnumEquals("", postingsEnum59, postingsEnum60, true); simpleIndexQueryParserTests55.resetCheckIndexStatus(); org.junit.rules.RuleChain ruleChain64 = simpleIndexQueryParserTests55.failureAndSuccessEvents; simpleIndexQueryParserTests44.failureAndSuccessEvents = ruleChain64; simpleIndexQueryParserTests35.failureAndSuccessEvents = ruleChain64; simpleIndexQueryParserTests22.failureAndSuccessEvents = ruleChain64; org.apache.lucene.util.LuceneTestCase.classRules = ruleChain64; simpleIndexQueryParserTests8.failureAndSuccessEvents = ruleChain64; // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests8.testDisMax(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/disMax.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale3); org.junit.Assert.assertEquals(locale3.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray4); org.junit.Assert.assertNotNull(cloneableList5); org.junit.Assert.assertEquals("'" + str23 + "' != '" + "<unknown>" + "'", str23, "<unknown>"); org.junit.Assert.assertEquals("'" + str36 + "' != '" + "<unknown>" + "'", str36, "<unknown>"); org.junit.Assert.assertEquals("'" + str45 + "' != '" + "<unknown>" + "'", str45, "<unknown>"); org.junit.Assert.assertEquals("'" + str48 + "' != '" + "<unknown>" + "'", str48, "<unknown>"); org.junit.Assert.assertNotNull(ruleChain64); } @Test public void test05489() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05489"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Fields fields5 = null; org.apache.lucene.index.Fields fields6 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.monster", indexReader4, fields5, fields6, true); 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 { simpleIndexQueryParserTests0.assertReaderStatisticsEquals("tests.maxfailures", indexReader10, indexReader11); org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null"); } catch (java.lang.NullPointerException e) { // Expected exception. } } @Test public void test05490() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05490"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.Terms terms5 = null; org.apache.lucene.index.Terms terms6 = null; simpleIndexQueryParserTests0.assertTermsEquals("tests.maxfailures", indexReader4, terms5, terms6, true); simpleIndexQueryParserTests0.ensureCheckIndexPassed(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoDistanceFilter2(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_distance2.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05491() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05491"); // The following exception was thrown during execution in test generation try { int int2 = org.elasticsearch.test.ElasticsearchTestCase.scaledRandomIntBetween(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 test05492() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05492"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.junit.rules.RuleChain ruleChain7 = simpleIndexQueryParserTests0.failureAndSuccessEvents; simpleIndexQueryParserTests0.restoreIndexWriterMaxDocs(); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.Terms terms11 = null; org.apache.lucene.index.Terms terms12 = null; simpleIndexQueryParserTests0.assertTermsEquals("node_s_0", indexReader10, terms11, terms12, false); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoBoundingBoxFilter3(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_boundingbox3.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertNull(ruleChain7); } @Test public void test05493() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05493"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); org.apache.lucene.index.IndexReader indexReader6 = null; org.apache.lucene.index.Fields fields7 = null; org.apache.lucene.index.Fields fields8 = null; simpleIndexQueryParserTests0.assertFieldsEquals("europarl.lines.txt.gz", indexReader6, fields7, fields8, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoDistanceFilter5(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_distance5.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); } @Test public void test05494() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05494"); java.util.Locale locale2 = org.apache.lucene.util.LuceneTestCase.localeForName("hi!"); java.lang.Cloneable[] cloneableArray3 = new java.lang.Cloneable[] { locale2 }; java.util.List<java.lang.Cloneable> cloneableList4 = org.elasticsearch.test.ElasticsearchTestCase.randomSubsetOf((int) (byte) 0, cloneableArray3); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests5 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests5.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain7 = simpleIndexQueryParserTests5.failureAndSuccessEvents; org.junit.Assert.assertNotSame((java.lang.Object) cloneableArray3, (java.lang.Object) simpleIndexQueryParserTests5); org.apache.lucene.index.IndexReader indexReader10 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; simpleIndexQueryParserTests5.assertDocsSkippingEquals("tests.failfast", indexReader10, (int) (byte) 100, postingsEnum12, postingsEnum13, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests5.testMatchWithoutFuzzyTranspositions(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/match-without-fuzzy-transpositions.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertNotNull(locale2); org.junit.Assert.assertEquals(locale2.toString(), "hi!"); org.junit.Assert.assertNotNull(cloneableArray3); org.junit.Assert.assertNotNull(cloneableList4); org.junit.Assert.assertNotNull(ruleChain7); } @Test public void test05495() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05495"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); simpleIndexQueryParserTests0.setIndexWriterMaxDocs((int) ' '); org.apache.lucene.index.PostingsEnum postingsEnum4 = null; org.apache.lucene.index.PostingsEnum postingsEnum5 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("", postingsEnum4, postingsEnum5, true); org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests0.assertDocsEnumEquals("", postingsEnum9, postingsEnum10, false); org.junit.rules.TestRule testRule13 = simpleIndexQueryParserTests0.ruleChain; simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.apache.lucene.index.IndexReader indexReader16 = null; org.apache.lucene.index.Fields fields17 = null; org.apache.lucene.index.Fields fields18 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.nightly", indexReader16, fields17, fields18, true); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testMultiMatchQuery(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/multiMatch-query-simple.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertNotNull(testRule13); } @Test public void test05496() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05496"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.nightly", indexReader7, 100, postingsEnum9, postingsEnum10, false); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader16 = null; org.apache.lucene.index.PostingsEnum postingsEnum18 = null; org.apache.lucene.index.PostingsEnum postingsEnum19 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.slow", indexReader16, (int) (byte) 10, postingsEnum18, postingsEnum19, true); simpleIndexQueryParserTests0.setUp(); org.apache.lucene.index.IndexReader indexReader24 = null; org.apache.lucene.index.Fields fields25 = null; org.apache.lucene.index.Fields fields26 = null; simpleIndexQueryParserTests0.assertFieldsEquals("tests.failfast", indexReader24, fields25, fields26, false); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testDisMaxBuilder(); 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 test05497() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05497"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain4 = null; simpleIndexQueryParserTests0.failureAndSuccessEvents = ruleChain4; org.apache.lucene.index.IndexReader indexReader7 = null; org.apache.lucene.index.PostingsEnum postingsEnum9 = null; org.apache.lucene.index.PostingsEnum postingsEnum10 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.nightly", indexReader7, 100, postingsEnum9, postingsEnum10, false); simpleIndexQueryParserTests0.resetCheckIndexStatus(); simpleIndexQueryParserTests0.resetCheckIndexStatus(); org.apache.lucene.index.IndexReader indexReader16 = null; org.apache.lucene.index.PostingsEnum postingsEnum18 = null; org.apache.lucene.index.PostingsEnum postingsEnum19 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.slow", indexReader16, (int) (byte) 10, postingsEnum18, postingsEnum19, true); org.apache.lucene.index.IndexReader indexReader23 = null; org.apache.lucene.index.Fields fields24 = null; org.apache.lucene.index.Fields fields25 = null; simpleIndexQueryParserTests0.assertFieldsEquals("random", indexReader23, fields24, fields25, false); // The following exception was thrown during execution in test generation try { // flaky: simpleIndexQueryParserTests0.testFuzzyQueryBuilder(); // flaky: 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 test05498() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05498"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests0.ensureCleanedUp(); java.lang.String str4 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.setUp(); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testGeoPolygonFilter1(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/geo_polygon1.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); org.junit.Assert.assertEquals("'" + str4 + "' != '" + "<unknown>" + "'", str4, "<unknown>"); } @Test public void test05499() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05499"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests0 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str1 = simpleIndexQueryParserTests0.getTestName(); simpleIndexQueryParserTests0.ensureAllSearchContextsReleased(); org.apache.lucene.index.IndexReader indexReader4 = null; org.apache.lucene.index.PostingsEnum postingsEnum6 = null; org.apache.lucene.index.PostingsEnum postingsEnum7 = null; simpleIndexQueryParserTests0.assertDocsSkippingEquals("tests.slow", indexReader4, 0, postingsEnum6, postingsEnum7, true); org.apache.lucene.index.IndexReader indexReader11 = null; org.apache.lucene.index.PostingsEnum postingsEnum13 = null; org.apache.lucene.index.PostingsEnum postingsEnum14 = null; simpleIndexQueryParserTests0.assertPositionsSkippingEquals("tests.awaitsfix", indexReader11, (int) (short) 1, postingsEnum13, postingsEnum14); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests0.testQueryString(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/query.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str1 + "' != '" + "<unknown>" + "'", str1, "<unknown>"); } @Test public void test05500() throws Throwable { if (debug) System.out.format("%n%s%n", "RegressionTest10.test05500"); org.elasticsearch.index.query.SimpleIndexQueryParserTests simpleIndexQueryParserTests2 = new org.elasticsearch.index.query.SimpleIndexQueryParserTests(); java.lang.String str3 = simpleIndexQueryParserTests2.getTestName(); simpleIndexQueryParserTests2.ensureAllSearchContextsReleased(); simpleIndexQueryParserTests2.ensureCleanedUp(); org.junit.rules.RuleChain ruleChain6 = null; simpleIndexQueryParserTests2.failureAndSuccessEvents = ruleChain6; org.apache.lucene.index.IndexReader indexReader9 = null; org.apache.lucene.index.PostingsEnum postingsEnum11 = null; org.apache.lucene.index.PostingsEnum postingsEnum12 = null; simpleIndexQueryParserTests2.assertDocsSkippingEquals("tests.nightly", indexReader9, 100, postingsEnum11, postingsEnum12, false); simpleIndexQueryParserTests2.resetCheckIndexStatus(); simpleIndexQueryParserTests2.resetCheckIndexStatus(); org.junit.Assert.assertNotSame("tests.maxfailures", (java.lang.Object) 1L, (java.lang.Object) simpleIndexQueryParserTests2); // The following exception was thrown during execution in test generation try { simpleIndexQueryParserTests2.testSpanContainingQueryParser(); org.junit.Assert.fail("Expected exception of type java.io.FileNotFoundException; message: Resource [/org/elasticsearch/index/query/spanContaining.json] not found in classpath"); } catch (java.io.FileNotFoundException e) { // Expected exception. } org.junit.Assert.assertEquals("'" + str3 + "' != '" + "<unknown>" + "'", str3, "<unknown>"); } }
67.460176
578
0.717762
1b6b6575f980fc3fcfc195f5c6d218e8a6579f92
1,472
package jpuppeteer.cdp.client.entity.console; /** * Console message. */ public class ConsoleMessage { /** * Message source. */ public final jpuppeteer.cdp.client.constant.console.ConsoleMessageSource source; /** * Message severity. */ public final jpuppeteer.cdp.client.constant.console.ConsoleMessageLevel level; /** * Message text. */ public final String text; /** * URL of the message origin. */ public final String url; /** * Line number in the resource that generated this message (1-based). */ public final Integer line; /** * Column number in the resource that generated this message (1-based). */ public final Integer column; public ConsoleMessage(jpuppeteer.cdp.client.constant.console.ConsoleMessageSource source, jpuppeteer.cdp.client.constant.console.ConsoleMessageLevel level, String text, String url, Integer line, Integer column) { this.source = source; this.level = level; this.text = text; this.url = url; this.line = line; this.column = column; } public ConsoleMessage(jpuppeteer.cdp.client.constant.console.ConsoleMessageSource source, jpuppeteer.cdp.client.constant.console.ConsoleMessageLevel level, String text) { this.source = source; this.level = level; this.text = text; this.url = null; this.line = null; this.column = null; } }
26.285714
216
0.652853
e9b1fdebd514aae8377e5e2e887d64f2a34be248
6,913
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package dogui; import app.FileBot; import java.io.File; import java.io.IOException; import java.net.URL; import java.nio.file.Files; import java.nio.file.Paths; import static java.nio.file.StandardCopyOption.REPLACE_EXISTING; import java.util.ArrayList; import java.util.ResourceBundle; import javafx.event.ActionEvent; import javafx.fxml.FXML; import javafx.fxml.Initializable; import javafx.scene.control.Button; import javafx.scene.control.ComboBox; import javafx.scene.control.Label; import javafx.scene.control.TextField; import javafx.scene.control.TreeItem; import javafx.scene.control.TreeView; import javafx.scene.paint.Color; /** * * @author github.com/polysource */ public class FXMLDocumentController implements Initializable { @FXML private Button createFolderBtn; @FXML private TextField newFolderName; @FXML private Label statusLB; @FXML private TreeView<String> allFiles = new TreeView<>(); private TreeItem<String> root = new TreeItem<String>("Desktop ('All Files')"); String[] filesReturned; @FXML private TreeView<String> allFolders = new TreeView<>(); private TreeItem<String> folders = new TreeItem<String>("Desktop ('Only folders')"); @FXML private ComboBox<String> extensionsCB = new ComboBox<>(); @FXML private ComboBox<String> destinationCB = new ComboBox<>(); @FXML private Button applyBTN; /* @FXML private void sayHello(ActionEvent event) { System.out.println("You clicked me!"); statusLB.setText("Folder created succesfully!"); TreeItem<String> item = new TreeItem<String> ("test1"); root.getChildren().add(item); }*/ @FXML private void createFolder(ActionEvent event) { String folderName = newFolderName.getText(); File f = new File(System.getProperty("user.home") + "/Desktop/"+folderName); if(!f.exists()) { f.mkdir(); TreeItem<String> item = new TreeItem<String> (folderName); folders.getChildren().add(item); TreeItem<String> item2 = new TreeItem<String> (folderName); root.getChildren().add(item2); destinationCB.getItems().add(folderName); statusLB.setTextFill(Color.web("#14a333")); statusLB.setText("Folder created succesfully!"); } else { statusLB.setTextFill(Color.web("#d71919")); statusLB.setText("Folder already exists!"); } } @FXML private void moveFiles(ActionEvent event) throws IOException { String opt = extensionsCB.getValue(); String destFolder = destinationCB.getValue(); FileBot fb = new FileBot(); String[] f = fb.getAllFiles(); ArrayList<String> newListFiles = new ArrayList<>(); for(String item : f) { if(fb.isSameExtension(item, opt)) { newListFiles.add(item); } } for(String k: newListFiles) { removeItemFrom(k, root); Files.move(Paths.get(System.getProperty("user.home") + "/Desktop/" + k), Paths.get(System.getProperty("user.home") + "/Desktop/" + destFolder + "/" + k), REPLACE_EXISTING); /*System.out.println(k); System.out.println(destFolder); Files.delete(Paths.get(System.getProperty("user.home") + "/Desktop/" + k));*/ allFiles.setRoot(null); //allFolders.setRoot(null); root.getChildren().clear(); updateFileTreeView(fb, allFiles, root); } //Files.move(Paths.get(System.getProperty("user.home") + "/Desktop/TEXT3000.txt"), Paths.get(System.getProperty("user.home") + "/Desktop/test3000/TEXT3000.txt"), REPLACE_EXISTING); statusLB.setTextFill(Color.web("#14a333")); statusLB.setText("Files moved"); } @Override public void initialize(URL url, ResourceBundle rb) { // TODO FileBot fb = new FileBot(); newFolderName.setPromptText("Folder name"); //Initializes Desktop file treeView root.setExpanded(true); /*filesReturned = fb.getAllFiles(); for(int i = 0; i < filesReturned.length; i++) { TreeItem<String> item = new TreeItem<String> (filesReturned[i]); root.getChildren().add(item); } allFiles.setRoot(root);*/ updateFileTreeView(fb,allFiles,root); //Display TreeView Folders folders.setExpanded(true); updateFolderTreeView(fb,allFolders,folders); //Load extensions combobox loadExtensionsComboBox(fb); loadFoldersComboBox(fb); } private void updateFolderTreeView(FileBot fb, TreeView t, TreeItem i) { ArrayList<String> allFoldersArray = fb.getAllFolders(); for(String f : allFoldersArray) { TreeItem<String> item2 = new TreeItem<String>(f); i.getChildren().add(item2); } t.setRoot(i); } private void updateFileTreeView(FileBot fb, TreeView t, TreeItem m) { filesReturned = fb.getAllFiles(); for(int i = 0; i < filesReturned.length; i++) { TreeItem<String> item = new TreeItem<String> (filesReturned[i]); m.getChildren().add(item); } /*root.setExpanded(true);*/ t.setRoot(m); } public void loadExtensionsComboBox(FileBot f) { ArrayList<String> list = f.listExtensions(); for(String s : list) { extensionsCB.getItems().add(s); } } public void loadFoldersComboBox(FileBot f) { ArrayList<String> list = f.getAllFolders(); for(String s : list) { destinationCB.getItems().add(s); } } public void removeItemFrom(String k, TreeItem i) { int s = i.getChildren().indexOf(i); System.out.println(s); } }
26.385496
188
0.550123
155ed6bc0fe66907967adde97a2657cad21ac16b
1,364
package com.example.foneproject.model; import com.fasterxml.jackson.annotation.JsonIgnore; import javax.persistence.*; import java.util.Objects; @Entity @Table(name = "phone") public class Phone { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @Column(length = 2, nullable = false) private String ddd; @Column(length = 9, nullable = false) private String number; @ManyToOne @JoinColumn(name = "person_id") @JsonIgnore private Person person; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Person getPerson() { return person; } public void setPerson(Person person) { this.person = person; } public String getDdd() { return ddd; } public void setDdd(String ddd) { this.ddd = ddd; } public String getNumber() { return number; } public void setNumber(String number) { this.number = number; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Phone phone = (Phone) o; return Objects.equals(id, phone.id); } @Override public int hashCode() { return Objects.hash(id); } }
18.944444
66
0.595308
a1655a73500b6a013047ea984e48bbb9614a696c
10,181
package com.ds365.erp.wms.pda.view.stock.pick.activity; import com.ds365.commons.utils.IntentUtils; import com.ds365.commons.utils.StringUtils; import com.ds365.commons.utils.T; import com.ds365.commons.widget.IntEditField; import com.ds365.erp.pda.R; import com.ds365.erp.wms.pda.common.base.ConstantUrl; import com.ds365.erp.wms.pda.common.base.PdaConstants; import com.ds365.erp.wms.pda.common.utils.QtyMoneyUtils; import com.ds365.erp.wms.pda.model.pickbill.PickBatchDetailModel; import com.ds365.erp.wms.pda.model.stock.SkuShelfBatchStockModel; import com.ds365.erp.wms.pda.view.common.activity.BasePdaActivity; import com.ds365.erp.wms.pda.view.common.activity.CodeScanActivity; import com.ds365.erp.wms.pda.view.common.activity.SkuShelfBatchStockSelectorActivity; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.text.Editable; import android.text.TextWatcher; import android.view.KeyEvent; import android.view.View; import android.view.View.OnClickListener; import android.view.inputmethod.EditorInfo; import android.view.inputmethod.InputMethodManager; import android.widget.EditText; import android.widget.ImageView; import android.widget.TextView; import android.widget.TextView.OnEditorActionListener; public class PickBatchDetailRegistForSingleEditActivity extends BasePdaActivity { private TextView storeNameValue, sysBatchNoValue, saveButton, qtyValue, shelfIdValue; private IntEditField unitQtyValue, minUnitQtyValue; private EditText shelfCodeValue; private ImageView shelfCodeScanButton; private PickBatchDetailModel pickBatchDetailModel; public final static String SER_KEY = PdaConstants.nextSerKey(); public static final int RESULT_CODE = PdaConstants.nextResultCode(); @Override protected void initActivityView() { pickBatchDetailModel = (PickBatchDetailModel) getIntent() .getSerializableExtra(PickBatchDetailRegistForSingleActivity.SER_KEY); shelfCodeScanButton = (ImageView) findViewById(R.id.pickBatchDetailRegistForSingleEdit_shelfCodeScan_button); shelfIdValue = (TextView) findViewById(R.id.pickBatchDetailRegistForSingleEdit_shelfId_value); saveButton = (TextView) findViewById(R.id.pickBatchDetailRegistForSingleEdit_save_button); shelfCodeValue = (EditText) findViewById(R.id.pickBatchDetailRegistForSingleEdit_shelfCode_value); sysBatchNoValue = (TextView) findViewById(R.id.pickBatchDetailRegistForSingleEdit_sysBatchNo_value); storeNameValue = (TextView) findViewById(R.id.pickBatchDetailRegistForSingleEdit_storeName_value); qtyValue = (TextView) findViewById(R.id.pickBatchDetailRegistForSingleEdit_qty_value); unitQtyValue = (IntEditField) findViewById(R.id.pickBatchDetailRegistForSingleEdit_unitQty_value); minUnitQtyValue = (IntEditField) findViewById(R.id.pickBatchDetailRegistForSingleEdit_minUnitQty_value); minUnitQtyValue.setMaxValueAndTextChangeListener(pickBatchDetailModel.getSpecQty(),"散数不能大于包装数量!",null); } @Override protected void initNavigation() { initHeadView(R.id.pickBatchDetailRegistForSingleEdit_headerView, R.string.goods_batch_detail); } @Override protected int getContentViewId() { return R.layout.stock_pick_batch_detail_regist_for_single_edit; } @Override protected void setListener() { shelfCodeValue.setOnEditorActionListener(new OnEditorActionListener() { @Override public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { //按回车键调用 if(event!=null&&event.getKeyCode()==KeyEvent.KEYCODE_ENTER){ searchShelfInfo(v); } if(actionId == EditorInfo.IME_ACTION_SEARCH){ /*隐藏软键盘*/ InputMethodManager imm = (InputMethodManager)v.getContext().getSystemService(Context.INPUT_METHOD_SERVICE); if (imm.isActive()) { imm.hideSoftInputFromWindow(v.getApplicationWindowToken(), 0); } searchShelfInfo(v); return true; } return false; } }); // 用Enter键或软键盘的搜索键进行计算 // OnEditorActionListener actionListener = new OnEditorActionListener() { // // @Override // public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { // // if(event != null && event.getKeyCode() == KeyEvent.KEYCODE_ENTER){ // verificationPickQty(); // } // if(actionId == EditorInfo.IME_ACTION_SEARCH){ // /*隐藏软键盘*/ // InputMethodManager imm = (InputMethodManager)v.getContext().getSystemService(Context.INPUT_METHOD_SERVICE); // if (imm.isActive()) { // imm.hideSoftInputFromWindow(v.getApplicationWindowToken(), 0); // } // verificationPickQty(); // return true; // } // return false; // } // }; // unitQtyValue.setOnEditorActionListener(actionListener); // minUnitQtyValue.setOnEditorActionListener(actionListener); //监测输入框的值,只要有变化就计算 TextWatcher textWatcher = new TextWatcher() { @Override public void onTextChanged(CharSequence s, int start, int before, int count) { } @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { } @Override public void afterTextChanged(Editable editable) { verificationPickQty(editable); } }; unitQtyValue.getEditText().addTextChangedListener(textWatcher); minUnitQtyValue.getEditText().addTextChangedListener(textWatcher); saveButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { //验证页面上的值是否合法 StringBuilder message=new StringBuilder(); if("".equals(shelfIdValue.getText().toString().trim())){ message.append("请输入货位号并选择货位批次库存信息\r\n"); } if (StringUtils.isEmptyEditText(unitQtyValue.getEditText())) { message.append("请输入件数\r\n"); } if(StringUtils.isEmptyEditText(minUnitQtyValue.getEditText())){ message.append("请输入散数\r\n"); } if ("".equals(qtyValue.getText().toString().trim())) { message.append("请计算出总数量"); } if ("0".equals(qtyValue.getText().toString().trim())) { message.append("拣货数量不能为零"); } if(message.length()!=0){ T.showShort(context, message.toString()); return; } // 验证通过后将值传回 pickBatchDetailModel.setExpectPickQty(Integer.valueOf(qtyValue.getText().toString().trim())); Bundle mBundle = new Bundle(); mBundle.putSerializable(SER_KEY,pickBatchDetailModel); getIntent().putExtras(mBundle); setResult(RESULT_CODE, getIntent()); finish(); } }); shelfCodeScanButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { IntentUtils.startActivityForResult(PickBatchDetailRegistForSingleEditActivity.this , CodeScanActivity.class, PdaConstants.PDA_REQUEST_CODE); } }); } /** * 验证拣货总数量是否小于应捡总数量 */ private void verificationPickQty(Editable editable){ Integer pickUnitQty = calPickUntiQty(editable); Integer pickMinUnitQty = calPickMinUintQty(editable); Integer pickQty = calPickQty(pickUnitQty, pickMinUnitQty); Integer expectPickQty = pickBatchDetailModel.getExpectPickQty(); if (pickQty.intValue() > expectPickQty.intValue()) { T.showShort(context, "拣货总数量已经大于应捡总数量了,请重新输入!"); }else{ pickBatchDetailModel.setPickUnitQty(pickUnitQty); pickBatchDetailModel.setPickMinUnitQty(pickMinUnitQty); pickBatchDetailModel.setPickQty(pickQty); qtyValue.setText(String.valueOf(pickQty)); } } private Integer calPickQty(Integer pickUnitQty, Integer pickMinUnitQty) { Integer specQty = pickBatchDetailModel.getSpecQty(); Integer pickQty = QtyMoneyUtils.getQty(pickUnitQty, pickMinUnitQty, specQty); return pickQty; } private Integer calPickMinUintQty(Editable editable) { int pickMinUnitQty=0; if(!"".equals(editable.toString())){ String minUintQtyStr=String.valueOf(minUnitQtyValue.getValue()); if(StringUtils.isBlank(minUintQtyStr)) pickMinUnitQty=StringUtils.isEmptyInt(minUintQtyStr); pickMinUnitQty = Integer.parseInt(minUintQtyStr); return pickMinUnitQty; }else{ T.showShort(context, "请输入数量!"); return pickMinUnitQty; } } private Integer calPickUntiQty(Editable editable) { int pickUnitQty=0; if(!"".equals(editable.toString())){ String unitQtyStr=String.valueOf(unitQtyValue.getValue()); if(StringUtils.isBlank(unitQtyStr)) pickUnitQty=StringUtils.isEmptyInt(unitQtyStr); pickUnitQty = Integer.parseInt(unitQtyStr); return pickUnitQty; }else{ T.showShort(context, "请输入数量!"); return pickUnitQty; } } /** * 获取货位批次库存信息 */ private void searchShelfInfo(TextView v){ Intent intent=new Intent(context, SkuShelfBatchStockSelectorActivity.class); intent.putExtra("shelfCode", v.getText().toString()); intent.putExtra("skuId",pickBatchDetailModel.getSku().getId()); intent.putExtra(SkuShelfBatchStockSelectorActivity.SELECTOR_URL_KEY, ConstantUrl.skuStock_skuStock_searchPageSkuShelfBatchStockForNormal); startActivityForResult(intent,PdaConstants.PDA_REQUEST_CODE); } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (data != null) { if (resultCode == SkuShelfBatchStockSelectorActivity.RESULT_CODE) { SkuShelfBatchStockModel skuShelfBatchStock = (SkuShelfBatchStockModel)data.getSerializableExtra(SkuShelfBatchStockSelectorActivity.SER_KEY); pickBatchDetailModel.setShelf(skuShelfBatchStock.getShelf()); pickBatchDetailModel.setStore(skuShelfBatchStock.getStore()); pickBatchDetailModel.setSysBatchNo(skuShelfBatchStock.getSysBatchNo()); shelfCodeValue.setText(skuShelfBatchStock.getShelf().getCode()); storeNameValue.setText(skuShelfBatchStock.getStore().getName()); sysBatchNoValue.setText(skuShelfBatchStock.getSysBatchNo()); shelfIdValue.setText(String.valueOf(skuShelfBatchStock.getShelf().getId())); }else if (resultCode == CodeScanActivity.RESULT_CODE) { shelfCodeValue.setText(data.getStringExtra(PdaConstants.scanResult)); } } } }
37.568266
145
0.745212
f159e9cab414ef0d3c07285e1a210e472b126b4c
453
package org.mozartoz.truffle.nodes; import java.math.BigInteger; import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary; import com.oracle.truffle.api.dsl.ImplicitCast; import com.oracle.truffle.api.dsl.TypeSystem; @TypeSystem({ long.class, BigInteger.class, Object[].class }) public abstract class OzTypes { @ImplicitCast @TruffleBoundary public static BigInteger castBigInteger(long value) { return BigInteger.valueOf(value); } }
23.842105
65
0.796909
b6e81b280075a9bcf11da761ed7ac8662d6c8966
4,693
/** * Copyright 2004 The Apache Software Foundation * * 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.apache.lucene.gdata.server.administration; import org.apache.lucene.gdata.data.GDataAccount; import org.apache.lucene.gdata.data.ServerBaseFeed; import org.apache.lucene.gdata.server.Service; import org.apache.lucene.gdata.server.ServiceException; /** * The AdminService interface extends the Service interface to serve common * administrator requests. Common users can not create feed or user instances. * This interface provides all actions for create, delete or update Users and * Feeds. Each Feed has an associated Feed - Name which acts as an ID. Feed will * be identified by the feed name e.g. {@link com.google.gdata.data.Source#getId()} * <p>User accounts are supposed to have a unique username attribute as the username acts as a primary key for the storage</p> * * * @author Simon Willnauer * */ public interface AdminService extends Service { /** * Creates a new feed instance. * * @param feed - * the feed to create * @param account - the account who own this feed * @throws ServiceException - * if the feed can not be created */ public abstract void createFeed(final ServerBaseFeed feed, final GDataAccount account) throws ServiceException; /** * Updates the given feed * * @param feed - * the feed to update * @param account - the account who own this feed * * @throws ServiceException - * if the feed can not be updated or does not exist. */ public abstract void updateFeed(final ServerBaseFeed feed, final GDataAccount account) throws ServiceException; /** * Deletes the given feed and all containing entries from the storage. The feed will not be accessable * anymore. * * @param feed - * the feed to deltete * * @throws ServiceException - * if the feed can not be deleted or does not exist */ public abstract void deleteFeed(final ServerBaseFeed feed) throws ServiceException; /** * Creates a new account accout. * * @param account - * the account to create * @throws ServiceException - * if the account can not be created or the account does already * exist. */ public abstract void createAccount(final GDataAccount account) throws ServiceException; /** * Deletes the given account from the storage. it will also delete all * accociated feeds. * * @param account * the account to delete * @throws ServiceException - * if the account does not exist or the account can not be deleted */ public abstract void deleteAccount(final GDataAccount account) throws ServiceException; /** * Updates the given account if the account already exists. * * @param account - the account to update * @throws ServiceException - if the account can not be updated or the account does not exist */ public abstract void updateAccount(final GDataAccount account) throws ServiceException; /** * Returns the account for the given account name or <code>null</code> if the account does not exist * * @param account - account name * @return - the account for the given account name or <code>null</code> if the account does not exist * @throws ServiceException - if the account can not be accessed */ public abstract GDataAccount getAccount(String account) throws ServiceException; /** * Returns the account associated with the feed for the given feed id * @param feedId - the feed id * @return - the GdataAccount assoziated with the feed for the given feed Id or <code>null</code> if there is no feed for the given feed Id * @throws ServiceException - if the storage can not be accessed */ public abstract GDataAccount getFeedOwningAccount(String feedId) throws ServiceException; }
37.846774
143
0.669721
d61980a5123e12afa02da9990e2dedeb47becc11
454
package com.sciatta.openmall.dao.mapper.ext; import com.sciatta.openmall.dao.pojo.po.mbg.Carousel; import org.apache.ibatis.annotations.Param; import java.util.List; /** * Created by yangxiaoyu on 2021/7/31<br> * All Rights Reserved(C) 2017 - 2021 SCIATTA<br><p/> * CarouselMapper */ public interface CarouselMapper extends com.sciatta.openmall.dao.mapper.mbg.CarouselMapper { List<Carousel> selectByIsShow(@Param("isShow") Integer isShow); }
28.375
92
0.762115
21d6948b6f210fb28e466a3c99229be3bcde4fa0
1,824
package com.anwar.service.impl; import com.anwar.domain.Product; import com.anwar.repository.ProductRepository; import com.anwar.service.ProductService; import com.anwar.service.exception.*; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import javax.inject.Inject; import javax.inject.Named; /** * @author Anwar */ @Named @Transactional(readOnly = true) public class ProductServiceImpl implements ProductService { @Inject private ProductRepository productRepository; @Override public Product getProduct(final Long id) { Product product = productRepository.findOne(id); if (product == null) { throw new ProductNotFoundException(ApiError.Errors._PRODUCT_NOT_FOUND, "Product with id : " + id + " not found."); } return product; } @Override public Page<Product> getProducts(final Pageable pageable) { final Page<Product> results = productRepository.findAll(pageable); if (CollectionUtils.isEmpty(results.getContent())) { throw new NoProductsFoundException(ApiError.Errors._PRODUCTS_NOT_FOUND, "There are no products available in the system"); } return results; } @Override public Page<Product> getProductsByCategory(final Long categoryId, final Pageable pageable) { final Page<Product> results = productRepository.findByCategoryId(categoryId, pageable); if (CollectionUtils.isEmpty(results.getContent())) { throw new NoProductsFoundException(ApiError.Errors._PRODUCTS_NOT_FOUND, "There are no products available in the system for category : " + categoryId); } return results; } }
34.415094
162
0.72807
db9c3c3a0c0b9cb66feec7a316a24d550dfd8d89
19,621
/** * */ package biorimp.view; import biorimp.optmodel.mappings.metaphor.MetaphorCode; import edu.wayne.cs.severe.redress2.controller.HierarchyBuilder; import edu.wayne.cs.severe.redress2.entity.TypeDeclaration; import edu.wayne.cs.severe.redress2.main.MainPredFormulasBIoRIPM; import org.gicentre.utils.geom.HashGrid; import org.gicentre.utils.geom.Locatable; import processing.core.PApplet; import processing.core.PVector; import java.util.ArrayList; import java.util.List; import java.util.Set; /** * @author Daavid */ public class MyProcessingSketch extends PApplet { static int rad = 15; static final float RADIUS = rad; // Search radius for hash grid HashGrid<Dot> hashGrid; MetaphorCode metaphor; HierarchyBuilder builder; double step = 0.001; // Size of each step along the path float beginX; // Initial x-coordinate float beginY; // Initial y-coordinate float endX; // Final x-coordinate float endY; // Final y-coordinate float distX; // X-axis distance to move float distY; // Y-axis distance to move float x = (float) 0.0; // Current x-coordinate float y = (float) 0.0; // Current y-coordinate float spring = (float) 0.05; float friction = (float) -0.9; public static void main(String args[]) { PApplet.main(new String[]{"--present", "view.MyProcessingSketch"}); } public void settings() { //First Step: Calculate Actual Metrics String userPath = System.getProperty("user.dir"); String[] args = {"-l", "Java", "-p", userPath + "\\test_data\\code\\optimization\\src", "-s", "java/optmodel/fitness "}; //Second Step: Create the structures for the prediction MainPredFormulasBIoRIPM init = new MainPredFormulasBIoRIPM(); init.main(args); metaphor = new MetaphorCode(init, 0); size(1200, 600); //size(640, 360, processing.opengl.PGraphics3D); } public void setup() { //noFill(); hashGrid = new HashGrid<Dot>(width, height, RADIUS); List<TypeDeclaration> childrenList; for (TypeDeclaration systype : metaphor.getSysTypeDcls()) { childrenList = metaphor.getBuilder().getChildClasses().get(systype.getQualifiedName()); hashGrid.add(new Dot(random(width), random(height), systype, childrenList)); } //Listing children List<Dot> dotchildren; for (Dot d : hashGrid) { if (d.getchildren() != null) { dotchildren = new ArrayList<Dot>(); for (TypeDeclaration dotChild : d.getchildren()) { for (Dot dChild : hashGrid) //dotchild for { if (dChild.systype.equals(dotChild)) { dChild.setEndLocation(d.getLocation().x, d.getLocation().y); dotchildren.add(dChild); } } } d.setdotChildren(dotchildren); } } fill(255, 204); } public void draw() { background(0); stroke(255); strokeWeight(1); textSize(20); motion_move_child(); collide(); move(); move_3(); for (Dot d : hashGrid) { ellipse(d.getLocation().x, d.getLocation().y, rad, rad); point(d.getLocation().x, d.getLocation().y); //text( d.getName().getName() , d.getLocation().x, d.getLocation().y ); if (d.getdotchildren() != null) for (Dot dotChild : d.getdotchildren()) line(d.getLocation().x, d.getLocation().y, dotChild.getLocation().x, dotChild.getLocation().y); } Set<Dot> dotsNearMouse = hashGrid.get(new PVector(mouseX, mouseY)); if (mousePressed) { //hashGrid.removeAll(dotsNearMouse); //motion_move_parent(); collide(); move(); move_2(); } else { strokeWeight(15); stroke(120, 20, 20, 200); for (Dot d : dotsNearMouse) { text(d.getSystype().getName(), d.getLocation().x, d.getLocation().y); point(d.getLocation().x, d.getLocation().y); } } } void collide() { HashGrid<Dot> hashGrid_ = new HashGrid<Dot>(width, height, RADIUS); for (Dot d : hashGrid) hashGrid_.add(d); for (Dot dotReal : hashGrid_) { for (Dot dot : hashGrid_) { if (!dotReal.equals(dot)) { float dx = dot.getLocation().x - dotReal.getLocation().x; float dy = dot.getLocation().y - dotReal.getLocation().y; float distance = sqrt(dx * dx + dy * dy); float minDist = rad * 3; if (distance < minDist) { float angle = atan2(dy, dx); float targetX = x + cos(angle) * minDist; float targetY = y + sin(angle) * minDist; float ax = (targetX - dot.getLocation().x) * spring; float ay = (targetY - dot.getLocation().y) * spring; dotReal.setVX(dotReal.getVX() - ax); dotReal.setVY(dotReal.getVY() - ay); dot.setVX(dot.getVX() + ax); dot.setVY(dot.getVY() + ay); } } } } List<TypeDeclaration> childrenList; hashGrid = new HashGrid<Dot>(width, height, RADIUS); for (Dot d : hashGrid_) { childrenList = d.getchildren(); hashGrid.add(new Dot( d.getLocation().x, d.getLocation().y, d.getSystype(), childrenList)); } //Update Dot Children List<Dot> dotchildren; for (Dot d : hashGrid) { if (d.getchildren() != null) { dotchildren = new ArrayList<Dot>(); for (TypeDeclaration dotChild : d.getchildren()) { for (Dot dChild : hashGrid) { if (dChild.systype.equals(dotChild)) dotchildren.add(dChild); } } d.setdotChildren(dotchildren); } } } public void motion_move_parent() { boolean bandera = false; HashGrid<Dot> hashGrid_ = new HashGrid<Dot>(width, height, RADIUS); for (Dot d : hashGrid) hashGrid_.add(d); for (Dot d : hashGrid_) { for (Dot dotChild : d.getdotchildren()) { for (Dot dotReal : hashGrid_) { if (dotChild.getSystype().equals(dotReal.getSystype())) { // dotReal.getPCT() < 1.0 && if (d.getPCT() < 1 && dist(dotReal.getLocation().x, dotReal.getLocation().y, d.getLocation().x, d.getLocation().y) > rad) { d.setPCTincrement(); distX = dotReal.getLocation().x - d.getLocation().x; distY = dotReal.getLocation().y - d.getLocation().y; x = d.getLocation().x + (d.getPCT() * distX * d.xdirection); y = d.getLocation().y + (d.getPCT() * distY * d.ydirection); d.setLocation(x, y); if (x > width - rad || x < rad) { d.setXdirect(); } if (y > height - rad || y < rad) { d.setYdirect(); } bandera = true; break; } } } if (bandera) break; } } List<TypeDeclaration> childrenList; hashGrid = new HashGrid<Dot>(width, height, RADIUS); for (Dot d : hashGrid_) { childrenList = d.getchildren(); hashGrid.add(new Dot( d.getLocation().x, d.getLocation().y, d.getSystype(), childrenList)); } //Update Dot Children List<Dot> dotchildren; for (Dot d : hashGrid) { if (d.getchildren() != null) { dotchildren = new ArrayList<Dot>(); for (TypeDeclaration dotChild : d.getchildren()) { for (Dot dChild : hashGrid) { if (dChild.systype.equals(dotChild)) dotchildren.add(dChild); } } d.setdotChildren(dotchildren); } } } public void motion_move_child() { HashGrid<Dot> hashGrid_ = new HashGrid<Dot>(width, height, RADIUS); for (Dot d : hashGrid) hashGrid_.add(d); for (Dot d : hashGrid_) { for (Dot dotChild : d.getdotchildren()) { for (Dot dotReal : hashGrid_) { if (dotChild.getSystype().equals(dotReal.getSystype())) { // dotReal.getPCT() < 1.0 && if (dotReal.getPCT() < 1 && dist(dotReal.getLocation().x, dotReal.getLocation().y, d.getLocation().x, d.getLocation().y) > rad * 5) { dotReal.setPCTincrement(); distX = d.getLocation().x - dotReal.getLocation().x; distY = d.getLocation().y - dotReal.getLocation().y; x = dotReal.getLocation().x + (dotReal.getPCT() * distX * dotReal.xdirection); y = dotReal.getLocation().y + (dotReal.getPCT() * distY * dotReal.ydirection); dotReal.setLocation(x, y); //break; } } } } } List<TypeDeclaration> childrenList; hashGrid = new HashGrid<Dot>(width, height, RADIUS); for (Dot d : hashGrid_) { childrenList = d.getchildren(); hashGrid.add(new Dot( d.getLocation().x, d.getLocation().y, d.getSystype(), childrenList)); } //Update Dot Children List<Dot> dotchildren; for (Dot d : hashGrid) { if (d.getchildren() != null) { dotchildren = new ArrayList<Dot>(); for (TypeDeclaration dotChild : d.getchildren()) { for (Dot dChild : hashGrid) { if (dChild.systype.equals(dotChild)) dotchildren.add(dChild); } } d.setdotChildren(dotchildren); } } } public void move() { HashGrid<Dot> hashGrid_ = new HashGrid<Dot>(width, height, RADIUS); for (Dot d : hashGrid) hashGrid_.add(d); for (Dot dotReal : hashGrid_) { x = dotReal.getLocation().x + dotReal.getVX(); y = dotReal.getLocation().y + dotReal.getVY(); if (x + rad > width) { x = width - rad; dotReal.setVX(dotReal.getVX() * friction); //vx *= friction; } else if (x - rad < 0) { x = rad; dotReal.setVX(dotReal.getVX() * friction); //vx *= friction; } if (y + rad > height) { y = height - rad; dotReal.setVY(dotReal.getVY() * friction); //vy *= friction; } else if (y - rad < 0) { y = rad; dotReal.setVY(dotReal.getVY() * friction); //vy *= friction; } dotReal.setLocation(x, y); if (dotReal.getLocation().x > width - rad || dotReal.getLocation().x < rad) { dotReal.setXdirect(); } if (dotReal.getLocation().y > height - rad || dotReal.getLocation().y < rad) { dotReal.setYdirect(); } } List<TypeDeclaration> childrenList; hashGrid = new HashGrid<Dot>(width, height, RADIUS); for (Dot d : hashGrid_) { childrenList = d.getchildren(); hashGrid.add(new Dot( d.getLocation().x, d.getLocation().y, d.getSystype(), childrenList)); } //Update Dot Children List<Dot> dotchildren; for (Dot d : hashGrid) { if (d.getchildren() != null) { dotchildren = new ArrayList<Dot>(); for (TypeDeclaration dotChild : d.getchildren()) { for (Dot dChild : hashGrid) { if (dChild.systype.equals(dotChild)) dotchildren.add(dChild); } } d.setdotChildren(dotchildren); } } } public void move_2() { HashGrid<Dot> hashGrid_ = new HashGrid<Dot>(width, height, RADIUS); for (Dot d : hashGrid) hashGrid_.add(d); for (Dot dotReal : hashGrid_) { for (Dot dotother : hashGrid_) { if (dist(dotReal.getLocation().x, dotReal.getLocation().y, dotother.getLocation().x, dotother.getLocation().y) < rad * 2) { dotother.setPCT_apartdecrement(); distX = dotReal.getLocation().x - dotother.getLocation().x; distY = dotReal.getLocation().y - dotother.getLocation().y; x = dotother.getLocation().x - (dotother.pct_apart * distX / 2); y = dotother.getLocation().y - (dotother.pct_apart * distY / 2); dotother.setLocation(x, y); } } } List<TypeDeclaration> childrenList; hashGrid = new HashGrid<Dot>(width, height, RADIUS); for (Dot d : hashGrid_) { childrenList = d.getchildren(); hashGrid.add(new Dot( d.getLocation().x, d.getLocation().y, d.getSystype(), childrenList)); } //Update Dot Children List<Dot> dotchildren; for (Dot d : hashGrid) { if (d.getchildren() != null) { dotchildren = new ArrayList<Dot>(); for (TypeDeclaration dotChild : d.getchildren()) { for (Dot dChild : hashGrid) { if (dChild.systype.equals(dotChild)) dotchildren.add(dChild); } } d.setdotChildren(dotchildren); } } } public void move_3() { HashGrid<Dot> hashGrid_ = new HashGrid<Dot>(width, height, RADIUS); for (Dot d : hashGrid) hashGrid_.add(d); for (Dot dotReal : hashGrid_) { for (Dot dotother : hashGrid_) { if (dist(dotReal.getLocation().x, dotReal.getLocation().y, dotother.getLocation().x, dotother.getLocation().y) < rad * 2) { dotReal.setPCT_apartdecrement(); distX = dotother.getLocation().x - dotReal.getLocation().x; distY = dotother.getLocation().y - dotReal.getLocation().y; x = dotReal.getLocation().x - (dotReal.pct_apart * distX / 2); y = dotReal.getLocation().y - (dotReal.pct_apart * distY / 2); dotReal.setLocation(x, y); } } } List<TypeDeclaration> childrenList; hashGrid = new HashGrid<Dot>(width, height, RADIUS); for (Dot d : hashGrid_) { childrenList = d.getchildren(); hashGrid.add(new Dot( d.getLocation().x, d.getLocation().y, d.getSystype(), childrenList)); } //Update Dot Children List<Dot> dotchildren; for (Dot d : hashGrid) { if (d.getchildren() != null) { dotchildren = new ArrayList<Dot>(); for (TypeDeclaration dotChild : d.getchildren()) { for (Dot dChild : hashGrid) { if (dChild.systype.equals(dotChild)) dotchildren.add(dChild); } } d.setdotChildren(dotchildren); } } } // Class for storing a point value. It must implement the Locatable // interface since objects of this type will be added to the hash grid. class Dot implements Locatable { PVector d; PVector end; TypeDeclaration systype; List<TypeDeclaration> children; List<Dot> dotchildren; float pct = 0; float pct_apart = 1; float vx = 0; float vy = 0; int xdirection = 1; // Left or Right int ydirection = 1; // Top to Bottom Dot(float x, float y, TypeDeclaration systype, List<TypeDeclaration> children, int xdire, int ydire) { d = new PVector(x, y); this.systype = systype; this.children = children; this.xdirection = xdire; this.ydirection = ydire; } Dot(float x, float y, TypeDeclaration systype, List<TypeDeclaration> children) { d = new PVector(x, y); this.systype = systype; this.children = children; } public float getVX() { return this.vx; } public void setVX(float vx) { this.vx = vx; } public float getVY() { return this.vy; } public void setVY(float vy) { this.vx = vy; } public void setXdirect() { this.xdirection *= -1; } public void setYdirect() { this.ydirection *= -1; } public float getPCT() { return this.pct; } public void setPCT(float pct) { this.pct = pct; } public void setPCTincrement() { this.pct += step; } public void setPCT_apartdecrement() { this.pct_apart -= step; } public void setLocation(float x, float y) { this.d = new PVector(x, y); } public PVector getEndLocation() { return end; } public PVector getLocation() { return d; } public TypeDeclaration getSystype() { return systype; } public void setdotChildren(List<Dot> dotchildren) { this.dotchildren = dotchildren; } public void setEndLocation(float x, float y) { this.end = new PVector(x, y); } public List<TypeDeclaration> getchildren() { return this.children; } public List<Dot> getdotchildren() { return this.dotchildren; } } }
32.165574
133
0.477091
1445e6e70a20ab27c4d8a4771a5af4887ccd64bf
801
package com.people.lyy.util; import java.util.ArrayList; import java.util.List; import android.content.Context; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; public class ActivityUtil { // 用于判断程序是否安装 public static boolean isAvilible(Context context, String packageName) { final PackageManager packageManager = context.getPackageManager();// 获取packagemanager List<PackageInfo> pinfo = packageManager.getInstalledPackages(0);// 获取所有已安装程序的包信息 List<String> pName = new ArrayList<String>();// 用于存储所有已安装程序的包名 // 从pinfo中将包名字逐一取出,压入pName list中 if (pinfo != null) { for (int i = 0; i < pinfo.size(); i++) { String pn = pinfo.get(i).packageName; pName.add(pn); } } return pName.contains(packageName);// 判断pName中是否有目标程序的包名,有TRUE,没有FALSE } }
28.607143
87
0.74407
5313087e648ee869c724cd7b9eec7e0cbf6ab68c
1,846
package com.hedstrom.spring.boot.security.saml.web.core; import java.util.ArrayList; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.userdetails.User; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.security.saml.SAMLCredential; import org.springframework.security.saml.userdetails.SAMLUserDetailsService; import org.springframework.stereotype.Service; @Service public class SAMLUserDetailsServiceImpl implements SAMLUserDetailsService { private static final Logger LOG = LoggerFactory.getLogger(SAMLUserDetailsServiceImpl.class); public Object loadUserBySAML(SAMLCredential credential) throws UsernameNotFoundException { String userID = credential.getNameID().getValue(); LOG.info(userID + " is logged in"); List<GrantedAuthority> authorities = new ArrayList<GrantedAuthority>(); GrantedAuthority authority = new SimpleGrantedAuthority("ROLE_USER"); authorities.add(authority); //locate user in database //returns // username // password // enabled: set to true if the user is enabled // accountNonExpired: set to true if the account has not expired // credentialsNonExpired: set to true if the credentials have not expired // accountNonLocked: set to true if the account is not locked // authorities: the authorities that should be granted to the caller if they presented the correct username and password and the user is enabled. Not null. return new User(userID, "<testPassword>", true, true, true, true, authorities); } }
41.954545
163
0.75623
15b73b1feafd7b6ba51b95aab74f26f0aed989e4
9,199
package com.maritesallen.almanac2020.ui.access.login; import android.graphics.Color; import android.os.Bundle; import android.text.SpannableString; import android.text.Spanned; import android.text.TextPaint; import android.text.method.LinkMovementMethod; import android.text.method.PasswordTransformationMethod; import android.text.style.ClickableSpan; import android.view.View; import android.widget.EditText; import androidx.lifecycle.ViewModelProviders; import androidx.navigation.Navigation; import com.maritesallen.almanac2020.BR; import com.maritesallen.almanac2020.R; import com.maritesallen.almanac2020.base.BaseFragment; import com.maritesallen.almanac2020.core.dialogs.DialogListener; import com.maritesallen.almanac2020.core.dialogs.termsCondition.TermsConditionDialog; import com.maritesallen.almanac2020.databinding.FragmentLoginBinding; import com.maritesallen.almanac2020.di.builder.ViewModelProviderFactory; import com.maritesallen.almanac2020.ui.dashboard.DashboardActivity; import com.maritesallen.almanac2020.utils.Logger; import org.jetbrains.annotations.NotNull; import javax.inject.Inject; import static com.maritesallen.almanac2020.core.dialogs.termsCondition.TermsConditionDialog.TYPE_TERMS; import static com.maritesallen.almanac2020.core.dialogs.termsCondition.TermsConditionDialog.TYPE_TERMS_INSIDE; import static com.maritesallen.almanac2020.utils.AppConstants.DIALOG_SIZE_FULL; /** * Author : Arvindo Mondal * Created on : 11-11-2019 * Email : arvindomondal@gmail.com * Designation : Programmer * Quote : No one can measure limit of stupidity but stupid things bring revolutions * Strength : Never give up * Motto : To be known as great Mathematician * Skills : Algorithms and logic */ public class LoginFragment extends BaseFragment<FragmentLoginBinding, LoginViewModel> implements LoginNavigator, DialogListener { @Inject ViewModelProviderFactory factory; private FragmentLoginBinding binding; private LoginViewModel viewModel; private boolean showPassword = false; private boolean isTermsLoded = false; /** * Override for set binding variable * * @return BR.Data; */ @Override public int getBindingVariable() { return BR.data; } /** * @return R.strings.text */ @Override public int setTitle() { return 0; } /** * @param savedInstanceState save the instance of fragment before closing * @param args if any Data transfer in form bundles * * viewModel.setNavigator(this); */ @Override protected void onCreateFragment(Bundle savedInstanceState, Bundle args) { viewModel.setNavigator(this); } /** * @param binding is used in current attached fragment */ @Override public void getFragmentBinding(FragmentLoginBinding binding) { this.binding = binding; } /** * @return R.layout.layout_file */ @Override public int getLayout() { return R.layout.fragment_login; } /** * Override for get the instance of viewModel * * @return viewModel = ViewModelProviders.of(this,factory).get(WelcomeViewModel.class); */ @Override public LoginViewModel getViewModel() { return viewModel = ViewModelProviders.of(this,factory).get(LoginViewModel.class); } /** * Write rest of the code of fragment in onCreateView after view created */ @Override protected void init() { // setUpUIText(); } private void setUpUIText() { SpannableString ss = new SpannableString(getString(R.string.signUpCondition)); ClickableSpan clickableSpan = new ClickableSpan() { @Override public void onClick(@NotNull View textView) { //Start Dialog if(isNetworkConnected()) { getBaseActivity().startDialog(new TermsConditionDialog(DIALOG_SIZE_FULL, LoginFragment.this, TYPE_TERMS), TermsConditionDialog.TAG); } else{ showMessage(R.string.network_error); } } @Override public void updateDrawState(@NotNull TextPaint ds) { super.updateDrawState(ds); ds.setUnderlineText(true); } }; ss.setSpan(clickableSpan, 69, 86, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); ss.setSpan(clickableSpan, 91, 105, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); binding.terms.setText(ss); binding.terms.setMovementMethod(LinkMovementMethod.getInstance()); binding.terms.setHighlightColor(Color.TRANSPARENT); } //Navigator---------------------- @Override public void onForgetPasswordClick(View view) { getBaseActivity().hideKeyboard(); Navigation.findNavController(view).navigate(R.id.action_loginFragment_to_forgetPasswordFragment); } @Override public void onLoginClick(View view) { getBaseActivity().hideKeyboard(); submitForm(); } @Override public void onShowPasswordClick() { //to show if(!showPassword) { binding.password.setTransformationMethod(new PasswordTransformationMethod()); showPassword = true; binding.showPassword.setBackgroundDrawable(getResources().getDrawable(R.drawable.ic_eye)); } else{ //to hide binding.password.setTransformationMethod(null); showPassword = false; binding.showPassword.setBackgroundDrawable(getResources().getDrawable(R.drawable.ic_eye_close)); } } @Override public void onRememberClick() { } @Override public void onSignUpClick(View view) { getBaseActivity().hideKeyboard(); Navigation.findNavController(view).navigate(R.id.action_loginFragment_to_registrationFragment); } @Override public void onTermsClick() { if (getBaseActivity() != null) { getBaseActivity().hideKeyboard(); if (getBaseActivity().isNetworkAvailable()) { getBaseActivity().startDialog(new TermsConditionDialog(DIALOG_SIZE_FULL, this, TYPE_TERMS_INSIDE), TermsConditionDialog.TAG); } else { getBaseActivity().showToast(R.string.network_error); } } } @Override public void onLoginSuccess() { if(getBaseActivity() != null) { getBaseActivity().startActivity(DashboardActivity.class); getBaseActivity().finishAffinity(); } } @Override public void onLoginError(String message) { // getBaseActivity().showToast(R.string.authentication_fail); if(message != null){ getBaseActivity().showToast(message); } else{ getBaseActivity().showToast(R.string.authentication_fail); } } @Override public void showMessage(int message) { if(getBaseActivity() != null) { getBaseActivity().showToast(message); } } //Submit task------------------------------ private void submitForm() { if (!validateEmail(binding.email)) { return; } if (!validatePassword(binding.password)) { getBaseActivity().showToast(getString(R.string.invalid_password)); return; } String email = binding.email.getText() != null ? binding.email.getText().toString() : ""; String password = binding.password.getText() != null ? binding.password.getText().toString() : ""; Logger.e("email:" + email); Logger.e("password:" + password); viewModel.doLogin(email, password); } //Additional------------------------------- private boolean validateEmail(EditText editText) { String string = editText.getText().toString(); if (string.matches("[*a-zA-Z]") || !string.contains("@") || !string.contains(".") || string.contains("@.")|| string.startsWith("@")|| string.endsWith(".")|| (string.lastIndexOf(".") < string.indexOf("@"))) { editText.setError(getString(R.string.invalid_email)); getBaseActivity().requestFocus(editText); return false; } else { editText.setError(null); } return true; } private boolean validatePassword(EditText editText) { if (editText.getText().toString().trim().isEmpty()) { // editText.setError(getString(R.string.invalid_password)); getBaseActivity().requestFocus(editText); return false; } else { editText.setError(null); } return true; } /** * Default response method of a dialog * * @param tag class name from which the response is getting * @param params string array with relative Data */ @Override public void onSuccessDialogResponse(String tag, String... params) { } }
31.183051
125
0.6367
97003b11a563cf452af7bcd0618eb5dfcea8c6b5
2,756
/* Copyright 2004, 2005, 2006 Acegi Technology Pty Limited * * 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.springframework.security.acls.model; import java.io.Serializable; /** * Represents the identity of an individual domain object instance. * * <p> * As implementations of <tt>ObjectIdentity</tt> are used as the key to represent * domain objects in the ACL subsystem, it is essential that implementations provide * methods so that object-equality rather than reference-equality can be relied upon * reliably. In other words, the ACL subsystem can consider two * <tt>ObjectIdentity</tt>s equal if <tt>identity1.equals(identity2)</tt>, rather than * reference-equality of <tt>identity1==identity2</tt>. * </p> * * @author Ben Alex */ public interface ObjectIdentity extends Serializable { //~ Methods ======================================================================================================== /** * @param obj to be compared * * @return <tt>true</tt> if the objects are equal, <tt>false</tt> otherwise * @see Object#equals(Object) */ boolean equals(Object obj); /** * Obtains the actual identifier. This identifier must not be reused to represent other domain objects with * the same <tt>javaType</tt>. * * <p>Because ACLs are largely immutable, it is strongly recommended to use * a synthetic identifier (such as a database sequence number for the primary key). Do not use an identifier with * business meaning, as that business meaning may change in the future such change will cascade to the ACL * subsystem data.</p> * * @return the identifier (unique within this <tt>type</tt>; never <tt>null</tt>) */ Serializable getIdentifier(); /** * Obtains the "type" metadata for the domain object. This will often be a Java type name (an interface or a class) * &ndash; traditionally it is the name of the domain object implementation class. * * @return the "type" of the domain object (never <tt>null</tt>). */ String getType(); /** * @return a hash code representation of the <tt>ObjectIdentity</tt> * @see Object#hashCode() */ int hashCode(); }
38.277778
120
0.669811
ec21b4d06a1cee10545617cdb80245d9d19e6fba
3,810
/* * Licensed to 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 org.apache.stratos.common.beans.topology; import org.apache.stratos.common.beans.kubernetes.KubernetesServiceBean; import javax.xml.bind.annotation.XmlRootElement; import java.io.Serializable; import java.util.List; @XmlRootElement(name = "clusterInstances") public class ClusterInstanceBean implements Serializable { private String status; private String instanceId; private String parentInstanceId; private String alias; private String serviceName; private String clusterId; private List<MemberBean> member; private String tenantRange; private List<String> hostNames; private List<String> accessUrls; private List<KubernetesServiceBean> kubernetesServices; public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public String getInstanceId() { return instanceId; } public void setInstanceId(String instanceId) { this.instanceId = instanceId; } public String getAlias() { return alias; } public void setAlias(String alias) { this.alias = alias; } public String getServiceName() { return serviceName; } public void setServiceName(String serviceName) { this.serviceName = serviceName; } public String getClusterId() { return clusterId; } public void setClusterId(String clusterId) { this.clusterId = clusterId; } public List<MemberBean> getMember() { return member; } public void setMember(List<MemberBean> member) { this.member = member; } public String getTenantRange() { return tenantRange; } public void setTenantRange(String tenantRange) { this.tenantRange = tenantRange; } public List<String> getHostNames() { return hostNames; } public void setHostNames(List<String> hostNames) { this.hostNames = hostNames; } @Override public String toString() { return "Cluster [serviceName=" + getServiceName() + ", clusterId=" + getClusterId() + ", member=" + getMember() + ", tenantRange=" + getTenantRange() + ", hostNames=" + getHostNames() + ", accessURLs=" + getAccessUrls() + ", kubernetesServices=" + getKubernetesServices(); } public String getParentInstanceId() { return parentInstanceId; } public void setParentInstanceId(String parentInstanceId) { this.parentInstanceId = parentInstanceId; } public List<String> getAccessUrls() { return accessUrls; } public void setAccessUrls(List<String> accessUrls) { this.accessUrls = accessUrls; } public void setKubernetesServices(List<KubernetesServiceBean> kubernetesServices) { this.kubernetesServices = kubernetesServices; } public List<KubernetesServiceBean> getKubernetesServices() { return kubernetesServices; } }
27.810219
119
0.68294
b7dc0b04d19dd5f0d89883822ae10af1718d3bd8
10,261
/* * Licensed to 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.alipay.sofa.registry.remoting.bolt; import java.net.InetSocketAddress; import java.util.List; import java.util.concurrent.Executor; import java.util.concurrent.atomic.AtomicBoolean; import com.alipay.remoting.Connection; import com.alipay.remoting.ConnectionEventProcessor; import com.alipay.remoting.ConnectionEventType; import com.alipay.remoting.InvokeCallback; import com.alipay.remoting.Url; import com.alipay.remoting.exception.RemotingException; import com.alipay.remoting.rpc.RpcClient; import com.alipay.remoting.rpc.protocol.RpcProtocol; import com.alipay.sofa.registry.common.model.store.URL; import com.alipay.sofa.registry.log.Logger; import com.alipay.sofa.registry.log.LoggerFactory; import com.alipay.sofa.registry.net.NetUtil; import com.alipay.sofa.registry.remoting.CallbackHandler; import com.alipay.sofa.registry.remoting.Channel; import com.alipay.sofa.registry.remoting.ChannelHandler; import com.alipay.sofa.registry.remoting.ChannelHandler.HandlerType; import com.alipay.sofa.registry.remoting.ChannelHandler.InvokeType; import com.alipay.sofa.registry.remoting.Client; /** * The type Bolt client. * * @author kezhu.wukz * @author shangyu.wh * @version $Id : BoltClient.java, v 0.1 2017-11-27 14:46 shangyu.wh Exp $ */ public class BoltClient implements Client { private static final Logger LOGGER = LoggerFactory.getLogger(BoltClient.class); private RpcClient rpcClient; private AtomicBoolean closed = new AtomicBoolean(false); private int connectTimeout = 2000; private final int connNum; /** * Instantiates a new Bolt client. */ public BoltClient(int connNum) { rpcClient = new RpcClient(); rpcClient.init(); this.connNum = connNum; } /** * Setter method for property <tt>channelHandlers</tt>. * * @param channelHandlers value to be assigned to property channelHandlers */ public void initHandlers(List<ChannelHandler> channelHandlers) { ChannelHandler connectionEventHandler = null; for (ChannelHandler channelHandler : channelHandlers) { if (HandlerType.LISENTER.equals(channelHandler.getType())) { connectionEventHandler = channelHandler; break; } } rpcClient.addConnectionEventProcessor(ConnectionEventType.CONNECT, newConnectionEventAdapter(connectionEventHandler, ConnectionEventType.CONNECT)); rpcClient.addConnectionEventProcessor(ConnectionEventType.CLOSE, newConnectionEventAdapter(connectionEventHandler, ConnectionEventType.CLOSE)); rpcClient.addConnectionEventProcessor(ConnectionEventType.EXCEPTION, newConnectionEventAdapter(connectionEventHandler, ConnectionEventType.EXCEPTION)); for (ChannelHandler channelHandler : channelHandlers) { if (HandlerType.PROCESSER.equals(channelHandler.getType())) { if (InvokeType.SYNC.equals(channelHandler.getInvokeType())) { rpcClient.registerUserProcessor(newSyncProcessor(channelHandler)); } else { rpcClient.registerUserProcessor(newAsyncProcessor(channelHandler)); } } } } protected ConnectionEventProcessor newConnectionEventAdapter(ChannelHandler connectionEventHandler, ConnectionEventType connectEventType) { return new ConnectionEventAdapter(connectEventType, connectionEventHandler, null); } protected AsyncUserProcessorAdapter newAsyncProcessor(ChannelHandler channelHandler) { return new AsyncUserProcessorAdapter(channelHandler); } protected SyncUserProcessorAdapter newSyncProcessor(ChannelHandler channelHandler) { return new SyncUserProcessorAdapter(channelHandler); } @Override public Channel connect(URL url) { if (url == null) { throw new IllegalArgumentException("Create connection url can not be null!"); } try { Connection connection = getBoltConnection(rpcClient, url); BoltChannel channel = new BoltChannel(); channel.setConnection(connection); return channel; } catch (RemotingException e) { LOGGER .error("Bolt client connect server got a RemotingException! target url:" + url, e); throw new RuntimeException("Bolt client connect server got a RemotingException!", e); } } protected Connection getBoltConnection(RpcClient rpcClient, URL url) throws RemotingException { Url boltUrl = createBoltUrl(url); try { Connection connection = rpcClient.getConnection(boltUrl, connectTimeout); if (connection == null || !connection.isFine()) { if (connection != null) { connection.close(); } throw new RemotingException("Get bolt connection failed for boltUrl: " + boltUrl); } return connection; } catch (InterruptedException e) { throw new RuntimeException( "BoltClient rpcClient.getConnection InterruptedException! target boltUrl:" + boltUrl, e); } } protected Url createBoltUrl(URL url) { Url boltUrl = new Url(url.getIpAddress(), url.getPort()); boltUrl.setProtocol(RpcProtocol.PROTOCOL_CODE); boltUrl.setConnNum(connNum); boltUrl.setConnWarmup(true); return boltUrl; } @Override public Channel getChannel(URL url) { try { Connection connection = getBoltConnection(rpcClient, url); BoltChannel channel = new BoltChannel(); channel.setConnection(connection); return channel; } catch (RemotingException e) { LOGGER .error("Bolt client connect server got a RemotingException! target url:" + url, e); throw new RuntimeException("Bolt client connect server got a RemotingException!", e); } } @Override public InetSocketAddress getLocalAddress() { return NetUtil.getLocalSocketAddress(); } @Override public void close() { if (closed.compareAndSet(false, true)) { rpcClient.shutdown(); } } @Override public boolean isClosed() { return closed.get(); } @Override public Object sendSync(URL url, Object message, int timeoutMillis) { try { return rpcClient.invokeSync(createBoltUrl(url), message, timeoutMillis); } catch (RemotingException e) { String msg = "Bolt Client sendSync message RemotingException! target url:" + url; LOGGER.error(msg, e); throw new RuntimeException(msg, e); } catch (InterruptedException e) { throw new RuntimeException( "Bolt Client sendSync message InterruptedException! target url:" + url, e); } } @Override public Object sendSync(Channel channel, Object message, int timeoutMillis) { if (channel != null && channel.isConnected()) { BoltChannel boltChannel = (BoltChannel) channel; try { return rpcClient.invokeSync(boltChannel.getConnection(), message, timeoutMillis); } catch (RemotingException e) { LOGGER.error("Bolt Client sendSync message RemotingException! target boltUrl:" + boltChannel.getRemoteAddress(), e); throw new RuntimeException("Bolt Client sendSync message RemotingException!", e); } catch (InterruptedException e) { LOGGER.error("Bolt Client sendSync message InterruptedException! target boltUrl:" + boltChannel.getRemoteAddress(), e); throw new RuntimeException("Bolt Client sendSync message InterruptedException!", e); } } throw new IllegalArgumentException( "Input channel: " + channel + " error! channel cannot be null,or channel must be connected!"); } @Override public void sendCallback(URL url, Object message, CallbackHandler callbackHandler, int timeoutMillis) { try { Connection connection = getBoltConnection(rpcClient, url); BoltChannel channel = new BoltChannel(); channel.setConnection(connection); rpcClient.invokeWithCallback(connection, message, new InvokeCallback() { @Override public void onResponse(Object result) { callbackHandler.onCallback(channel, result); } @Override public void onException(Throwable e) { callbackHandler.onException(channel, e); } @Override public Executor getExecutor() { return callbackHandler.getExecutor(); } }, timeoutMillis); return; } catch (RemotingException e) { String msg = "Bolt Client sendSync message RemotingException! target url:" + url; LOGGER.error(msg, e); throw new RuntimeException(msg, e); } } }
39.617761
104
0.648182
ef818c2e71ff937fd8ed689d8273084bf7227935
4,868
package com.example.administrator.biaozhunban.greendao.entity; import org.greenrobot.greendao.annotation.Entity; import org.greenrobot.greendao.annotation.Id; import org.greenrobot.greendao.annotation.NotNull; import org.greenrobot.greendao.annotation.Generated; import org.greenrobot.greendao.annotation.Transient; import org.greenrobot.greendao.annotation.Unique; /** * Created by Administrator on 2018/1/29. * 居民表 */ @Entity public class Natives { @Id(autoincrement = true) private Long id; private String na_id; @NotNull private String na_number; @NotNull private String na_name; @NotNull private int na_sex; @NotNull private int na_age; @NotNull @Unique private String na_idcard; private String na_address; private String na_household; private String na_tel; private String na_birthday; private String na_country; private String na_villages; private String user_id; private String na_creattime; private String na_note; @Transient private int tempOrder;//临时的排列序号 private String createDate; @Generated(hash = 1751138081) public Natives(Long id, String na_id, @NotNull String na_number, @NotNull String na_name, int na_sex, int na_age, @NotNull String na_idcard, String na_address, String na_household, String na_tel, String na_birthday, String na_country, String na_villages, String user_id, String na_creattime, String na_note, String createDate) { this.id = id; this.na_id = na_id; this.na_number = na_number; this.na_name = na_name; this.na_sex = na_sex; this.na_age = na_age; this.na_idcard = na_idcard; this.na_address = na_address; this.na_household = na_household; this.na_tel = na_tel; this.na_birthday = na_birthday; this.na_country = na_country; this.na_villages = na_villages; this.user_id = user_id; this.na_creattime = na_creattime; this.na_note = na_note; this.createDate = createDate; } @Generated(hash = 1070649648) public Natives() { } public Long getId() { return this.id; } public void setId(Long id) { this.id = id; } public String getNa_id() { return this.na_id; } public void setNa_id(String na_id) { this.na_id = na_id; } public String getNa_number() { return this.na_number; } public void setNa_number(String na_number) { this.na_number = na_number; } public String getNa_name() { return this.na_name; } public void setNa_name(String na_name) { this.na_name = na_name; } public int getNa_sex() { return this.na_sex; } public void setNa_sex(int na_sex) { this.na_sex = na_sex; } public int getNa_age() { return this.na_age; } public void setNa_age(int na_age) { this.na_age = na_age; } public String getNa_idcard() { return this.na_idcard; } public void setNa_idcard(String na_idcard) { this.na_idcard = na_idcard; } public String getNa_address() { return this.na_address; } public void setNa_address(String na_address) { this.na_address = na_address; } public String getNa_household() { return this.na_household; } public void setNa_household(String na_household) { this.na_household = na_household; } public String getNa_tel() { return this.na_tel; } public void setNa_tel(String na_tel) { this.na_tel = na_tel; } public String getNa_birthday() { return this.na_birthday; } public void setNa_birthday(String na_birthday) { this.na_birthday = na_birthday; } public String getNa_country() { return this.na_country; } public void setNa_country(String na_country) { this.na_country = na_country; } public String getNa_villages() { return this.na_villages; } public void setNa_villages(String na_villages) { this.na_villages = na_villages; } public String getUser_id() { return this.user_id; } public void setUser_id(String user_id) { this.user_id = user_id; } public String getNa_creattime() { return this.na_creattime; } public void setNa_creattime(String na_creattime) { this.na_creattime = na_creattime; } public String getNa_note() { return this.na_note; } public void setNa_note(String na_note) { this.na_note = na_note; } public String getCreateDate() { return this.createDate; } public void setCreateDate(String createDate) { this.createDate = createDate; } }
27.502825
84
0.644412
316f767ff87ddadd39194353fb21b4e425497b82
7,314
package io.improbable.keanu.tensor.ndj4; import io.improbable.keanu.tensor.FloatingPointTensor; import io.improbable.keanu.tensor.bool.BooleanTensor; import io.improbable.keanu.tensor.dbl.TensorMulByMatrixMul; import org.apache.commons.math3.linear.Array2DRowRealMatrix; import org.apache.commons.math3.linear.LUDecomposition; import org.apache.commons.math3.linear.RealMatrix; import org.nd4j.linalg.api.ndarray.INDArray; import org.nd4j.linalg.api.ops.impl.scalar.LogX; import org.nd4j.linalg.api.ops.impl.transforms.pairwise.arithmetic.PowPairwise; import org.nd4j.linalg.api.ops.impl.transforms.strict.ACosh; import org.nd4j.linalg.api.ops.impl.transforms.strict.ASinh; import org.nd4j.linalg.api.ops.impl.transforms.strict.Expm1; import org.nd4j.linalg.api.ops.impl.transforms.strict.Log1p; import org.nd4j.linalg.api.ops.impl.transforms.strict.Tan; import org.nd4j.linalg.factory.Nd4j; import org.nd4j.linalg.inverse.InvertMatrix; import org.nd4j.linalg.ops.transforms.Transforms; import static io.improbable.keanu.tensor.ndj4.INDArrayExtensions.asBoolean; public abstract class Nd4jFloatingPointTensor<T extends Number, TENSOR extends FloatingPointTensor<T, TENSOR>> extends Nd4jNumberTensor<T, TENSOR> implements FloatingPointTensor<T, TENSOR> { public Nd4jFloatingPointTensor(INDArray tensor) { super(tensor); } @Override public TENSOR tensorMultiply(TENSOR value, int[] dimsLeft, int[] dimsRight) { return TensorMulByMatrixMul.tensorMmul(getThis(), value, dimsLeft, dimsRight); } @Override public TENSOR sqrtInPlace() { Transforms.sqrt(tensor, false); return getThis(); } @Override public TENSOR logInPlace() { Transforms.log(tensor, false); return getThis(); } @Override public TENSOR reciprocalInPlace() { tensor.rdivi(1.0); return getThis(); } @Override public TENSOR sinInPlace() { Transforms.sin(tensor, false); return getThis(); } @Override public TENSOR cosInPlace() { Transforms.cos(tensor, false); return getThis(); } @Override public TENSOR tanInPlace() { Nd4j.getExecutioner().exec(new Tan(tensor, tensor)); return getThis(); } @Override public TENSOR atanInPlace() { Transforms.atan(tensor, false); return getThis(); } @Override public TENSOR atan2InPlace(T y) { tensor = Transforms.atan2(tensor, Nd4j.scalar(y).broadcast(this.tensor.shape())); return getThis(); } @Override public TENSOR atan2InPlace(TENSOR y) { if (y.isScalar()) { tensor = Transforms.atan2(tensor, getTensor(y).broadcast(this.tensor.shape())); } else { tensor = INDArrayShim.atan2(tensor, getTensor(y)); } return getThis(); } @Override public TENSOR asinInPlace() { Transforms.asin(tensor, false); return getThis(); } @Override public TENSOR acosInPlace() { Transforms.acos(tensor, false); return getThis(); } @Override public TENSOR sinhInPlace() { Transforms.sinh(tensor, false); return getThis(); } @Override public TENSOR coshInPlace() { Transforms.cosh(tensor, false); return getThis(); } @Override public TENSOR tanhInPlace() { Transforms.tanh(tensor, false); return getThis(); } @Override public TENSOR asinhInPlace() { Nd4j.getExecutioner().execAndReturn(new ASinh(tensor)); return getThis(); } @Override public TENSOR acoshInPlace() { Nd4j.getExecutioner().execAndReturn(new ACosh(tensor)); return getThis(); } @Override public TENSOR atanhInPlace() { Transforms.atanh(tensor, false); return getThis(); } @Override public TENSOR expInPlace() { Transforms.exp(tensor, false); return getThis(); } @Override public TENSOR log1pInPlace() { Nd4j.getExecutioner().exec(new Log1p(tensor)); return getThis(); } @Override public TENSOR log2InPlace() { Nd4j.getExecutioner().exec(new LogX(tensor, 2)); return getThis(); } @Override public TENSOR log10InPlace() { Nd4j.getExecutioner().exec(new LogX(tensor, 10)); return getThis(); } @Override public TENSOR exp2InPlace() { INDArray indArray = Nd4j.valueArrayOf(tensor.shape(), 2.0); Nd4j.getExecutioner().exec(new PowPairwise(indArray, tensor, tensor)); return getThis(); } @Override public TENSOR expM1InPlace() { Nd4j.getExecutioner().exec(new Expm1(tensor)); return getThis(); } @Override public TENSOR standardizeInPlace() { tensor.subi(mean().scalar()).divi(standardDeviation().scalar()); return getThis(); } @Override public TENSOR mean(int... overDimensions) { if (overDimensions.length == 0) { return duplicate(); } return create(tensor.mean(overDimensions)); } @Override public TENSOR mean() { return create(Nd4j.scalar(tensor.meanNumber().doubleValue()).castTo(tensor.dataType())); } @Override public TENSOR standardDeviation() { return create(Nd4j.scalar(tensor.stdNumber().doubleValue()).castTo(tensor.dataType())); } @Override public TENSOR setAllInPlace(T value) { this.tensor.assign(value); return getThis(); } @Override public TENSOR clampInPlace(TENSOR min, TENSOR max) { return minInPlace(max).maxInPlace(min); } public TENSOR ceilInPlace() { Transforms.ceil(tensor, false); return getThis(); } @Override public TENSOR floorInPlace() { Transforms.floor(tensor, false); return getThis(); } @Override public TENSOR roundInPlace() { Transforms.round(tensor, false); return getThis(); } @Override public TENSOR sigmoidInPlace() { Transforms.sigmoid(tensor, false); return getThis(); } @Override public TENSOR matrixDeterminant() { if (tensor.rank() > 2) { return fromJVM(toJVM().matrixDeterminant()); } INDArray dup = tensor.dup(); double[][] asMatrix = dup.toDoubleMatrix(); RealMatrix matrix = new Array2DRowRealMatrix(asMatrix); return create(Nd4j.scalar(new LUDecomposition(matrix).getDeterminant())); } @Override public TENSOR matrixInverse() { if (tensor.rank() > 2) { return fromJVM(toJVM().matrixInverse()); } return create(InvertMatrix.invert(tensor, false)); } @Override public TENSOR choleskyDecomposition() { if (tensor.rank() > 2) { return fromJVM(toJVM().choleskyDecomposition()); } INDArray dup = tensor.dup(); Nd4j.getBlasWrapper().lapack().potrf(dup, true); return create(dup); } @Override public BooleanTensor notNaN() { return isNaN().notInPlace(); } @Override public BooleanTensor isNaN() { return BooleanTensor.create(asBoolean(tensor.isNaN()), tensor.shape()); } }
26.5
110
0.634947
037397d32224a5118d1cde5f90f377085e51c049
33,470
package net.tomp2p.p2p; import java.net.UnknownHostException; import java.util.ArrayList; import java.util.Collection; import java.util.Comparator; import java.util.Iterator; import java.util.List; import java.util.Random; import java.util.SortedSet; import java.util.TreeSet; import net.tomp2p.Utils2; import net.tomp2p.connection.Bindings; import net.tomp2p.connection.ChannelCreator; import net.tomp2p.futures.BaseFuture; import net.tomp2p.futures.FutureChannelCreator; import net.tomp2p.futures.FutureDone; import net.tomp2p.futures.FutureRouting; import net.tomp2p.futures.FutureWrapper; import net.tomp2p.message.Message.Type; import net.tomp2p.p2p.builder.RoutingBuilder; import net.tomp2p.peers.Number160; import net.tomp2p.peers.PeerAddress; import net.tomp2p.peers.PeerMap; import net.tomp2p.utils.Pair; import net.tomp2p.utils.Utils; import org.junit.Assert; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class TestRouting { private static final Logger LOG = LoggerFactory.getLogger(TestRouting.class); final private static Random rnd = new Random(43L); @Test public void testMerge() throws UnknownHostException { // setup SortedSet<PeerAddress> queue = new TreeSet<PeerAddress>(PeerMap.createComparator(new Number160(88))); SortedSet<PeerAddress> neighbors = new TreeSet<PeerAddress>( PeerMap.createComparator(new Number160(88))); SortedSet<PeerAddress> already = new TreeSet<PeerAddress>(PeerMap.createComparator(new Number160(88))); queue.add(Utils2.createAddress(12)); queue.add(Utils2.createAddress(14)); queue.add(Utils2.createAddress(16)); neighbors.add(Utils2.createAddress(88)); neighbors.add(Utils2.createAddress(12)); neighbors.add(Utils2.createAddress(16)); // do testing and verification already.add(Utils2.createAddress(16)); boolean testb = RoutingMechanism.merge(queue, neighbors, already); Assert.assertEquals(true, testb); // next one neighbors.add(Utils2.createAddress(89)); testb = RoutingMechanism.merge(queue, neighbors, already); Assert.assertEquals(false, testb); // next one neighbors.add(Utils2.createAddress(88)); testb = RoutingMechanism.merge(queue, neighbors, already); Assert.assertEquals(false, testb); } @Test public void testEvaluate() throws UnknownHostException { // setup SortedSet<PeerAddress> queue = new TreeSet<PeerAddress>(PeerMap.createComparator(new Number160(88))); SortedSet<PeerAddress> neighbors = new TreeSet<PeerAddress>( PeerMap.createComparator(new Number160(88))); SortedSet<PeerAddress> already = new TreeSet<PeerAddress>(PeerMap.createComparator(new Number160(88))); queue.add(Utils2.createAddress(12)); queue.add(Utils2.createAddress(14)); queue.add(Utils2.createAddress(16)); neighbors.add(Utils2.createAddress(89)); neighbors.add(Utils2.createAddress(12)); neighbors.add(Utils2.createAddress(16)); already.add(Utils2.createAddress(16)); RoutingMechanism routingMechanism = new RoutingMechanism(null, null, null); // do testing and verification // AtomicInteger nrNoNewInformation = new AtomicInteger(); boolean testb = routingMechanism.evaluateInformation(neighbors, queue, already, 0); Assert.assertEquals(0, routingMechanism.nrNoNewInfo()); Assert.assertEquals(false, testb); testb = routingMechanism.evaluateInformation(neighbors, queue, already, 2); Assert.assertEquals(1, routingMechanism.nrNoNewInfo()); Assert.assertEquals(false, testb); neighbors.add(Utils2.createAddress(11)); testb = routingMechanism.evaluateInformation(neighbors, queue, already, 2); Assert.assertEquals(2, routingMechanism.nrNoNewInfo()); Assert.assertEquals(true, testb); neighbors.add(Utils2.createAddress(88)); testb = routingMechanism.evaluateInformation(neighbors, queue, already, 2); Assert.assertEquals(0, routingMechanism.nrNoNewInfo()); Assert.assertEquals(false, testb); // testb = routingMechanism.evaluateInformation(neighbors, queue, already, 2); Assert.assertEquals(1, routingMechanism.nrNoNewInfo()); neighbors.add(Utils2.createAddress(89)); testb = routingMechanism.evaluateInformation(neighbors, queue, already, 2); Assert.assertEquals(2, routingMechanism.nrNoNewInfo()); neighbors.add(Utils2.createAddress(88)); testb = routingMechanism.evaluateInformation(neighbors, queue, already, 2); Assert.assertEquals(3, routingMechanism.nrNoNewInfo()); Assert.assertEquals(true, testb); } @Test public void testRouting1() throws Exception { for (int i = 0; i < 20; i++) { testRouting1(true, Type.REQUEST_1); testRouting1(false, Type.REQUEST_1); testRouting1(true, Type.REQUEST_2); testRouting1(false, Type.REQUEST_2); } } private void testRouting1(boolean tcp, Type request) throws Exception { Peer[] peers = null; ChannelCreator cc = null; try { // setup peers = createSpecialPeers(7); addToPeerMap(peers[0], peers[0].peerAddress(), peers[1].peerAddress()); addToPeerMap(peers[1], peers[0].peerAddress(), peers[1].peerAddress(), peers[2].peerAddress()); addToPeerMap(peers[2], peers[0].peerAddress(), peers[1].peerAddress(), peers[2].peerAddress(), peers[3].peerAddress()); addToPeerMap(peers[3], peers[0].peerAddress(), peers[1].peerAddress(), peers[2].peerAddress(), peers[3].peerAddress(), peers[4].peerAddress()); addToPeerMap(peers[4], peers[0].peerAddress(), peers[1].peerAddress(), peers[2].peerAddress(), peers[3].peerAddress(), peers[4].peerAddress(), peers[5].peerAddress()); // do testing if (tcp) { FutureChannelCreator fcc = peers[0].connectionBean().reservation().create(0, 2); fcc.awaitUninterruptibly(); cc = fcc.channelCreator(); } else { FutureChannelCreator fcc = peers[0].connectionBean().reservation().create(2, 0); fcc.awaitUninterruptibly(); cc = fcc.channelCreator(); } RoutingBuilder routingBuilder = new RoutingBuilder(); if (tcp) { routingBuilder.forceTCP(true); } routingBuilder.setLocationKey(peers[6].peerID()); routingBuilder.setMaxDirectHits(0); routingBuilder.setMaxNoNewInfo(0); routingBuilder.setMaxFailures(0); routingBuilder.setMaxSuccess(100); routingBuilder.setParallel(2); FutureRouting fr = peers[0].distributedRouting().route(routingBuilder, request, cc); // new RoutingBuilder(peers[6].getPeerID(), null, null, 0, 0, 0, 100, 2, false), Type.REQUEST_2, cc); fr.awaitUninterruptibly(); // do verification Assert.assertEquals(true, fr.isSuccess()); SortedSet<PeerAddress> ns = fr.potentialHits(); Assert.assertEquals(peers[5].peerAddress(), ns.first()); } finally { if (cc != null) { cc.shutdown().awaitListenersUninterruptibly(); } for (Peer n : peers) { n.shutdown().await(); } } } @Test public void testRouting2() throws Exception { for (int i = 0; i < 20; i++) { LOG.error("round "+i); //testRouting2(true, Type.REQUEST_1); //testRouting2(false, Type.REQUEST_1); //testRouting2(true, Type.REQUEST_2); testRouting2(false, Type.REQUEST_2); } } /** * In this test we have a peer that cannot be reached: Utils2.createAddress("0xffffff") * @param tcp * @param request * @throws Exception */ private void testRouting2(boolean tcp, Type request) throws Exception { Peer[] peers = null; ChannelCreator cc = null; try { // setup peers = createSpecialPeers(7); addToPeerMap(peers[0], peers[0].peerAddress(), peers[1].peerAddress()); addToPeerMap(peers[1], peers[0].peerAddress(), peers[1].peerAddress(), peers[2].peerAddress()); addToPeerMap(peers[2], peers[0].peerAddress(), peers[1].peerAddress(), peers[2].peerAddress(), peers[3].peerAddress()); addToPeerMap(peers[3], peers[0].peerAddress(), peers[1].peerAddress(), peers[2].peerAddress(), peers[3].peerAddress(), peers[4].peerAddress()); addToPeerMap(peers[4], peers[0].peerAddress(), peers[1].peerAddress(), peers[2].peerAddress(), peers[3].peerAddress(), peers[4].peerAddress(), Utils2.createAddress("0xffffff")); // do testing if (tcp) { FutureChannelCreator fcc = peers[0].connectionBean().reservation().create(0, 2); fcc.awaitUninterruptibly(); cc = fcc.channelCreator(); } else { FutureChannelCreator fcc = peers[0].connectionBean().reservation().create(2, 0); fcc.awaitUninterruptibly(); cc = fcc.channelCreator(); } RoutingBuilder routingBuilder = new RoutingBuilder(); if (tcp) { routingBuilder.forceTCP(true); } routingBuilder.setLocationKey(peers[6].peerID()); routingBuilder.setMaxDirectHits(0); routingBuilder.setMaxNoNewInfo(0); routingBuilder.setMaxFailures(0); routingBuilder.setMaxSuccess(100); routingBuilder.setParallel(2); FutureRouting fr = peers[0].distributedRouting().route(routingBuilder, request, cc); fr.awaitUninterruptibly(); // do verification Assert.assertEquals(true, fr.isSuccess()); SortedSet<PeerAddress> ns = fr.potentialHits(); // node5 cannot be reached, so it should not be part of the result Assert.assertEquals(false, peers[5].peerAddress().equals(ns.first())); Assert.assertEquals(true, peers[4].peerAddress().equals(ns.first())); LOG.error("done!"); } finally { if (cc != null) { cc.shutdown().awaitListenersUninterruptibly(); } for (Peer n : peers) { n.shutdown().await(); } } } @Test public void testRouting3() throws Exception { for (int i = 0; i < 20; i++) { testRouting3(true, Type.REQUEST_1); testRouting3(false, Type.REQUEST_1); testRouting3(true, Type.REQUEST_2); testRouting3(false, Type.REQUEST_2); } } private void testRouting3(boolean tcp, Type request) throws Exception { Peer[] peers = null; ChannelCreator cc = null; try { // setup peers = createSpecialPeers(7); addToPeerMap(peers[0], peers[0].peerAddress(), peers[1].peerAddress()); addToPeerMap(peers[1], peers[0].peerAddress(), peers[1].peerAddress(), peers[2].peerAddress()); addToPeerMap(peers[2], peers[0].peerAddress(), peers[1].peerAddress(), peers[2].peerAddress(), peers[3].peerAddress(), peers[4].peerAddress(), peers[5].peerAddress()); addToPeerMap(peers[3], peers[0].peerAddress(), peers[1].peerAddress()); addToPeerMap(peers[4], peers[0].peerAddress(), peers[1].peerAddress()); addToPeerMap(peers[5], peers[0].peerAddress(), peers[1].peerAddress()); // do testing if (tcp) { FutureChannelCreator fcc = peers[0].connectionBean().reservation().create(0, 1); fcc.awaitUninterruptibly(); cc = fcc.channelCreator(); } else { FutureChannelCreator fcc = peers[0].connectionBean().reservation().create(1, 0); fcc.awaitUninterruptibly(); cc = fcc.channelCreator(); } RoutingBuilder routingBuilder = new RoutingBuilder(); if (tcp) { routingBuilder.forceTCP(true); } routingBuilder.setLocationKey(peers[6].peerID()); routingBuilder.setMaxDirectHits(0); routingBuilder.setMaxNoNewInfo(0); routingBuilder.setMaxFailures(0); routingBuilder.setMaxSuccess(100); routingBuilder.setParallel(1); FutureRouting fr = peers[0].distributedRouting().route(routingBuilder, request, cc); fr.awaitUninterruptibly(); // do verification Assert.assertEquals(true, fr.isSuccess()); SortedSet<PeerAddress> ns = fr.potentialHits(); Assert.assertEquals(peers[5].peerAddress(), ns.first()); Assert.assertEquals(false, ns.contains(peers[3].peerAddress())); Assert.assertEquals(false, ns.contains(peers[4].peerAddress())); } finally { if (cc != null) { cc.shutdown().awaitListenersUninterruptibly(); } for (Peer n : peers) { n.shutdown().await(); } } } @Test public void testRouting4() throws Exception { for (int i = 0; i < 20; i++) { testRouting4(true, Type.REQUEST_1); testRouting4(false, Type.REQUEST_1); testRouting4(true, Type.REQUEST_2); testRouting4(false, Type.REQUEST_2); } } private void testRouting4(boolean tcp, Type request) throws Exception { Peer[] peers = null; ChannelCreator cc = null; try { // setup peers = createSpecialPeers(7); addToPeerMap(peers[0], peers[0].peerAddress(), peers[1].peerAddress()); addToPeerMap(peers[1], peers[0].peerAddress(), peers[1].peerAddress(), peers[2].peerAddress()); addToPeerMap(peers[2], peers[0].peerAddress(), peers[1].peerAddress(), peers[2].peerAddress(), peers[3].peerAddress(), peers[4].peerAddress(), peers[5].peerAddress()); addToPeerMap(peers[3], peers[0].peerAddress(), peers[1].peerAddress()); addToPeerMap(peers[4], peers[0].peerAddress(), peers[1].peerAddress()); addToPeerMap(peers[5], peers[0].peerAddress(), peers[1].peerAddress()); // do testing if (tcp) { FutureChannelCreator fcc = peers[0].connectionBean().reservation().create(0, 2); fcc.awaitUninterruptibly(); cc = fcc.channelCreator(); } else { FutureChannelCreator fcc = peers[0].connectionBean().reservation().create(2, 0); fcc.awaitUninterruptibly(); cc = fcc.channelCreator(); } RoutingBuilder routingBuilder = new RoutingBuilder(); if (tcp) { routingBuilder.forceTCP(true); } routingBuilder.setLocationKey(peers[6].peerID()); routingBuilder.setMaxDirectHits(0); routingBuilder.setMaxNoNewInfo(0); routingBuilder.setMaxFailures(0); routingBuilder.setMaxSuccess(100); routingBuilder.setParallel(2); FutureRouting fr = peers[0].distributedRouting().route(routingBuilder, request, cc); fr.awaitUninterruptibly(); // do verification Assert.assertEquals(true, fr.isSuccess()); SortedSet<PeerAddress> ns = fr.potentialHits(); Assert.assertEquals(peers[5].peerAddress(), ns.first()); Assert.assertEquals(true, ns.contains(peers[0].peerAddress())); Assert.assertEquals(true, ns.contains(peers[1].peerAddress())); Assert.assertEquals(true, ns.contains(peers[2].peerAddress())); Assert.assertEquals(false, ns.contains(peers[3].peerAddress())); Assert.assertEquals(true, ns.contains(peers[4].peerAddress())); } finally { if (cc != null) { cc.shutdown().awaitListenersUninterruptibly(); } for (Peer n : peers) { n.shutdown().await(); } } } @Test public void testRouting5() throws Exception { for (int i = 0; i < 20; i++) { testRouting5(true, Type.REQUEST_1); testRouting5(false, Type.REQUEST_1); testRouting5(true, Type.REQUEST_2); testRouting5(false, Type.REQUEST_2); } } private void testRouting5(boolean tcp, Type request) throws Exception { Peer[] peers = null; ChannelCreator cc = null; try { // setup peers = createSpecialPeers(7); addToPeerMap(peers[0], peers[0].peerAddress(), peers[1].peerAddress()); addToPeerMap(peers[1], peers[0].peerAddress(), peers[1].peerAddress(), peers[2].peerAddress()); addToPeerMap(peers[2], peers[0].peerAddress(), peers[1].peerAddress(), peers[2].peerAddress(), peers[3].peerAddress(), peers[4].peerAddress(), peers[5].peerAddress()); addToPeerMap(peers[3], peers[0].peerAddress(), peers[1].peerAddress()); addToPeerMap(peers[4], peers[0].peerAddress(), peers[1].peerAddress()); addToPeerMap(peers[5], peers[0].peerAddress(), peers[1].peerAddress()); // do testing if (tcp) { FutureChannelCreator fcc = peers[0].connectionBean().reservation().create(0, 3); fcc.awaitUninterruptibly(); cc = fcc.channelCreator(); } else { FutureChannelCreator fcc = peers[0].connectionBean().reservation().create(3, 0); fcc.awaitUninterruptibly(); cc = fcc.channelCreator(); } RoutingBuilder routingBuilder = new RoutingBuilder(); if (tcp) { routingBuilder.forceTCP(true); } routingBuilder.setLocationKey(peers[6].peerID()); routingBuilder.setMaxDirectHits(0); routingBuilder.setMaxNoNewInfo(0); routingBuilder.setMaxFailures(0); routingBuilder.setMaxSuccess(100); routingBuilder.setParallel(3); FutureRouting fr = peers[0].distributedRouting().route(routingBuilder, request, cc); fr.awaitUninterruptibly(); // do verification Assert.assertEquals(true, fr.isSuccess()); SortedSet<PeerAddress> ns = fr.potentialHits(); Assert.assertEquals(peers[5].peerAddress(), ns.first()); Assert.assertEquals(true, ns.contains(peers[3].peerAddress())); Assert.assertEquals(true, ns.contains(peers[4].peerAddress())); Assert.assertEquals(6, ns.size()); } finally { if (cc != null) { cc.shutdown().awaitListenersUninterruptibly(); } for (Peer n : peers) { n.shutdown().await(); } } } /** * Adds peers to a peer's map. * * @param peer * The peer to which the peers will be added * @param peers * The peers that will be added */ private void addToPeerMap(Peer peer, PeerAddress... peers) { for (int i = 0; i < peers.length; i++) { peer.peerBean().peerMap().peerFound(peers[i], null, null); } } private Peer[] createSpecialPeers(int nr) throws Exception { StringBuilder sb = new StringBuilder("0x"); Peer[] peers = new Peer[nr]; for (int i = 0; i < nr; i++) { sb.append("f"); peers[i] = new PeerBuilder(new Number160(sb.toString())).ports(4001 + i).start(); } return peers; } @Test public void testPerfectRouting() throws Exception { final Random rnd = new Random(42L); Peer master = null; try { // setup Peer[] peers = Utils2.createNodes(1000, rnd, 4001); System.err.println("nodes created."); master = peers[0]; Utils2.perfectRouting(peers); // do testing Collection<PeerAddress> pas = peers[30].peerBean().peerMap() .closePeers(peers[30].peerID(), 20); Iterator<PeerAddress> i = pas.iterator(); PeerAddress p1 = i.next(); Assert.assertEquals(peers[262].peerAddress(), p1); } finally { master.shutdown().await(); } } @Test public void testRoutingBulk() throws Exception { testRoutingBulk(true, Type.REQUEST_1); testRoutingBulk(false, Type.REQUEST_1); testRoutingBulk(true, Type.REQUEST_1); testRoutingBulk(false, Type.REQUEST_2); } private void testRoutingBulk(boolean tcp, Type request) throws Exception { Peer master = null; ChannelCreator cc = null; try { // setup Peer[] peers = Utils2.createNodes(2000, rnd, 4001); master = peers[0]; Utils2.perfectRouting(peers); // do testing if (tcp) { FutureChannelCreator fcc = peers[0].connectionBean().reservation().create(0, 1); fcc.awaitUninterruptibly(); cc = fcc.channelCreator(); } else { FutureChannelCreator fcc = peers[0].connectionBean().reservation().create(1, 0); fcc.awaitUninterruptibly(); cc = fcc.channelCreator(); } RoutingBuilder routingBuilder = new RoutingBuilder(); if (tcp) { routingBuilder.forceTCP(true); } routingBuilder.setLocationKey(peers[20].peerID()); routingBuilder.setMaxDirectHits(0); routingBuilder.setMaxNoNewInfo(0); routingBuilder.setMaxFailures(0); routingBuilder.setMaxSuccess(100); routingBuilder.setParallel(1); FutureRouting fr = peers[500].distributedRouting().route(routingBuilder, request, cc); fr.awaitUninterruptibly(); // do verification Assert.assertEquals(true, fr.isSuccess()); SortedSet<PeerAddress> ns = fr.potentialHits(); Assert.assertEquals(peers[20].peerAddress(), ns.first()); } finally { if (cc != null) { cc.shutdown().awaitListenersUninterruptibly(); } if (master != null) { master.shutdown().await(); } } } @Test public void testRoutingConcurrently() throws Exception { for (int i = 0; i < 3; i++) { testRoutingConcurrently(true, Type.REQUEST_1, 1); testRoutingConcurrently(false, Type.REQUEST_1, 1); testRoutingConcurrently(true, Type.REQUEST_1, 1); testRoutingConcurrently(false, Type.REQUEST_2, 1); testRoutingConcurrently(true, Type.REQUEST_1, 2); testRoutingConcurrently(false, Type.REQUEST_1, 2); testRoutingConcurrently(true, Type.REQUEST_1, 2); testRoutingConcurrently(false, Type.REQUEST_2, 2); } } private void testRoutingConcurrently(boolean tcp, Type request, int res) throws Exception { final Random rnd1 = new Random(42L); final Random rnd2 = new Random(43L); final Random rnd3 = new Random(42L); Peer master = null; ChannelCreator cc = null; try { // setup Peer[] peers = Utils2.createNodes(2000, rnd, 4001); master = peers[0]; Utils2.perfectRouting(peers); // do testing System.err.println("do routing."); List<FutureRouting> frs = new ArrayList<FutureRouting>(); for (int i = 0; i < peers.length; i++) { if (tcp) { FutureChannelCreator fcc = peers[0].connectionBean().reservation().create(0, res); fcc.awaitUninterruptibly(); cc = fcc.channelCreator(); } else { FutureChannelCreator fcc = peers[0].connectionBean().reservation().create(res, 0); fcc.awaitUninterruptibly(); cc = fcc.channelCreator(); } RoutingBuilder routingBuilder = new RoutingBuilder(); if (tcp) { routingBuilder.forceTCP(true); } routingBuilder.setLocationKey(peers[rnd1.nextInt(peers.length)].peerID()); routingBuilder.setMaxDirectHits(0); routingBuilder.setMaxNoNewInfo(0); routingBuilder.setMaxFailures(0); routingBuilder.setMaxSuccess(100); routingBuilder.setParallel(res); FutureRouting frr = peers[rnd2.nextInt(peers.length)].distributedRouting().route( routingBuilder, request, cc); frs.add(frr); Utils.addReleaseListener(cc, frr); } System.err.println("now checking if the tests were successful."); for (int i = 0; i < peers.length; i++) { frs.get(i).awaitListenersUninterruptibly(); Assert.assertEquals(true, frs.get(i).isSuccess()); SortedSet<PeerAddress> ns = frs.get(i).potentialHits(); Assert.assertEquals(peers[rnd3.nextInt(peers.length)].peerAddress(), ns.first()); } System.err.println("done!"); } finally { if (cc != null) { cc.shutdown().awaitListenersUninterruptibly(); } if (master != null) { master.shutdown().await(); } } } @Test public void testRoutingBootstrap1() throws Exception { testRoutingBootstrap1(true); testRoutingBootstrap1(false); } private void testRoutingBootstrap1(boolean tcp) throws Exception { Peer master = null; ChannelCreator cc = null; try { // setup Peer[] peers = Utils2.createNodes(200, rnd, 4001); master = peers[0]; Utils2.perfectRouting(peers); // do testing Collection<PeerAddress> peerAddresses = new ArrayList<PeerAddress>(1); peerAddresses.add(master.peerAddress()); for (int i = 1; i < peers.length; i++) { if (tcp) { FutureChannelCreator fcc = peers[0].connectionBean().reservation().create(0, 1); fcc.awaitUninterruptibly(); cc = fcc.channelCreator(); } else { FutureChannelCreator fcc = peers[0].connectionBean().reservation().create(1, 0); fcc.awaitUninterruptibly(); cc = fcc.channelCreator(); } RoutingBuilder routingBuilder = new RoutingBuilder(); if (tcp) { routingBuilder.forceTCP(true); } routingBuilder.setMaxDirectHits(0); routingBuilder.setMaxNoNewInfo(5); routingBuilder.setMaxFailures(100); routingBuilder.setMaxSuccess(100); routingBuilder.setParallel(1); FutureDone<Pair<FutureRouting,FutureRouting>> fm = peers[i].distributedRouting().bootstrap( peerAddresses, routingBuilder, cc); fm.awaitUninterruptibly(); // do verification Assert.assertEquals(true, fm.isSuccess()); Assert.assertEquals(true, fm.object().element0().isSuccess()); Assert.assertEquals(true, fm.object().element1().isSuccess()); } } finally { if (cc != null) { cc.shutdown().awaitListenersUninterruptibly(); } if (master != null) { master.shutdown().await(); } } } @Test public void testBootstrap() throws Exception { Peer master = null; Peer client = null; try { // Bindings b = new Bindings("wlan0"); master = new PeerBuilder(new Number160(rnd)).ports(4000).start(); client = new PeerBuilder(new Number160(rnd)).ports(4001).start(); BaseFuture tmp = client.ping().broadcast().port(4000).start(); tmp.awaitUninterruptibly(); System.err.println(tmp.failedReason()); Assert.assertEquals(true, tmp.isSuccess()); Assert.assertEquals(1, client.peerBean().peerMap().size()); } finally { if (client != null) { client.shutdown().await(); } if (master != null) { master.shutdown().await(); } } } @Test public void testBootstrap2() throws Exception { Peer master = null; Peer client = null; try { Bindings b = new Bindings().addInterface("lo"); master = new PeerBuilder(new Number160(rnd)).externalBindings(b).ports(4002).start(); client = new PeerBuilder(new Number160(rnd)).externalBindings(b).ports(4001).start(); BaseFuture tmp = client.ping().broadcast().port(4001).start(); tmp.awaitUninterruptibly(); Assert.assertEquals(false, tmp.isSuccess()); Assert.assertEquals(0, client.peerBean().peerMap().size()); } finally { if (client != null) { client.shutdown().await(); } if (master != null) { master.shutdown().await(); } } } @Test public void testRoutingLoop() throws Exception { testRoutingLoop(true); testRoutingLoop(false); } private void testRoutingLoop(boolean tcp) throws Exception { final Random rnd = new Random(43L); for (int k = 0; k < 100; k++) { Number160 find = Number160.createHash("findme"); Peer master = null; ChannelCreator cc = null; try { System.err.println("round " + k); // setup Peer[] peers = Utils2.createNodes(200, rnd, 4001); master = peers[0]; Utils2.perfectRouting(peers); Comparator<PeerAddress> cmp = PeerMap.createComparator(find); SortedSet<PeerAddress> ss = new TreeSet<PeerAddress>(cmp); for (int i = 0; i < peers.length; i++) { ss.add(peers[i].peerAddress()); } // do testing if (tcp) { FutureChannelCreator fcc = peers[0].connectionBean().reservation().create(0, 2); fcc.awaitUninterruptibly(); cc = fcc.channelCreator(); } else { FutureChannelCreator fcc = peers[0].connectionBean().reservation().create(2, 0); fcc.awaitUninterruptibly(); cc = fcc.channelCreator(); } RoutingBuilder routingBuilder = new RoutingBuilder(); if (tcp) { routingBuilder.forceTCP(true); } routingBuilder.setLocationKey(find); routingBuilder.setMaxDirectHits(Integer.MAX_VALUE); routingBuilder.setMaxNoNewInfo(5); routingBuilder.setMaxFailures(10); routingBuilder.setMaxSuccess(20); routingBuilder.setParallel(2); FutureRouting frr = peers[50].distributedRouting().route(routingBuilder, Type.REQUEST_1, cc); frr.awaitUninterruptibly(); SortedSet<PeerAddress> ss2 = frr.potentialHits(); // test the first 5 peers, because we set noNewInformation to 5, // which means we find at least 5 entries. for (int i = 0; i < 5; i++) { PeerAddress pa = ss.first(); PeerAddress pa2 = ss2.first(); System.err.println("test " + pa + " - " + pa2); Assert.assertEquals(pa.peerId(), pa2.peerId()); ss.remove(pa); ss2.remove(pa2); } } finally { if (cc != null) { cc.shutdown().awaitListenersUninterruptibly(); } if (master != null) { master.shutdown().awaitListenersUninterruptibly(); } } } } }
41.474597
113
0.565252
0193759853a284f5130907b3c55ba58f8f8e9032
3,451
/* * Copyright 2017 Peng Wan <phylame@163.com> * * This file is part of Jem. * * 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. */ import jclp.setting.PropertiesSettings; import jclp.util.CollectionUtils; import jclp.util.StringUtils; import jem.Chapter; import jem.crawler.CrawlerBook; import jem.crawler.CrawlerListener; import jem.crawler.CrawlerManager; import jem.epm.EpmManager; import jem.epm.util.MakerParam; import lombok.val; import java.io.File; import java.util.Date; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; public class Test { public static void main(String[] args) throws Exception { crawlerTest(); } private static void crawlerTest() throws Exception { val settings = new PropertiesSettings(); settings.set("maker.vdm.type", "zip"); // settings.set("maker.xml.encoding", "gbk"); settings.set("maker.xml.indent", "\t"); settings.set("maker.pmab.meta", CollectionUtils.mapOf("version", "3.0", "generator", "jem v4.0")); long begin = System.currentTimeMillis(); CrawlerManager cm = new CrawlerManager(); System.out.println(cm.getService("book.qidian.com").getName()); val executor = Executors.newFixedThreadPool(80); val book = cm.fetchBook("http://m.qidian.com/book/1005401934", settings); int totals = 0; if (book instanceof CrawlerBook) { val crawlerBook = (CrawlerBook) book; crawlerBook.schedule(executor); totals = crawlerBook.getTotals(); } val n = totals; settings.set("crawler.listener", new CrawlerListener() { private AtomicInteger i = new AtomicInteger(); @Override public void textFetched(Chapter chapter, String url) { String str = StringUtils.duplicated("#", 100); int i = (int) (str.length() * (this.i.addAndGet(1) / (double) n)); String s = StringUtils.duplicated("#", i) + StringUtils.duplicated(" ", str.length() - i); // System.out.printf("\r%d/%d %s: %s", i.addAndGet(1), n, getString(chapter, TITLE), url); System.out.print("\r[" + s + "]"); System.out.flush(); } }); book.getExtensions().set("date", new Date()); System.out.println(); try { new EpmManager().writeBook(MakerParam.builder() .book(book) .format("pmab") .file(new File("E:/tmp/3")) .arguments(settings) .build()); } catch (Exception e) { e.printStackTrace(); } executor.shutdown(); executor.awaitTermination(Long.MAX_VALUE, TimeUnit.MICROSECONDS); System.out.println(System.currentTimeMillis() - begin); book.cleanup(); } }
38.344444
106
0.623587
3fac9d9a00590cd14fa4f3591aa0dad0bdd66792
407
package me.hsgamer.adsinadchat.processor.converter; import me.hsgamer.adsinadchat.api.Converter; import org.bukkit.entity.Player; public class TextChanger extends Converter { public TextChanger(String value) { super(value); } @Override public String convert(Player player, String text) { return value.replace("{text}", text).replace("{player}", player.getName()); } }
25.4375
83
0.70516
16299566b3fea08fb92fb8568ead40f073b974f6
19,141
package hu.szte.vizz.model.user; import hu.szte.vizz.persistence.entity.user.User; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.test.context.junit4.SpringRunner; import java.util.UUID; import static org.junit.Assert.*; @RunWith(SpringRunner.class) public class LocationDTOUnitTest { @Test public void When_getId_Expect_correctIdReturned() { UUID id = UUID.randomUUID(); LocationDTO location = new LocationDTO() .setId(id); assertEquals(id, location.getId()); } @Test public void When_setId_Expect_correctIdSetted() { UUID id = UUID.randomUUID(); LocationDTO location = new LocationDTO() .setId(UUID.randomUUID()); assertNotEquals(id, location.getId()); location.setId(id); assertEquals(id, location.getId()); } @Test public void When_getUserId_Expect_correctUserIdReturned() { User user = new User() .setId(UUID.randomUUID()); LocationDTO location = new LocationDTO() .setUserId(user.getId()); assertEquals(user.getId(), location.getUserId()); } @Test public void When_setUserId_Expect_correctUserIdSetted() { User user1 = new User() .setId(UUID.randomUUID()); User user2 = new User() .setId(UUID.randomUUID()); LocationDTO location = new LocationDTO() .setUserId(user2.getId()); assertNotEquals(user1.getId(), location.getUserId()); location.setUserId(user1.getId()); assertEquals(user1.getId(), location.getUserId()); } @Test public void When_getTitle_Expect_correctTitleReturned() { LocationDTO location = new LocationDTO() .setTitle("title"); assertEquals("title", location.getTitle()); } @Test public void When_setTitle_Expect_correctTitleSetted() { LocationDTO location = new LocationDTO() .setTitle("nottitle"); assertNotEquals("title", location.getTitle()); location.setTitle("title"); assertEquals("title", location.getTitle()); } @Test public void When_getZip_Expect_correctZipReturned() { LocationDTO location = new LocationDTO() .setZip("zip"); assertEquals("zip", location.getZip()); } @Test public void When_setZip_Expect_correctZipSetted() { LocationDTO location = new LocationDTO() .setZip("notzip"); assertNotEquals("zip", location.getZip()); location.setZip("zip"); assertEquals("zip", location.getZip()); } @Test public void When_getCity_Expect_correctCityReturned() { LocationDTO location = new LocationDTO() .setCity("city"); assertEquals("city", location.getCity()); } @Test public void When_setCity_Expect_correctCitySetted() { LocationDTO location = new LocationDTO() .setCity("notcity"); assertNotEquals("city", location.getCity()); location.setCity("city"); assertEquals("city", location.getCity()); } @Test public void When_getStreet_Expect_correctStreetReturned() { LocationDTO location = new LocationDTO() .setStreet("street"); assertEquals("street", location.getStreet()); } @Test public void When_setStreet_Expect_correctStreetSetted() { LocationDTO location = new LocationDTO() .setStreet("notstreet"); assertNotEquals("street", location.getStreet()); location.setStreet("street"); assertEquals("street", location.getStreet()); } @Test public void When_getAddress_Expect_correctAddressReturned() { LocationDTO location = new LocationDTO() .setAddress("address"); assertEquals("address", location.getAddress()); } @Test public void When_setAddress_Expect_correctAddressSetted() { LocationDTO location = new LocationDTO() .setAddress("notaddress"); assertNotEquals("address", location.getAddress()); location.setAddress("address"); assertEquals("address", location.getAddress()); } @Test public void When_isDefault_Expect_correctValueReturned() { LocationDTO location = new LocationDTO() .setDefault(true); assertTrue(location.isDefault()); } @Test public void When_setDefault_Expect_correctValueSetted() { LocationDTO location = new LocationDTO(); assertFalse(location.isDefault()); location.setDefault(true); assertTrue(location.isDefault()); } @Test public void When_equalsSame_Expect_true() { LocationDTO location = new LocationDTO(); assertEquals(location, location); } @Test public void When_equalsIdentical_Expect_true() { UUID id = UUID.randomUUID(); UUID userId = UUID.randomUUID(); LocationDTO location1 = new LocationDTO() .setId(id) .setUserId(userId) .setTitle("title") .setZip("1000") .setCity("city") .setStreet("street") .setAddress("address") .setDefault(true); LocationDTO location2 = new LocationDTO() .setId(id) .setUserId(userId) .setTitle("title") .setZip("1000") .setCity("city") .setStreet("street") .setAddress("address") .setDefault(true); assertEquals(location1, location2); } @Test public void When_equalsWithNull_Expect_false() { LocationDTO location = new LocationDTO(); assertNotEquals(location, null); } @Test public void When_equalsWithDifferentObjectType_Expect_false() { LocationDTO location = new LocationDTO(); assertNotEquals(location, "Hello"); } @Test public void When_equalsWithDifferentId_Expect_false() { UUID userId = UUID.randomUUID(); LocationDTO location1 = new LocationDTO() .setId(UUID.randomUUID()) .setUserId(userId) .setTitle("title") .setZip("1000") .setCity("city") .setStreet("street") .setAddress("address") .setDefault(true); LocationDTO location2 = new LocationDTO() .setId(UUID.randomUUID()) .setUserId(userId) .setTitle("title") .setZip("1000") .setCity("city") .setStreet("street") .setAddress("address") .setDefault(true); assertNotEquals(location1, location2); } @Test public void When_equalsWithNullId_Expect_false() { UUID userId = UUID.randomUUID(); LocationDTO location1 = new LocationDTO() .setUserId(userId) .setTitle("title") .setZip("1000") .setCity("city") .setStreet("street") .setAddress("address") .setDefault(true); LocationDTO location2 = new LocationDTO() .setId(UUID.randomUUID()) .setUserId(userId) .setTitle("title") .setZip("1000") .setCity("city") .setStreet("street") .setAddress("address") .setDefault(true); assertNotEquals(location1, location2); } @Test public void When_equalsWithNullIdBoth_Expect_true() { UUID userId = UUID.randomUUID(); LocationDTO location1 = new LocationDTO() .setUserId(userId) .setTitle("title") .setZip("1000") .setCity("city") .setStreet("street") .setAddress("address") .setDefault(true); LocationDTO location2 = new LocationDTO() .setUserId(userId) .setTitle("title") .setZip("1000") .setCity("city") .setStreet("street") .setAddress("address") .setDefault(true); assertEquals(location1, location2); } @Test public void When_equalsWithDifferentUserId_Expect_false() { UUID id = UUID.randomUUID(); LocationDTO location1 = new LocationDTO() .setId(id) .setUserId(UUID.randomUUID()) .setTitle("title") .setZip("1000") .setCity("city") .setStreet("street") .setAddress("address") .setDefault(true); LocationDTO location2 = new LocationDTO() .setId(id) .setUserId(UUID.randomUUID()) .setTitle("title") .setZip("1000") .setCity("city") .setStreet("street") .setAddress("address") .setDefault(true); assertNotEquals(location1, location2); } @Test public void When_equalsWithNullUserId_Expect_false() { UUID id = UUID.randomUUID(); LocationDTO location1 = new LocationDTO() .setId(id) .setTitle("title") .setZip("1000") .setCity("city") .setStreet("street") .setAddress("address") .setDefault(true); LocationDTO location2 = new LocationDTO() .setId(id) .setUserId(UUID.randomUUID()) .setTitle("title") .setZip("1000") .setCity("city") .setStreet("street") .setAddress("address") .setDefault(true); assertNotEquals(location1, location2); } @Test public void When_equalsWithNullUserIdBoth_Expect_true() { UUID id = UUID.randomUUID(); LocationDTO location1 = new LocationDTO() .setId(id) .setTitle("title") .setZip("1000") .setCity("city") .setStreet("street") .setAddress("address") .setDefault(true); LocationDTO location2 = new LocationDTO() .setId(id) .setTitle("title") .setZip("1000") .setCity("city") .setStreet("street") .setAddress("address") .setDefault(true); assertEquals(location1, location2); } @Test public void When_equalsWithDifferentTitle_Expect_false() { UUID id = UUID.randomUUID(); UUID userId = UUID.randomUUID(); LocationDTO location1 = new LocationDTO() .setId(id) .setUserId(userId) .setTitle("title") .setZip("1000") .setCity("city") .setStreet("street") .setAddress("address") .setDefault(true); LocationDTO location2 = new LocationDTO() .setId(id) .setUserId(userId) .setTitle("title2") .setZip("1000") .setCity("city") .setStreet("street") .setAddress("address") .setDefault(true); assertNotEquals(location1, location2); } @Test public void When_equalsWithDifferentZip_Expect_false() { UUID id = UUID.randomUUID(); UUID userId = UUID.randomUUID(); LocationDTO location1 = new LocationDTO() .setId(id) .setUserId(userId) .setTitle("title") .setZip("1001") .setCity("city") .setStreet("street") .setAddress("address") .setDefault(true); LocationDTO location2 = new LocationDTO() .setId(id) .setUserId(userId) .setTitle("title") .setZip("1000") .setCity("city") .setStreet("street") .setAddress("address") .setDefault(true); assertNotEquals(location1, location2); } @Test public void When_equalsWithDifferentCity_Expect_false() { UUID id = UUID.randomUUID(); UUID userId = UUID.randomUUID(); LocationDTO location1 = new LocationDTO() .setId(id) .setUserId(userId) .setTitle("title") .setZip("1000") .setCity("city") .setStreet("street") .setAddress("address") .setDefault(true); LocationDTO location2 = new LocationDTO() .setId(id) .setUserId(userId) .setTitle("title") .setZip("1000") .setCity("city3") .setStreet("street") .setAddress("address") .setDefault(true); assertNotEquals(location1, location2); } @Test public void When_equalsWithDifferentStreet_Expect_false() { UUID id = UUID.randomUUID(); UUID userId = UUID.randomUUID(); LocationDTO location1 = new LocationDTO() .setId(id) .setUserId(userId) .setTitle("title") .setZip("1000") .setCity("city") .setStreet("street") .setAddress("address") .setDefault(true); LocationDTO location2 = new LocationDTO() .setId(id) .setUserId(userId) .setTitle("title") .setZip("1000") .setCity("city") .setStreet("street2") .setAddress("address") .setDefault(true); assertNotEquals(location1, location2); } @Test public void When_equalsWithDifferentAddress_Expect_false() { UUID id = UUID.randomUUID(); UUID userId = UUID.randomUUID(); LocationDTO location1 = new LocationDTO() .setId(id) .setUserId(userId) .setTitle("title") .setZip("1000") .setCity("city") .setStreet("street") .setAddress("address") .setDefault(true); LocationDTO location2 = new LocationDTO() .setId(id) .setUserId(userId) .setTitle("title") .setZip("1000") .setCity("city") .setStreet("street") .setAddress("address2") .setDefault(true); assertNotEquals(location1, location2); } @Test public void When_equalsWithDifferentDefaultState_Expect_false() { UUID id = UUID.randomUUID(); UUID userId = UUID.randomUUID(); LocationDTO location1 = new LocationDTO() .setId(id) .setUserId(userId) .setTitle("title") .setZip("1000") .setCity("city") .setStreet("street") .setAddress("address") .setDefault(true); LocationDTO location2 = new LocationDTO() .setId(id) .setUserId(userId) .setTitle("title") .setZip("1000") .setCity("city") .setStreet("street") .setAddress("address"); assertNotEquals(location1, location2); } @Test public void When_hashCodeIdentical_Expect_true() { UUID id = UUID.randomUUID(); UUID userId = UUID.randomUUID(); LocationDTO location1 = new LocationDTO() .setId(id) .setUserId(userId) .setTitle("title") .setZip("1000") .setCity("city") .setStreet("street") .setAddress("address") .setDefault(true); LocationDTO location2 = new LocationDTO() .setId(id) .setUserId(userId) .setTitle("title") .setZip("1000") .setCity("city") .setStreet("street") .setAddress("address") .setDefault(true); assertEquals(location1.hashCode(), location2.hashCode()); } @Test public void When_hashCodeIdenticalWithNullId_Expect_true() { UUID userId = UUID.randomUUID(); LocationDTO location1 = new LocationDTO() .setUserId(userId) .setTitle("title") .setZip("1000") .setCity("city") .setStreet("street") .setAddress("address") .setDefault(true); LocationDTO location2 = new LocationDTO() .setUserId(userId) .setTitle("title") .setZip("1000") .setCity("city") .setStreet("street") .setAddress("address") .setDefault(true); assertEquals(location1.hashCode(), location2.hashCode()); } @Test public void When_hashCodeIdenticalWithNullUserId_Expect_true() { UUID id = UUID.randomUUID(); LocationDTO location1 = new LocationDTO() .setId(id) .setTitle("title") .setZip("1000") .setCity("city") .setStreet("street") .setAddress("address") .setDefault(true); LocationDTO location2 = new LocationDTO() .setId(id) .setTitle("title") .setZip("1000") .setCity("city") .setStreet("street") .setAddress("address") .setDefault(true); assertEquals(location1.hashCode(), location2.hashCode()); } @Test public void When_hashCodeDifferent_Expect_false() { UUID id = UUID.randomUUID(); UUID userId = UUID.randomUUID(); LocationDTO location1 = new LocationDTO() .setId(id) .setUserId(userId) .setTitle("title") .setZip("1000") .setCity("city") .setStreet("street") .setAddress("address") .setDefault(true); LocationDTO location2 = new LocationDTO() .setId(id) .setUserId(userId) .setTitle("title") .setZip("1000") .setCity("city") .setStreet("street") .setAddress("address"); assertNotEquals(location1.hashCode(), location2.hashCode()); } }
33.17331
69
0.520401
6289a925234c697ef46dd85e93c2738a456bffd9
399
package dev.patika.patikahw02; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; // @SpringBootApplication includes ComponentScan and finds Beans @SpringBootApplication public class PatikaHw02Application { public static void main(String[] args) { SpringApplication.run(PatikaHw02Application.class, args); } }
26.6
68
0.804511
26fa5ae9ea856f0217fb59f1c91d3f943b607e03
356
package seedu.address.model.record.exceptions; /** * Signals that the operation will result in duplicate Records. * Should be checked equal using the Record equals() method. */ public class DuplicateRecordException extends RuntimeException { public DuplicateRecordException() { super("Operation would result in duplicate records"); } }
29.666667
64
0.752809
9e4fed57ed7084259b8d5b920f13225c2440f4f4
6,484
/** * Copyright (C) 2015 Orange * 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 com.francetelecom.clara.cloud.activation.plugin.cf.infrastructure; import com.francetelecom.clara.cloud.activation.plugin.cf.domain.CFServiceActivationService; import com.francetelecom.clara.cloud.activation.plugin.cf.domain.ServiceActivationStatus; import com.francetelecom.clara.cloud.activation.plugin.cf.infrastructure.CFServiceActivationServiceDefaultImpl.ServiceAlreadyExists; import com.francetelecom.clara.cloud.techmodel.cf.Space; import com.francetelecom.clara.cloud.techmodel.cf.SpaceName; import com.francetelecom.clara.cloud.techmodel.cf.services.managed.ManagedService; import com.francetelecom.clara.cloud.techmodel.cf.services.userprovided.SimpleUserProvidedService; import org.fest.assertions.Assertions; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.runners.MockitoJUnitRunner; @RunWith(MockitoJUnitRunner.class) public class CFServiceActivationServiceDefaultImplTest { @Mock CfAdapter cfAdapter; @Test(expected = ServiceAlreadyExists.class) public void fail_to_create_and_bind_service_if_service_with_same_name_exists() { CFServiceActivationService cFServiceActivationService = new CFServiceActivationServiceDefaultImpl(cfAdapter); // given service postgres-joyndb already exi Space space = new Space(); space.activate(new SpaceName("joyn-space")); SimpleUserProvidedService postgresService = new SimpleUserProvidedService("postgres-joyndb", "postgres://user:password@hostname:1234/joyndb", space); Mockito.doReturn(true).when(cfAdapter).serviceExists("postgres-joyndb", "joyn-space"); // when I create service postgres-joyndb cFServiceActivationService.activate(postgresService); // then it should fail } @Test public void should_create_service_if_no_service_with_same_name_exists() { CFServiceActivationService cFServiceActivationService = new CFServiceActivationServiceDefaultImpl(cfAdapter); // given no service postgres-joyndb exists Space space = new Space(); space.activate(new SpaceName("joyn-space")); SimpleUserProvidedService postgresService = new SimpleUserProvidedService("postgres-joyndb", "postgres://user:password@hostname:1234/joyndb", space); Mockito.doReturn(false).when(cfAdapter).serviceExists("postgres-joyndb", "joyn-space"); // when I create service postgres-joyndb cFServiceActivationService.activate(postgresService); // then it should succeed } @Test public void should_not_fail_delete_service_if_service_does_not_exist() { CFServiceActivationService cFServiceActivationService = new CFServiceActivationServiceDefaultImpl(cfAdapter); // given service postgres-joyndb does not exist Space space = new Space(); space.activate(new SpaceName("joyn-space")); SimpleUserProvidedService postgresService = new SimpleUserProvidedService("postgres-joyndb", "postgres://user:password@hostname:1234/joyndb", space); Mockito.doReturn(false).when(cfAdapter).serviceExists("postgres-joyndb", "joyn-space"); // when I delete service postgres-joyndb cFServiceActivationService.delete(postgresService); // then it should not fail } @Test public void should_not_delete_managed_service_if_service_has_not_been_activated_yet() throws Exception { CFServiceActivationService cFServiceActivationService = new CFServiceActivationServiceDefaultImpl(cfAdapter); //given service exists //but has not been activated yet Space space = new Space(); ManagedService service = new ManagedService("rabbit", "rabbit", "rabbit", space); final ServiceActivationStatus status = cFServiceActivationService.delete(service); Mockito.verify(cfAdapter, Mockito.never()).deleteService("rabbit", space.getSpaceName().getValue()); Assertions.assertThat(status.hasSucceed()).isEqualTo(true); } @Test public void should_not_delete_ups_if_service_has_not_been_activated_yet() throws Exception { CFServiceActivationService cFServiceActivationService = new CFServiceActivationServiceDefaultImpl(cfAdapter); //given service exists //but has not been activated yet Space space = new Space(); SimpleUserProvidedService postgresService = new SimpleUserProvidedService("postgres-joyndb", "postgres://user:password@hostname:1234/joyndb", space); final ServiceActivationStatus status = cFServiceActivationService.delete(postgresService); Mockito.verify(cfAdapter, Mockito.never()).deleteService("postgres-joyndb",space.getSpaceName().getValue()); Assertions.assertThat(status.hasSucceed()).isEqualTo(true); } @Test public void should_delete_service_if_service_exists() { CFServiceActivationService cFServiceActivationService = new CFServiceActivationServiceDefaultImpl(cfAdapter); // given service postgres-joyndb already exists Space space = new Space(); space.activate(new SpaceName("joyn-space")); SimpleUserProvidedService postgresService = new SimpleUserProvidedService("postgres-joyndb", "postgres://user:password@hostname:1234/joyndb", space); Mockito.doReturn(true).when(cfAdapter).serviceExists("postgres-joyndb", "joyn-space"); // when I delete service postgres-joyndb cFServiceActivationService.delete(postgresService); // then it should succeed } @Test public void should_get_service_activation_state() { CFServiceActivationService cFServiceActivationService = new CFServiceActivationServiceDefaultImpl(cfAdapter); // given service aDatabase activation has succeeded Mockito.doReturn(ServiceActivationStatus.ofService("mysql-db", "joyn-space").hasSucceeded()).when(cfAdapter).getServiceInstanceState("mysql-db", "joyn-space"); // when I get service instance state final ServiceActivationStatus status = cFServiceActivationService.getServiceActivationStatus(ServiceActivationStatus.ofService("mysql-db", "joyn-space").isPending("in progress")); // then it should return in progress Assertions.assertThat(status.hasSucceed()).isTrue(); } }
44.410959
181
0.80583
add7ebf3f59995597a61950437da792c4f9e0624
343
package fax.play.model3; import org.infinispan.protostream.GeneratedSchema; import org.infinispan.protostream.annotations.AutoProtoSchemaBuilder; @AutoProtoSchemaBuilder(includeClasses = Model3E.class, schemaFileName = "model3-schema.proto") public interface Schema3E extends GeneratedSchema { Schema3E INSTANCE = new Schema3EImpl(); }
28.583333
95
0.825073
bb5d55269d05179a2255932c37816b4baf4e34d3
2,180
package org.wrj.haifa.web.container.jetty; import javax.naming.ConfigurationException; import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.nio.SelectChannelConnector; import org.eclipse.jetty.util.log.StdErrLog; import org.eclipse.jetty.webapp.WebAppContext; public class JettyServer { protected String charset = "UTF-8"; /** * port */ private int port = 9000; public JettyServer() { } public JettyServer(int port) { this.port = port; } public JettyServer(int port, String charset) { super(); this.port = port; this.charset = charset; } public static void main(String[] args) { JettyServer peckerServer = new JettyServer(); peckerServer.start(); } /** * 服务器启动。 * * @throws ConfigurationException */ public void start() { // 设置Jetty日志 System.setProperty("org.eclipse.jetty.util.log.class", StdErrLog.class.getName()); Server server = new Server(); // 设置连接器 Connector connector = new SelectChannelConnector(); connector.setPort(this.port); connector.setRequestHeaderSize(16246); server.setConnectors(new Connector[] { connector }); // 设置context WebAppContext context = new WebAppContext(); // eclipse 设置的是./src/main/webapp context.setResourceBase("/Users/wangrenjun/git/haifa-parent/haifa-web-container/jetty/src/main/webapp"); context.setContextPath("/"); // eclipse设置的是jetty/webdefault.xml context.setDefaultsDescriptor("/Users/wangrenjun/git/haifa-parent/haifa-web-container/jetty/src/test/java/jetty/webdefault.xml"); // PS:嵌入式的Jetty,应用当前工程的ClassPath,如果不设置将使用WebAppClassLoder,WEB-INF/lib目录加载jar。 context.setClassLoader(Thread.currentThread().getContextClassLoader()); context.setParentLoaderPriority(true); server.setHandler(context); // 启动Server try { server.start(); server.join(); } catch (Exception e) { throw new RuntimeException(e); } } }
27.948718
137
0.646789
7a450dc0720161fb3ce1b1c4bcc4f52764c2dc1b
846
package ru.mike.adapter.dto; import com.fasterxml.jackson.annotation.*; import java.util.HashMap; import java.util.Map; @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({"temp"}) public class OpenWeatherResponse { @JsonIgnore private Map<String, Object> additionalProperties = new HashMap<String, Object>(); public int getTemp() { HashMap<String, Object> tempInfo = (HashMap<String, Object>) additionalProperties.get("main"); System.out.println(); return (int)Math.round((double)tempInfo.get("temp") - 273.15); } @JsonAnyGetter public Map<String, Object> getAdditionalProperties() { return this.additionalProperties; } @JsonAnySetter public void setAdditionalProperty(String name, Object value) { this.additionalProperties.put(name, value); } }
25.636364
102
0.70331
487c12d8a7fac921464c67f998badd8700302a33
2,683
package net.mikej.connectors.reddit.api.connection; import java.io.IOException; import org.joda.time.DateTime; import org.joda.time.Instant; import org.json.JSONObject; import okhttp3.Credentials; import okhttp3.MultipartBody; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; import okhttp3.ResponseBody; public class TokenProvider { private final String URL = "https://www.reddit.com/api/v1/access_token"; private final String username; private final String password; private final String client_id; private final String client_secret; private String token; private Instant expiration; public TokenProvider(final String username, final String password, final String client_id, final String client_secret) { this.username = username; this.password = password; this.client_id = client_id; this.client_secret = client_secret; } public String getToken() throws IOException { if (token == null || expiration.isBeforeNow()) return renewToken(); return this.token; } public String renewToken() throws IOException { DateTime start = DateTime.now(); Request request = new Request.Builder().url(URL) .method("POST", new MultipartBody.Builder().setType(MultipartBody.FORM).addFormDataPart("grant_type", "password") .addFormDataPart("username", this.username).addFormDataPart("password", this.password).build()) .addHeader("Authorization", Credentials.basic(this.client_id, this.client_secret)).build(); OkHttpClient client = new OkHttpClient(); Response response = client.newCall(request).execute(); ResponseBody responseBody = response.body(); JSONObject json = new JSONObject(responseBody.string()); responseBody.close(); this.token = json.getString("access_token"); this.expiration = start.plusSeconds(json.getInt("expires_in")).toInstant(); return this.token; } public static class Builder { private String username; private String password; private String client_id; private String client_secret; public Builder username(String username) { this.username = username; return this; } public Builder password(String password) { this.password = password; return this; } public Builder clientId(String client_id) { this.client_id = client_id; return this; } public Builder clientSecret(String client_secret) { this.client_secret = client_secret; return this; } public TokenProvider build() { return new TokenProvider(this.username, this.password, this.client_id, this.client_secret); } } }
30.146067
111
0.715617
14286449a165e44125fe5b6975a32676fdb065f9
11,529
// // Source code recreated from a .class file by IntelliJ IDEA // (powered by Fernflower decompiler) // package com.spark.blockchain.util; import java.io.BufferedReader; import java.io.IOException; import java.io.StringReader; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; public class CrippledJavaScriptParser { private static CrippledJavaScriptParser.Keyword[] keywords; public CrippledJavaScriptParser() { } private static boolean isDigit(char ch) { return ch >= '0' && ch <= '9'; } private static boolean isIdStart(char ch) { return ch == '_' || ch >= 'a' && ch <= 'z' || ch >= 'A' && ch <= 'Z'; } private static boolean isId(char ch) { return isDigit(ch) || ch == '_' || ch >= 'a' && ch <= 'z' || ch >= 'A' && ch <= 'Z'; } private static Object parseJSString(StringParser jsString, char delim) { StringBuilder b = new StringBuilder(); while(!jsString.isEmpty()) { char sc = jsString.poll(); if (sc == '\\') { char cc = jsString.poll(); switch(cc) { case 'b': b.append('\b'); break; case 'c': case 'd': case 'e': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'o': case 'p': case 'q': case 's': default: b.append(cc); break; case 'f': b.append('\f'); break; case 'n': b.append('\n'); break; case 'r': b.append('\r'); break; case 't': b.append('\t'); break; case 'u': try { char ec = (char)Integer.parseInt(jsString.peek(4), 16); b.append(ec); jsString.forward(4); } catch (NumberFormatException var6) { b.append("\\u"); } } } else { if (sc == delim) { break; } b.append(sc); } } return b.toString(); } private static List parseJSArray(StringParser jsArray) { ArrayList rv = new ArrayList(); jsArray.trim(); if (jsArray.peek() == ']') { jsArray.forward(1); return rv; } else { while(!jsArray.isEmpty()) { rv.add(parseJSExpr(jsArray)); jsArray.trim(); if (!jsArray.isEmpty()) { char ch = jsArray.poll(); if (ch == ']') { return rv; } if (ch != ',') { throw new RuntimeException(jsArray.toString()); } jsArray.trim(); } } return rv; } } private static String parseId(StringParser jsId) { StringBuilder b = new StringBuilder(); b.append(jsId.poll()); char ch; while(isId(ch = jsId.peek())) { b.append(ch); jsId.forward(1); } return b.toString(); } private static HashMap parseJSHash(StringParser jsHash) { LinkedHashMap rv = new LinkedHashMap(); jsHash.trim(); if (jsHash.peek() == '}') { jsHash.forward(1); return rv; } else { Object key; Object value; for(; !jsHash.isEmpty(); rv.put(key, value)) { if (isIdStart(jsHash.peek())) { key = parseId(jsHash); } else { key = parseJSExpr(jsHash); } jsHash.trim(); if (jsHash.isEmpty()) { throw new IllegalArgumentException(); } if (jsHash.peek() != ':') { throw new RuntimeException(jsHash.toString()); } jsHash.forward(1); jsHash.trim(); value = parseJSExpr(jsHash); jsHash.trim(); if (!jsHash.isEmpty()) { char ch = jsHash.poll(); if (ch == '}') { rv.put(key, value); return rv; } if (ch != ',') { throw new RuntimeException(jsHash.toString()); } jsHash.trim(); } } return rv; } } public static Object parseJSExpr(StringParser jsExpr) { if (jsExpr.isEmpty()) { throw new IllegalArgumentException(); } else { jsExpr.trim(); char start = jsExpr.poll(); if (start == '[') { return parseJSArray(jsExpr); } else if (start == '{') { return parseJSHash(jsExpr); } else if (start != '\'' && start != '"') { if (!isDigit(start) && start != '-' && start != '+') { CrippledJavaScriptParser.Keyword[] var7 = keywords; int var9 = var7.length; for(int var10 = 0; var10 < var9; ++var10) { CrippledJavaScriptParser.Keyword keyword = var7[var10]; int keywordlen = keyword.keywordFromSecond.length(); if (start == keyword.firstChar && jsExpr.peek(keywordlen).equals(keyword.keywordFromSecond)) { if (jsExpr.length() == keyword.keywordFromSecond.length()) { jsExpr.forward(keyword.keywordFromSecond.length()); return keyword.value; } if (!isId(jsExpr.charAt(keyword.keywordFromSecond.length()))) { jsExpr.forward(keyword.keywordFromSecond.length()); jsExpr.trim(); return keyword.value; } throw new IllegalArgumentException(jsExpr.toString()); } } if (start == 'n' && jsExpr.peek("ew Date(".length()).equals("ew Date(")) { jsExpr.forward("ew Date(".length()); Number date = (Number)parseJSExpr(jsExpr); jsExpr.trim(); if (jsExpr.poll() != ')') { throw new RuntimeException("Invalid date"); } else { return new Date(date.longValue()); } } else { throw new UnsupportedOperationException("Unparsable javascript expression: \"" + start + jsExpr + "\""); } } else { StringBuilder b = new StringBuilder(); if (start != '+') { b.append(start); } char psc = 0; boolean exp = false; boolean dot = false; while(true) { char sc; label139: { if (!jsExpr.isEmpty()) { sc = jsExpr.peek(); if (isDigit(sc)) { break label139; } if (sc == 'E' || sc == 'e') { if (exp) { throw new NumberFormatException(b.toString() + jsExpr.toString()); } exp = true; break label139; } if (sc == '.') { if (!dot && !exp) { dot = true; break label139; } throw new NumberFormatException(b.toString() + jsExpr.toString()); } if ((sc == '-' || sc == '+') && (psc == 'E' || psc == 'e')) { break label139; } } return !dot && !exp ? Long.parseLong(b.toString()) : Double.parseDouble(b.toString()); } b.append(sc); jsExpr.forward(1); psc = sc; } } } else { return parseJSString(jsExpr, start); } } } public static Object parseJSExpr(String jsExpr) { return parseJSExpr(new StringParser(jsExpr)); } public static LinkedHashMap<String, Object> parseJSVars(String javascript) { try { BufferedReader r = new BufferedReader(new StringReader(javascript)); LinkedHashMap rv = new LinkedHashMap(); String l; while((l = r.readLine()) != null) { l = l.trim(); if (!l.isEmpty() && l.startsWith("var")) { l = l.substring(3).trim(); int i = l.indexOf(61); if (i != -1) { String varName = l.substring(0, i).trim(); String expr = l.substring(i + 1).trim(); if (expr.endsWith(";")) { expr = expr.substring(0, expr.length() - 1).trim(); } rv.put(varName, parseJSExpr(expr)); } } } return rv; } catch (IOException var7) { throw new RuntimeException(var7); } } static { keywords = new CrippledJavaScriptParser.Keyword[]{new CrippledJavaScriptParser.Keyword("null", (Object)null), new CrippledJavaScriptParser.Keyword("true", Boolean.TRUE), new CrippledJavaScriptParser.Keyword("false", Boolean.FALSE)}; } private static class Keyword { public final String keyword; public final Object value; public final char firstChar; public final String keywordFromSecond; public Keyword(String keyword, Object value) { this.keyword = keyword; this.value = value; this.firstChar = keyword.charAt(0); this.keywordFromSecond = keyword.substring(1); } } }
34.109467
240
0.388065
761e77b8e1f68270402b32988238eb425ec91622
6,157
/* * Licensed to 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.parrot.drone.groundsdk.internal.ftp.apachecommons.parser; import com.parrot.drone.groundsdk.internal.ftp.apachecommons.FTPFile; import com.parrot.drone.groundsdk.internal.ftp.apachecommons.FTPFileEntryParser; import java.util.Calendar; /** * Parser for the Connect Enterprise Unix FTP Server From Sterling Commerce. * Here is a sample of the sort of output line this parser processes: * "-C--E-----FTP B QUA1I1 18128 41 Aug 12 13:56 QUADTEST" * <P><B> * Note: EnterpriseUnixFTPEntryParser can only be instantiated through the * DefaultFTPParserFactory by classname. It will not be chosen * by the autodetection scheme. * </B> * @see FTPFileEntryParser FTPFileEntryParser (for usage instructions) * @see com.parrot.drone.groundsdk.internal.ftp.apachecommons.parser.DefaultFTPFileEntryParserFactory */ public class EnterpriseUnixFTPEntryParser extends RegexFTPFileEntryParserImpl { /** * months abbreviations looked for by this parser. Also used * to determine <b>which</b> month has been matched by the parser. */ private static final String MONTHS = "(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)"; /** * this is the regular expression used by this parser. */ private static final String REGEX = "(([\\-]|[A-Z])([\\-]|[A-Z])([\\-]|[A-Z])([\\-]|[A-Z])([\\-]|[A-Z])" + "([\\-]|[A-Z])([\\-]|[A-Z])([\\-]|[A-Z])([\\-]|[A-Z])([\\-]|[A-Z]))" + "(\\S*)\\s*" // 12 + "(\\S+)\\s*" // 13 + "(\\S*)\\s*" // 14 user + "(\\d*)\\s*" // 15 group + "(\\d*)\\s*" // 16 filesize + MONTHS // 17 month + "\\s*" // TODO should the space be optional? // TODO \\d* should be \\d? surely ? Otherwise 01111 is allowed + "((?:[012]\\d*)|(?:3[01]))\\s*" // 18 date [012]\d* or 3[01] + "((\\d\\d\\d\\d)|((?:[01]\\d)|(?:2[0123])):([012345]\\d))\\s" // 20 \d\d\d\d = year OR // 21 [01]\d or 2[0123] hour + ':' // 22 [012345]\d = minute + "(\\S*)(\\s*.*)"; // 23 name /** * The sole constructor for a EnterpriseUnixFTPEntryParser object. * */ public EnterpriseUnixFTPEntryParser() { super(REGEX); } /** * Parses a line of a unix FTP server file listing and converts it into a * usable format in the form of an <code> FTPFile </code> instance. If * the file listing line doesn't describe a file, <code> null </code> is * returned, otherwise a <code> FTPFile </code> instance representing the * files in the directory is returned. * * @param entry A line of text from the file listing * @return An FTPFile instance corresponding to the supplied entry */ @Override public FTPFile parseFTPEntry(String entry) { FTPFile file = new FTPFile(); file.setRawListing(entry); if (matches(entry)) { String usr = group(14); String grp = group(15); String filesize = group(16); String mo = group(17); String da = group(18); String yr = group(20); String hr = group(21); String min = group(22); String name = group(23); file.setType(FTPFile.FILE_TYPE); file.setUser(usr); file.setGroup(grp); try { file.setSize(Long.parseLong(filesize)); } catch (NumberFormatException e) { // intentionally do nothing } Calendar cal = Calendar.getInstance(); cal.set(Calendar.MILLISECOND, 0); cal.set(Calendar.SECOND, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.HOUR_OF_DAY, 0); int pos = MONTHS.indexOf(mo); int month = pos / 4; final int missingUnit; // the first missing unit try { if (yr != null) { // it's a year; there are no hours and minutes cal.set(Calendar.YEAR, Integer.parseInt(yr)); missingUnit = Calendar.HOUR_OF_DAY; } else { // it must be hour/minute or we wouldn't have matched missingUnit = Calendar.SECOND; int year = cal.get(Calendar.YEAR); // if the month we're reading is greater than now, it must // be last year if (cal.get(Calendar.MONTH) < month) { year--; } cal.set(Calendar.YEAR, year); cal.set(Calendar.HOUR_OF_DAY, Integer.parseInt(hr)); cal.set(Calendar.MINUTE, Integer.parseInt(min)); } cal.set(Calendar.MONTH, month); cal.set(Calendar.DAY_OF_MONTH, Integer.parseInt(da)); cal.clear(missingUnit); file.setTimestamp(cal); } catch (NumberFormatException e) { // do nothing, date will be uninitialized } file.setName(name); return file; } return null; } }
36.64881
101
0.553191
29b141be7e1daa806e14dbdec4da60deae3e46f1
442
package com.williambl.legacybrigadier.impl.server.utils; import com.mojang.brigadier.context.CommandContext; import java.util.List; @SuppressWarnings({"unchecked", "rawtypes"}) public final class UncheckedCaster { public static <T> List<T> list(List theList) { return (List<T>)theList; } public static <T> CommandContext<T> context(CommandContext<?> theContext) { return (CommandContext<T>)theContext; } }
26
79
0.717195
f83df345e5958c9e94acd3942dc2fa5e0929462f
1,224
package com.communote.server.core.common.ldap.caching; import com.communote.server.core.common.caching.CacheKey; /** * @author Communote GmbH - <a href="http://www.communote.com/">http://www.communote.com/</a> */ public class LdapServerCacheKey implements CacheKey { private final String domain; private final String queryPrefix; /** * Constructor. * * @param domain * Domain for the server. * @param queryPrefix * The query prefix. */ public LdapServerCacheKey(String domain, String queryPrefix) { this.domain = domain; this.queryPrefix = queryPrefix; } /** * @return "ldapServers". */ @Override public String getCacheKeyString() { return "ldapServers|" + domain + "|" + queryPrefix; } /** * @return the domain */ public String getDomain() { return domain; } /** * @return the queryPrefix */ public String getQueryPrefix() { return queryPrefix; } /** * @return True. */ @Override public boolean isUniquePerClient() { return true; } }
21.473684
94
0.555556
f95e2ef254a9fdfe47515d04933ddc41054a9d2a
10,238
/* * The MIT License (MIT) * * Copyright (c) 2019 Twineworks GmbH * * 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.twineworks.tweakflow.std; import com.twineworks.tweakflow.lang.errors.LangError; import com.twineworks.tweakflow.lang.errors.LangException; import com.twineworks.tweakflow.lang.types.Types; import com.twineworks.tweakflow.lang.values.*; import java.util.Collections; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.regex.PatternSyntaxException; public final class Regex { public static final class matcher_impl implements UserFunction, Arity1UserFunction { private final Pattern pattern; public matcher_impl(Pattern pattern) { this.pattern = pattern; } @Override public Value call(UserCallContext context, Value x) { if (x == Values.NIL) return Values.NIL; if (pattern.matcher(x.string()).matches()){ return Values.TRUE; } else{ return Values.FALSE; } } } // function matching (string pattern) -> function public static final class matching implements UserFunction, Arity1UserFunction { @Override public Value call(UserCallContext context, Value pattern) { if (pattern == Values.NIL) throw new LangException(LangError.NIL_ERROR, "pattern cannot be nil"); try { Pattern p = Pattern.compile(pattern.string()); return Values.make( new UserFunctionValue( new FunctionSignature(Collections.singletonList( new FunctionParameter(0, "x", Types.STRING, Values.NIL)), Types.BOOLEAN), new matcher_impl(p))); } catch (PatternSyntaxException e){ throw new LangException(LangError.ILLEGAL_ARGUMENT, "invalid regex pattern: "+e.getMessage()); } } } public static final class capture_impl implements UserFunction, Arity1UserFunction { private final Pattern pattern; public capture_impl(Pattern pattern) { this.pattern = pattern; } @Override public Value call(UserCallContext context, Value x) { if (x == Values.NIL) return Values.NIL; String str = x.string(); Matcher matcher = pattern.matcher(str); ListValue groups = new ListValue(); if (matcher.find() && matcher.start() == 0 && matcher.end() == str.length()){ int groupCount = matcher.groupCount(); for (int i=0; i<=groupCount; i++){ String group = matcher.group(i); if (group == null){ groups = groups.append(Values.NIL); } else { groups = groups.append(Values.make(group)); } } } return Values.make(groups); } } // function capture (string pattern) -> function public static final class capturing implements UserFunction, Arity1UserFunction { @Override public Value call(UserCallContext context, Value pattern) { if (pattern == Values.NIL) throw new LangException(LangError.NIL_ERROR, "pattern cannot be nil"); try { Pattern p = Pattern.compile(pattern.string()); return Values.make( new UserFunctionValue( new FunctionSignature(Collections.singletonList( new FunctionParameter(0, "x", Types.STRING, Values.NIL)), Types.LIST), new capture_impl(p))); } catch (PatternSyntaxException e){ throw new LangException(LangError.ILLEGAL_ARGUMENT, "invalid regex pattern: "+e.getMessage()); } } } public static final class replace_impl implements UserFunction, Arity1UserFunction { private final Pattern pattern; private final String replace; public replace_impl(Pattern pattern, String replace) { this.pattern = pattern; this.replace = replace; } @Override public Value call(UserCallContext context, Value x) { if (x == Values.NIL) return Values.NIL; try { Matcher matcher = pattern.matcher(x.string()); String s = matcher.replaceAll(replace); return Values.make(s); } catch(IndexOutOfBoundsException e){ throw new LangException(LangError.INDEX_OUT_OF_BOUNDS, e.getMessage()); } } } public static final class replacing implements UserFunction, Arity2UserFunction { @Override public Value call(UserCallContext context, Value pattern, Value replace) { if (pattern == Values.NIL) throw new LangException(LangError.NIL_ERROR, "pattern cannot be nil"); if (replace == Values.NIL) throw new LangException(LangError.NIL_ERROR, "replace cannot be nil"); try { Pattern p = Pattern.compile(pattern.string()); return Values.make( new UserFunctionValue( new FunctionSignature(Collections.singletonList( new FunctionParameter(0, "x", Types.STRING, Values.NIL)), Types.STRING), new replace_impl(p, replace.string()))); } catch (PatternSyntaxException e){ throw new LangException(LangError.ILLEGAL_ARGUMENT, "invalid regex pattern: "+e.getMessage()); } } } public static final class scanning_impl implements UserFunction, Arity1UserFunction { private final Pattern pattern; public scanning_impl(Pattern pattern) { this.pattern = pattern; } @Override public Value call(UserCallContext context, Value x) { if (x == Values.NIL) return Values.NIL; String str = x.string(); Matcher matcher = pattern.matcher(str); ListValue result = new ListValue(); while (matcher.find()){ ListValue groups = new ListValue(); int groupCount = matcher.groupCount(); for (int i=0; i<=groupCount; i++){ String group = matcher.group(i); if (group == null){ groups = groups.append(Values.NIL); } else { groups = groups.append(Values.make(group)); } } result = result.append(Values.make(groups)); } return Values.make(result); } } // function scanning (string pattern) -> function public static final class scanning implements UserFunction, Arity1UserFunction { @Override public Value call(UserCallContext context, Value pattern) { if (pattern == Values.NIL) throw new LangException(LangError.NIL_ERROR, "pattern cannot be nil"); try { Pattern p = Pattern.compile(pattern.string()); return Values.make( new UserFunctionValue( new FunctionSignature(Collections.singletonList( new FunctionParameter(0, "x", Types.STRING, Values.NIL)), Types.LIST), new scanning_impl(p))); } catch (PatternSyntaxException e){ throw new LangException(LangError.ILLEGAL_ARGUMENT, "invalid regex pattern: "+e.getMessage()); } } } public static final class splitting_impl implements UserFunction, Arity1UserFunction { private final Pattern pattern; private final int limit; public splitting_impl(Pattern pattern, int limit) { this.pattern = pattern; this.limit = limit; } @Override public Value call(UserCallContext context, Value x) { if (x == Values.NIL) return Values.NIL; String str = x.string(); String[] out = pattern.split(str, limit); ListValue result = new ListValue(); for (String s : out) { result = result.append(Values.make(s)); } return Values.make(result); } } // function splitting (string pattern, long limit=nil) -> function public static final class splitting implements UserFunction, Arity2UserFunction { @Override public Value call(UserCallContext context, Value pattern, Value limit) { if (pattern == Values.NIL) throw new LangException(LangError.NIL_ERROR, "pattern cannot be nil"); int intLimit = 0; if (limit != Values.NIL){ long longLimit = limit.longNum(); if (longLimit < 0){ intLimit = -1; } else if (longLimit > Integer.MAX_VALUE){ intLimit = Integer.MAX_VALUE; } else { intLimit = (int) longLimit; } } try { Pattern p = Pattern.compile(pattern.string()); return Values.make( new UserFunctionValue( new FunctionSignature(Collections.singletonList( new FunctionParameter(0, "x", Types.STRING, Values.NIL)), Types.LIST), new splitting_impl(p, intLimit))); } catch (PatternSyntaxException e){ throw new LangException(LangError.ILLEGAL_ARGUMENT, "invalid regex pattern: "+e.getMessage()); } } } // function quote (string x) -> string public static final class quote implements UserFunction, Arity1UserFunction { @Override public Value call(UserCallContext context, Value x) { if (x == Values.NIL) return Values.NIL; return Values.make(Pattern.quote(x.string())); } } }
29.589595
102
0.640555
4d4c194972a84117ff49cc6da2ec702d7fce3033
5,766
/*- * ============LICENSE_START======================================================= * SDC * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ * 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. * ============LICENSE_END========================================================= */ package org.openecomp.sdc.versioning.dao.types; import com.datastax.driver.mapping.annotations.Transient; import com.datastax.driver.mapping.annotations.UDT; import java.util.Date; import java.util.Map; @UDT(name = "version", keyspace = "dox") public class Version { public static final String VERSION_STRING_VIOLATION_MSG = "Version string must be in the format of: {integer}.{integer}"; @Transient private String id; private int major; // TODO: 6/7/2017 remove! private int minor; // TODO: 6/7/2017 remove! @Transient private String name; @Transient private String description; @Transient private String baseId; @Transient private Date creationTime; @Transient private Date modificationTime; @Transient private VersionStatus status = VersionStatus.Draft; @Transient private VersionState state; @Transient private Map<String, Object> additionalInfo; public Version() { } public Version(String id) { this.id = id; } @Deprecated public Version(int major, int minor) { this.major = major; this.minor = minor; } /** * Value of version. * * @param versionString the version string * @return the version */ public static Version valueOf(String versionString) { if (versionString == null) { return null; } String[] versionLevels = versionString.split("\\."); Version version; if (versionLevels.length != 2) { throw new IllegalArgumentException(VERSION_STRING_VIOLATION_MSG); } try { version = new Version(Integer.parseInt(versionLevels[0]), Integer.parseInt(versionLevels[1])); } catch (Exception ex) { throw new IllegalArgumentException(VERSION_STRING_VIOLATION_MSG); } return version; } public int getMajor() { return major; } public void setMajor(int major) { this.major = major; } public int getMinor() { return minor; } public void setMinor(int minor) { this.minor = minor; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public String getBaseId() { return baseId; } public void setBaseId(String baseId) { this.baseId = baseId; } public Date getCreationTime() { return creationTime; } public void setCreationTime(Date creationTime) { this.creationTime = creationTime; } public Date getModificationTime() { return modificationTime; } public void setModificationTime(Date modificationTime) { this.modificationTime = modificationTime; } public VersionStatus getStatus() { return status; } public void setStatus(VersionStatus status) { this.status = status; } public VersionState getState() { return state; } public void setState(VersionState state) { this.state = state; } public Version calculateNextCandidate() { return new Version(major, minor + 1); } public Version calculateNextFinal() { return new Version(major + 1, 0); } public boolean isFinal() { return major != 0 && minor == 0; } public Map<String, Object> getAdditionalInfo() { return additionalInfo; } public void setAdditionalInfo(Map<String, Object> additionalInfo) { this.additionalInfo = additionalInfo; } @Override public int hashCode() { int result = major; result = 31 * result + minor; return result; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } Version version = (Version) obj; return major == version.major && minor == version.minor; } public int compareTo(Version other){ if (this.major>other.major) { return 1; } else if(this.major<other.major){ return -1; } else if(this.major == other.major){ return Integer.compare(this.minor,other.minor); } return 0; } @Override public String toString() { return name != null ? name : major + "." + minor; } @Override public Version clone() { Version version = new Version(); version.setStatus(this.getStatus()); version.setCreationTime(this.getCreationTime()); version.setName(this.getName()); version.setBaseId(this.getBaseId()); version.setMajor(this.major); version.setMinor(this.minor); version.setModificationTime(this.getModificationTime()); version.setDescription(this.description); version.setId(this.getId()); return version; } }
23.826446
100
0.639785
cd90a1d4799054f28566639ac1cc9b9c4a07767c
7,545
package com.kenshoo.pl.intellij.controller; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.CaseFormat; import com.intellij.psi.PsiDirectory; import com.kenshoo.pl.intellij.codegen.*; import com.kenshoo.pl.intellij.model.EntityInput; public class NewEntityController { private final SourceCodeFilePersister sourceCodeFilePersister; private final TableCodeGenerator tableCodeGenerator; private final EntityCodeGenerator entityCodeGenerator; private final EntityPersistenceCodeGenerator entityPersistenceCodeGenerator; private final CommandCodeGenerator createCommandCodeGenerator; private final CommandCodeGenerator updateCommandCodeGenerator; private final CommandCodeGenerator upsertCommandCodeGenerator; private final CommandCodeGenerator deleteCommandCodeGenerator; private NewEntityController( SourceCodeFilePersister sourceCodeFilePersister, TableCodeGenerator tableCodeGenerator, EntityCodeGenerator entityCodeGenerator, EntityPersistenceCodeGenerator entityPersistenceCodeGenerator, CommandCodeGenerator createCommandCodeGenerator, CommandCodeGenerator updateCommandCodeGenerator, CommandCodeGenerator upsertCommandCodeGenerator, CommandCodeGenerator deleteCommandCodeGenerator ) { this.sourceCodeFilePersister = sourceCodeFilePersister; this.tableCodeGenerator = tableCodeGenerator; this.entityCodeGenerator = entityCodeGenerator; this.entityPersistenceCodeGenerator = entityPersistenceCodeGenerator; this.createCommandCodeGenerator = createCommandCodeGenerator; this.updateCommandCodeGenerator = updateCommandCodeGenerator; this.upsertCommandCodeGenerator = upsertCommandCodeGenerator; this.deleteCommandCodeGenerator = deleteCommandCodeGenerator; } public void createNewEntity(PsiDirectory directory, EntityInput input) { final String tableTypeName = createTableTypeName(input.getTableName()); final String entityTypeName = createEntityTypeName(input.getEntityName()); final String entityPersistenceTypeName = createEntityPersistenceTypeName(input.getEntityName()); final String createCommandTypeName = "Create" + input.getEntityName(); final String updateCommandTypeName = "Update" + input.getEntityName(); final String upsertCommandTypeName = "Upsert" + input.getEntityName(); final String deleteCommandTypeName = "Delete" + input.getEntityName(); final String tableCode = tableCodeGenerator.generate(tableTypeName, input); final String entityCode = entityCodeGenerator.generate(entityTypeName, tableTypeName, input); final String entityPersistenceCode = entityPersistenceCodeGenerator.generate(entityTypeName, entityPersistenceTypeName); final String createCommandCode = createCommandCodeGenerator.generate(createCommandTypeName, entityTypeName); final String updateCommandCode = updateCommandCodeGenerator.generate(updateCommandTypeName, entityTypeName); final String upsertCommandCode = upsertCommandCodeGenerator.generate(upsertCommandTypeName, entityTypeName); final String deleteCommandCode = deleteCommandCodeGenerator.generate(deleteCommandTypeName, entityTypeName); sourceCodeFilePersister.persist(directory, tableTypeName, tableCode); sourceCodeFilePersister.persist(directory, entityTypeName, entityCode); sourceCodeFilePersister.persist(directory, entityPersistenceTypeName, entityPersistenceCode); sourceCodeFilePersister.persist(directory, createCommandTypeName, createCommandCode); sourceCodeFilePersister.persist(directory, updateCommandTypeName, updateCommandCode); sourceCodeFilePersister.persist(directory, upsertCommandTypeName, upsertCommandCode); sourceCodeFilePersister.persist(directory, deleteCommandTypeName, deleteCommandCode); } @VisibleForTesting String createTableTypeName(String tableName) { return String.format("%sTable", CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, tableName)); } @VisibleForTesting String createEntityTypeName(String entityName) { return String.format("%sEntity", CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, entityName)); } @VisibleForTesting String createEntityPersistenceTypeName(String entityName) { return String.format("%sPersistence", CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, entityName)); } public static Builder builder() { return new Builder(); } public static class Builder { private SourceCodeFilePersister sourceCodeFilePersister; private TableCodeGenerator tableCodeGenerator; private EntityCodeGenerator entityCodeGenerator; private EntityPersistenceCodeGenerator entityPersistenceCodeGenerator; private CommandCodeGenerator createCommandCodeGenerator; private CommandCodeGenerator updateCommandCodeGenerator; private CommandCodeGenerator upsertCommandCodeGenerator; private CommandCodeGenerator deleteCommandCodeGenerator; private Builder() { // singleton } public Builder sourceCodeFilePersister(SourceCodeFilePersister sourceCodeFilePersister) { this.sourceCodeFilePersister = sourceCodeFilePersister; return this; } public Builder tableCodeGenerator(TableCodeGenerator tableCodeGenerator) { this.tableCodeGenerator = tableCodeGenerator; return this; } public Builder entityCodeGenerator(EntityCodeGenerator entityCodeGenerator) { this.entityCodeGenerator = entityCodeGenerator; return this; } public Builder entityPersistenceCodeGenerator(EntityPersistenceCodeGenerator entityPersistenceCodeGenerator) { this.entityPersistenceCodeGenerator = entityPersistenceCodeGenerator; return this; } public Builder createCommandCodeGenerator(CommandCodeGenerator createCommandCodeGenerator) { this.createCommandCodeGenerator = createCommandCodeGenerator; return this; } public Builder updateCommandCodeGenerator(CommandCodeGenerator updateCommandCodeGenerator) { this.updateCommandCodeGenerator = updateCommandCodeGenerator; return this; } public Builder upsertCommandCodeGenerator(CommandCodeGenerator upsertCommandCodeGenerator) { this.upsertCommandCodeGenerator = upsertCommandCodeGenerator; return this; } public Builder deleteCommandCodeGenerator(CommandCodeGenerator deleteCommandCodeGenerator) { this.deleteCommandCodeGenerator = deleteCommandCodeGenerator; return this; } public NewEntityController build() { return new NewEntityController(sourceCodeFilePersister, tableCodeGenerator, entityCodeGenerator, entityPersistenceCodeGenerator, createCommandCodeGenerator, updateCommandCodeGenerator, upsertCommandCodeGenerator, deleteCommandCodeGenerator); } } }
49.638158
128
0.734791
e020b3c9d59b6931ca18968569350ea959e51af2
2,266
package com.dsm.nms.domain.reply.facade; import com.dsm.nms.domain.comment.entity.Comment; import com.dsm.nms.domain.comment.exception.CommentNotFoundException; import com.dsm.nms.domain.comment.repository.CommentRepository; import com.dsm.nms.domain.notice.api.dto.response.SchoolResponse; import com.dsm.nms.domain.reply.entity.Reply; import com.dsm.nms.domain.reply.exception.ReplyNotFoundException; import com.dsm.nms.domain.reply.repository.ReplyRepository; import com.dsm.nms.global.entity.Writer; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; import java.util.List; import static java.util.stream.Collectors.toList; @RequiredArgsConstructor @Component public class ReplyFacade { private final CommentRepository commentRepository; private final ReplyRepository replyRepository; public List<SchoolResponse.reply> getReplies(Comment comment) { return comment.getReplies().stream() .map(reply -> SchoolResponse.reply.builder() .id(reply.getId()) .writer(SchoolResponse.writer.builder() .id(reply.getWriter().getId()) .name(reply.getWriter().getName()) .profileUrl(reply.getWriter().getProfileUrl()) .build()) .content(reply.getContent()) .createdDate(reply.getCreatedDate()) .build()) .collect(toList()); } public Integer getReplyCount(Integer commentId) { return replyRepository.countByCommentId(commentId); } public void createReply(Integer commentId, String content, Writer writer) { Comment comment = commentRepository.findById(commentId) .orElseThrow(() -> CommentNotFoundException.EXCEPTION); replyRepository.save(new Reply(comment, content, writer)); } public Reply getById(Integer id) { return replyRepository.findById(id) .orElseThrow(() -> ReplyNotFoundException.EXCEPTION); } public void removeReply(Integer replyId) { replyRepository.delete( getById(replyId) ); } }
36.548387
79
0.653575
af9f7e93801c842247c9a465b770532207ccb722
4,845
/* * Copyright (c) [2016] [ <ether.camp> ] * This file is part of the ethereumJ library. * * The ethereumJ library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * The ethereumJ library 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. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with the ethereumJ library. If not, see <http://www.gnu.org/licenses/>. */ package org.ethereum.jsontestsuite.suite.validators; import org.ethereum.core.AccountState; import org.ethereum.db.ContractDetails; import org.ethereum.vm.DataWord; import org.spongycastle.util.encoders.Hex; import java.math.BigInteger; import java.util.*; public class AccountValidator { public static List<String> valid(String address, AccountState expectedState, ContractDetails expectedDetails, AccountState currentState, ContractDetails currentDetails){ List<String> results = new ArrayList<>(); if (currentState == null || currentDetails == null){ String formattedString = String.format("Account: %s: expected but doesn't exist", address); results.add(formattedString); return results; } if (expectedState == null || expectedDetails == null){ String formattedString = String.format("Account: %s: unexpected account in the repository", address); results.add(formattedString); return results; } BigInteger expectedBalance = expectedState.getBalance(); if (currentState.getBalance().compareTo(expectedBalance) != 0) { String formattedString = String.format("Account: %s: has unexpected balance, expected balance: %s found balance: %s", address, expectedBalance.toString(), currentState.getBalance().toString()); results.add(formattedString); } BigInteger expectedNonce = expectedState.getNonce(); if (currentState.getNonce().compareTo(expectedNonce) != 0) { String formattedString = String.format("Account: %s: has unexpected nonce, expected nonce: %s found nonce: %s", address, expectedNonce.toString(), currentState.getNonce().toString()); results.add(formattedString); } byte[] code = currentDetails.getCode(); if (!Arrays.equals(expectedDetails.getCode(), code)) { String formattedString = String.format("Account: %s: has unexpected code, expected code: %s found code: %s", address, Hex.toHexString(expectedDetails.getCode()), Hex.toHexString(currentDetails.getCode())); results.add(formattedString); } // compare storage Set<DataWord> expectedKeys = expectedDetails.getStorage().keySet(); for (DataWord key : expectedKeys) { // force to load known keys to cache to enumerate them currentDetails.get(key); } Set<DataWord> currentKeys = currentDetails.getStorage().keySet(); Set<DataWord> checked = new HashSet<>(); for (DataWord key : currentKeys) { DataWord currentValue = currentDetails.getStorage().get(key); DataWord expectedValue = expectedDetails.getStorage().get(key); if (expectedValue == null) { String formattedString = String.format("Account: %s: has unexpected storage data: %s = %s", address, key, currentValue); results.add(formattedString); continue; } if (!expectedValue.equals(currentValue)) { String formattedString = String.format("Account: %s: has unexpected value, for key: %s , expectedValue: %s real value: %s", address, key.toString(), expectedValue.toString(), currentValue.toString()); results.add(formattedString); continue; } checked.add(key); } for (DataWord key : expectedKeys) { if (!checked.contains(key)) { String formattedString = String.format("Account: %s: doesn't exist expected storage key: %s", address, key.toString()); results.add(formattedString); } } return results; } }
39.390244
139
0.616718
0b91f6187bdc95823051cef086b79cfa25ee06de
1,808
package com.shangyd.jcartadministrationback.controller; import com.github.pagehelper.Page; import com.shangyd.jcartadministrationback.dto.out.PageOutDTO; import com.shangyd.jcartadministrationback.dto.out.ReturnListOutDTO; import com.shangyd.jcartadministrationback.po.Return; import com.shangyd.jcartadministrationback.service.ReturnService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.List; import java.util.stream.Collectors; @RequestMapping("/return") @RestController @CrossOrigin public class ReturnController { @Autowired private ReturnService returnService; @GetMapping("/search") public PageOutDTO<ReturnListOutDTO> search(@RequestParam(defaultValue = "1",required = false)Integer pageNum){ Page<Return> page = returnService.search(pageNum); List<ReturnListOutDTO> returnListOutDTOS = page.stream().map(aReturn -> { ReturnListOutDTO returnListOutDTO = new ReturnListOutDTO(); returnListOutDTO.setCreateTime(aReturn.getCreateTime().getTime()); returnListOutDTO.setCustomerId(aReturn.getCustomerId()); returnListOutDTO.setCustomerName(aReturn.getCustomerName()); returnListOutDTO.setStatus(aReturn.getStatus()); returnListOutDTO.setReturnId(aReturn.getReturnId()); returnListOutDTO.setOrderId(aReturn.getOrderId()); return returnListOutDTO; }).collect(Collectors.toList()); PageOutDTO<ReturnListOutDTO> pageOutDTO = new PageOutDTO<>(); pageOutDTO.setList(returnListOutDTOS); pageOutDTO.setPageNum(page.getPageNum()); pageOutDTO.setTotal(page.getTotal()); pageOutDTO.setPageSize(page.getPageSize()); return pageOutDTO; } }
41.090909
114
0.743363
3b38a4d4fca9f87362b1a51ead43ce0c30d23ba4
435
package com.dazito.oauthexample.model; import lombok.Getter; import lombok.Setter; import javax.persistence.CascadeType; import javax.persistence.DiscriminatorValue; import javax.persistence.Entity; import javax.persistence.OneToOne; @Setter @Getter @Entity @DiscriminatorValue("CONTENT") public class Content extends StorageElementWithChildren { private String root; // @OneToOne // private AccountEntity contentOwner; }
21.75
57
0.806897
0d2300d26d55940b993022e44ef00983b9a8784e
393
package ch.raffael.sangria; import java.net.URI; import java.net.URL; import java.util.Set; /** * @author <a href="mailto:herzog@raffael.ch">Raffael Herzog</a> */ public interface BundleBuilder { URI getUri(); BundleBuilder addToClassPath(URL url); BundleBuilder addToClassPath(URL... url); BundleBuilder addToClassPath(Iterable<URL> url); Set<URL> classPath(); }
17.863636
64
0.704835
58b7d088efd58e9f8cd96073d35db687a59398eb
997
package mysko.pilzhere.christmasgame; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.g2d.Sprite; import com.badlogic.gdx.math.Vector3; import com.badlogic.gdx.utils.viewport.Viewport; public class Utils { private static Viewport viewport; public static void setViewport(Viewport viewport) { Utils.viewport = viewport; } private static Vector3 tempScreenPosition = new Vector3(); public static Vector3 calculateScreenPosition(Vector3 position, Vector3 projPos) { projPos.set(viewport.project(position.cpy())); tempScreenPosition.set(projPos.x, projPos.y, 0); return tempScreenPosition.cpy(); // Old projPos and ScreenPos for trees and candycanes etc... // projPos.set(screen.viewport.project(position.cpy())); // screenPos.set(projPos.x, projPos.y, 0); } /** * Don't use this method! * * @param sprite */ public static void setSpriteScale(Sprite sprite) { sprite.setScale(Gdx.graphics.getWidth() / 1280f, Gdx.graphics.getHeight() / 720f); } }
26.236842
84
0.745236
af8bdc4bfc360d2612a24af3ca9908b25610f67e
4,279
/* * Copyright 2022 ConsenSys AG. * * 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 tech.pegasys.web3signer.signing; import tech.pegasys.signers.bls.keystore.KeyStore; import tech.pegasys.signers.bls.keystore.KeyStoreLoader; import tech.pegasys.signers.bls.keystore.KeyStoreValidationException; import tech.pegasys.signers.bls.keystore.model.KeyStoreData; import tech.pegasys.teku.bls.BLSKeyPair; import tech.pegasys.teku.bls.BLSSecretKey; import tech.pegasys.web3signer.signing.config.metadata.SignerOrigin; import java.io.IOException; import java.io.UncheckedIOException; import java.nio.file.Files; import java.nio.file.Path; import java.util.Collection; import java.util.List; import java.util.Optional; import java.util.stream.Collectors; import java.util.stream.Stream; import org.apache.commons.io.FilenameUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.tuweni.bytes.Bytes; import org.apache.tuweni.bytes.Bytes32; public class BlsKeystoreBulkLoader { private static final Logger LOG = LogManager.getLogger(); public Collection<ArtifactSigner> loadKeystoresUsingPasswordDir( final Path keystoresDirectory, final Path passwordsDirectory) { final List<Path> keystoreFiles = keystoreFiles(keystoresDirectory); return keystoreFiles.parallelStream() .map( keystoreFile -> createSignerForKeystore( keystoreFile, key -> Files.readString(passwordsDirectory.resolve(key + ".txt")))) .flatMap(Optional::stream) .collect(Collectors.toList()); } public Collection<ArtifactSigner> loadKeystoresUsingPasswordFile( final Path keystoresDirectory, final Path passwordFile) { final List<Path> keystoreFiles = keystoreFiles(keystoresDirectory); final String password; try { password = Files.readString(passwordFile); } catch (final IOException e) { throw new UncheckedIOException("Unable to read the password file", e); } return keystoreFiles.parallelStream() .map(keystoreFile -> createSignerForKeystore(keystoreFile, key -> password)) .flatMap(Optional::stream) .collect(Collectors.toList()); } private Optional<? extends ArtifactSigner> createSignerForKeystore( final Path keystoreFile, final PasswordRetriever passwordRetriever) { try { LOG.debug("Loading keystore {}", keystoreFile); final KeyStoreData keyStoreData = KeyStoreLoader.loadFromFile(keystoreFile); final String key = FilenameUtils.removeExtension(keystoreFile.getFileName().toString()); final String password = passwordRetriever.retrievePassword(key); final Bytes privateKey = KeyStore.decrypt(password, keyStoreData); final BLSKeyPair keyPair = new BLSKeyPair(BLSSecretKey.fromBytes(Bytes32.wrap(privateKey))); final BlsArtifactSigner artifactSigner = new BlsArtifactSigner(keyPair, SignerOrigin.FILE_KEYSTORE); return Optional.of(artifactSigner); } catch (final KeyStoreValidationException | IOException e) { LOG.error("Keystore could not be loaded {}", keystoreFile, e); return Optional.empty(); } } @FunctionalInterface private interface PasswordRetriever { String retrievePassword(final String key) throws IOException; } private List<Path> keystoreFiles(final Path keystoresPath) { try (final Stream<Path> fileStream = Files.list(keystoresPath)) { return fileStream .filter(path -> FilenameUtils.getExtension(path.toString()).equalsIgnoreCase("json")) .collect(Collectors.toList()); } catch (final IOException e) { throw new UncheckedIOException("Unable to access the supplied keystore directory", e); } } }
41.144231
118
0.743398
6d546711321ac096899ad8c7dcc22e3d51acfe57
18,565
/** */ package org.afplib.afplib.impl; import org.afplib.afplib.AfplibPackage; import org.afplib.afplib.FNPRG; import org.afplib.base.impl.TripletImpl; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.ENotificationImpl; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>FNPRG</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * </p> * <ul> * <li>{@link org.afplib.afplib.impl.FNPRGImpl#getReserved <em>Reserved</em>}</li> * <li>{@link org.afplib.afplib.impl.FNPRGImpl#getLcHeight <em>Lc Height</em>}</li> * <li>{@link org.afplib.afplib.impl.FNPRGImpl#getCapMHt <em>Cap MHt</em>}</li> * <li>{@link org.afplib.afplib.impl.FNPRGImpl#getMaxAscHt <em>Max Asc Ht</em>}</li> * <li>{@link org.afplib.afplib.impl.FNPRGImpl#getMaxDesDp <em>Max Des Dp</em>}</li> * <li>{@link org.afplib.afplib.impl.FNPRGImpl#getReserved2 <em>Reserved2</em>}</li> * <li>{@link org.afplib.afplib.impl.FNPRGImpl#getRetired <em>Retired</em>}</li> * <li>{@link org.afplib.afplib.impl.FNPRGImpl#getReserved3 <em>Reserved3</em>}</li> * <li>{@link org.afplib.afplib.impl.FNPRGImpl#getUscoreWd <em>Uscore Wd</em>}</li> * <li>{@link org.afplib.afplib.impl.FNPRGImpl#getUscoreWdf <em>Uscore Wdf</em>}</li> * <li>{@link org.afplib.afplib.impl.FNPRGImpl#getUscorePos <em>Uscore Pos</em>}</li> * </ul> * * @generated */ public class FNPRGImpl extends TripletImpl implements FNPRG { /** * The default value of the '{@link #getReserved() <em>Reserved</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getReserved() * @generated * @ordered */ protected static final Integer RESERVED_EDEFAULT = null; /** * The cached value of the '{@link #getReserved() <em>Reserved</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getReserved() * @generated * @ordered */ protected Integer reserved = RESERVED_EDEFAULT; /** * The default value of the '{@link #getLcHeight() <em>Lc Height</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getLcHeight() * @generated * @ordered */ protected static final Integer LC_HEIGHT_EDEFAULT = null; /** * The cached value of the '{@link #getLcHeight() <em>Lc Height</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getLcHeight() * @generated * @ordered */ protected Integer lcHeight = LC_HEIGHT_EDEFAULT; /** * The default value of the '{@link #getCapMHt() <em>Cap MHt</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getCapMHt() * @generated * @ordered */ protected static final Integer CAP_MHT_EDEFAULT = null; /** * The cached value of the '{@link #getCapMHt() <em>Cap MHt</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getCapMHt() * @generated * @ordered */ protected Integer capMHt = CAP_MHT_EDEFAULT; /** * The default value of the '{@link #getMaxAscHt() <em>Max Asc Ht</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getMaxAscHt() * @generated * @ordered */ protected static final Integer MAX_ASC_HT_EDEFAULT = null; /** * The cached value of the '{@link #getMaxAscHt() <em>Max Asc Ht</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getMaxAscHt() * @generated * @ordered */ protected Integer maxAscHt = MAX_ASC_HT_EDEFAULT; /** * The default value of the '{@link #getMaxDesDp() <em>Max Des Dp</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getMaxDesDp() * @generated * @ordered */ protected static final Integer MAX_DES_DP_EDEFAULT = null; /** * The cached value of the '{@link #getMaxDesDp() <em>Max Des Dp</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getMaxDesDp() * @generated * @ordered */ protected Integer maxDesDp = MAX_DES_DP_EDEFAULT; /** * The default value of the '{@link #getReserved2() <em>Reserved2</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getReserved2() * @generated * @ordered */ protected static final byte[] RESERVED2_EDEFAULT = null; /** * The cached value of the '{@link #getReserved2() <em>Reserved2</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getReserved2() * @generated * @ordered */ protected byte[] reserved2 = RESERVED2_EDEFAULT; /** * The default value of the '{@link #getRetired() <em>Retired</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getRetired() * @generated * @ordered */ protected static final Integer RETIRED_EDEFAULT = null; /** * The cached value of the '{@link #getRetired() <em>Retired</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getRetired() * @generated * @ordered */ protected Integer retired = RETIRED_EDEFAULT; /** * The default value of the '{@link #getReserved3() <em>Reserved3</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getReserved3() * @generated * @ordered */ protected static final Integer RESERVED3_EDEFAULT = null; /** * The cached value of the '{@link #getReserved3() <em>Reserved3</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getReserved3() * @generated * @ordered */ protected Integer reserved3 = RESERVED3_EDEFAULT; /** * The default value of the '{@link #getUscoreWd() <em>Uscore Wd</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getUscoreWd() * @generated * @ordered */ protected static final Integer USCORE_WD_EDEFAULT = null; /** * The cached value of the '{@link #getUscoreWd() <em>Uscore Wd</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getUscoreWd() * @generated * @ordered */ protected Integer uscoreWd = USCORE_WD_EDEFAULT; /** * The default value of the '{@link #getUscoreWdf() <em>Uscore Wdf</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getUscoreWdf() * @generated * @ordered */ protected static final Integer USCORE_WDF_EDEFAULT = null; /** * The cached value of the '{@link #getUscoreWdf() <em>Uscore Wdf</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getUscoreWdf() * @generated * @ordered */ protected Integer uscoreWdf = USCORE_WDF_EDEFAULT; /** * The default value of the '{@link #getUscorePos() <em>Uscore Pos</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getUscorePos() * @generated * @ordered */ protected static final Integer USCORE_POS_EDEFAULT = null; /** * The cached value of the '{@link #getUscorePos() <em>Uscore Pos</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getUscorePos() * @generated * @ordered */ protected Integer uscorePos = USCORE_POS_EDEFAULT; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected FNPRGImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return AfplibPackage.eINSTANCE.getFNPRG(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Integer getReserved() { return reserved; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setReserved(Integer newReserved) { Integer oldReserved = reserved; reserved = newReserved; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.FNPRG__RESERVED, oldReserved, reserved)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Integer getLcHeight() { return lcHeight; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setLcHeight(Integer newLcHeight) { Integer oldLcHeight = lcHeight; lcHeight = newLcHeight; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.FNPRG__LC_HEIGHT, oldLcHeight, lcHeight)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Integer getCapMHt() { return capMHt; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setCapMHt(Integer newCapMHt) { Integer oldCapMHt = capMHt; capMHt = newCapMHt; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.FNPRG__CAP_MHT, oldCapMHt, capMHt)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Integer getMaxAscHt() { return maxAscHt; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setMaxAscHt(Integer newMaxAscHt) { Integer oldMaxAscHt = maxAscHt; maxAscHt = newMaxAscHt; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.FNPRG__MAX_ASC_HT, oldMaxAscHt, maxAscHt)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Integer getMaxDesDp() { return maxDesDp; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setMaxDesDp(Integer newMaxDesDp) { Integer oldMaxDesDp = maxDesDp; maxDesDp = newMaxDesDp; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.FNPRG__MAX_DES_DP, oldMaxDesDp, maxDesDp)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public byte[] getReserved2() { return reserved2; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setReserved2(byte[] newReserved2) { byte[] oldReserved2 = reserved2; reserved2 = newReserved2; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.FNPRG__RESERVED2, oldReserved2, reserved2)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Integer getRetired() { return retired; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setRetired(Integer newRetired) { Integer oldRetired = retired; retired = newRetired; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.FNPRG__RETIRED, oldRetired, retired)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Integer getReserved3() { return reserved3; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setReserved3(Integer newReserved3) { Integer oldReserved3 = reserved3; reserved3 = newReserved3; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.FNPRG__RESERVED3, oldReserved3, reserved3)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Integer getUscoreWd() { return uscoreWd; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setUscoreWd(Integer newUscoreWd) { Integer oldUscoreWd = uscoreWd; uscoreWd = newUscoreWd; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.FNPRG__USCORE_WD, oldUscoreWd, uscoreWd)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Integer getUscoreWdf() { return uscoreWdf; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setUscoreWdf(Integer newUscoreWdf) { Integer oldUscoreWdf = uscoreWdf; uscoreWdf = newUscoreWdf; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.FNPRG__USCORE_WDF, oldUscoreWdf, uscoreWdf)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Integer getUscorePos() { return uscorePos; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setUscorePos(Integer newUscorePos) { Integer oldUscorePos = uscorePos; uscorePos = newUscorePos; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.FNPRG__USCORE_POS, oldUscorePos, uscorePos)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case AfplibPackage.FNPRG__RESERVED: return getReserved(); case AfplibPackage.FNPRG__LC_HEIGHT: return getLcHeight(); case AfplibPackage.FNPRG__CAP_MHT: return getCapMHt(); case AfplibPackage.FNPRG__MAX_ASC_HT: return getMaxAscHt(); case AfplibPackage.FNPRG__MAX_DES_DP: return getMaxDesDp(); case AfplibPackage.FNPRG__RESERVED2: return getReserved2(); case AfplibPackage.FNPRG__RETIRED: return getRetired(); case AfplibPackage.FNPRG__RESERVED3: return getReserved3(); case AfplibPackage.FNPRG__USCORE_WD: return getUscoreWd(); case AfplibPackage.FNPRG__USCORE_WDF: return getUscoreWdf(); case AfplibPackage.FNPRG__USCORE_POS: return getUscorePos(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case AfplibPackage.FNPRG__RESERVED: setReserved((Integer)newValue); return; case AfplibPackage.FNPRG__LC_HEIGHT: setLcHeight((Integer)newValue); return; case AfplibPackage.FNPRG__CAP_MHT: setCapMHt((Integer)newValue); return; case AfplibPackage.FNPRG__MAX_ASC_HT: setMaxAscHt((Integer)newValue); return; case AfplibPackage.FNPRG__MAX_DES_DP: setMaxDesDp((Integer)newValue); return; case AfplibPackage.FNPRG__RESERVED2: setReserved2((byte[])newValue); return; case AfplibPackage.FNPRG__RETIRED: setRetired((Integer)newValue); return; case AfplibPackage.FNPRG__RESERVED3: setReserved3((Integer)newValue); return; case AfplibPackage.FNPRG__USCORE_WD: setUscoreWd((Integer)newValue); return; case AfplibPackage.FNPRG__USCORE_WDF: setUscoreWdf((Integer)newValue); return; case AfplibPackage.FNPRG__USCORE_POS: setUscorePos((Integer)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case AfplibPackage.FNPRG__RESERVED: setReserved(RESERVED_EDEFAULT); return; case AfplibPackage.FNPRG__LC_HEIGHT: setLcHeight(LC_HEIGHT_EDEFAULT); return; case AfplibPackage.FNPRG__CAP_MHT: setCapMHt(CAP_MHT_EDEFAULT); return; case AfplibPackage.FNPRG__MAX_ASC_HT: setMaxAscHt(MAX_ASC_HT_EDEFAULT); return; case AfplibPackage.FNPRG__MAX_DES_DP: setMaxDesDp(MAX_DES_DP_EDEFAULT); return; case AfplibPackage.FNPRG__RESERVED2: setReserved2(RESERVED2_EDEFAULT); return; case AfplibPackage.FNPRG__RETIRED: setRetired(RETIRED_EDEFAULT); return; case AfplibPackage.FNPRG__RESERVED3: setReserved3(RESERVED3_EDEFAULT); return; case AfplibPackage.FNPRG__USCORE_WD: setUscoreWd(USCORE_WD_EDEFAULT); return; case AfplibPackage.FNPRG__USCORE_WDF: setUscoreWdf(USCORE_WDF_EDEFAULT); return; case AfplibPackage.FNPRG__USCORE_POS: setUscorePos(USCORE_POS_EDEFAULT); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case AfplibPackage.FNPRG__RESERVED: return RESERVED_EDEFAULT == null ? reserved != null : !RESERVED_EDEFAULT.equals(reserved); case AfplibPackage.FNPRG__LC_HEIGHT: return LC_HEIGHT_EDEFAULT == null ? lcHeight != null : !LC_HEIGHT_EDEFAULT.equals(lcHeight); case AfplibPackage.FNPRG__CAP_MHT: return CAP_MHT_EDEFAULT == null ? capMHt != null : !CAP_MHT_EDEFAULT.equals(capMHt); case AfplibPackage.FNPRG__MAX_ASC_HT: return MAX_ASC_HT_EDEFAULT == null ? maxAscHt != null : !MAX_ASC_HT_EDEFAULT.equals(maxAscHt); case AfplibPackage.FNPRG__MAX_DES_DP: return MAX_DES_DP_EDEFAULT == null ? maxDesDp != null : !MAX_DES_DP_EDEFAULT.equals(maxDesDp); case AfplibPackage.FNPRG__RESERVED2: return RESERVED2_EDEFAULT == null ? reserved2 != null : !RESERVED2_EDEFAULT.equals(reserved2); case AfplibPackage.FNPRG__RETIRED: return RETIRED_EDEFAULT == null ? retired != null : !RETIRED_EDEFAULT.equals(retired); case AfplibPackage.FNPRG__RESERVED3: return RESERVED3_EDEFAULT == null ? reserved3 != null : !RESERVED3_EDEFAULT.equals(reserved3); case AfplibPackage.FNPRG__USCORE_WD: return USCORE_WD_EDEFAULT == null ? uscoreWd != null : !USCORE_WD_EDEFAULT.equals(uscoreWd); case AfplibPackage.FNPRG__USCORE_WDF: return USCORE_WDF_EDEFAULT == null ? uscoreWdf != null : !USCORE_WDF_EDEFAULT.equals(uscoreWdf); case AfplibPackage.FNPRG__USCORE_POS: return USCORE_POS_EDEFAULT == null ? uscorePos != null : !USCORE_POS_EDEFAULT.equals(uscorePos); } return super.eIsSet(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (Reserved: "); result.append(reserved); result.append(", LcHeight: "); result.append(lcHeight); result.append(", CapMHt: "); result.append(capMHt); result.append(", MaxAscHt: "); result.append(maxAscHt); result.append(", MaxDesDp: "); result.append(maxDesDp); result.append(", Reserved2: "); result.append(reserved2); result.append(", Retired: "); result.append(retired); result.append(", Reserved3: "); result.append(reserved3); result.append(", UscoreWd: "); result.append(uscoreWd); result.append(", UscoreWdf: "); result.append(uscoreWdf); result.append(", UscorePos: "); result.append(uscorePos); result.append(')'); return result.toString(); } } //FNPRGImpl
26.333333
116
0.654511
fa5cb75698b8c7574f9932e9a373049d5eba3e8e
745
package com.notronix.lw.api.model; public enum FilterNameType { General, SKU, Title, RetailPrice, PurchasePrice, Tracked, Barcode, VariationGroupName, Available, MinimumLevel, InOrder, StockLevel, StockValue, Due, BinRack, Category, ChannelSKU, SupplierCode, eBayId, AmazonASIN, Image, ExtendedProperty, ExtendedPropertyName, Channel, CreatedDate, ModifiedDate, SerialNumberScanRequired, BatchNumberScanRequired, BatchType, BatchNumber, Weight, DimHeight, DimWidth, DimDepth, JIT, ReorderAmount, ReorderDate, AverageConsumption, BasicReorder }
16.555556
35
0.608054
b3e8744a37c348894b042970ab3bd0fc5c383c35
743
package io.micronaut.docs.inject.anninheritance; //tag::imports[] import io.micronaut.context.annotation.AliasFor; import io.micronaut.context.annotation.Requires; import io.micronaut.core.annotation.AnnotationMetadata; import jakarta.inject.Named; import jakarta.inject.Singleton; import java.lang.annotation.Inherited; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; //end::imports[] //tag::class[] @Inherited // <1> @Retention(RetentionPolicy.RUNTIME) @Requires(property = "datasource.url") // <2> @Named // <3> @Singleton // <4> public @interface SqlRepository { @AliasFor(annotation = Named.class, member = AnnotationMetadata.VALUE_MEMBER) // <5> String value() default ""; } //end::class[]
28.576923
88
0.761777
67ef7fc239c3987c0ea06781bb4462214d5c00aa
1,592
package github.aq.cryptoprofittracker.dto; import com.fasterxml.jackson.databind.ObjectMapper; public class CryptowatchResponseCurrentPriceDto { private Result result; private Allowance allowance; public Result getResult() { return result; } public void setResult(Result result) { this.result = result; } public Allowance getAllowance() { return allowance; } public void setAllowance(Allowance allowance) { this.allowance = allowance; } public static class Result { private double price; public double getPrice() { return price; } public void setPrice(double price) { this.price = price; } } static class Allowance { private long cost; private long remaining; public long getCost() { return cost; } public void setCost(long cost) { this.cost = cost; } public long getRemaining() { return remaining; } public void setRemaining(long remaining) { this.remaining = remaining; } } public static void main(String[] args) throws Exception { // TODO Auto-generated method stub ObjectMapper mapper = new ObjectMapper(); CryptowatchResponseCurrentPriceDto resp = new CryptowatchResponseCurrentPriceDto(); Result result = new Result(); result.setPrice(6463.99); Allowance allowance = new Allowance(); allowance.setCost(1); allowance.setRemaining(1); resp.setResult(result); resp.setAllowance(allowance); //mapper.writeValue(new File("file.json"), obj); System.out.println(mapper.writeValueAsString(resp)); } }
22.111111
86
0.687814
4fabe20802869ac819e55f073385f12c745ab418
3,459
package org.xmodel.compress.serial; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import java.math.BigDecimal; import java.math.BigInteger; import org.xmodel.compress.CompressorException; /** * An implementation of ISerializer that serializes java.lang.Number. */ public class NumberSerializer extends AbstractSerializer { /* (non-Javadoc) * @see org.xmodel.compress.ISerializer#readObject(java.io.DataInput) */ @Override public Object readObject( DataInput input) throws IOException, ClassNotFoundException, CompressorException { byte type = input.readByte(); if ( type == 0x13) { return input.readFloat(); } else if ( type == 0x14) { return input.readDouble(); } else if ( type == 0x15) { int length = input.readUnsignedByte(); byte[] bytes = new byte[ length]; input.readFully( bytes); BigInteger unscaledValue = new BigInteger( bytes); int scale = input.readInt(); return new BigDecimal( unscaledValue, scale); } else if ( type == 0x01) { return input.readByte(); } else if ( type == 0x02) { return input.readShort(); } else if ( type == 0x03) { return input.readInt(); } else if ( type == 0x04) { return input.readLong(); } else if ( type == 0x05) { int length = input.readByte() & 0xFF; byte[] bytes = new byte[ length]; input.readFully( bytes); return new BigInteger( bytes); } throw new IOException( "Illegal number type specifier."); } /* (non-Javadoc) * @see org.xmodel.compress.ISerializer#writeObject(java.io.DataOutput, java.lang.Object) */ @Override public int writeObject( DataOutput output, Object object) throws IOException, CompressorException { if ( object instanceof Float) { output.writeByte( 0x13); output.writeFloat( (Float)object); return 5; } else if ( object instanceof Double) { output.writeByte( 0x14); output.writeDouble( (Double)object); return 9; } else if ( object instanceof BigDecimal) { output.writeByte( 0x15); BigDecimal value = (BigDecimal)object; BigInteger unscaled = value.unscaledValue(); byte[] unscaledBytes = unscaled.toByteArray(); output.writeByte( (byte)unscaledBytes.length); output.write( unscaledBytes); output.writeInt( value.scale()); return 1 + unscaledBytes.length + 4; } else if ( object instanceof Byte) { output.writeByte( 0x01); output.writeByte( (Byte)object); return 2; } else if ( object instanceof Short) { output.writeByte( 0x02); output.writeShort( (Short)object); return 3; } else if ( object instanceof Integer) { output.writeByte( 0x03); output.writeInt( (Integer)object); return 5; } else if ( object instanceof Long) { output.writeByte( 0x04); output.writeLong( (Long)object); return 9; } else if ( object instanceof BigInteger) { output.writeByte( 0x05); BigInteger value = (BigInteger)object; byte[] bytes = value.toByteArray(); output.writeByte( (byte)bytes.length); output.write( bytes); return 1 + bytes.length; } else { throw new IllegalArgumentException( object.getClass().getName()); } } }
25.813433
108
0.62388
7499fb9e2567d08f73d3c884c7bd740ad5fdd278
7,476
package esa.mo.nmf.apps; import java.io.File; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.logging.Level; import java.util.logging.Logger; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import esa.mo.nmf.apps.exceptions.NotEnoughParamsForRequestedType; public class DatapoolXmlManager { private static final Logger LOGGER = Logger.getLogger(DatapoolXmlManager.class.getName()); // path to the datapool xml file // FIXME: Can a list be fetched from NMF Supervisor? private static final String XML_FILE_PATH = "Datapool.xml"; private static final String XML_ELEM_PARAMETER = "parameter"; private static final String XML_PARAM_NAME = "name"; private static final String XML_PARAM_ATTRIBUTE_TYPE = "attributeType"; enum DatapoolParamTypes { Boolean, Double, Float, Integer, Long, Octet, Short, UInteger, UShort, UOctet, } // the map containing all the parameter names grouped by there data type private Map<String, List<String>> paramMap; // map used to track the latest param name index fetched from the param name lists // this is used to make sure that each simulate app has a different set of param names private Map<String, Integer> paramListTrackerMap; // singleton instance private static DatapoolXmlManager instance; /** * Hide constructor. */ private DatapoolXmlManager(){ this.paramMap = new HashMap<String, List<String>>(); this.paramListTrackerMap = new HashMap<String, Integer>(); loadXml(); } /** * Returns the PropertiesManager instance of the application. * Singleton. * * @return the PropertiesManager instance. */ public static DatapoolXmlManager getinstance() { if (instance == null) { instance = new DatapoolXmlManager(); } return instance; } /** * Loads the properties from the configuration file. */ public void loadXml() { try { File inputFile = new File(XML_FILE_PATH); DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder dBuilder = dbFactory.newDocumentBuilder(); Document doc = dBuilder.parse(inputFile); doc.getDocumentElement().normalize(); NodeList nList = doc.getElementsByTagName(XML_ELEM_PARAMETER); for (int i = 0; i < nList.getLength(); i++) { Node node = nList.item(i); // build a Map of datapool parameters grouped by their types if (node.getNodeType() == Node.ELEMENT_NODE) { Element elem = (Element) node; String paramName = elem.getAttribute(XML_PARAM_NAME); String paramType = elem.getAttribute(XML_PARAM_ATTRIBUTE_TYPE); // initialize the param name list for the first time we encounter a specific type if(!this.paramMap.containsKey(paramType)) { List<String> paramNames = new ArrayList<String>(); paramNames.add(paramName); // put initialized param name in list of param names this.paramMap.put(paramType, paramNames); // also initialize the list tracker for the list of param names. this.paramListTrackerMap.put(paramType, Integer.valueOf(0)); }else { this.paramMap.get(paramType).add(paramName); } } } LOGGER.log(Level.INFO, String.format("Loaded datapool names and types from file %s", XML_FILE_PATH)); } catch (Exception e) { LOGGER.log(Level.SEVERE, e.getMessage(), e); } } /** * Get a list of parameter names given a desired amount and data type * @param count how many params to fetch * @param type the types of params to fetch * @return */ public List<String> getParamNames(int count, DatapoolParamTypes type) throws NotEnoughParamsForRequestedType{ // fetch all param names that are of the given type List<String> allParamNamesForRequestedType = this.paramMap.get(type.name()); // grab n amount of param names that satisfy the configure param count List<String> sampledParamNames = new ArrayList<String>(); // fetch the index from which we need to start getting param names from the list of param names int startIndex = this.paramListTrackerMap.get(type.name()).intValue(); // declare the loop index here so that we can use it later int i; // throw exception in case there are not enough params for the requested type if((startIndex + count) > allParamNamesForRequestedType.size()) { throw new NotEnoughParamsForRequestedType( (startIndex + count) + " unique params of type " + type.toString() + " were requested but there are only "+ allParamNamesForRequestedType.size() + "."); } // Build list of param names for(i = startIndex; i < (startIndex + count); i++) { sampledParamNames.add(allParamNamesForRequestedType.get(i)); } // update list index this.paramListTrackerMap.put(type.name(), Integer.valueOf(i)); // return param names that will be used for stress testing return sampledParamNames; } /** * Get DatapoolParamType from its string representation. * @param paramType * @return */ public DatapoolParamTypes getDatapoolParamTypeFromString(String paramType) { if(paramType.equalsIgnoreCase("Boolean")){ return DatapoolParamTypes.Boolean; }else if(paramType.equalsIgnoreCase("Double")){ return DatapoolParamTypes.Double; }else if(paramType.equalsIgnoreCase("Float")){ return DatapoolParamTypes.Float; }else if(paramType.equalsIgnoreCase("Integer")){ return DatapoolParamTypes.Integer; }else if(paramType.equalsIgnoreCase("Long")){ return DatapoolParamTypes.Long; }else if(paramType.equalsIgnoreCase("Octet")){ return DatapoolParamTypes.Octet; }else if(paramType.equalsIgnoreCase("Short")){ return DatapoolParamTypes.Short; }else if(paramType.equalsIgnoreCase("UInteger")){ return DatapoolParamTypes.UInteger; }else if(paramType.equalsIgnoreCase("UShort")){ return DatapoolParamTypes.UShort; }else if(paramType.equalsIgnoreCase("UOctet")){ return DatapoolParamTypes.UOctet; }; return null; } }
36.468293
128
0.596709
e1f420a5fcf4dddbd6ecb9cf38324e9e8c528ac9
8,213
package com.peterzuo.fundamentals; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicReference; public class AVLTree<T extends Comparable> extends Tree<T> implements AVL<T> { int count; public AVLTree(){ super(); this.count = 0; } public static class AVLTreeNode<T extends Comparable> extends TreeNode<T>{ int height; public AVLTreeNode(T data) { super(data); height = 0; } } private void addChild(TreeNode parent, TreeNode child, Boolean asLeftChild){ if (asLeftChild) { parent.left = child; child.parent = parent; } else{ parent.right = child; child.parent = parent; } } protected static int getHeight(TreeNode node){ if (node == null){ return -1; } return ((AVLTreeNode)node).height; } private void updateHeightBottomUp(AVLTreeNode node){ if (node == null){ return; } do { node.height = Math.max(this.getHeight(node.left), this.getHeight(node.right)) + 1; node = (AVLTreeNode)node.parent; } while (node != null); } private boolean rightHeavy(AVLTreeNode node){ return getHeight(node.left) < getHeight(node.right); } private boolean leftHeavy(AVLTreeNode node){ return getHeight(node.left) > getHeight(node.right); } protected static boolean violationBalanceCheck(AVLTreeNode node){ return (Math.abs(getHeight(node.left) - getHeight(node.right)) > 1); } private void rotate_left(AVLTreeNode node){ if (node.right == null){ return; } // move node.right to be replace node. TreeNode parent = node.parent; if (parent != null) { if (parent.left == node) { parent.left = node.right; } else { parent.right = node.right; } } else { this.root = node.right; } // move the node.right's left child branch to be node's right child TreeNode right = node.right; node.parent = right; node.right = node.right.left; if (right.left != null) { right.left.parent = node; } right.left = node; right.parent = parent; updateHeightBottomUp(node); } private void rotate_right(AVLTreeNode node){ if (node.left == null){ return; } // move node.left to be replace node. TreeNode parent = node.parent; if (parent != null) { if (parent.left == node) { parent.left = node.left; } else { parent.right = node.left; } } else { this.root = node.left; } // move the node.left's right child branch to be node's left child TreeNode left = node.left; node.parent = left; node.left = left.right; if (left.right != null) { left.right.parent = node; } left.right = node; left.parent = parent; updateHeightBottomUp(node); } private void balanceAVL(AVLTreeNode node){ updateHeightBottomUp(node); while(node.parent != null){ AVLTreeNode parent = (AVLTreeNode)node.parent; if (violationBalanceCheck(parent)){ if (rightHeavy(parent) && rightHeavy((AVLTreeNode)parent.right)){ rotate_left(parent); } else if (rightHeavy(parent) && leftHeavy((AVLTreeNode)parent.right)){ rotate_right((AVLTreeNode) parent.right); rotate_left(parent); } if (leftHeavy(parent) && leftHeavy((AVLTreeNode)parent.left)){ rotate_right(parent); } else if (leftHeavy(parent) && rightHeavy((AVLTreeNode)parent.left)){ rotate_left((AVLTreeNode) parent.left); rotate_right(parent); } } node = parent; } } @Override public void insert(T object) { AVLTreeNode node = new AVLTreeNode(object); if (this.root == null){ this.root = node; } else { TreeNode parent = this.root; while(parent != null){ if ( ((Comparable)parent.data).compareTo(object) < 0){ if (parent.right != null){ parent = parent.right; } else{ this.addChild(parent, node, false); balanceAVL(node); break; } } else { if (parent.left != null){ parent = parent.left; } else{ this.addChild(parent, node, true); balanceAVL(node); break; } } } } this.count++; } private void remove_leafnode(TreeNode node){ if (node.parent != null){ if (node.parent.left == node){ node.parent.left = null; } else { node.parent.right = null; } } this.updateHeightBottomUp((AVLTreeNode)node.parent); node.parent = null; if (this.root == node){ this.root = null; } this.count--; } private void replace_node(TreeNode node, TreeNode replace_node){ if (node.parent != null){ if (node.parent.left == node){ node.parent.left = replace_node; } else { node.parent.right = replace_node; } replace_node.parent = node.parent; } replace_node.left = node.left; if (node.left != null){ node.left.parent = replace_node; } replace_node.right = node.right; if (node.right != null){ node.right.parent = replace_node; } if (this.root == node){ this.root = replace_node; } } @Override public boolean delete(T node_data) { AtomicReference<AVLTreeNode> found = new AtomicReference<>(null); this.traverseRecursive(this.root, TraverseOrder.Inorder, (current)->{ if (((Comparable)current.data).compareTo(node_data) == 0){ found.set((AVLTreeNode) current); } }); if (found == null){ return false; } AVLTreeNode parent; AVLTreeNode node = found.get(); if (node.left == null && node.right == null){ parent = (AVLTreeNode) node.parent; remove_leafnode(node); } else { AVLTreeNode replaceNode = null; if (rightHeavy(node)) { replaceNode = (AVLTreeNode) node.right.getLeftMostNode(); } else { replaceNode = (AVLTreeNode) node.left.getRightMostNode(); } parent = (AVLTreeNode) replaceNode.parent; if (parent == node) { parent = replaceNode; } remove_leafnode(replaceNode); replace_node(node, replaceNode); updateHeightBottomUp(node); } balanceAVL(parent); return true; } @Override public int size() { return count; } @Override public int height() { return getHeight(this.root); } public static <T extends Comparable> boolean validateBalanced(AVLTree<T> tree){ AtomicBoolean isBalanced = new AtomicBoolean(true); tree.traverseRecursive(tree.root, TraverseOrder.Inorder, (node)->{ if (AVLTree.violationBalanceCheck((AVLTreeNode)node)){ isBalanced.set(false); } }); return isBalanced.get(); } }
27.935374
94
0.504201
f7616fe35e8139da826fcbae88141e239c526563
14,872
package cn.apisium.uniporter; import cn.apisium.uniporter.acme.Authorizer; import cn.apisium.uniporter.router.api.Config; import cn.apisium.uniporter.router.api.Route; import cn.apisium.uniporter.router.api.UniporterHttpHandler; import cn.apisium.uniporter.router.defaults.DefaultStaticHandler; import cn.apisium.uniporter.router.listener.RouterChannelCreator; import cn.apisium.uniporter.util.ReflectionFinder; import io.netty.buffer.Unpooled; import io.netty.channel.*; import io.netty.handler.codec.http.*; import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; import org.bukkit.command.PluginCommand; import org.bukkit.plugin.PluginLoadOrder; import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.java.annotation.command.Command; import org.bukkit.plugin.java.annotation.command.Commands; import org.bukkit.plugin.java.annotation.dependency.SoftDependency; import org.bukkit.plugin.java.annotation.permission.Permission; import org.bukkit.plugin.java.annotation.permission.Permissions; import org.bukkit.plugin.java.annotation.plugin.*; import org.bukkit.plugin.java.annotation.plugin.author.Author; import java.io.File; import java.util.*; import java.util.stream.Stream; /** * Uniporter plugin class, also contains some API methods. * * @author Baleine_2000 */ @Plugin(name = "Uniporter", version = "@@RELEASE_VERSION@@") @Description("A netty wrapper for Minecraft, which allows running multiple protocols in same port.") @Author("Baleine_2000") @LoadOrder(PluginLoadOrder.STARTUP) @Website("https://apisium.cn") @ApiVersion(ApiVersion.Target.v1_13) @Commands(@Command(name = "uniporter", permission = "uniporter.use", usage = "/uniporter")) @Permissions(@Permission(name = "uniporter.use")) @SoftDependency("ProtocolLib") public final class Uniporter extends JavaPlugin { private static final String PREFIX = ChatColor.YELLOW + "[Uniporter] "; private static final HashMap<String, UniporterHttpHandler> handlers = new HashMap<>(); private static final ArrayList<RouteWithOptions> pluginRoutes = new ArrayList<>(); private static Uniporter instance; private static Config config; private static boolean debug; // Is this debug environment private static boolean useNativeTransport; /** * @return Plugin's instance */ public static Uniporter getInstance() { return instance; } /** * @return The route config */ public static Config getRouteConfig() { return config; } /** * @return is in debug environment */ public static boolean isDebug() { return debug; } /** * @return is in debug environment */ public static boolean isUseNativeTransport() { return useNativeTransport; } /** * Register a route listen to minecraft port. * * @param route the route need to be registered */ public static void registerRoute(Route route) { getRouteConfig().registerRoute(":minecraft", true, route); pluginRoutes.add(new RouteWithOptions(":minecraft", true, route)); } /** * Register a route, with given port to listen to, and will ssl be used * * @param port port it listen to * @param ssl use ssl or not * @param route the route need to be registered */ @SuppressWarnings("unused") public static void registerRoute(int port, boolean ssl, Route route) { getRouteConfig().registerRoute(":" + port, ssl, route); pluginRoutes.add(new RouteWithOptions(":" + port, ssl, route)); } /** * Register handler for later use. * * @param id the unique handler id, the very last handler registered with same id will be used * @param handler the handler who will process the http request */ public static void registerHandler(String id, UniporterHttpHandler handler) { registerHandler(id, handler, false); } /** * Register handler for later use. * * @param id the unique handler id, the very last handler registered with same id will be used * @param handler the handler who will process the http request * @param isAutoRoute will the handler register a route corresponding to its id immediately */ public static void registerHandler(String id, UniporterHttpHandler handler, boolean isAutoRoute) { registerHandler(id, handler, isAutoRoute, true); } /** * Register handler for later use. * * @param id the unique handler id, the very last handler registered with same id will be used * @param handler the handler who will process the http request * @param isAutoRoute will the handler register a route corresponding to its id immediately * @param gzip whether gzip is enabled */ public static void registerHandler(String id, UniporterHttpHandler handler, boolean isAutoRoute, boolean gzip) { handlers.put(id, handler); if (isAutoRoute) { registerRoute(new Route("/" + id, id, gzip, Collections.emptyMap(), Collections.emptyMap())); } } @SuppressWarnings("unused") public static Map<String, UniporterHttpHandler> getHandlers() { return Collections.unmodifiableMap(handlers); } /** * Remove a registered handler. * * @param id the unique handler id */ @SuppressWarnings("unused") public static void removeHandler(String id) { handlers.remove(id); } /** * Find a possible handler represents by the given id * * @param id unique handler id * @return possible handler */ public static UniporterHttpHandler getHandler(String id) { return handlers.get(id); } /** * Clear channel handlers. * * @param context current Netty context */ @SuppressWarnings("unused") public static void clearNettyHandler(ChannelHandlerContext context) { Decoder.clearHandler(context); } public static void send(ChannelHandlerContext context, String mime, byte[] data) { FullHttpResponse response = new DefaultFullHttpResponse( HttpVersion.HTTP_1_1, HttpResponseStatus.OK, Unpooled.copiedBuffer(data)); response.headers().set(HttpHeaderNames.CONTENT_TYPE, mime); context.writeAndFlush(response).addListener(ChannelFutureListener.CLOSE); } @SuppressWarnings("unused") public static Set<Integer> findPortsByHandler(String handler) { return getRouteConfig().findPortsByHandler(handler); } @SuppressWarnings("unused") public static Set<Route> findRoutesByHandler(String handler) { return getRouteConfig().findRoutesByHandler(handler); } /** * Check if a port is ssl enabled or not. Note that by default, minecraft port supports both, however, this * method returns false if the port is the same as minecraft port. * * @param port the port that need to be checked * @return if the port is a ssl-only port */ @SuppressWarnings("unused") public static boolean isSSLPort(int port) { return getRouteConfig().isSSLPort(port); } private static Stream<ChannelFuture> findBoostrapChannelFutures() { List<?> futures = ReflectionFinder.findChannelFutures(); assert futures != null; return futures.stream() .filter(f -> f instanceof ChannelFuture) .map(f -> (ChannelFuture) f); } /** * Attach channel handler to Minecraft */ @SuppressWarnings("OptionalGetWithoutIsPresent") private void attachChannelHandler() { try { findBoostrapChannelFutures().findFirst().get().channel().pipeline() .addFirst(Constants.UNIPORTER_ID, new ChannelInboundHandlerAdapter() { @Override public void channelRead(ChannelHandlerContext ctx, Object msg) { Channel channel = (Channel) msg; if (!channel.pipeline().names().contains(Constants.DECODER_ID)) { channel.pipeline().addFirst(Constants.DECODER_ID, new Decoder()); } ctx.fireChannelRead(msg); } }); } catch (Throwable e) { e.printStackTrace(); getLogger().info("Failed to attach channel."); } } private void reload() { config.stop(); reloadConfig(); debug = this.getConfig().getBoolean("debug", false); useNativeTransport = this.getConfig().getBoolean("use-native-transport", true); config = new Config(new File(this.getDataFolder(), "route.yml")); pluginRoutes.forEach(it -> config.registerRoute(it.port, it.ssl, it.route)); } @Override public void onEnable() { this.saveDefaultConfig(); instance = this; config = new Config(new File(this.getDataFolder(), "route.yml")); debug = this.getConfig().getBoolean("debug", false); useNativeTransport = this.getConfig().getBoolean("use-native-transport", true); getServer().getPluginManager().registerEvents(new RouterChannelCreator(), this); // Register default static handler registerHandler("static", new DefaultStaticHandler()); getServer().getScheduler().runTask(this, this::attachChannelHandler); PluginCommand command = getServer().getPluginCommand("uniporter"); assert command != null; command.setTabCompleter(this); command.setExecutor(this); if (this.getConfig().getBoolean("eula") && this.getConfig().getBoolean("order")) { boolean success = false; int count = 5; while (!success && count > 0) { try { count--; new Authorizer(this).order(); success = true; } catch (Throwable e) { e.printStackTrace(); } } if (Authorizer.server != null) { Authorizer.server.getFuture().channel().close(); Authorizer.server.getFuture().channel().closeFuture().syncUninterruptibly(); } getRouteConfig().keyStoreExist = getRouteConfig().getKeyStore().exists(); this.getConfig().set("order", false); this.saveConfig(); } // Uncomment below to see how example works. // Uniporter.registerHandler("helloworld", new HttpHelloSender(), true); // Uniporter.registerHandler("helloworld-re-fire", new HttpReFireHelloSender(), true); // Uniporter.registerHandler("hijack", new HttpHijackSender(), true); // Uniporter.registerHandler("mix", new HttpHijackMixedSender(), true); } @Override public void onDisable() { findBoostrapChannelFutures().forEach(future -> { if (future.channel().pipeline().get(Constants.UNIPORTER_ID) != null) { future.channel().pipeline().remove(Constants.UNIPORTER_ID); } }); config.stop(); } private static String formatBoolean(boolean value) { return (value ? ChatColor.GREEN : ChatColor.RED).toString() + value; } @Override public boolean onCommand(CommandSender sender, org.bukkit.command.Command command, String label, String[] args) { if (args.length == 0) { sender.sendMessage(PREFIX + ChatColor.GRAY + "Version: " + ChatColor.WHITE + getDescription().getVersion()); sender.sendMessage(ChatColor.AQUA + "/uniporter channels"); sender.sendMessage(ChatColor.AQUA + "/uniporter debug"); sender.sendMessage(ChatColor.AQUA + "/uniporter handlers"); sender.sendMessage(ChatColor.AQUA + "/uniporter reload"); return true; } if (args.length != 1) return false; switch (args[0]) { case "reload": reload(); sender.sendMessage(PREFIX + ChatColor.GREEN + "Success!"); return true; case "debug": sender.sendMessage(PREFIX + ChatColor.GRAY + "Current is: " + formatBoolean((debug = !debug))); return true; case "handlers": sender.sendMessage(PREFIX + ChatColor.GRAY + "Handlers:"); handlers.forEach((k, v) -> { sender.sendMessage(" " + k + ": " + ChatColor.GRAY + v.getClass().getName()); sender.sendMessage(ChatColor.GRAY + " Need re-fire: " + formatBoolean(v.needReFire())); sender.sendMessage(ChatColor.GRAY + " Hijack Aggregator: " + formatBoolean(v.hijackAggregator())); }); return true; case "channels": sender.sendMessage(PREFIX + ChatColor.GRAY + "Channels:"); findBoostrapChannelFutures() .forEach(future -> { Channel channel = future.channel(); sender.sendMessage(channel.id().asShortText() + ":"); sender.sendMessage(ChatColor.GRAY + " Active: " + formatBoolean(channel.isActive())); sender.sendMessage(ChatColor.GRAY + " Open: " + formatBoolean(channel.isOpen())); sender.sendMessage(ChatColor.GRAY + " Registered: " + formatBoolean(channel.isRegistered())); sender.sendMessage(ChatColor.GRAY + " Address: " + ChatColor.WHITE + channel.localAddress().toString()); sender.sendMessage(ChatColor.GRAY + " Pipelines:"); channel.pipeline().forEach(it -> sender.sendMessage(" " + it.getKey() + ": " + ChatColor.GRAY + it.getValue().getClass().getName())); }); return true; default: return false; } } @Override public List<String> onTabComplete(CommandSender sender, org.bukkit.command.Command command, String alias, String[] args) { return args.length == 1 ? Arrays.asList("channels", "debug", "handlers", "reload") : Collections.emptyList(); } private static final class RouteWithOptions { public final String port; public final boolean ssl; public final Route route; public RouteWithOptions(String port, boolean ssl, Route route) { this.port = port; this.ssl = ssl; this.route = route; } } }
39.448276
120
0.617133
ae6cd856ad72e082fc08d3f0ddb3b60d519d1ee9
6,529
package com.cwc.mylibrary.utils; import java.math.BigDecimal; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; /** * Created by Administrator on 2016/1/12. 时间数据转化帮助类 */ public class MTimeHelper { // SimpleDateFormat 类的格式化字符: // G 年代指示符(AD) // y 年(yy:10 y/yyy/yyyy:2010) // M 月(M:1 MM:01 MMM:Jan MMMM:January MMMMM:J) // L 独立月(L:1 LL:01 LLL:Jan LLLL:January LLLLL:J) // d 一个月中的第几日(只需此一个字符,输出如:10) // h 时(只需此一个字符,输出如:上/下午 1 ~ 12) // H 时(只需此一个字符,输出如:0 ~ 23) // k 一天中的第几个小时(只需此一个字符,输出如:1 ~ 24) // K 时(上/下午 0 ~ 11) // m 一小时中的第几分(只需此一个字符,输出如:30) // s 一分钟中的第几秒(只需此一个字符,输出如:55) // S 毫秒(只需此一个字符,输出如:978) // E 星期几(E/EE/EEE:Tue, EEEE:Tuesday, EEEEE:T) // c 独立星期几(c/cc/ccc:Tue, cccc:Tuesday, ccccc:T) // D 一年中的第几天(只需此一个字符,输出如:189) // F 一月中的第几个星期几(只需此一个字符,输出如:2) // w 一年中的第几个星期(只需此一个字符,输出如:27) // W 一月中的第几个星期(只需此一个字符,输出如:1) // a 上/下午标记符(只需此一个字符,输出如:AM/PM) // Z 时区(RFC822)(Z/ZZ/ZZZ:-0800 ZZZZ:GMT-08:00 ZZZZZ:-08:00) // z 时区(z/zz/zzz:PST zzzz:Pacific Standard Time) // 要忽略的字符都要用单引号('')括住! // eg: SimpleDateFormat sdf = new SimpleDateFormat("'Date'yyyy-MM-dd'Time'HH:mm:ss'Z'"); // type: "yyyy年MM月dd日" "yyyy-MM-dd HH:mm:ss" "yyyy-MM-dd HH:mm:ss" "yyyy-MM-dd HH:mm:ss" /** * 将字符串转为时间戳 * * @param str * @param type * @return */ public static long str2Time(String str, String type) { SimpleDateFormat sdf = new SimpleDateFormat(type); Date date = new Date(); try { date = sdf.parse(str); } catch (ParseException e) { e.printStackTrace(); } return date.getTime(); } /** * 将时间戳转为字符串 * * @param stamp * @param type * @return */ public static String time2Str(long stamp, String type) { String str = null; SimpleDateFormat sdf = new SimpleDateFormat(type); str = sdf.format(new Date(stamp * 1000)); return str; } public static String timeStr2Str(String stamp, String type) { String str = null; SimpleDateFormat sdf = new SimpleDateFormat(type); str = sdf.format(new Date(Long.parseLong(stamp) * 1000)); return str; } private static final int DEF_DIV_SCALE = 10; /** * 保留两位小数 * * @param v1 */ public static Double keepTwo(Double v1) { BigDecimal bd = new BigDecimal(v1.toString()); bd = bd.setScale(2, BigDecimal.ROUND_HALF_UP);//2位小数 return bd.doubleValue(); } /** * 两个Double数相加 * * @param v1 * @param v2 * @return Double */ public static Double add(Double v1, Double v2) { BigDecimal b1 = new BigDecimal(v1.toString()); BigDecimal b2 = new BigDecimal(v2.toString()); BigDecimal bd = b1.add(b2); bd = bd.setScale(2, BigDecimal.ROUND_HALF_UP);//2位小数 return bd.doubleValue(); } /** * 两个Double数相减 * * @param v1 * @param v2 * @return Double */ public static Double sub(Double v1, Double v2) { BigDecimal b1 = new BigDecimal(v1.toString()); BigDecimal b2 = new BigDecimal(v2.toString()); BigDecimal bd = b1.subtract(b2); bd = bd.setScale(2, BigDecimal.ROUND_HALF_UP); return bd.doubleValue(); } /** * 两个Double数相乘 * * @param v1 * @param v2 * @return Double */ public static Double mul(Double v1, Double v2) { BigDecimal b1 = new BigDecimal(v1.toString()); BigDecimal b2 = new BigDecimal(v2.toString()); BigDecimal bd = b1.multiply(b2); bd = bd.setScale(2, BigDecimal.ROUND_HALF_UP); return bd.doubleValue(); } /** * 两个Double数相除 * * @param v1 * @param v2 * @return Double */ public static Double div(Double v1, Double v2) { BigDecimal b1 = new BigDecimal(v1.toString()); BigDecimal b2 = new BigDecimal(v2.toString()); BigDecimal bd = b1.divide(b2, DEF_DIV_SCALE, BigDecimal.ROUND_HALF_UP); bd = bd.setScale(2, BigDecimal.ROUND_HALF_UP); return bd.doubleValue(); } /** * 两个Double数相除,并保留scale位小数 * * @param v1 * @param v2 * @param scale * @return Double */ public static Double div(Double v1, Double v2, int scale) { if (scale < 0) { throw new IllegalArgumentException( "The scale must be a positive integer or zero"); } BigDecimal b1 = new BigDecimal(v1.toString()); BigDecimal b2 = new BigDecimal(v2.toString()); BigDecimal bd = b1.divide(b2, scale, BigDecimal.ROUND_HALF_UP); bd = bd.setScale(2, BigDecimal.ROUND_HALF_UP); return bd.doubleValue(); } /** * 时间格式化 将 秒 转换成 00:00:00 格式显示 */ public static String formattedTime(long second) { String hs, ms, ss, formatTime; long h, m, s; h = second / 3600; m = (second % 3600) / 60; s = (second % 3600) % 60; if (h < 10) { hs = "0" + h; } else { hs = "" + h; } if (m < 10) { ms = "0" + m; } else { ms = "" + m; } if (s < 10) { ss = "0" + s; } else { ss = "" + s; } // if (hs.equals("00")) { // formatTime = ms + ":" + ss; // } else { formatTime = hs + ":" + ms + ":" + ss; // } return formatTime; } /** * 秒为单位 * * @param seconds * @return */ public static String getStandardDate(long seconds) { String temp = ""; try { long now = System.currentTimeMillis() / 1000; //转换成秒 long differ = now - seconds; long months = differ / (60 * 60 * 24 * 30); long days = differ / (60 * 60 * 24); long hours = differ / (60 * 60); long minutes = differ / 60; if (months > 0) { temp = months + "月前"; } else if (days > 0) { temp = days + "天前"; } else if (hours > 0) { temp = hours + "小时前"; } else if (minutes > 0) { temp = minutes + "分钟前"; } else { temp = seconds + "秒前"; } } catch (Exception e) { e.printStackTrace(); } return temp; } }
26.326613
94
0.522898
e25ad8bb254a43205d185397f1017786283af2b2
2,107
package com.example.riven_chris; import java.io.File; import java.io.IOException; /** * Created by riven_chris on 15/7/30. */ public class MakeDirectories { private static void usage() { System.err.println( "Usage:MakeDirectories path1 ...\n" + "Create each path\n" + "Usage:MakeDirectories -d path1 ...\n" + "Delete each path\n" + "Usage:MakeDirectories -r path1 path2\n" + "renames form path1 to path2"); System.exit(1); } private static void fileData(File f) { System.out.println( "Absolute path: " + f.getAbsolutePath() + "\n Can read: " + f.canRead() + "\n Can write: " + f.canWrite() + "\n getName: " + f.getName() + "\n getParent: " + f.getParent() + "\n getPath: " + f.getPath() + "\n length: " + f.length() + "\n lastModified: " + f.lastModified()); if (f.isFile()) { System.out.println("It's a file"); } else if (f.isDirectory()) { System.out.println("It's a directory"); } } public static void main(String[] args) { File file = new File("testFile"); File rname = new File("file_test"); file.renameTo(rname); // fileData(file); // fileData(rname); rname.delete(); File newFile = new File("file_test.jpg"); if (newFile.exists()) { newFile.delete(); System.out.println("deleting " + newFile); } else { newFile.mkdirs(); System.out.println("creating " + newFile); } // try { // File.createTempFile("icon", ".jpg", newFile); // System.out.println("createTempFIle success"); // } catch (IOException e) { // System.out.println("createTempFIle failed"); // e.printStackTrace(); // } } }
31.924242
66
0.47271
fde566a2d5327d6a272514f32255f1b385590d80
9,501
package com.example.sqlliteapp; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.os.Bundle; import android.text.TextUtils; import android.text.method.ScrollingMovementMethod; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.DatePicker; import android.widget.ImageButton; import android.widget.TextView; import android.widget.TimePicker; import android.widget.Toast; import androidx.fragment.app.DialogFragment; import java.sql.Time; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; public class PopInfo extends DialogFragment{ View view; TextView time_df,date_df; ImageButton back_rem, time_pick, date_pic; Button delete_rem, save_rem; String time_get, date_get; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment view=inflater.inflate(R.layout.pop_info, container, false); back_rem=(ImageButton)view.findViewById(R.id.back_rem); time_pick=(ImageButton)view.findViewById(R.id.time_pick); date_pic=(ImageButton)view.findViewById(R.id.date_pic); delete_rem=(Button) view.findViewById(R.id.delete_rem); save_rem=(Button) view.findViewById(R.id.save_rem); time_df=(TextView)view.findViewById(R.id.time_df); date_df=(TextView)view.findViewById(R.id.date_df); if (getArguments() != null && !TextUtils.isEmpty(getArguments().getString("time_value"))) time_get=getArguments().getString("time_value"); if (getArguments() != null && !TextUtils.isEmpty(getArguments().getString("date_value"))) date_get=getArguments().getString("date_value"); SimpleDateFormat sdf1 = new SimpleDateFormat("HH:mm", Locale.getDefault()); SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy", Locale.getDefault()); String currentTime1 = sdf1.format(new Date()); String currentDate1 = sdf.format(new Date()); if(time_get.equalsIgnoreCase("ignore")) { time_df.setText(currentTime1); } else{ time_df.setText(time_get); } if(date_get.equalsIgnoreCase("ignore")) { date_df.setText(currentDate1); } else{ // String[] date_array = date_get.split("-",3); // // for (String a : date_array) // System.out.println("Holathis13"+a); // // System.out.println("Holathis123"+date_array[0]); // System.out.println("Holathis123"+date_array[1]); // System.out.println("Holathis123"+date_array[2]); // Integer month_correction=Integer.parseInt(date_array[1])+1; // String s1=date_array[2]+"-"+month_correction+"-"+date_array[0]; date_df.setText(date_get); } back_rem.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // Toast.makeText(getContext(),"back_rem",Toast.LENGTH_SHORT).show(); dismiss(); } }); time_pick.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // Toast.makeText(getContext(),"time_pick",Toast.LENGTH_SHORT).show(); androidx.fragment.app.FragmentManager fragmentManager1=getFragmentManager(); PopTime poptime=new PopTime(); Bundle bundle1_time = new Bundle(); bundle1_time.putString("time_value1", time_get); bundle1_time.putString("date_value1", date_get); poptime.setArguments(bundle1_time); poptime.show(fragmentManager1,"Time Picker Fragment Show"); dismiss(); } }); date_pic.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // Toast.makeText(getContext(),"date_pic",Toast.LENGTH_SHORT).show(); androidx.fragment.app.FragmentManager fragmentManager2=getFragmentManager(); PopDate popdate=new PopDate(); Bundle bundle1_date = new Bundle(); bundle1_date.putString("time_value2", time_get); bundle1_date.putString("date_value2", date_get); popdate.setArguments(bundle1_date); popdate.show(fragmentManager2,"Date Picker Fragment Show"); dismiss(); } }); delete_rem.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Toast.makeText(getContext(),"Reminder Removed!",Toast.LENGTH_SHORT).show(); Main3Activity m3a1=(Main3Activity)getActivity(); m3a1.deleteRem(); dismiss(); } }); save_rem.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Toast.makeText(getContext(),"Reminder Added!",Toast.LENGTH_SHORT).show(); Main3Activity m3a=(Main3Activity)getActivity(); m3a.setDateTime(time_df.getText().toString(),date_df.getText().toString()); dismiss(); } }); /* old code for setting onclick listner for edit and delete datetime_pop=(TextView)view.findViewById(R.id.datetime_tv3); title_pop=(TextView)view.findViewById(R.id.title_tv3); desc_pop=(TextView)view.findViewById(R.id.desc_tv3); edit_pop=(Button)view.findViewById(R.id.edit_popup); delete_pop=(Button)view.findViewById(R.id.delete_popup); if (getArguments() != null && !TextUtils.isEmpty(getArguments().getString("datetime"))) datetime_pop.setText(getArguments().getString("datetime")); if (getArguments() != null && !TextUtils.isEmpty(getArguments().getString("title"))) title_pop.setText(getArguments().getString("title")); if (getArguments() != null && !TextUtils.isEmpty(getArguments().getString("description"))) desc_pop.setText(getArguments().getString("description")); if (getArguments() != null && !TextUtils.isEmpty(getArguments().getCharSequence("IDvalue"))) id_value=getArguments().getString("IDvalue"); // System.out.println("Hello World1"+id_value); // cancel_pop=(Button)view.findViewById(R.id.cancel_popup); // title_pop.setSelected(true); title_pop.setMovementMethod(new ScrollingMovementMethod()); // title_pop.setHorizontallyScrolling(true); desc_pop.setMovementMethod(new ScrollingMovementMethod()); // edit_pop.setOnClickListener(this); edit_pop.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // Toast.makeText(getContext(),"After modifying please press on UPDATE button",Toast.LENGTH_SHORT).show(); dismiss(); MainActivity ma1=(MainActivity)getActivity(); ma1.update_element_new(title_pop.getText().toString(),desc_pop.getText().toString()); } }); delete_pop.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { AlertDialog.Builder info1=new AlertDialog.Builder(getContext()); info1.setMessage("Are you sure you want to delete this note?") .setTitle("Warning") .setNeutralButton("YES", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dismiss(); MainActivity ma=(MainActivity)getActivity(); // System.out.println("Hello World"+id_value); ma.delete_element(id_value); } }) .setPositiveButton("CANCEL", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { } }) .show(); // Toast.makeText(getContext(),"DELETE",Toast.LENGTH_SHORT).show(); // dismiss(); // MainActivity ma=(MainActivity)getActivity(); //// System.out.println("Hello World"+id_value); // ma.delete_element(id_value); } }); */ return view; } /* Below code is not useful void set_time_frag(String timenow){ time_df.setText(timenow); } void set_date_frag(String datenow){ // TextView date_df=(TextView)view.findViewById(R.id.date_df); date_df.setText(datenow); } */ }
39.098765
122
0.587201
be27c43831972a34a4d5eee6ac5835be2a5697cd
1,192
package Sort_algorithm.JAVA; //https://hahahoho5915.tistory.com/7 public class Selection_sort_02 { public void selectionSort(int[] data) //선택정렬 함수 { int size= data.length; //배열의 크기 int min; int temp; for(int i=0; i<size-1; i++) { min = i; //기준 index i를 min으로 for(int j=i+1; j<size; j++) { if(data[min] > data[j]) //0번째 원소가 더크면 { min=j; //작은 원소의 index를 min에 대입 } } temp= data[min]; //index min은 이제 최소값을 가짐으로 최소값을 i번째 (0부터 시작하는)의 값과 바꿈 data[min]= data[i]; data[i]= temp; } //배열의 크기 -1보다 작을 때까지 반복 } public static void main(String[] args) { Selection_sort_02 selection= new Selection_sort_02(); int data[]= {66, 10, 1, 99, 5}; selection.selectionSort(data); for(int i=0; i<data.length; i++) { System.out.print("data["+i+"] : " + data[i]); } } }
27.72093
100
0.411074