Céline Perherin
email: perherin@cerema.fr

Nathalie Berenger
email: nathalie.berenger@cerema.fr

Ludovic Bocquier
email: ludovic.bocquier@developpement-durable.gouv.fr

Nicolas Flouest
email: nicolas.flouest@cerema.fr

Sylvain Moreira
email: sylvain.moreira@cerema.fr

Moreira Sylvain

Comprendre les submersions marines et leurs conséquences L'apport du retour d'expérience Xynthia pour la définition des données à collecter suite à une submersion

Comprendre les submersions marines et leurs conséquences L'apport du retour d'expérience Xynthia pour la définition des données à collecter suite à une submersion

Introduction

Dans la nuit du 27 au 28 février 2010, la tempête Xynthia a entraîné d'importantes submersions marines (70 000 hectares pour les seuls départements de Vendée, Gironde et Charente-Maritime). Étant donné l'ampleur du phénomène, de nombreuses collectes de données ont été lancées après l'événement par différents maîtres d'ouvrage pour capitaliser au mieux toute information sur les conséquences physiques des inondations et sur leur déroulement. Différents modes de collectes d'informations ont été mis en oeuvre : imagerie satellitaire, prises de vues aériennes, reconnaissances de terrain, enquêtes locales. Grâce à un retour d'expérience sur les différentes collectes menées suite à Xynthia et de leurs exploitations a posteriori, cet article illustre la complémentarité de ces modes de collectes pour recenser et comprendre les événements de submersion marine et propose des pistes d'amélioration.

Les données collectées suite à Xynthia et leur exploitation

La tempête Xynthia a fait l'objet d'une multitude de données collectées afin de comprendre et de garder trace de cet événement de grande ampleur. Cet article présente principalement les collectes menées par les services de l'État et par le réseau scientifique et technique du Ministère de l'Écologie et n'est donc pas exhaustif sur les nombreuses initiatives locales.

Les images satellites

Le Centre opérationnel de gestion interministérielle des crises (Cogic) a déclenché par anticipation le samedi 27 février 2010 à 20h30 le processus Safer (Services and applications for emergency response) qui vise à produire et diffuser rapidement de l'information géographique sur les événements catastrophiques. Les premières images satellitaires (prises le 1 er et le 2 mars) ont été analysées sous 24h par le Service régional de traitement d'image et de télédétection (Sertit) (Sertit, 2010). Des images complémentaires plus tardives ont été également interprétées par le Sertit : 16 produits ont été ainsi livrés aux services chargés de la gestion de la crise entre le 2 et le 16 mars. Ces produits ont permis principalement une estimation rapide de l'extension des zones inondées ainsi que du délai de retour à la normale (évacuation de l'eau).

Le bilan de l'opération s'est révélé globalement positif, notamment quant à l'anticipation du déclenchement et la mise à disposition des produits. Quelques difficultés ont été néanmoins rencontrées, en lien avec une estimation initiale incomplète des zones affectées par la tempête, qui a conduit à prioriser l'estuaire de la Gironde et à retarder l'acquisition des images sur les autres zones de Vendée et de Charente-Maritime.

Les survols aériens par hélicoptère

En région Aquitaine, un premier vol d'identification des zones inondées a été réalisé le 28 février, du nord du département de la Gironde à l'île de Ré, par le Groupement d'intérêt public « Aménagement du territoire et gestion des risques » (GIP ATGeRi).

Des vols par hélicoptère ont ensuite été réalisés sous maîtrise d'ouvrage de la Direction Départementale des Territoires et de la Mer (DDTM) de Gironde sur l'estuaire de la Gironde (linéaire de 370 km), le 6 et le 17 mars, afin d'identifier les zones inondées, le recul du trait de côte et les principaux dégâts, de réaliser un examen des digues et de définir les zones à inspecter par voie terrestre pour approfondir l'expertise.

En région Poitou-Charentes, des vols par hélicoptère ont été réalisés sous maîtrise d'ouvrage de la DDTM de Charente-Maritime les 8 et 16 mars (linéaire 225 km), avec les mêmes objectifs que précédemment.

Dans ces deux derniers cas, une assistance technique a été apportée par le Centre d'études et d'expertise sur les risques, l'environnement, la mobilité et l'aménagement (Cerema), direction territoriale Sud-Ouest (DTer SO, ex-CETE du Sud-Ouest).

En région Pays de la Loire, où existe depuis 2009 un protocole pour la collecte de données de connaissance des inondations, les DDTM concernées et la Direction régionale de l'environnement, de l'aménagement et du logement (Dreal) Pays de la Loire ont décidé de tester ce protocole, axé initialement sur les inondations par débordement de cours d'eau. Dans ce cadre, des vols d'hélicoptères ont été réalisés les 3 et 4 mars sur l'ensemble du littoral de la région (excepté l'île d'Yeu et le nord du département de Loire-Atlantique) sous maîtrise d'ouvrage de la Dreal. Leur premier objectif était d'identifier les zones inondées et les principaux dégâts, notamment ceux subis par les ouvrages de protection.

En-dehors du protocole régional, un vol a été réalisé sur l'estuaire de la Loire par le GIP Loire Estuaire, un autre a été mis en oeuvre par la commune de La Barre-de-Monts (85).

Les photographies aériennes obliques prises lors des survols par hélicoptère ont permis d'identifier rapidement les secteurs prioritaires pour les reconnaissances de terrain ultérieures, les enjeux majeurs touchés, les zones soumises à la submersion et au recul du trait de côte ainsi que les ruptures de digues. ont permis toutefois le lancement d'une campagne aérienne spécifique. Elle a démarré 3 semaines après l'événement (clichés pris entre le 17 mars et le 10 avril). Le cahier des charges demandait l'acquisition d'images numériques, de haute résolution spatiale (20 cm), dans les longueurs d'onde du visible (couleur canaux RVB) et de l'infrarouge proche, avec une échelle de restitution à 1/10000 et un recouvrement des clichés permettant une analyse stéréoscopique. Environ 9 000 clichés ont été pris [START_REF] Meddtl | Photographies aériennes post-Xynthia[END_REF], sur un territoire allant de la baie de Bourgneuf (44) à l'estuaire de la Gironde (33). La recette des clichés a été réalisée par la DTer Normandie-Centre du Cerema, sous maîtrise d'ouvrage de la DGPR. Certaines zones inondées lors de Xynthia n'ont pas été survolées (marais de Guérande, estuaire de la Loire et bassin d'Arcachon notamment).

Les survols aériens par drone

Des survols ponctuels par drones ont été organisés à des fins principalement expérimentales, dans le but d'évaluer leur pertinence et leur efficacité en contexte post-crise. Le pilotage de cette opération a été assuré par la Direction de la recherche et de l'innovation (DRI) du Conseil général du développement durable (CGDD) ; les vols ont été mis en oeuvre en Charente-Maritime par l'École nationale de l'aviation civile (Enac) le 19 mars et en Loire-Atlantique par l'Institut français des sciences et technologies des transports, de l'aménagement et des réseaux (Ifsttar) le 29 mars. Les objectifs des survols étaient multiples : observations des dégâts sur les ouvrages, vérification du comportement des ouvrages de protection à marée haute, évaluation du recul de cordons dunaires, restitution de modèles numériques de terrain (MNT), tests d'analyse stéréoscopique, etc.

Ces expérimentations ont permis de définir les produits et exploitations possibles (notamment la possibilité d'analyse stéréoscopique) mais également de mettre en évidence les limites d'utilisation des drones en contexte post-crise, vis-à-vis notamment des conditions météorologiques et de la qualité des images verticales. Les prises de vue n'ont pas été exploitées de manière opérationnelle par la suite.

Les photographies aériennes verticales

Les photographies aériennes verticales permettent une vision précise de l'ensemble de l'événement à un instant donné. Elles peuvent être utilisées dans les longueurs d'onde du visible en vision simple et stéréoscopique pour étudier : l'emprise des surfaces inondées, la dynamique de la submersion, le mode de défaillance des ouvrages et faire un bilan non exhaustif des dégâts. L'étude de clichés pris dans les longueurs d'onde de l'infrarouge proche permet de détecter les terrains qui ont été inondés dès lors que les clichés sont pris peu de temps après l'événement. La photointerprétation par analyse stéréoscopique peut cependant être longue du fait des multiples objectifs possibles et de la résolution spatiale très fine des clichés. Elle doit donc être privilégiée dans le cas d'étude de certains secteurs prioritaires, des défaillances des systèmes de protection et de la dynamique de submersion ou pour apporter des données sur les secteurs manquant d'autres sources d'informations.

Le principal intérêt de ces données réside dans le caractère factuel fixant l'information à un instant donné. La définition des secteurs survolés doit être concertée afin de couvrir l'ensemble des secteurs inondés. En outre, un survol juste après le retrait des eaux est à privilégier afin que l'ensemble des informations potentiellement repérables soient visibles. Compte-tenu de ces conditions, une campagne de prises de vues aériennes verticales doit faire l'objet d'un pilotage dédié et d'un protocole permettant la mise en oeuvre au moment adéquat du survol aérien. La principale limite de ces clichés réside dans la nécessité de faire réaliser l'interprétation par un photo-interprète connaissant les phénomènes considérés. Ces campagnes étant onéreuses, il convient de les réserver aux événements extrêmes.

Les autres prises de vues aériennes

Les survols à faible altitude par hélicoptère ou tout autre moyen aérien adapté (ULM, petit avion, etc.) permettent d'une part, de réaliser une analyse rapide en cours de vol de l'événement et d'autre part, de prendre des photographies obliques d'ensemble et de détail. Dans ce cadre, l'utilisation de drones pourrait se développer à l'avenir, notamment pour couvrir rapidement des secteurs isolés et inaccessibles.

Les photographies aériennes obliques sont utiles pour identifier l'extension des inondations et les principaux dégâts aux ouvrages de protection. La possibilité d'avoir des vues à différentes échelles, la rapidité de réalisation, le faible coût, sont leurs principaux atouts. En revanche, ce type de mission est difficile à mettre en oeuvre en urgence et nécessite également un pilotage dédié et la définition en amont d'un protocole.

Les reconnaissances de terrain

Les reconnaissances de terrain sont indispensables pour constater et relever précisément les cotes des plus hautes eaux observées. Elles permettent également de relever les traces d'évolution morphologique et d'autres laisses d'inondation qui pourront renseigner sur l'extension de l'inondation et la dynamique des écoulements. Ces reconnaissances de terrain sont à réaliser de manière systématique quelle que soit l'ampleur de l'événement et le plus rapidement possible dès le retrait des eaux. La mise en place d'un protocole de collecte au préalable [START_REF] Cerema | Étude des systèmes de protection contre les submersions marines -Méthodologie et études de cas issues du retour d'expérience Xynthia -Étude du site de Loix (Charente-Maritime)[END_REF] permet un gain de temps, une optimisation des moyens disponibles et une amélioration de la fiabilité des laisses collectées.

Les enquêtes locales

La recherche de témoignages humains est un type de collecte qui peut paraître superflu si on dispose déjà de nombreuses données par ailleurs. Néanmoins, et en tenant compte des limites inhérentes à tout témoignage humain, notamment quand celui-ci rend compte d'éléments vécus en situation de crise, ces enquêtes peuvent permettre de valider et compléter les informations, en particulier celles concernant la dynamique de la submersion.

Conclusion

Le retour d'expérience de la tempête Xynthia montre la nécessité de disposer de données nombreuses et de bonne qualité pour l'analyse de l'événement afin d'en tirer des enseignements pertinents et utiles aux différents volets de la prévention des risques, notamment la préparation à de futures crises. Chaque type de collecte peut être utilisé, d'une part, en fonction de ses avantages et de ses inconvénients et, d'autre part, en fonction de l'ampleur de l'événement. Si les images satellites et les photographies aériennes sont principalement utiles sur les événements de grande ampleur, les collectes par reconnaissance de terrain et les enquêtes locales doivent dans la mesure du possible être menées pour tous les événements de submersion marine.

Afin d'obtenir les informations indispensables à l'analyse, les collectes doivent être organisées et préparées. Chaque type de collecte doit faire l'objet d'une coordination des différents levés afin d'optimiser les moyens mis à disposition, le temps (au moment de la prise de décision et lors de la réalisation des collectes) et les informations recueillies. Ce retour d'expérience montre donc l'importance d'un processus décisionnel d'intervention préalablement défini et partagé, d'une définition précise des livrables attendus et de réflexions préalables sur les méthodes et l'organisation des collectes. L'élaboration de protocoles de collectes de données, tels que celui présentant les reconnaissances de terrain après une inondation [START_REF] Cerema | Étude des systèmes de protection contre les submersions marines -Méthodologie et études de cas issues du retour d'expérience Xynthia -Étude du site de Loix (Charente-Maritime)[END_REF], trouvent dans ce cadre toute leur justification.

Malgré les conditions de vol parfois difficiles (turbulences) et une autonomie limitée à 1h30 environ, les survols par hélicoptères du linéaire côtier à haute et basse altitude ou en station audessus de points particuliers, ont permis un recensement et une analyse rapides, qualitatifs et visuels des dégâts, malgré quelques difficultés pour localiser les observations. Ces survols ont été exploités par la suite dans le cadre des reconnaissances de terrain ou des études, notamment pour mieux cerner l'extension des zones inondées.

2.5. Les reconnaissances de terrainPlusieurs campagnes de levés de laisses d'inondation ont été menées.Sur plusieurs secteurs du littoral, entre l'estuaire de la Loire et le bassin d'Arcachon, le Bureau de recherches géologiques et minières (BRGM) et l'Office national des forêts (ONF) ont mené du 8 au 12 mars une mission de terrain. Ont été relevés ponctuellement des évolutions morphologiques, des niveaux et limites d'inondation ainsi que des dégâts.En région Pays de la Loire, des laisses d'inondation ont été relevées par les DDTM 85 et 44, avec un appui du Cerema DTer Ouest en Vendée, dans le cadre de la mise en oeuvre du protocole régional. Il s'agissait en Vendée de cotes de plus hautes eaux (PHE), qui ont été collectées dans un délai maximum de 8 jours après l'inondation, sur 3 secteurs de la pointe de l'Aiguillon fortement impactés par la submersion.La communauté de communes de Noirmoutier a également recueilli des informations sur les niveaux d'eau atteints dans l'île, sur les surfaces inondées et les points d'entrée de l'eau.

Les collectes d'information suite aux submersions marinesSur la base de ces enseignements, les données les plus pertinentes à collecter afin de décrire a posteriori de manière satisfaisante les submersions marines peuvent être définies.4.1. Les images satellitesLa télédétection sur des images satellitaires permet, de manière rapide et automatisée, de déterminer le contour des zones inondées à un instant donné. Ces images sont notamment utiles pour les événements de grande ampleur, les satellites couvrant une surface importante du globe terrestre. Repassant pour certains plusieurs fois à l'aplomb du même point de la surface terrestre, les satellites peuvent permettre une analyse diachronique des images, et ainsi le suivi temporel de l'évolution des submersions et du retrait des eaux.La principale limite à l'utilisation des données satellitaires réside dans la couverture de la zone considérée. Il est rare en effet que les satellites se trouvent à l'aplomb exact de la zone affectée au moment de l'ampleur maximale de l'événement (même si il est possible d'agir sur la trajectoire de certains satellites) et que les conditions météorologiques soient optimales. Il est à noter enfin que l'utilisation des images satellitaires pour des études de détail est encore aujourd'hui limitée par leur échelle inadaptée ; les progrès en cours et à venir sur les capteurs embarqués conduiront probablement à modifier cet état de fait.

En Gironde et en Charente-Maritime, des relevés ponctuels de PHE ont été réalisés respectivement par les DDTM 33 et 17.

Les enquêtes locales

Ces enquêtes, menées auprès de collectivités et de riverains rencontrés lors des reconnaissances de terrain, avaient pour objectifs de préciser, les caractéristiques hydrauliques de l'événement Xynthia, notamment l'ampleur et la dynamique de la submersion : niveaux d'eau atteints, points d'entrée de la submersion, etc. Elles ont été réalisées en Pays de la Loire et en Charente-Maritime (respectivement sous maîtrise d'ouvrage Dreal et DDTM) au cours de l'année 2010 plusieurs mois après l'événement.

L'analyse des submersions marines provoquées par Xynthia

Suite à ces collectes, plusieurs études ont été menées en parallèle afin de répondre à certains objectifs spécifiques (extension des submersions, défaillances des systèmes de protection, etc.). Les principales analyses des submersions ont été réalisées lors de la photo-interprétation des images aériennes verticales et des retours d'expériences régionaux.

L'analyse des photographies aériennes verticales

Après l'étude de faisabilité technique et financière, conduite en 2012 par le Cerema (DTer Ouest, Sud-Ouest, Méditerranée, Centre-Est, Normandie-Centre sous pilotage de la direction technique eau, mer et fleuves), il a été décidé de réaliser une analyse stéréoscopique numérique des clichés verticaux et de produire une orthophotographie, destinée à servir, d'une part, de support pour le report des informations issues de l'analyse stéréoscopique numérique et, d'autre part, de fond de plan récent pour d'autres études. L'étude de faisabilité a permis également de définir les différents indices à rechercher sur les clichés : évolutions morphologiques, traces d'érosion, identification de zones toujours en eaux, de zones ressuyées, dégâts sur les ouvrages, etc.

Bien que les clichés aient été pris 3 semaines après l'événement, les tests ont montré que ces indices pouvaient être repérés, y compris pour l'extension des submersions. En effet même si la zone soumise à l'inondation ne peut être précisément définie à partir de cette seule source, les nombreuses traces du passage de l'eau permettent d'en donner un contour approché. Ces tests ont également permis de définir la méthode d'analyse et ont montré la longueur de l'exercice sur des zones aussi vastes que celles touchées par Xynthia. Il a donc été décidé d'analyser uniquement certains secteurs (côtes charentaises, marais du Blayais, baie de l'Aiguillon notamment). Ces études spécifiques visent plusieurs objectifs : analyse des systèmes de protection [START_REF] Cerema | Étude des systèmes de protection contre les submersions marines -Méthodologie et études de cas issues du retour d'expérience Xynthia -Étude du site de Loix (Charente-Maritime)[END_REF], analyse de la dynamique de submersion dans les marais rétro-littoraux (CETE du Sud-Ouest, 2013), estimation du recul du trait de côte.


Eric Goncalvès
email: eric.goncalves@ensma.fr

Dia Zeidan
email: dia.zeidan@gju.edu.jo

Numerical Simulation of Unsteady Cavitation in Liquid Hydrogen Flows

Keywords: Two-phase flow, heat and mass transfer, liquid and hydrogen, cavitation, homogeneous model, splitting techniques, inviscid simulation. Reference

An unsteady cavitation model in liquid hydrogen flow is studied in the context of compressible, two-phase, one-fluid inviscid solver. This is accomplished by applying three conservation laws for mixture mass, mixture momentum and total energy along with gas volume fraction transport equation, with thermodynamic effects. Various mass transfers between phases are utilized to study the process under consideration. A numerical procedure is presented for the simulation of cavitation due to rarefaction and shock waves. Attention is focused on cavitation in which the simulated fluid is liquid hydrogen in cryogenic conditions. Numerical results are in close agreement with theoretical solutions for several test cases. The current numerical results show that liquid hydrogen flow can be accurately modeled using an accurate inviscid approach to describe the features of thermodynamic effects on cavitation.

Introduction

Thermodynamics of thermosensitive fluids is an essential phenomenon of cavitation dynamics arising in cryogenic fluids. These fluids are typically characterized by variations in fluid properties such as the temperature, with special intense to vapour pressure. In cryogenic fluids, however, the density ratio of liquid-vapour is lower than the density of typical fluids such as cold water which leads to vaporization of liquid mass to sustain a cavity. The evaporative cooling effects are more evident where the temperature of the liquid phase near the liquidvapour interface is depressed below the free-stream temperature. Although the temperature depression is negligible in cold water, it remains a continuing interest in cavitation. Indeed, for cavitation, the local cooling effects delay such phenomenon and decrease the fluid local vapour pressure that leads to a lower cavity pressure. Consequently, this implies that it is useful for cryogenic pumps to establish a relatively improved performance. Earlier research on thermal effects was generally focused on achieving correlations for temperature depression as a function of flow conditions and liquid properties. This has included the B-factor theory that characterize the sensitivity of fluids to thermodynamic effects [START_REF] Stahl | Thermodynamic aspects of cavitation in centrifugal pumps[END_REF][START_REF] Moore | Prediction of thermodynamic effects on developed cavitation based on liquid hydrogen and freon 114 data in scaled venturis[END_REF]. In [START_REF] Hsiao | Prediction of vortex cavitation inception using coupled spherical and non-spherical models and unrans computations[END_REF], [START_REF] Hsiao | Effect of gas diffusion on bubble entrainment and dynamics around a propeller[END_REF], the authors used the Rayleigh-Plesset equation to investigate such thermodynamics. In this model, the governing equations are composed by three balance equations for the mixture quantities coupled with a macroscopic model for the bubble dynamics based on the Rayleigh-Plesset equation. This model is capable of handling either single bubbles or clouds of bubbles that grow and decrease through a pressure field [START_REF] Fujikawa | Nonequilibrium vapour condensation on a shock-tube endwall behind a reflected shock wave[END_REF][START_REF] Rodio | Influence of convective heat transfer modeling on the estimation of thermal effects in cryogenic cavitating flows[END_REF]). In the case where heat transfer is negligible, the phase change is driven by inertia effects. Yet, when thermal effects are involved, the liquid inertia become rapidly negligible and the evolution is controlled by the heat flux provided by the liquid at the bubble surface [START_REF] Florschuetz | On the mechanics of vapor bubble collapse[END_REF][START_REF] Prosperetti | Vapour-bubble growth in a superheated liquid[END_REF]. The widely used modeling approach in cavitation is based on averaged two-phase flow models of the one-fluid formulation. However, there are different approaches within these models according to the assumptions made on the local thermodynamic equilibrium along with the slip conditions between phases. In general, the seven-equation models are regarded as the most complete models due to their non-equilibrium process between phases [START_REF] Ambroso | A godunov-type method for the seven-equation model of compressible two-phase flow[END_REF][START_REF] Baer | A two-phase mixture theory for the deflagration-to-detonation transition (DDT) in reactive granular materials[END_REF][START_REF] Chalons | Large time-step numerical scheme for the seven-equation model of compressible two-phase flows[END_REF]). Further, these models have been investigated and applied to metastable states and evaporation front dynamics [START_REF] Saurel | A multiphase model for compressible flows with interfaces, shocks, detonation waves and cavitation[END_REF][START_REF] Ishimoto | Numerical study of cavitating flow characteristics of liquid helium in a pipe[END_REF]. Another set of similar models, the five-equation model, is also derived on the basis velocity and pressure equilibrium [START_REF] Allaire | A fiveequation model for the simulation of interfaces between compressible fluids[END_REF][START_REF] Kapila | Two-phase modeling of deflagration-todetonation transition in granular materials: reduced equations[END_REF][START_REF] Kreeft | A new formulation of Kapila's five-equation model for compressible two-fluid flow, and its numerical treatment[END_REF]. This also can be expressed as a four-equation model by assuming thermal equilibrium between phases. With such formulation, the authors in [START_REF] Utturkar | Recent progress in modelling of cryogenic cavitation for liquid rocket propulsion[END_REF][START_REF] Tseng | Modeling for isothermal and cryogenic cavitation[END_REF][START_REF] Huang | Numerical investigation of cavitating flow in liquid hydrogen[END_REF]) adapted a set of models to simulate turbulent cavitating flows in cold water within cryogenic applications. These models, however, utilizes three conservation laws for mixture quantities (mass, momentum, energy) along with a mass equation for the vapour or liquid density including a cavitation source [START_REF] Utturkar | Recent progress in modelling of cryogenic cavitation for liquid rocket propulsion[END_REF]). Yet, this family of models is not thermodynamically well-posed and does not account for the main thermodynamic constraints features [START_REF] Goncalves | Constraints on equation of state for cavitating flows with thermodynamic effects[END_REF][START_REF] Zeidan | Numerical study of wave propagation in compressible two?phase flow[END_REF]). The authors in [START_REF] Downar-Zapolski | The non-equilibrium relaxation model for one-dimensional flashing liquid flow[END_REF][START_REF] Schmidt | Multidimensional simulation of thermal non-equilibrium channel flow[END_REF]) have applied the Homogeneous Relaxation Model to boiling flow processes taking into account the mass fraction equation with a relaxation term which is estimated from experimental data. The objective of this paper is to investigate cavitating flows in liquid hydrogen within cryogenic conditions. This is based on a transport-equation for the void fraction in which the mass transfer between phases appear explicitly and closed by assuming its proportionality with the velocity divergence. The vapour pressure is assumed to vary linearly with the temperature though the parameter dP vap /dT . Validations have shown the ability of such models to correctly simulate cavitation pockets in both water and freon R-114 [START_REF] Goncalves | Numerical study of expansion tube problems: Toward the simulation of cavitation[END_REF][START_REF] Goncalves | Modelling for isothermal cavitation with a four-equation model[END_REF][START_REF] Goncalves | Modeling for non isothermal cavitation using 4-equation model[END_REF][START_REF] Charriere | A comparative study of cavitation models in a venturi flow[END_REF][START_REF] Goncalves | 13) numerical study of cavitation in liquid hydrogen flow[END_REF]. In order to investigate thermal effects in LH 2 cryogenic cavitating flows, one-dimensional cavitation tube problems are proposed. Such rarefaction tube problems involving cavitation are one of the most used case to study the behaviour of phase transition models and to test and develop numerical schemes [START_REF] Saurel | A multiphase model for compressible flows with interfaces, shocks, detonation waves and cavitation[END_REF][START_REF] Barberon | Finite volume simulation of cavitating flows[END_REF][START_REF] Saurel | Modelling phase transition in metastable liquids: application to cavitating and flashing flows[END_REF][START_REF] Zein | Modeling phase transition for compressible two-phase flows applied to metastable liquids[END_REF][START_REF] Causon | Finite volume simulation of unsteady shock-cavitation in compressible water[END_REF][START_REF] Spina | A compressible single-temperature conservative two-phase model with phase transitions[END_REF][START_REF] Pelanti | A mixture-energy-consistent six-equation two-phase numerical model for fluids with interfaces, cavitation and evaporation waves[END_REF]. This paper is organized as follows. In Section 2, we present the governing equations, the mass transfer closure relations and the mixture equation of states. Section 3 describes the finite volume scheme adopted and the integration of the source term. The numerical results and the influence of parameters are presented in Section 4.

Equations and models

The homogeneous mixture approach is used to model the two phase flows of interest in the current paper. Further, the two phases are assumed to be sufficiently well mixed with very small particles of the dispersed phase and the two phase move at equal velocities and share the same pressure P . Although the temperature-equalizing time is larger than the pressure and velocity relaxation times, as noted in [START_REF] Kapila | Two-phase modeling of deflagration-todetonation transition in granular materials: reduced equations[END_REF], it is possible to consider a single-temperature model as an approximate model of flow if the difference of phase temperatures is not too big.

A four-equation single-temperature model

The model consists in three conservation laws for mixture quantities and an additional equation for the void ratio [START_REF] Goncalves | Numerical study of expansion tube problems: Toward the simulation of cavitation[END_REF]. We present below the inviscid one-dimensional equations, expressed with the vector of variables w = (ρ, ρu, ρE, α):

∂ρ ∂t + ∂ρu ∂x = 0, (1)
∂(ρu) ∂t + ∂(ρu 2 + P ) ∂x = 0, (2)
∂(ρE) ∂t + ∂(ρuH) ∂x = 0, ( 3
)
∂α ∂t + u ∂α ∂x = K ∂u ∂x + ṁ ρ I , ( 4
) K = ρ l c 2 l -ρ v c 2 v ρ l c 2 l 1-α + ρvc 2 v α and 1 ρ I = c 2 v α + c 2 l 1-α ρ l c 2 l 1-α + ρvc 2 v α . (5)
In the above, E = e + u 2 /2 and H = h + u 2 /2 denote the mixture total energy and the mixture total enthalpy, respectively. ρ I is the interfacial density, ṁ is the mass transfer between phases and c k the speed of sound of the phase k.

Pure phase EOS

The liquid density ρ l is assumed to be in its equilibrium state at the reference temperature: ρ l = ρ sat l (T ref ). In addition to that, the vapour density ρ v follows the stiffened gas EOS and varies with the temperature. The convex stiffened gas EOS relations are (see [START_REF] Metayer | Elaborating equations of state of a liquid and its vapor for two-phase flow models[END_REF])):

P (ρ, e) = (γ -1)ρ(e -q) -γP ∞ , (6) P (ρ, T ) = ρ(γ -1)C v T -P ∞ , (7) T (ρ, h) = h -q C p , ( 8
)
where γ = C p /C v is the heat capacity ratio, C p and C v are thermal capacities, q the energy of formation and P ∞ is the constant reference pressure. The speed of sound c is given by:

c 2 = γ P + P ∞ ρ = (γ -1)C p T (9)

Closure relation for the mass transfer

Assuming the mass transfer is proportional to the divergence of the velocity, it is possible to develop a family of models [START_REF] Goncalves | Numerical study of expansion tube problems: Toward the simulation of cavitation[END_REF][START_REF] Goncalves | Modelling for isothermal cavitation with a four-equation model[END_REF]) in which the mass transfer is expressed as:

ṁ = ρ l ρ v ρ l -ρ v ( 1 - c 2 c 2 wallis ) ∂u ∂x . ( 10
)
Here c wallis is the propagation velocity of acoustic waves without mass transfer [START_REF] Wallis | One-dimensional two-phase flow[END_REF]. This speed of sound is expressed as a weighted harmonic mean of speeds of sound of each phase:

1 ρc 2 wallis = α ρ v c 2 v + 1 -α ρ l c 2 l . (11)

Mixture EOS

To close the system and to compute the mixture pressure and the mixture temperature, an equation of state for the mixture is necessary. In the present study, two formulations are compared: a mixture of stiffened gas and a sinus law.

A mixture of stiffened gas EOS

Assuming pressure equilibrium between phases, an expression for the pressure can be obtained as a function of the void ratio α and the vapour mass fraction Y :

P (ρ, e, α, Y ) = (γ(α) -1)ρ(e -q(Y )) -γ(α)P ∞ (α), (12) 1 γ(α) -1 = α γ v -1 + 1 -α γ l -1 , ( 13
)
q(Y ) = Y q v + (1 -Y )q l , ( 14
) P ∞ (α) = γ(α) -1 γ(α) [ α γ v γ v -1 P v ∞ + (1 -α) γ l γ l -1 P l ∞ ] , ( 15
) Y = αρ v ρ . ( 16
)
Further, assuming thermal equilibrium between phases, the mixture temperature is expressed as:

T (ρ, h, Y ) = h l -q l C p l = h v -q v C pv = h -q(Y ) C p (Y ) , ( 17
)
where

C p (Y ) = Y C pv + (1 -Y )C p l . ( 18
)
The speed of sound within the mixture can be represented as a function of the enthalpy of each phase [START_REF] Goncalves | Numerical simulation of cavitating flows with homogeneous models[END_REF]:

ρc 2 = (γ -1) [ ρ v ρ l (ρ l -ρ v ) (h v -h l ) ] , ( 19
)
where the enthalpies of pure phase h l and h v are computed with the mixture temperature T .

A modified sinusoidal EOS

A sinusoidal relation can be considered for the current mixture flows (Goncalves & Patella 2010). When the pressure is smaller than P vap (T ) + ∆P , the following relationship applies:

P (α, T ) = P vap (T ) + ( ρ sat l -ρ sat v 2 ) c 2 sinus sin -1 (1 -2α). ( 20
)
This EOS introduces a small non-equilibrium effect on the pressure quantified by the quantity ∆P . For a void ratio value of 0.5, the pressure is equal to the saturation pressure P vap (T ) at the local temperature T . This temperature is evaluated using the relation ( 17).

The saturation values ρ sat l and ρ sat v are evaluated at the reference temperature T ref . The quantity c sinus , which has the dimension of a velocity, is a parameter of the model. The pressure continuity between the liquid and the mixture is given by:

π 2 ρ sat l -ρ sat v 2 c 2 sinus = ρ sat l (γ l -1)C v l T ref -P l ∞ -P vap (T ref ), (21)
which determines c sinus for given values of saturation conditions. It is worth note that the vaporization pressure varies linearly with the temperature by

P vap (T ) = P vap (T ref ) + dP vap dT (T -T ref ), ( 22
)
where the constant quantity dP vap /dT is evaluated using a thermodynamic table. When dP vap /dT = 0, one find the isothermal model. Furthermore, the speed of sound in the mixture can be written as (Goncalves & Patella 2010):

c 2 = ρvρ l ρ(ρ l -ρv) (h v -h l ) dPvap dT + ρC p (Y )c 2 T ρC p (Y ) - dPvap dT , ( 23
)
c 2 T = ( ∂P ∂ρ ) s = ( ∂P ∂ρ ) T = c 2 sinus 2 √ α(1 -α) , ( 24
)
where c T is the isothermal speed of sound.

Hyperbolicity

Without mass transfer, the four equations form a system of conservation laws having a hyperbolic nature. The eigenvalues of the system are:

λ 1 = u -c wallis , λ 2,3 = u and λ 4 = u + c wallis .
However, when heat and mass transfer occur, the system is still hyperbolic with the following eigenvalues:

λ 1 = u -c, λ 2,3 = u and λ 4 = u + c,
where c is the mixture speed of sound which depends on the EOS formulation.

Numerics

The conservation laws governing both models is written as

∂w ∂t + ∂F (w) ∂x = S(w), ( 25
)
where w is the vector of variables, F the convective flux and S the source term. We focus herein on finite volume schemes. Regular meshes are considered, whose size ∆x is such that: ∆x = x i+1/2 -x i-1/2 with the usual time step ∆t, where ∆t = t n+1 -t n . Also, we let w n i be the approximate value of w(x, t n ) in the cell centered on x i . A discrete form of the system can be written as:

∆x w n+1 i -w n i ∆t + F n i+1/2 -F n i-1/2 = S n i ∆x, ( 26
)
where F i+1/2 is the numerical flux through the cell interface

x i+1/2 × [t n , t n+1 ].
The time step should comply with CFL (Courant-Freidrichs-Lewy) condition in order to guarantee some stability requirement. Finally, the numerical flux through the cell interface is computed with both the first-order Rusanov scheme [START_REF] Rusanov | Calculation of interaction of non-steady shock waves with obstacles[END_REF]) and the second-order Jameson-Schmidt-Turkel scheme [START_REF] Jameson | Numerical solution of the Euler equations by finite volume methods using Runge-Kutta time stepping schemes[END_REF].

Treatment of the source term

The numerical simulations of the initial-boundary value problems are accomplished using splitting approach. One starts in solving the source-free homogeneous part of the whole system:

∂w ∂t + ∂F (w) ∂x = 0. ( 27
)
This is followed by solving the system of ordinary differential equations describing the mass transfer between phases to obtain the complete solution:

dw dt = S(w, ∇w). ( 28
)

Inlet and outlet boundary conditions

The numerical treatment of the boundary conditions is based on the use of the characteristic relations of Euler equations. The number of variables to impose at boundaries is given by the number of positive characteristics. The characteristic relations obtained for the 4-equation system are [START_REF] Goncalves | Numerical study of expansion tube problems: Toward the simulation of cavitation[END_REF]:

-c 2 (ρ c -ρ s ) + (P c -P s ) = 0, ( 29
) (P c -P s ) + ρc(V c -V s ) = 0, ( 30
) (P c -P s ) -ρc(V c -V s ) = 0, (31) ρ(α c -α s ) -K(ρ c -ρ s ) = 0. ( 32
)
The variables with superscript c denote the variables to be computed at the boundary. Variables with superscript s denote the variables obtained by the current numerical scheme.

At inflow, we impose the initial values of the void ratio, densities of pure phases and the velocity. The pressure is evaluated with the relation ( 31) and all variables can be evaluated at the boundary. At outflow, the static pressure is imposed. The variables are computed with three characteristic relations (29), ( 30) and (32).

Simulation of double rarefaction cases

These cases are similar to those proposed in [START_REF] Saurel | Modelling phase transition in metastable liquids: application to cavitating and flashing flows[END_REF]) with hot water. It consists in a one meter long tube filled with a liquid and a weak volume fraction of vapour α =0.01 is added. An initial discontinuity of velocity u 0 is set at 0.5 m, the left velocity is -u 0 and the right velocity is u 0 . The stretch of the liquid leads to the creation of a cavitation area in the middle of the tube (see Figure 1). Without mass transfer, the solution involves two expansion waves. As gas is present, the pressure cannot become negative. To maintain positive pressure, the gas volume fraction increases due to the gas mechanical expansion and creates a pocket. Liquid water is expanded until the saturation pressure is reached then evaporation appears and quite small amount of vapour is created.

The solution with phase transition is composed of four expansion waves. The extra two expansion waves correspond to the evaporation fronts (see Figure 2). The evaporation creates a cooling effect and a temperature depression is observed inside the cavity. According to the initial velocity u 0 , the cooling effect can be strong.

A simple heat balance between the two phases can estimate the scale of temperature difference ∆T * caused by thermal effects.

∆T * = ρ v L vap ρ l C p l , ( 33
)
where L vap is the latent heat.

The B-factor is estimated as the ratio between the actual temperature drop and ∆T * . By assuming that the whole liquid contributes to the heat necessary for the vapor, we obtain [START_REF] Franc | Fundamentals of cavitation[END_REF]):

B = ∆T ∆T * ≃ α 1 -α . ( 34
)
However, the hypothesis that the whole liquid is contributing to the vaporization process is a very strong one.

Initial velocity u 0 =10 m/s

A double rarefaction case is proposed for which the running fluid is liquid hydrogen in cryogenic conditions. Liquid hydrogen is initially at the pressure 2 bar and at the reference temperature T ref = 22.1 K. A weak volume fraction of vapour α = 0.01 is initially added to the liquid. The initial discontinuity velocity is u 0 = 10 m/s. The vapour pressure at the reference temperature is P vap (T ref ) = 1.63 bar. Parameters of the stiffened gas are given in Table 1. The quantity c sinus is set to 3.15 m/s following equation ( 21). The quantity dP vap /dT is determined using the NIST thermodynamic table (NIST n.d.). Figure 3 presents the linear approximation of the vapour pressure on the temperature interval [19, 24] K. The value of dP vap /dT is set to 38980 Pa/K. For all simulations, the mesh contains 5000 cells and the time step is set to 10 -7 s. Computations are performed using the first-order Rusanov scheme. The pressure, the void fraction, the temperature and the velocity are plotted in Figure 4, at time t=0.8 ms, for both 4-equation models. The four expansion waves are clearly illustrated (two fast expansion waves and two slow evaporation fronts). The pressure drop under the initial value of the vapour pressure is around 0.2 bar. It is more pronounced using the 4-equation SG model and due to a larger cooling effect. The creation of void ratio is weak (around 20 %) and a little more void ratio is produced by the 4-equation sinus model. For the velocity profile, results obtained with both models are similar. The vapour density ρ v , the mass fraction of vapour Y , the B-factor and the speed of sound are plotted in Figure 5, at time t=0.8 ms, for both 4-equation models. The mixture speed of sound of the sinus EOS is largely smaller than the SG relation, that can explain the greater quantity of vapour created by the sinus model, as observed for the mass fraction profile. Indeed, the mass transfer is linked to the quantity 1 -c 2 /c 2 wallis following equation ( 10). The B-factor is computed as the ratio between the actual temperature drop and the characteristic temperature drop ∆T * , following equation ( 34). Saturation values at the reference temperature T ref are used. For the 4-equation sinus, the maximal value is 0.375 to be compared with the ideal value given by the ratio α/(1 -α) = 0.31 evaluated with the maximal value of the void ratio (21 % of error). For the 4-equation SG model, the maximal value is 0.49 to be compared with 0.22 (120 % of error). Comparatively, the 4-equation sinus solution is in better agreement with the ideal value.

The vapour density evolution is linked to the pressure and temperature profiles (it follows the stiffened gas EOS). As observed for T and P , the 4-equation SG model provides a lower value in comparison with the 4-equation sinus model. Finally, the effect of the numerical scheme is shown in Figure 6 where are plotted the pressure, the void ratio, the temperature and the velocity at time t=0.8 ms. For all variables, numerical solutions obtained with both schemes are similar. A small difference can be observed on the expansion fronts, which are stiffer using the 2ndorder Jameson scheme. In the following, only simulations performed with the Rusanov scheme will be presented.

Initial velocity u 0 =100 m/s

The same conditions are used except regarding the discontinuity velocity which is set to u 0 =100 m/s. Such high velocities are representative of flows occurring in turbopumps of rocket propulsion systems (see for example (Goncalves et al. 2010)). In this case, evaporation is much more intense resulting in a large cavitation pocket.

The estimation of the slope dP vap /dT leads to difficulties due to the large temperature drop. A linear approximation on the temperature interval [14,22] K is presented in Figure 7. The value of dP vap /dT is around 24500 Pa/K. A parabolic approximation will be clearly better, but the model properties, especially the mixture speed of sound formulation, are more difficult to study. Secondly, using the linear approximation, we observe than the vapour pressure becomes negative if the temperature is smaller than 15 K. This situation occurs with the initial discontinuity velocity u 0 =100 m/s. The pressure and the temperature are plotted in Figure 8, at time t=0.8 ms, using the 4-equation sinus model with dP vap /dT = 24500 Pa/K. The cooling effect is important and the mixture temperature decreases to 14.9 K. Negative values of the pressure appear in the middle of the tube. A similar result is obtained using the 4-equation SG model. As a remedy, a smaller value is considered: P vap /dT = 20000 Pa/K. The pressure, the void fraction, the temperature and the vapour density are plotted in Figure 9, at time t=0.8 ms, for both 4-equation models.

Using the 4-equation SG model, negative values for the pressure and the vapour density are obtained. The temperature decreases up to 13.5 K that is lower than the triple point (13.8 K). On the other hand, using the 4-equation sinus model, the pressure and the vapour density remain positive. The temperature decreases to 14.3 K. The pressure drop under the initial value of the vapour pressure is very strong, it reaches 1.5 bar. A large cavitation area is created for which the maximal value of the void ratio is 84 %.

Figure 12 presents the B-factor and the mixture speed of sound evolutions in the tube, at time t=0.8 ms, computed with the 4-equation sinus model and with dP vap /dT = 20000 Pa/K. The maximal value of the B-factor is 5.5 to be compared with the ideal value estimated with the maximal void ratio (84 %) that is 5.25 (5% of error). The numerical simulation is in close agreement with the theoretical value. The large variations of the speed of sound are well illustrated: around 460 m/s in the initial condition, 12 m/s behind the expansion waves and 146 m/s in the cavitation area. This non monotonous behaviour makes the numerical integration stiff.

Another strategy for the estimation of dP vap /dT consists in splitting the linear approximation on two intervals, as plotted in Figure 10. The temperature at the intersection between the two lines is 18.15 K. Values of dP vap /dT are 9930 Pa/K and 27260 Pa/K, respectively. The pressure, the void fraction, the temperature and the vapour density are plotted in Figure 11, at time t=0.8 ms, for both 4-equation models. Using the 4-equation SG model, as previously negative values are obtained for the pressure and vapour density. For both models, an irregularity is observed on profiles due to the change of slope dP vap /dT around 18 K. For the 4-equation sinus model, the temperature drop reaches 13.7 K, which is under the triple point value.

Shock-cavitation interaction, u 0 =100 m/s

This case is similar to the previous one, except that the two ends of the tube are simultaneously closed once the flow starts. Therefore, a shock created at each end moves towards the center, resulting in shock-cavitation interaction and cavitation collapse. A uniform mesh of 5000 cells is used and the time step is set to 10 -8 s. Simulations are performed using the 4-equation sinus model with dP vap /dT = 20000 Pa/K. The pressure, the void ratio, the temperature and the vapour density are plotted at different times in Figure 13 (with a logarithmic scale for the pressure and the vapour density). The cavitation pocket grows up to time t = 0.6 ms. After this time, the shocks created at the ends meet the rarefaction waves generated at the center, and then interacts with the expanding cavitation interface.

The cavitation collapse begins. The reduction of the cavitation area is clearly observed on the void ratio profile after time t=0.6 ms. From time 0.6 ms to 1.1 ms, the cavitation pocket narrows but the maximal void ratio remains around 80 %. At time t = 1.2 ms, the decrease of the void ratio is abrupt and the value in the middle of the tube is around 5 %.

The shock propagation through the rarefaction region is well illustrated on the pressure, the temperature and the vapour density profiles, up to time t = 0.6 ms. Then shocks interacts with the expanding cavitation interface, resulting in a discontinuity forms at the interface. The cavitation collapse generates two shocks which propagate outwards. For the initial shocks, the maximum pressure is around 54 bar, whereas the maximal pressure for the two shocks created during the cavitation collapse is around 28 bar. At time t = 1.2 ms when the void ratio decreases abruptly, we observe a large increase of the vapour density up to 28 kg/m 3 and a warming effect about 6 K in comparison with the reference temperature. At time t =1.3 ms (not presented), the temperature reaches 30 K. The magnitude of both phenomena, the cooling effect due to the evaporation and the warming effect due to the collapse, is quite similar.

Conclusion

The thermal effects in 1D cryogenic cavitating flows were studied. Two EOS were tested associated with a mass transfer closure based on the ratio between the mixture speed of sound and the Wallis speed of sound. Simulations were performed on inviscid rarefaction problems leading to a phase transition, for which the working fluid is liquid hydrogen at the temperature 22.1 K. Different initial velocities were considered and especially a high-speed case was investigated, corresponding to a realistic velocity in turbopump applications. Moreover, a shock-cavitation case was simulated leading to the collapse of the cavitation area. These cases lead to different concluding remark:

• As regard to the EOS comparison, the sinus model generated more vapour and a lower temperature depression than the SG model. For the high-speed case, the pressure and vapour density obtained with the SG model were negative, that constitutes a clear drawback.

• Problems appeared with the calibration of the parameter dP vap /dT for the high-speed case because of the prediction of negative pressure. A piecewise approximation was tested and led to a temperature decrease lower than the triple point value. For this situation, a specific thermodynamic model have to be developped. Using a constant value dP vap /dT = 20000 Pa/K, the simulated temperature drop was around 8K and the result was in good agreement with the B-factor theory.

• For the shock-cavitation case, a warming effect was highlighted during the collapse for which the magnitude was quite similar to the cooling effect during the evaporation process.

Ongoing works are to pursue comparative analysis and to develop two-temperature models. A detailed thermal analysis under a range of physical conditions is planned in later phases of work to be reported in future publications.

Figure 1 Figure 2 Figure 3 Figure 4 Figure 5 Figure 6 Figure 7 Figure 8 Figure 9 Figure 10 Figure 11 Figure 12 Figure 13

 12345678910111213 Figure 1 The double rarefaction tube

Table 1

 1 Parameters of the stiffened gas EOS for LH2 at T = 22.1K

		γ	P ∞ (Pa) q (J/kg)	C p (J/K.kg) ρ sat (kg/m 3 )
	liquid	2.8	2. 10 5	-2.21 10 5 10875	68.78
	vapour 1.38 0	1.66 10 5	13090	2.50

Acknowledgments


---/ tmp / chart_4_Nopol / source / org / jfree / chart / plot / XYPlot . java +++ / tmp / chart_4_Nopol / source / org / jfree / chart / plot / XYPlot . java @@ -1606 ,3 +1606 ,5 @@ public void setRenderer ( X YItemR endere r renderer ) { -setRenderer (0 , renderer ) ; + if ( renderer != null ) { + setRenderer (0 , renderer ) ; + } } Listing 2: "The generated patch for the bug Chart 4" Number of tests that execute the patch: 18 Execution time: 7 minutes, 32 seconds

Chart 5

---/ tmp / chart_5_Nopol / source / org / jfree / data / xy / XYSeries . java +++ / tmp / chart_5_Nopol / source / org / jfree / data / xy / XYSeries . java @@ -562 ,3 +562 ,3 @@ // append the value to the list ... -if ( this . autoSort ) { + if ( overwritten != null ) { this . data . add ( -index -1 , new XYDataItem (x , y ) ) ;

Listing 3: "The generated patch for the bug Chart 5" Number of tests that execute the patch: 6 Execution time: 38 seconds

Chart 9

---/ tmp / chart_9_Nopol / source / org / jfree / data / time / TimeSeries . java +++ / tmp / chart_9_Nopol / source / org / jfree / data / time / TimeSeries . java @@ -882 ,3 +882 ,5 @@ if ( end < start ) { -throw new I l l e g a l A r g u m e n t E x c e p t i o n (" Requires start <= end .") ; + if ( org . jfree . data . time . TimeSeries . this . data . size () == org . jfree . data . time . TimeSeries . this . range . length () ) { + throw new I l l e g a l A r g u m e n t E x c e p t i o n (" Requires start <= end .") ; + } } Listing 4: "The generated patch for the bug Chart 9" Number of tests that execute the patch: 4 Execution time: 34 seconds

Chart 13

---/ tmp / chart_ 13_Nop ol / source / org / jfree / chart / block / B o r d e r A r r a n g e m e n t . java +++ / tmp / char t_13_N opol / source / org / jfree / chart / block / B o r d e r A r r a n g e m e n t . java @@ -452 ,9 +452 ,11 @@ h

[3] = h [2]; - if ( this . rightBlock != null ) { - R e c

Closure 18

---/ tmp / c l o s u r e _ 1 8 _ N o p o l / src / com / google / javascript / rhino / Node . java +++ / tmp / c l o s u r e _ 1 8 _ N o p o l / src / com / google / javascript / rhino / Node . java @@ -1429 ,7 +1429 ,9 @@ if ( diff != null ) { -return " Node tree inequality :" + -"\ nTree1 :\ n " + toStringTree () + -"\ n \ nTree2 :\ n " + node2 . toStringTree () + -"\ n \ nSubtree1 : " + diff . nodeA . toStringTree () + -"\ n \ nSubtree2 ---/ tmp / c l o s u r e _ 3 0 _ N o p o l / src / com / google / javascript / rhino / Node . java +++ / tmp / c l o s u r e _ 3 0 _ N o p o l / src / com / google / javascript / rhino / Node . java @@ -1429 ,7 +1429 ,9 @@ if ( diff != null ) { -return " Node tree inequality :" + -"\ nTree1 :\ n " + toStringTree () + -"\ n \ nTree2 :\ n " + node2 . toStringTree () + -"\ n \ nSubtree1 : " + diff . nodeA . toStringTree () + -"\ n \ nSubtree2 : " + diff . nodeB . toStringTree () ; + if ( com . google . javascript . rhino . Node . this . type < 32) { + return " Node tree inequality :" + + "\ nTree1 :\ n " + toStringTree () + + "\ n \ nTree2 :\ n " + node2 . toStringTree () + + "\ n \ nSubtree1 : " + diff . nodeA . toStringTree () + + "\ n \ nSubtree2 : " + diff . nodeB . toStringTree () ; + } } Listing 29: "The generated patch for the bug Closure 30" Number of tests that execute the patch: 5 Execution time: 1 minute, 45 seconds

Closure 31

---/ tmp / c l o s u r e _ 3 1 _ N o p o l / src / com / google / javascript / rhino / Node . java +++ / tmp / c l o s u r e _ 3 1 _ N o p o l / src / com / google / javascript / rhino / Node . java @@ -1429 ,7 +1429 ,9 @@ if ( diff != null ) { -return " Node tree inequality :" + -"\ nTree1 :\ n " + toStringTree () + -"\ n \ nTree2 :\ n " + node2 . toStringTree () + -"\ n \ nSubtree1 : " + diff . nodeA . toStringTree () + -"\ n \ nSubtree2

Closure 49

---/ tmp / c l o s u r e _ 4 9 _ N o p o l / src / com / google / javascript / rhino / Node . java +++ / tmp / c l o s u r e _ 4 9 _ N o p o l / src / com / google / javascript / rhino / Node . java @@ -1566 ,7 +1566 ,9 @@ if ( diff != null ) { -return " Node tree inequality :" + -"\ nTree1 :\ n " + toStringTree () + -"\ n \ nTree2 :\ n " + node2 . toStringTree () + -"\ n \ nSubtree1 : " + diff . nodeA . toStringTree () + -"\ n \ nSubtree2 : " + diff . nodeB . toStringTree () ; + if ( com . google . javascript . rhino . Node . this . type < 29) { + return " Node tree inequality :" + + "\ nTree1 :\ n " + toStringTree () + + "\ n \ nTree2 :\ n " + node2 . toStringTree () + + "\ n \ nSubtree1 : " + diff . nodeA . toStringTree () + + "\ n \ nSubtree2 : " + diff . nodeB . toStringTree () ; + } } Listing 37: "The generated patch for the bug Closure 49" Number of tests that execute the patch: 68 Execution time: 1 minute, 47 seconds 2.29 Closure 50 ---/ tmp / c l o s u r e _ 5 0 _ N o p o l / src / com / google / javascript / rhino / Node . java +++ / tmp / c l o s u r e _ 5 0 _ N o p o l / src / com / google / javascript / rhino / Node . java @@ -1566 ,7 +1566 ,9 @@ if ( diff != null ) { -return " Node tree inequality :" + -"\ nTree1 :\ n " + toStringTree () + -"\ n \ nTree2 :\ n " + node2 . toStringTree () + -"\ n \ nSubtree1 : " + diff . nodeA . toStringTree () + -"\ n \ nSubtree2

+

  if ((( removed ) && ( removed ) ) || ( org . jfree . data . time . TimeSeries . D E F A U L T _ R A N G E _ D E S C R I P T I O N . length () <= org . jfree . data . time . TimeSeries . this . maxY ) ) { f i n d B o u n d s B y I t e r a t i o n () ; Listing 1: "The generated patch for the bug Chart 3" Number of tests that execute the patch: 86 Execution time: 50 seconds 1.2 Chart 4

2. 9

 9 Closure 14 ---/ tmp / c l o s u r e _ 1 4 _ N o p o l / src / com / google / javascript / jscomp / C o n t r o l F l o w A n a l y s i s . java +++ / tmp / c l o s u r e _ 1 4 _ N o p o l / src / com / google / javascript / jscomp / C o n t r o l F l o w A n a l y s i s . java @@ -663 ,3 +663 ,5 @@ } else { -finallyMap . put ( lastJump , null ) ; + if ( com . google . javascript . jscomp . C o n t r o l F l o w A n a l y s i s . this . s h o u l d T r a v e r s e F u n c t i o n s ) { + finallyMap . put ( lastJump , null ) ; + } } Listing 18: "The generated patch for the bug Closure 14" Number of tests that execute the patch: 7 2.10 Closure 15 ---/ tmp / c l o s u r e _ 1 5 _ N o p o l / src / com / google / javascript / rhino / Node . java +++ / tmp / c l o s u r e _ 1 5 _ N o p o l / src / com

2. 12

 12 Closure 17 ---/ tmp / c l o s u r e _ 1 7 _ N o p o l / src / com / google / javascript / jscomp / T y p e d S c o p e C r e a t o r . java +++ / tmp / c l o s u r e _ 1 7 _ N o p o l / src / com / google / javascript / jscomp / T y p e d S c o p e C r e a t o r . java @@ -1294 ,3 +1294 ,5 @@ // then we can safely use that . -return rValue . getJSType () ; + if (!( com . google . javascript . jscomp . T y p e d S c o p e C r e a t o r . D E L E G A T E _ P R O X Y _ S U F F I X . length () == -1 + com . google . javascript . jscomp . T y p e d S c o p e C r e a t o r . this . f u n c t i o n A n a l y s i s R e s u l t s . size () ) ) { + return rValue . getJSType () ; + } } else if ( rValue . isOr () ) { Listing 21: "The generated patch for the bug Closure 17" Number of tests that execute the patch: 25 Execution time: 2 minutes, 1 second

2. 15

 15 Closure 21 ---/ tmp / c l o s u r e _ 2 1 _ N o p o l / src / com / google / javascript / jscomp / C h e c k S i d e E f f e c t s . java +++ / tmp / c l o s u r e _ 2 1 _ N o p o l / src / com / google / javascript / jscomp / C h e c k S i d e E f f e c t s . java @@ -117 ,7 +117 ,9 @@ if ( n == parent . getLastChild () ) { -for ( Node an : parent . getAncestors () ) { -int ancestorType = an . getType () ; -if ( ancestorType == Token . COMMA ) continue ; -if ( ancestorType != Token . EXPR_RESULT && ancestorType != Token . BLOCK ) return ; -else break ; + if ( com . google . javascript . jscomp . C h e c k S i d e E f f e c t s . PROTECTOR_FN . length () ==0) { + for ( Node an : parent . getAncestors () ) { + int ancestorType = an . getType () ; + if ( ancestorType == Token . COMMA ) continue ; + if ( ancestorType != Token . EXPR_RESULT && ancestorType != Token . BLOCK ) return ; + else break ; + } } Listing 24: "The generated patch for the bug Closure 21" Number of tests that execute the patch: 2 Execution time: 1 minute, 59 seconds 2.16 Closure 22 ---/ tmp / c l o s u r e _ 2 2 _ N o p o l / src / com / google / javascript / jscomp / C h e c k S i d e E f f e c t s . java +++ / tmp / c l o s u r e _ 2 2 _ N o p o l / src / com / google / javascript / jscomp / C h e c k S i d e E f f e c t s . java @@ -115 ,6 +115 ,8 @@ continue ; -if ( ancestorType != Token . EXPR_RESULT && ancestorType != Token . BLOCK ) + if ( com . google . javascript . jscomp . C h e c k S i d e E f f e c t s . PROTECTOR_FN . length () ==0) { + if ( ancestorType != Token . EXPR_RESULT && ancestorType != Token . BLOCK ) Listing 25: "The generated patch for the bug Closure 22" Number of tests that execute the patch: 3

Table 1 :

 1 The number of synthesized test-suite adequate patches for each project.

	Project # Patches # Bugs Repair Rate
	Chart	9	26	37%
	Closure	56	133	42%
	Lang	4	65	6%
	Math	24	106	22%
	Mockito	2	38	5%
	Time	8	27	29%
	Total	103	395	26%

  ---/ tmp / c lo su r e_ 2_ N op o l / src / com / google / javascript / jscomp / TypeCheck . java +++ / tmp / c l os ur e _2 _N o po l / src / com / google / javascript / jscomp / TypeCheck . java ---/ tmp / c lo su r e_ 5_ N op o l / src / com / google / javascript / rhino / Node . java +++ / tmp / c l os ur e _5 _N o po l / src / com / google / javascript / rhino / Node . java @@ -1410 ,7 +1410 ,9 @@

	+ +			} "\ n \ nTree2 :\ n " + node2 . toStringTree () +
	+		}	"\ n \ nSubtree1 : " + diff . nodeA . toStringTree () +	java
	-@@ -1410 ,7 +1410 ,9 @@ else if ( orientation == P l ot Or i en ta t io n . VERTICAL ) { + "\ n \ nSubtree2 : " + diff . nodeB . toStringTree () ;
	-+	d r a w V e r t i c a l I t e m ( g2 , state , dataArea , plot , domainAxis , rangeAxis , if ( diff != null ) { }
	--	}	statData , row , column ) ; return " Node tree inequality :" +
	----	}	}	t a n g l e C o n s t r a i n t c4 = new R e c t a n g l e C o n s t r a i n t (0.0 , new Range (0.0 , constraint . getWidth () -w [2]) , "\ nTree1 :\ n " + toStringTree () + "\ n \ nTree2 :\ n " + node2 . toStringTree () + Listing 15: "The generated patch for the bug Closure 8"
	------+	L e n g t h C o n s t r a i n t T y p e . RANGE , h [2] , null , L e n g t h C o n s t r a i n t T y p e . FIXED ) ; Size2D size = this . rightBlock . arrange ( g2 , c4 ) ; w [3] = size . width ; "\ n \ nSubtree1 : " + diff . nodeA . toStringTree () + Listing 8: "The generated patch for the bug Chart 25" Number of tests that execute the patch: 10 "\ n \ nSubtree2 : " + diff . nodeB . toStringTree () ; Number of tests that execute the patch: 8 if ( com . google . javascript . rhino . Node . this . type <= com . google . javascript . rhino . Node . IN FER R E D _ F U N C T I O N ) { Execution time: 2 minutes, 28 seconds
	+ + + + 2.7 Closure 10 if ( null != null ) { if ( this . rightBlock != null ) { Execution time: 33 seconds return " Node tree inequality :" + "\ nTree1 :\ n " + toStringTree () +
	+ + + + + + + + 1.9 Chart 26 R e c t a n g l e C o n s t r a i n t c4 = new R e c t a n g l e C o n s t r a i n t (0.0 , new Range (0.0 , constraint . getWidth () -w [2]) , L e n g t h C o n s t r a i n t T y p e . RANGE , h [2] , null , L e n g t h C o n s t r a i n t T y p e . FIXED ) ; Size2D size = this . rightBlock . arrange ( g2 , c4 ) ; w [3] = size . width ; } } Listing 5: "The generated patch for the bug Chart 13" Number of tests that execute the patch: 2 Execution time: 42 seconds "\ n \ nTree2 :\ n " + node2 . toStringTree () + ---/ tmp / chart_ 26_Nop ol / source / org / jfree / chart / plot / CategoryPlot . java +++ / tmp / char t_26_N opol / source / org / jfree / chart / plot / CategoryPlot . java + "\ n \ nSubtree1 : " + diff . nodeA . toStringTree () + + ---/ tmp / c l o s u r e _ 1 0 _ N o p o l / src / com / google / javascript / rhino / Node . java "\ n \ nSubtree2 : " + diff . nodeB . toStringTree () ; + +++ / tmp / c l o s u r e _ 1 0 _ N o p o l / src / com / google / javascript / rhino / Node . java } @@ -1432 ,7 +1432 ,9 @@ } if ( diff != null ) { @@ -2537 ,3 +2537 ,3 @@ boolean b2 = ( area . getHeight () <= M I N I M U M _ H E I G H T _ T O _ D R A W ) ; --return " Node tree inequality :" + Listing 12: "The generated patch for the bug Closure 3" -"\ nTree1 :\ n " + toStringTree () + if ( b1 || b2 ) { + -"\ n \ nTree2 :\ n " + node2 . toStringTree () + if ( org . jfree . chart . plot . CategoryPlot . D E F A U L T _ C R O S S H A I R _ S T R O K E != null ) { Number of tests that execute the patch: 10 -"\ n \ nSubtree1 : " + diff . nodeA . toStringTree () + return ; -"\ n \ nSubtree2 : " + diff . nodeB . toStringTree () ; Execution time: 7 minutes, 8 seconds + if ( com . google . javascript . rhino . Node . this . type <= com . google . javascript . rhino . Node . Listing 9: "The generated patch for the bug Chart 26" QUOTED_PROP ) { 2.4 Closure 5 + return " Node tree inequality :" + Number of tests that execute the patch: 48 + "\ nTree1 :\ n " + toStringTree () + Execution time: 1 minute, 40 seconds + "\ n \ nTree2 :\ n " + node2 . toStringTree () + 1.6 Chart 17 ---/ tmp / chart_ 17_Nop ol / source / org / jfree / data / time / TimeSeries . java + "\ n \ nSubtree1 : " + diff . nodeA . toStringTree () + + "\ n \ nSubtree2 : " + diff . nodeB . toStringTree () ; 2 Closure + }
	+++ / tmp / char t_17_N opol / source / org / jfree / data / time / TimeSeries . java @@ -879 ,3 +879 ,5 @@ if ( end < start ) { } Nopol repairs 56 bugs in the project Closure. Listing 16: "The generated patch for the bug Closure 10"
	2.1 Closure 1 Number of tests that execute the patch: 8
		IN FER R E D _ F U N C T I O N ) { Execution time: 4 minutes, 28 seconds
	+ ---/ tmp / c lo su r e_ 1_ N op o l / src / com / google / javascript / rhino / Node . java } } +++ / tmp / c l os ur e _1 _N o po l / src / com / google / javascript / rhino / Node . java + return " Node tree inequality :" + + "\ nTree1 :\ n " + toStringTree () + 2.8 Closure 12
	@@ -1410 ,7 +1410 ,9 @@ + "\ n \ nTree2 :\ n " + node2 . toStringTree () + Listing 6: "The generated patch for the bug Chart 17" Number of tests that execute the patch: 4 Execution time: 33 seconds 1.7 Chart 21 ---/ tmp / chart_ 21_Nop ol / source / org / jfree / data / Range . java +++ / tmp / char t_21_N opol / source / org / jfree / data / Range . java @@ -334 ,3 +334 ,5 @@ if (!( this . lower == range . lower ) ) { -return false ; + if (((1 + org . jfree . data . Range . this . lower ) -( -1) < org . jfree . data . Range . this . if ( diff != null ) { -return " Node tree inequality :" + -"\ nTree1 :\ n " + toStringTree () + -"\ n \ nTree2 :\ n " + node2 . toStringTree () + -+ "\ n \ nSubtree1 : " + diff . nodeA . toStringTree () + + ---/ tmp / c l o s u r e _ 1 2 _ N o p o l / src / com / google / javascript / rhino / Node . java "\ n \ nSubtree2 : " + diff . nodeB . toStringTree () ; + +++ / tmp / c l o s u r e _ 1 2 _ N o p o l / src / com / google / javascript / rhino / Node . java } @@ -1432 ,7 +1432 ,9 @@ } if ( diff != null ) { "\ n \ nSubtree1 : " + diff . nodeA . toStringTree () + -"\ n \ nSubtree2 : " + diff . nodeB . toStringTree () ; + -return " Node tree inequality :" + Listing 13: "The generated patch for the bug Closure 5" -"\ nTree1 :\ n " + toStringTree () + if (( node2 . type ) != ( com . google . javascript . rhino . Node . this . type ) ) { + -"\ n \ nTree2 :\ n " + node2 . toStringTree () + return " Node tree inequality :" + + Number of tests that execute the patch: 8 -"\ n \ nSubtree1 : " + diff . nodeA . toStringTree () + "\ nTree1 :\ n " + toStringTree () + + "\ n \ nTree2 :\ n " + node2 . toStringTree () + + -"\ n \ nSubtree2 : " + diff . nodeB . toStringTree () ; Execution time: 1 minute, 51 seconds + if ( com . google . javascript . rhino . Node . this . type <= com . google . javascript . rhino . Node . "\ n \ nSubtree1 : " + diff . nodeA . toStringTree () + + "\ n \ nSubtree2 : " + diff . nodeB . toStringTree () ; + QUOTED_PROP ) { 2.5 Closure 7 + return " Node tree inequality :" + } + "\ nTree1 :\ n " + toStringTree () + } ---/ tmp / c lo su r e_ 7_ N op o l / src / com / google / javascript / rhino / testing / Asserts . java + "\ n \ nTree2 :\ n " + node2 . toStringTree () +
	upper ) || ( org . jfree . data . Range . this . lower <= 0) ) { return false ; +++ / tmp / c l os ur e _7 _N o po l / src / com / google / javascript / rhino / testing / Asserts . java + + "\ n \ nSubtree1 : " + diff . nodeA . toStringTree () + Listing 10: "The generated patch for the bug Closure 1" @@ -102 ,3 +102 ,3 @@ + "\ n \ nSubtree2 : " + diff . nodeB . toStringTree () ;
	+ + -	} ( a == null ) == ( b == null ) ) ; } } Number of tests that execute the patch: 15 if ( a == null ) { }
	Listing 7: "The generated patch for the bug Chart 21" Number of tests that execute the patch: 12 Execution time: 2 minutes, 4 seconds if ( message != null ) { return ; Listing 17: "The generated patch for the bug Closure 12" 2.2 Closure 2 + Listing 14: "The generated patch for the bug Closure 7" Number of tests that execute the patch: 8
	Execution time: 37 seconds 1.8 Chart 25 c u r r e n t P r o p e r t i e s . clear () ; Execution time: 3 minutes, 26 seconds @@ -1663 ,4 +1663 ,6 @@ Number of tests that execute the patch: 358 Execution time: 7 minutes, 35 seconds
	---/ tmp / chart_ 25_Nop ol / source / org / jfree / chart / renderer / category / S t a t i s t i c a l B a r R e n d e r e r . java -c h e c k I n t e r f a c e C o n f l i c t P r o p e r t i e s (t , n , functionPrivateName , -properties , currentProperties , interfaceType ) ; 2.6 Closure 8
	+++ / tmp / char t_25_N opol / source / org / jfree / chart / renderer / category / S t a t i s t i c a l B a r R e n d e r e r . java + if ( com . google . javascript . jscomp . TypeCheck . this . unknownCount < com . google . javascript
	@@ -206 ,10 +206 ,12 @@ . jscomp . TypeCheck . this . typedCount ) { ---/ tmp / c lo su r e_ 8_ N op o l / src / com / google / javascript / rhino / Node . java
	P lo tO r ie nt a ti o n orientation = plot . getOr ientat ion () ; c h e c k I n t e r f a c e C o n f l i c t P r o p e r t i e s (t , n , functionPrivateName , +++ / tmp / c l os ur e _8 _N o po l / src / com / google / javascript / rhino / Node . java +
	-+ @@ -1410 ,7 +1410 ,9 @@ if ( orientation == P lo tO r ie nt a ti o n . HORIZONTAL ) { properties , currentProperties , interfaceType ) ;
	-+	d r a w H o r i z o n t a l I t e m ( g2 , state , dataArea , plot , domainAxis , if ( diff != null ) { }
	--		rangeAxis , statData , row , column ) ; properties . putAll ( c u r r e n t P r o p e r t i e s ) ; return " Node tree inequality :" +
	+ -		if (0 == 1) { "\ nTree1 :\ n " + toStringTree () +
	+			if ( orientation == P lo tO r ie n ta ti o n . HORIZONTAL ) {
	+			d r a w H o r i z o n t a l I t e m ( g2 , state , dataArea , plot , domainAxis ,
	+			rangeAxis , statData , row , column ) ;
	+			}
	+	else if ( orientation == P l ot Or i en t at io n . VERTICAL ) { IN FER R E D _ F U N C T I O N ) {
	+ +			d r a w V e r t i c a l I t e m ( g2 , state , dataArea , plot , domainAxis , rangeAxis , return " Node tree inequality :" +
	+ +			statData , row , column ) ; "\ nTree1 :\ n " + toStringTree () +

throw new I l l e g a l A r g u m e n t E x c e p t i o n (" Requires start <= end .") ; + if ( org . jfree . data . time . TimeSeries . this . data . size () == org . jfree . data . time . TimeSeries . this . range . length () ) { + throw new I l l e g a l A r g u m e n t E x c e p t i o n (" Requires start <= end .") ; Listing 11: "The generated patch for the bug Closure 2" Number of tests that execute the patch: 17 Execution time: 2 minutes, 7 seconds 2.3 Closure 3 ---/ tmp / c lo su r e_ 3_ N op o l / src / com / google / javascript / rhino / Node . java +++ / tmp / c l os ur e _3 _N o po l / src / com / google / javascript / rhino / Node . if ( diff != null ) { -return " Node tree inequality :" + -"\ nTree1 :\ n " + toStringTree () + -"\ n \ nTree2 :\ n " + node2 . toStringTree () + -"\ n \ nSubtree1 : " + diff . nodeA . toStringTree () + -"\ n \ nSubtree2 : " + diff . nodeB . toStringTree () ; + if ( com . google . javascript . rhino . Node . this . type <= com . google . javascript . rhino . Node . -"\ n \ nTree2 :\ n " + node2 . toStringTree () + -"\ n \ nSubtree1 : " + diff . nodeA . toStringTree () + -"\ n \ nSubtree2 : " + diff . nodeB . toStringTree () ; + if ( com . google . javascript . rhino . Node . this . type <= com . google . javascript . rhino . Node .

  Listing 36: "The generated patch for the bug Closure 45" Number of tests that execute the patch: 3 Execution time: 1 minute, 41 seconds

	+	if (( fieldName . length () ) != (5) ) { Number of tests that execute the patch: 3
	+ +	if ( builder . addProperty ( fieldName , fieldType , fieldNameNode ) == null ) { // Duplicate field name , warning and skip Execution time: 2 minutes, 7 seconds
	+ + 2.27 Closure 45 reporter . warning ( " Duplicate record field " + fieldName ,
	+ + ---/ tmp / c l o s u r e _ 4 5 _ N o p o l / src / com / google / javascript / rhino / Node . java sourceName , n . getLineno () , fieldNameNode . getCharno () ) ; + +++ / tmp / c l o s u r e _ 4 5 _ N o p o l / src / com / google / javascript / rhino / Node . java } @@ -1403 ,7 +1403 ,9 @@ } if ( diff != null ) {
	-	Listing 32: "The generated patch for the bug Closure 35" return " Node tree inequality :" +
	-	"\ nTree1 :\ n " + toStringTree () +
	--	"\ n \ nTree2 :\ n " + node2 . toStringTree () + Number of tests that execute the patch: 26 "\ n \ nSubtree1 : " + diff . nodeA . toStringTree () +
	-+ 2.24 Closure 36 "\ n \ nSubtree2 : " + diff . nodeB . toStringTree () ; Execution time: 2 minutes, 43 seconds if ( com . google . javascript . rhino . Node . this . type < 32) { + return " Node tree inequality :" +
	+	"\ nTree1 :\ n " + toStringTree () +
	+ ---/ tmp / c l o s u r e _ 3 6 _ N o p o l / src / com / google / javascript / rhino / Node . java "\ n \ nTree2 :\ n " + node2 . toStringTree () + + "\ n \ nSubtree1 : " + diff . nodeA . toStringTree () + +++ / tmp / c l o s u r e _ 3 6 _ N o p o l / src / com / google / javascript / rhino / Node . java + "\ n \ nSubtree2 : " + diff . nodeB . toStringTree () ; @@ -1416 ,7 +1416 ,9 @@ + } if ( diff != null ) { -return " Node tree inequality :" + }
	-	"\ nTree1 :\ n " + toStringTree () +
	-	"\ n \ nTree2 :\ n " + node2 . toStringTree () +
	-	"\ n \ nSubtree1 : " + diff . nodeA . toStringTree () +
	-	"\ n \ nSubtree2 : " + diff . nodeB . toStringTree () ;
	+	if ( com . google . javascript . rhino . Node . this . type <= com . google . javascript . rhino . Node .
		IS_DISPATCHER ) {
	+	return " Node tree inequality :" +
	+	"\ nTree1 :\ n " + toStringTree () +
	+	"\ n \ nTree2 :\ n " + node2 . toStringTree () +
	+	"\ n \ nSubtree1 : " + diff . nodeA . toStringTree () +
	+	"\ n \ nSubtree2 : " + diff . nodeB . toStringTree () ;
	+	}
		}
	+	IS_DISPATCHER ) { return " Node tree inequality :" + Listing 33: "The generated patch for the bug Closure 36"
	+	"\ nTree1 :\ n " + toStringTree () +
	+ + +	"\ n \ nTree2 :\ n " + node2 . toStringTree () + Number of tests that execute the patch: 3 "\ n \ nSubtree1 : " + diff . nodeA . toStringTree () + "\ n \ nSubtree2 : " + diff . nodeB . toStringTree () ; Execution time: 1 minute, 48 seconds
	+ 2.25 Closure 38 } }
	Listing 30: "The generated patch for the bug Closure 31" ---/ tmp / c l o s u r e _ 3 8 _ N o p o l / src / com / google / javascript / jscomp / CodeConsumer . java
	+++ / tmp / c l o s u r e _ 3 8 _ N o p o l / src / com / google / javascript / jscomp / CodeConsumer . java
	Number of tests that execute the patch: 3 @@ -244 ,3 +244 ,3 @@
	-	boolean negativeZero = i sNegat iveZer o ( x ) ; Execution time: 1 minute, 54 seconds if ( x < 0 && prev == ' -') {
	+ 2.22 Closure 33 if (( prev == ' -') ) { add ( " " ) ;
	---/ tmp / c l o s u r e _ 3 3 _ N o p o l / src / com / google / javascript / rhino / jstype / P r o t o t y p e O b j e c t T y p e . java Listing 34: "The generated patch for the bug Closure 38"
	+++ / tmp / c l o s u r e _ 3 3 _ N o p o l / src / com / google / javascript / rhino / jstype / P r o t o t y p e O b j e c t T y p e . java
	@@ -572 ,4 +572 ,6 @@ Number of tests that execute the patch: 1665 if (! hasProperty ( prop ) ) { -typeToInfer = getNativeType ( JSTypeNative . VOID_TYPE ) Execution time: 3 minutes, 11 seconds
	-+ 2.26 Closure 40 . g e t L e a s t S u p e r t y p e ( propType ) ; if ( com . google . javascript . rhino . jstype . P r o t o t y p e O b j e c t T y p e . this . prettyPrint ) {
	+	typeToInfer = getNativeType ( JSTypeNative . VOID_TYPE )
	+ + ---/ tmp / c l o s u r e _ 4 0 _ N o p o l / src / com / google / javascript / rhino / Node . java . g e t L e a s t S u p e r t y p e ( propType ) ; } +++ / tmp / c l o s u r e _ 4 0 _ N o p o l / src / com / google / javascript / rhino / Node . java } @@ -1411 ,7 +1411 ,9 @@
	-	if ( diff != null ) { Listing 31: "The generated patch for the bug Closure 33" return " Node tree inequality :" +
	-	"\ nTree1 :\ n " + toStringTree () +
	-	Number of tests that execute the patch: 8 "\ n \ nTree2 :\ n " + node2 . toStringTree () +
	--	"\ n \ nSubtree1 : " + diff . nodeA . toStringTree () + Execution time: 1 minute, 52 seconds "\ n \ nSubtree2 : " + diff . nodeB . toStringTree () ;
	+ 2.23 Closure 35 if ( com . google . javascript . rhino . Node . this . type < 32) { + return " Node tree inequality :" +
	+	"\ nTree1 :\ n " + toStringTree () +
	---/ tmp / c l o s u r e _ 3 5 _ N o p o l / src / com / google / javascript / rhino / jstype / JSType Regist ry . java + "\ n \ nTree2 :\ n " + node2 . toStringTree () +
	+++ / tmp / c l o s u r e _ 3 5 _ N o p o l / src / com / google / javascript / rhino / jstype / JSTy peReg istry . java + "\ n \ nSubtree1 : " + diff . nodeA . toStringTree () +
	@@ -1654 ,8 +1654 ,10 @@ + "\ n \ nSubtree2 : " + diff . nodeB . toStringTree () ;
	+	// Add the property to the record . }
	-	if ( builder . addProperty ( fieldName , fieldType , fieldNameNode ) == null ) { }
	--	// Duplicate field name , warning and skip reporter . warning ( Listing 35: "The generated patch for the bug Closure 40"
	-	" Duplicate record field " + fieldName ,
	-	sourceName ,
	-	n . getLineno () , fieldNameNode . getCharno () ) ;

: " + diff . nodeB . toStringTree () ; + if ( com . google . javascript . rhino . Node . this . type <= com . google . javascript . rhino . Node .

  : " + diff . nodeB . toStringTree () ; + if ( com . google . javascript . rhino . Node . this . type <= com . google . javascript . rhino . Node . Listing 38: "The generated patch for the bug Closure 50" Number of tests that execute the patch: 4 Execution time: 1 minute, 50 seconds 2.30 Closure 55

	LABEL_PROP ) {
	+	return " Node tree inequality :" +
	+	"\ nTree1 :\ n " + toStringTree () +
	+	"\ n \ nTree2 :\ n " + node2 . toStringTree () +
	+	"\ n \ nSubtree1 : " + diff . nodeA . toStringTree () +
	+	"\ n \ nSubtree2 : " + diff . nodeB . toStringTree () ;
	+	}
	}

Closure 26

---/ tmp / c l o s u r e _ 2 6 _ N o p o l / src / com / google / javascript / rhino / Node . java +++ / tmp / c l o s u r e _ 2 6 _ N o p o l / src / com / google / javascript / rhino / Node . java @@ -1429 ,7 +1429 ,9 @@ if ( diff != null ) { -return " Node tree inequality :" + -"\ nTree1 :\ n " + toStringTree () + -"\ n \ nTree2 :\ n " + node2 . toStringTree () + -"\ n \ nSubtree1 : " + diff . nodeA . toStringTree () + -"\ n \ nSubtree2 : " + diff . nodeB . toStringTree () ; + if (( com . google . javascript . rhino . Node . this . type ) != ( node2 . type ) ) { + return " Node tree inequality :" + + "\ nTree1 :\ n " + toStringTree () + + "\ n \ nTree2 :\ n " + node2 . toStringTree () + + "\ n \ nSubtree1 : " + diff . nodeA . toStringTree () + + "\ n \ nSubtree2 : " + diff . nodeB . toStringTree () ; + } } Listing 26: "The generated patch for the bug Closure 26" Number of tests that execute the patch: 14 Execution time: 3 minutes, 34 seconds 2.18 Closure 28 ---/ tmp / c l o s u r e _ 2 8 _ N o p o l / src / com / google / javascript / rhino / Node . java +++ / tmp / c l o s u r e _ 2 8 _ N o p o l / src / com / google / javascript / rhino / Node . java @@ -1429 ,7 +1429 ,9 @@ if ( diff != null ) { -return " Node tree inequality :" + -"\ nTree1 :\ n " + toStringTree () + -"\ n \ nTree2 :\ n " + node2 . toStringTree () + -"\ n \ nSubtree1 : " + diff . nodeA . toStringTree () + -"\ n \ nSubtree2 : " + diff . nodeB . toStringTree () ; + if ( com . google . javascript . rhino . Node . this . type < 32) { + return " Node tree inequality :" + + "\ nTree1 :\ n " + toStringTree () + + "\ n \ nTree2 :\ n " + node2 . toStringTree () + + "\ n \ nSubtree1 : " + diff . nodeA . toStringTree () + + "\ n \ nSubtree2 : " + diff . nodeB . toStringTree () ; + } } Listing 27: "The generated patch for the bug Closure 28" Number of tests that execute the patch: 8 Execution time: 1 minute, 55 seconds

Closure 29

---/ tmp / c l o s u r e _ 2 9 _ N o p o l / src / com / google / javascript / rhino / Node . java +++ / tmp / c l o s u r e _ 2 9 _ N o p o l / src / com / google / javascript / rhino / Node . java @@ -1429 ,7 +1429 ,9 @@ if ( diff != null ) { -return " Node tree inequality :" + -"\ nTree1 :\ n " + toStringTree () + -"\ n \ nTree2 :\ n " + node2 . toStringTree () + -"\ n \ nSubtree1 : " + diff . nodeA . toStringTree () + -"\ n \ nSubtree2 : " + diff . nodeB . toStringTree () ; + if (( com . google . javascript . rhino . Node . this . type ) != ( node2 . type ) ) { + return " Node tree inequality :" + + "\ nTree1 :\ n " + toStringTree () + + "\ n \ nTree2 :\ n " + node2 . toStringTree () + + "\ n \ nSubtree1 : " + diff . nodeA . toStringTree () + + "\ n \ nSubtree2 : " + diff . nodeB . toStringTree () ; + } } Listing 28: "The generated patch for the bug Closure 29" Number of tests that execute the patch: 12 Execution time: 2 minutes 2.20 Closure 30 ---/ tmp / c l o s u r e _ 5 5 _ N o p o l / src / com / google / javascript / jscomp / F u n c t i o n R e w r i t e r . java +++ / tmp / c l o s u r e _ 5 5 _ N o p o l / src / com / google / javascript / jscomp / F u n c t i o n R e w r i t e r . java @@ -92 ,10 +92 ,12 @@ // reductions if doing so will result in some savings . ---/ tmp / c l o s u r e _ 6 0 _ N o p o l / src / com / google / javascript / jscomp / P e e p h o l e S u b s t i t u t e A l t e r n a t e S y n t a x . java +++ / tmp / c l o s u r e _ 6 0 _ N o p o l / src / com / google / javascript / jscomp / P e e p h o l e S u b s t i t u t e A l t e r n a t e S y n t a x . java @@ -1196 ,3 +1196 ,5 @@ if (! newNode . isEqu ivalen tTo ( n

Closure 62

---/ tmp / c l o s u r e _ 6 2 _ N o p o l / src / com / google / javascript / jscomp / L i g h t w e i g h t M e s s a g e F o r m a t t e r . java +++ / tmp / c l o s u r e _ 6 2 _ N o p o l / src / com / google / javascript / jscomp / L i g h t w e i g h t M e s s a g e F o r m a t t e r . java @@ -96 ,4 +96 ,3 @@ // at the end of the

Closure 115

---/ tmp / c l o s u r e _ 1 1 5 _ N o p o l / src / com / google / javascript / rhino / Node . java +++ / tmp / c l o s u r e _ 1 1 5 _ N o p o l / src / com / google / javascript / rhino / Node . java @@ -1429 ,7 +1429 ,9 @@ if ( diff != null ) { -return " Node tree inequality :" + -"\ nTree1 :\ n " + toStringTree ()

Closure 120

---/ tmp / c l o s u r e _ 1 2 0 _ N o p o l / src / com / google / javascript / rhino / Node . java +++ / tmp / c l o s u r e _ 1 2 0 _ N o p o l / src / com / google / javascript / rhino / Node . java @@ -1429 ,7 +1429 ,9 @@ if ( diff != null ) { -return " Node tree inequality :" + -"\ nTree1 :\ n " + toStringTree () + -"\ n \ nTree2 :\ n " + node2 . toStringTree () + -"\ n \ nSubtree1 : " + diff . nodeA . toStringTree () + -"\ n \ nSubtree2

Lang

Nopol repairs 4 bugs in the project Lang.

Lang 44

---/ tmp / lang_44_Nopol / src / java / org / apache / commons / lang / NumberUtils . java +++ / tmp / lang_44_Nopol / src / java / org / apache / commons / lang / NumberUtils . java @@ -192 ,5 +192 ,3 @@ case 'L ' : -if ( dec == null -&& exp == null -&& ( numeric . charAt (0) == '-' && isDigits ( numeric . substring (1) ) || isDigits ( numeric ) ) ) { + if ((( dec == null ) && ( exp == null ) ) ) { try { @@ -201 ,3 +199 ,3 @@ return c r e a t e B i g I n t e g e r ( numeric ) ; -+ }

Listing 66: "The generated patch for the bug Lang 44"

Math

Nopol repairs 24 bugs in the project Math.

Math 2

---/ tmp / math_2_Nopol / src / main / java / org / apache / commons / math3 / distribution / A b s t r a c t I n t e g e r D i s t r i b u t i o n . java +++ / tmp / math_2_Nopol / src / main / java / org / apache / commons / math3 / distribution / A b s t r a c t I n t e g e r D i s t r i b u t i o n . java @@ -137 ,3 +137 ,5 @@ if ( tmp < upper

Math 4

---/ tmp / math_4_Nopol / src / main / java / org / apache / commons / math3 / geometry / euclidean / twod / Line . java +++ / tmp / math_4_Nopol / src / main / java / org / apache / commons / math3 / geometry / euclidean / twod / Line . java @@ -199 ,3 +199 ,5 @@ if ( FastMath . abs ( d ) <

Math 24

---/ tmp / math_24_Nopol / src / main / java / org / apache / commons / math3 / analysis / FunctionUtils . java +++ / tmp / math_24_Nopol / src / main / java / org / apache / commons / math3 / analysis / FunctionUtils . java @@ -145 ,3 +145 ,5 @@ for ( int i = 1; i < f . length ;

Math 40

---/ tmp / math_40_Nopol / src / main / java / org / apache / commons / math / analysis / solvers / B r a c k e t i n g N t h O r d e r B r e n t S o l v e r . java +++ / tmp / math_40_Nopol / src / main / java / org / apache / commons / math / analysis / solvers / B r a c k e t i n g N t h O r d e r B r e n t S o l v e r . java @@ -259 ,3 +259 ,3 @@ // we try again with a lower interpolation order if ( s ig n Ch a ng eI n de x -start >= end -s ig n Ch an g eI n de

Math 44

---/ tmp / math_44_Nopol / src / main / java / org / apache / commons / math / ode / A b s t r a c t I n t e g r a t o r . java +++ / tmp / math_44_Nopol / src / main / java / org / apache / commons / math / ode / A b s t r a c t I n t e g r a t o r . java @@ -286 ,3 +286 ,5 @@ } -s t a

Math 49

---/ tmp / math_49_Nopol / src / main / java / org / apache / commons / math / linear / O p e n M a p R e a l V e c t o r . java +++ / tmp / math_49_Nopol / src / main / java / org / apache / commons / math / linear / O p e n M a p R e a l V e c t o r . java @@ -666 ,3 +666 ,5 @@ } else if ( entries . containsKey

Math 50

---/ tmp / math_50_Nopol / src / main / java / org / apache / commons / math / analysis / solvers / B a s e S e c a n t S o l v e r . java +++ / tmp / math_50_Nopol / src / main / java / org / apache / commons / math / analysis / solvers / B a s e S e c a n t S o l v e r . java @@ -236 ,15 +236 ,17 @@ atol ) ) { -switch ( allowed )

Math 57

---/ tmp / math_57_Nopol / src / main / java / org / apache / commons / math / stat / clustering / E u c l i d e a n I n t e g e r P o i n t . java +++ / tmp / math_57_Nopol / src / main / java / org / apache / commons / math / stat / clustering / E u c l i d e a n I n t e g e r P o i n t . java @@ -84 ,4 +84 ,6 @@ for ( int i = 0; i < point . length

Listing 83: "The generated patch for the bug Math 57" Number of tests that execute the patch: 5 Execution time: 3 minutes, 10 seconds 4.15 Math 58 ---/ tmp / math_58_Nopol / src / main / java / org / apache / commons / math / analysis / function / Gaussian . java +++ / tmp / math_58_Nopol / src / main / java / org / apache / commons / math / analysis / function / Gaussian . java @@ -181 ,4 +181 ,

Math 69

---/ tmp / math_69_Nopol / src / main / java / org / apache / commons / math / stat / correlation / P e a r s o n s C o r r e l a t i o n . java +++ / tmp / math_69_Nopol / src / main / java / org / apache / commons / math / stat / correlation / P e a r s o n s C o r r e l a t i o n . java @@ -192 ,3 +192 ,5 @@ outMatrix . setEntry (i , j , corr ) ; -outMatrix . setEntry (j , i , corr ) ; + if (2 < nVars ) { + outMatrix . setEntry (j , i , corr ) ; + } } Listing 85: "The generated patch for the bug Math 69" Number of tests that execute the patch: 11 Execution time: 33 seconds 4.17 Math 73 ---/ tmp / math_73_Nopol / src / main / java / org / apache / commons / math / analysis / solvers / U n i v a r i a t e R e a l S o l v e r I m p l . java +++ / tmp / math_73_Nopol / src / main / java / org / apache / commons / math / analysis / solvers / U n i v a r i a t e R e a l S o l v e r I m p l . java @@ -224 ,6 +224 ,6 @@ protected void verify Sequen ce ( final double lower , final double initial , final double upper ) { -if (! isSequence ( lower , initial , upper ) ) { + if (((!((1) != ( lower ) ) ) && ( org . apache . commons . math . analysis . solvers . U n i v a r i a t e R e a l S o l v e r I m p l . this . result < org . apache . commons . math . analysis . solvers . U n i v a r i a t e R e a l S o l v e r I m p l . this . d e f a u l t F u n c t i o n V a l u e A c c u r a c y ) ) || ( initial <= lower ) ) { throw M a t h R u n t i m e E x c e p t i o n . c r e a t e I l l e g a l A r g u m e n t

Time 18

---/ tmp / time_18_Nopol / src / main / java / org / joda / time / chrono / B a si cC h ro no l og y . java +++ / tmp / time_18_Nopol / src / main / java / org / joda / time / chrono / Ba si c Ch r on ol o gy . java @@ -604 ,3 +604 ,5 @@ FieldUtils . v e r i f y