Introduction

Tephritid fruit flies are amongst the world's most economically significant pests of fruit production1,2. In Australia, the Queensland fruit fly, Bactrocera tryoni (Froggatt), or ‘Q-fly’, presents a costly challenge to Australia’s $13.5 billion horticulture industry, affecting a vast diversity of commercial and non-commercial crops3,4,5. Organophosphate insecticides have been the most common solution for decades, but their use is now greatly restricted due to environmental and human health concerns. Alternative control measures are now a high priority. The Sterile Insect Technique (SIT) is a sustainable technology that is growing rapidly in favour. SIT involves releasing millions of sterile insects that reduce the reproductive capacity of pest populations by inducing reproductive failure in females6,7. SIT has been used globally to combat some of the most damaging fruit fly species, including the Mediterranean fruit fly, or medfly Ceratitis capitata (Wiedemann)8, the Melon fly Zeugodacus cucurbitae (Coquillett)9,10, the Oriental fruit fly Bactrocera dorsalis (Hendel)11 and the Mexican fruit fly Anastrepha ludens (Loew)12. While SIT has proven effective for numerous species, there is still substantial scope to increase efficacy and cost effectiveness in most programs.

Fruit flies commonly have long adult maturation phases and high mortality rates in the field, such that a quite small proportion of the released flies might survive to mature and contribute to SIT13,14,15,16. Most species are anautogenous, needing to acquire nutritional resources, especially protein, as adults to complete reproductive development17. Yeast hydrolysate (YH) mixed with sugar is a standard adult diet used to maintain fruit fly colonies, providing a rich source of amino acids, micronutrients and carbohydrates18 that is effective at sustaining reproductive development19,20,21. When provided for even a 1–2 day pre-release period in SIT programs, YH and sugar effectively sustain development of male Q-flies over the following days22,23, increasing the prevalence of mature sterile flies in the field24.

While providing sterile Q-flies with nutritional resources during pre-release holding periods is an effective means of hastening development, additional treatments that can further reduce the delay between release and maturity remain of particular interest. Dietary or topical application of methoprene, a juvenile hormone analogue, provides one prominent avenue, having been found to substantially accelerate adult development in Q-fly25,26,27,28, as well as in Z. cucurbitae29,30, A. fraterculus31,32,33,34, A. ludens35,36,37, and A. suspensa38,39. Other pre-release treatments have been explored for their effects on sexual performance of already mature fruit flies, especially plant semiocmicals such as methyl eugenol to which males of some species are attracted and from which they gain substantial sexual benefits40,41,42,43,44,45,46,47. While Q-flies are not attracted to methyl-eugenol, they are attracted to raspberry ketone. Dietary access to cuelure, an analogue of raspberry ketone, has been found to function as a potent simulant in sexually mature male Q-flies, significantly increasing expression of energetic pathways and significantly increasing sexual performance for 2–3 days48. This effect has been colloquially termed ‘The Red Bull Effect’48. Although immature males are not attracted to raspberry ketone, Akter et al.49 has found that raspberry ketone mixed in the diet of immature male Q-flies yields acceleration in sexual maturation that is a close match to the effects of methoprene27,28. The finding that a compound known to be effective as a stimulant in mature adult Q-flies also accelerates development of immature adult Q-flies raises the possibility that other stimulants might also accelerate development of fruit flies released in SIT programs.

Caffeine is a potent stimulant, affecting diverse taxa including insects50,51,52,53,54,55,56. Several studies that point to possible effects of caffeine in tephritid fruit flies, including effects on mating performance. Arita and Kaneshiro57 compared sexual competitiveness of male C. capitata from two populations, one that emerged from Jerusalem cherries (Solanum pseudocapsicum L.) and one that emerged from Arabian coffee (Coffea arabica L.). Despite being smaller, the male flies emerging from coffee sexually outcompeted the male flies emerging from Jerusalem cherries, regardless of which population the females came from. One possible explanation is that exposure to caffiene during the larval stage carried over to the adult stage, then either accelerated development or increased sexual effort. In a mating competitiveness study, laboratory C. capitata provided ad libitum access to adult diet supplemented with guarana powder, which contains caffiene, sexually outperformed untreated laboratory and wild flies58. It remains unclear, however, whether these results are attributable to the caffiene or other compounds in the supplements, and whether the effects were through accleration of development or through elevated levels of sexual effort.

In the present study we investigate whether sexual maturation of male Q-flies is accelerated by caffeine supplements from three different sources—analytical caffeine, guarana powder, and instant coffee incorporated into the adult diet for two days following adult emergence. Because such supplements could increase mating activity without promoting development of reproductive organs22, we assess the effects of treatment and age on both mating success and the development of reproductive organs as separate measures of sexual maturation.

Results

Longevity

Analytical caffeine had no significant effect on Q-fly longevity at any tested concentration (F7,71 = 0.5, P = 0.85; Fig. 1a), whereas the highest two doses of both guarana powder (F7,71 = 97.5, P < 0.001; Fig. 1b) and instant coffee (F7,71 = 78.7, P < 0.001; Fig. 1c) significantly reduced longevity.

Figure 1
figure 1

Effects of dose (%) of each supplement (Analytical caffeine, Guarana powder, Instant Coffee and Control) on male Q-fly longevity. Means with different letter from control are significantly different from control (Dunnett’s test, P < 0.05).

Sexual performance

Mating probability

For all treatments, age had significant effect on mating probability (Table 1) as the proportion of flies mating increased over the first 8 days of adulthood, and then plateaued (Fig. 2). In addition to the effects of age, mating probability significantly varied with analytical caffeine treatment (Table 1). Flies provided both doses of analytical caffeine had significantly greater mating probability than the control (low dose log odds = 0.71 ± 0.2, P = 0.0011; high dose log odds = 0.66 ± 0.2, P = 0.0022; Fig. 2a). No effects were detected for either guarana powder or instant coffee (Table 1, Fig. 2b,c).

Table 1 GLM analysis testing fixed effects of age (4, 6, 8, 10, 12, 15, and 20 days post emergence) and treatments (Analytical caffeine, Guarana powder, Instant coffee and Control) on male Q-fly mating probability.
Figure 2
figure 2

Relationship between age and proportion of male Q-flies mating after being fed a diet of sugar and yeast hydrolysate combined with two doses (%) of each supplement (Analytical caffeine, Guarana powder, Instant coffee and Control) for 2 days after emergence and then sugar only.

Mating latency

For all treatments, mating latency varied significantly with age (Table 2). Latency to mate decreased with age until 15 days (Fig. 3a–c). As with mating probability, analytical caffeine treatment had significant effect on mating latency (Table 2). Flies that received both doses of analytical caffeine had significantly shorter mating latency than untreated flies (low dose \(\Delta \beta \hspace{0.17em}\)= 0.45 ± 0.12, P < 0.001; high dose \(\Delta \beta \) = 0.5 ± 0.12, P < 0.001; Fig. 3a). However, flies provided guarana powder and instant coffee had mating latency that was not significantly different from untreated flies (Table 2, Fig. 3b).

Table 2 Linear model analysis testing fixed effects of age (4, 6, 8, 10, 12, 15, and 20 days post emergence) and treatments (Analytical caffeine, Guarana powder, Instant coffee and Control) on male Q-fly mating latency.
Figure 3
figure 3

Mating latency (mean ± SE) and mating duration (mean ± SE) obtained in mating trials at different ages by male Q-flies provided a diet of sugar and yeast hydrolysate combined with two doses (%) of each supplement (Analytical caffeine, Guarana powder, Instant coffee and Control) for 2 days after emergence and then sugar only.

Mating duration

Age had significant effect on mating duration for all treatments (Table 3). Mating duration increased with age until 15 days (Fig. 3d–f). Mating duration also varied significantly with analytical caffeine treatment (Table 3). Flies that received both doses of analytical caffeine had significantly longer mating duration than untreated flies (low dose \(\Delta \beta \) = 0.69 ± 0.17, P < 0.001; high dose \(\Delta \beta \) = 0.6 ± 0.17, P < 0.001; Fig. 3d). However, mating durations of flies provided guarana powder or instant coffee were not significantly different from those of control flies (Table 3; Fig. 3e,f).

Table 3 Linear model analysis testing fixed effects of age (4, 6, 8, 10, 12, 15, and 20 days post emergence) and treatments (Analytical caffeine, Guarana powder, Instant coffee and Control) on male Q-fly mating duration.

Reproductive organ development

Ejaculatory apodeme

For flies provided analytical caffeine, ejaculatory apodeme length and area varied significantly with age and dose, with a significant age × dose interaction (Table 4) (Fig. 4). Ejaculatory apodeme length and area increased with age, but this increase was much steeper at young ages for flies that were provided the two doses of analytical caffeine compared with control flies (Fig. 4a,d). For flies provided guarana powder, ejaculatory apodeme length increased significantly with age but was not affected by the supplements (Table 4), while ejaculatory apodeme area varied with a significant age × dose interaction (Table 4). Flies that were provided guarana powder had reduced apodeme area at 15 and 20 days of age compared to control flies (Fig. 4e). For flies provided instant coffee ejaculatory apodeme length and area increased significantly with age but was not affected by the supplements (Table 4) (Fig. 4c,f).

Table 4 GLM analysis testing fixed effects of age (4, 6, 8, 10, 12, 15, and 20 days post emergence) and treatments (Analytical caffeine, Guarana powder, Instant coffee and Control) on male Q-fly ejaculatory apodeme development (length and area).
Figure 4
figure 4

Ejaculatory apodeme length (mean ± SE) and apodeme area (mean ± SE) obtained at different ages by male Q-flies provided a diet of sugar and yeast hydrolysate combined with two doses (%) of each supplement (Analytical caffeine, Guarana powder, Instant coffee and Control) for 2 days after emergence and then sugar only. Means separated by different letters indicates significant differences between treatment and control at particular ages (Dunnett’s test, P < 0.05).

Testes

For flies provided analytical caffeine, testis length and area varied significantly with age and dose, with a significant age × dose interaction (Table 5; Fig. 5). Testis length and area increased with age, but this increase was much steeper at young ages for flies that were provided the two doses of analytical caffeine compared with control flies (Fig. 5a,d). For flies provided guarana powder and instant coffee, testis length and area increased significantly with age but was not affected by the supplements (Table 5; Fig. 5b,c,e,f).

Table 5 GLM analysis testing fixed effects of age (4, 6, 8, 10, 12, 15, and 20 days post emergence) and treatments (Analytical caffeine, Guarana powder, Instant coffee and Control) on male Q-fly Testis development (length and area).
Figure 5
figure 5

Testis length (mean ± SE) and testis area (mean ± SE) obtained at different ages by male Q-flies provided a diet of sugar and yeast hydrolysate combined with two doses (%) of each supplement (Analytical caffeine, Guarana powder, Instant coffee and Control) for 2 days after emergence and then sugar only. Means separated by different letters indicates significant differences between treatment and control at particular ages (Dunnett’s test, P < 0.05).

Discussion

Dietary supplements of analytical caffeine significantly increased mating propensity and accelerated reproductive organ development in male Q-flies. These effects were closely comparable to effects of methoprene25,26,27 and raspberry ketone49 supplements incorporated into the adult diet for two days following emergence. Despite providing equivalent concentrations of caffeine in guarana powder and instant coffee, these supplements had little effect on mating behaviour or development.

Being a metabolic enhancer caffeine likely activates metabolic pathways in immature male Q-flies, and by this mechanism accelerates reproductive development. Caffeine is the most popular psychoactive drug in the world owing to its stimulatory properties50,55. In addition to the familiar effects on humans, caffeine also has potent effects on invertebrates such as increased spontaneous neural activity and increased locomotor activity52,59. While in invertebrates caffeine influences energy reserves and metabolic activity60, in vertebrates caffeine mostly acts on the central nervous system61. Sequentially it mobilizes intracellular calcium, inhibits specific phosphodiesterase, and most importantly it induces differential responses on the action of the methylxanthine on serotonin neurons. These responses are found to translate into altered locomotion, learning, memory, performance and coordination52. Furthermore, in vertebrates caffeine promotes energy metabolism in the brain and decreases cerebral blood flow, generating a relative brain hypo perfusion61. However, in Drosophila Nall et al.53 postulated that dopamine mediates the wake-promoting effect of caffeine, and that caffeine likely acts pre-synaptically to increase dopamine signalling. A cluster of neurons, the paired anterior medial (PAM) cluster of dopaminergic neurons exhibits increased activity as a result of caffeine administration53. Dopamine has been reported to increase behavioural activity (locomotion, sexual behaviour, and pheromone production or secretion) in Drosophila melanogaster62,63,64,65,66, to mediate aggressive encounter, flying and fighting ability in crickets67,68, to increase motor response in worker bees69,70 and queen bees71,72 and to enhance escape behaviour in cockroaches73,74. Therefore, accelerated sexual maturation in caffeine-supplemented Q-fly might be related to increased dopamine signalling. Further studies are required to address the changes in biogenic amines following caffeine treatment.

In addition to increased mating propensity, analytical caffeine-supplemented Q-fly males had shorter mating latency. It might be that shorter mating latency is simply a behavioural expression of greater sexual vigour and courtship effort. Shorter latency to initiate mating displayed by analytical caffeine-supplemented males corresponds with similar effect associated with methoprene supplements in the Q-fly26 and also in the melon fly Bactrocera cucurbitae30. Additionally, analytical caffeine-supplemented flies had longer mating duration, which also resembles the effect of dietary methoprene supplements26,27,30. The implications of longer mating duration for SIT is not straightforward. While there is little evidence of links between between mating duration and quantity of sperm storage20,75,76,77, postcopulatory success might still be promoted by longer copulation. Longer copulations by sterile males can induce higher levels of infertility in females that have previously mated with a fertile male or later remate with a fertile male, which is positive post-mating outcome for SIT76.

The increase in mating propensity of analytical caffeine-supplemented flies corresponded with accelerated development of the reproductive organs (ejaculatory apodeme and testes). This pattern confirms that the effects of analytical caffeine are not solely behavioural, but that the expression of mating behaviour aligns with development of the reproductive system. This is important, because if analytical caffeine only affected mating behaviour without also affecting morphological development then the matings of young caffeine treated males might be ineffective. While there is still a need to directly assess remating tendency of females mated by analytical caffeine-supplemented males, the alignment of age-dependent mating propensity with age-dependent development of reproductive organs is encouraging. Those treatments that did not result in increased mating propensity also did not result in accelerated development of reproductive organs, and this further substantiates the links between development of reproductive organs and expression of mating behaviour.

Regardless of dose, analytical caffeine did not affect the longevity of Q-flies. On the other hand, the highest two doses of guarana powder and instant coffee resulted in substantially reduced longevity. Caffeine is the most known component of roasted coffee beans, varying between 0.8 and 4.0% (w/w) depending on variety78. However, coffee beans also contain a large diversity of compounds, including carbohydrates (38.0–41.5%), lipids (11–17.0%), protein (10.0%), trigonelline, niacin (1.0%), aliphatic acids (2.4–2.5%), chlorogenic acids (2.7–3.1%), minerals (4.5–4.7%), melanoidinsc/brown compounds (23%)78,79,80. In addition to a high percentage (2.5–6%) of caffeine (1,3,7-tri-methylxanthine)81, guarana seeds also contain starch (60.88%), tannin (9.6%), protein (8.56%), soluble sugar (7.97%), reducing sugars (4.89%), as well as smaller proportions of the purine alkaloids theobromine (3,7-dimethylxanthine) and theophylline (1,3-dimethylxanthine). Guarana seeds also contain a high concentration of polyphenols, particularly proanthocyanidins with a higher prevalence of catechins and epicatechins82,83,84,85. Some of the diverse compounds in guarana powder and instant coffee might be toxic when applied at higher tested doses, or inhibit feeding, which would explain the reduction in Q-fly longevity. Despite having similar caffeine content, guarana powder and instant coffee did not affect sexual development and this may reflect sub-lethal effects of constituents other than caffeine. Overall, together with the acceleration of reproductive development, the absence of negative effects of analytical caffeine supplements on longevity are promising for use as a potential pre-release supplement for Q-fly SIT.

Conclusion

Dietary analytical caffeine supplements provided in the first two days post-eclosion strongly accelerate Q-fly reproductive development without effects on longevity, and have potential value as pre-release supplement to increase efficacy of SIT programs. Coffee powder and guarana powder both contain caffeine but were not effective in promoting sexual maturation. Q-fly SIT programs commonly release immature flies and pre-release caffeine supplements provide a new means to decrease the delay to maturation following release and thereby increase the number of flies that survive to maturity and participate in mating with pest populations. Having proven effective for Q-fly, it is highly likely that caffeine supplements will yield parallel benefits in other fruit flies.

Methods

Study insects

Q-flies were obtained as pupae from the Fruit Fly Production Facility at the Elizabeth Macarthur Agricultural Institute, Menangle, New South Wales (NSW), Australia (for production details, see Dominiak et al.86). At this facility, larvae were reared on lucerne chaff larval diet. At Macquarie University, all pupae and flies, and experiments, were maintained in controlled environment rooms at 25 ± 0.5 °C and 65 ± 5% RH. A L13:D11 h photoperiod was maintained, with flies experiencing a simulated dawn and dusk as the lights ramped up and down through 0.5 h at the beginning and end of the light phase, respectively. To sterilize flies, pupae were irradiated with 65 Gy gamma radiation at Macquarie University, New South Wales, Australia87,88. For sterilisation, ca. 4000 pupae were sealed in zip lock plastic bags (100 × 150 mm) two days prior to emergence. The sealed bags were held overnight in a temperature-controlled room (18 °C) to so that they were hypoxic for irradiation.

Treatments

Newly emerged adult male Q-flies were provided dry blended mixtures of the following supplements for 48 h:

  • Analytical caffeine: Analytical caffeine + sugar and YH (3:1).

  • Guarana powder: Guarana powder + sugar and YH (3:1).

  • Instant coffee: Instant coffee + sugar and YH (3:1).

  • Control: Only sugar and YH (3:1) as food.

All the caffeine sources used in this study were available in powder form. The powdered caffeine source (as required on dry weight basis) was mixed with sugar and YH (3:1) using a blender such that selective feeding was not possible.

Analysis of caffeine contents

Analytical caffeine was obtained from Sigma Aldrich Australia (CAS Number 58-08-2), Guarana powder was from My Protein Australia Ltd, and instant coffee was from Moconna classic medium roast (Netherlands). To estimate caffeine content of guarana powder and instant coffee, GC-FID analysis was performed on a Shimadzu GC17A equipped with a split/split less injector, a Restek Rxi-5Ms fused silica capillary column (30 m × 0.25 mm, 0.25 μm film), flame ionization detector (FID) and an AOC-20 auto sampler. Hydrogen gas (BOC, North Ryde, NSW, Australia) (99.999%) was used as a carrier gas with a constant flow of 1.5 mL/min. Caffeine in guarana and instant coffee was extracted by dissolving in boiling water and extracting with dichloromethane (DCM). A weighed amount of guarana powder or instant coffee was added to water (15 mL) in a beaker. The solution was boiled and stirred with magnetic stirrer bar for 15 min. The solution was vacuum filtered, and the filtrates were allowed to cool to room temperature. The filtrate was extracted with DCM (15 mL × 3) using a separator funnel. The organic layers were combined, dried over anhydrous Na2SO4 (Sigma Aldrich), and concentrated under reduced pressure to give 1.0 mL, which was subjected to GC-FID for quantification. A stock solution of caffeine was prepared. Standard solutions of caffeine were prepared by serial dilution of the stock solution. Tridecane (Sigma Aldrich) was used as an internal standard that was incorporated into each standard and sample solutions to give a final concentration of 8.53 µg/mL. The standard and sample solutions were run through GC-FID. The peak area ratios of GC response of caffeine to internal standard in standard solutions were plotted against the concentrations of the standard solutions to obtain a standard curve. The standard curve was used to estimate the concentration of caffeine and hence the amount in each sample could be calculated in µg/g. Guarana powder and instant coffee used in the analysis contained 5% and 1% caffeine, respectively.

Longevity

Approximately 6,000 pupae from a single day of pupation were placed in each of 22 mesh cages (Megaview Bugdorm 44,545, 47.5 × 47.5 × 47.5 cm) for adult emergence. Usually few flies emerge on the first day of emergence, and these were discarded. During emergence, each cage of flies was provided with water-soaked cotton wool in two 70-mL clear plastic sample container but no food. After the second day of emergence, unemerged pupae were removed from the cages and newly emerged adults (age 0–24 h) were provided a 1:3 mixture of yeast hydrolysate and sugar containing one of seven doses of analytical caffeine (0.0125, 0.025, 0.05, 0.075, 0.1, 0.125, & 0.15%), guarana powder (0.25, 0.50, 1, 1.5, 2 , 2.5, & 3%), instant coffee (1.25, 2.5, 5, 7.5, 10, 12.5, & 15%) or a control (0%) for 2 days ad libitum. Based on caffeine quantification, doses from the three sources had equivalent caffeine levels. After two days, five male flies from each treatment were placed in each of five 1.125 L cages that had a mesh-covered window (ca. 28 cm2) for ventilation (i.e., 25 flies for each treatment). Each cage was provided with water-soaked cotton wool and sugar in separate 35 mm Petri dishes. Flies were checked daily until all had died. Dead flies were removed from the cages daily. Longevity trials were performed twice, using pupae from two different batches.

Sexual performance

To assess the effect of caffeine on mating propensity, the two highest doses that were found to be non-toxic for all caffeine sources in the longevity assay were tested. Approximately 6,000 pupae from a single day of pupation were placed in each of seven mesh cages (Megaview Bugdorm 44,545 Taiwan) for adult emergence. Each cage was provided with water-soaked cotton wool in two 70-mL clear plastic sample containers during emergence26,27. Flies emerging on the first day of emergence were discarded26,27. After the second day of emergence, newly emerged adults (age 0–24 h) were provided 1:3 mixture of yeast hydrolysate and sugar containing analytical caffeine (0.075 or 0.1%), guarana powder (1.5 or 2%), instant coffee (7.5 or 10%) or a control (0%) for next two days. Doses of analytical caffeine, guarana powder and instant coffee had equivalent caffeine content. After two days, the treated food was replaced with sugar only in a 90 mm Petri dish27. The flies were then sorted according to sex within 3 days after emerging by collecting and transferring individual flies in glass tubes to transparent plastic 12-L cages that had a mesh-covered ca. 80 cm2 window for ventilation26,27. Approximately 200 flies in each 12-L cage were provided continuous access to dry granular sucrose27. As a source of water, cages were supplied with water-soaked cotton wool in a 70-mL clear plastic sample container27.

To obtain mature flies (12–17 days old) to pair with treated flies, ca. 800 pupae from numerous pupation dates were placed in separate mesh cages (Megaview Bugdorm 44,545) for adult emergence. Cages were supplied with water-soaked cotton wool two 70-mL sample containers and dry granular sucrose along with yeast hydrolysate (3:1) as food on a 90 mm Petri dish; this diet is effective at supporting Q-fly development20,21,22. Adult flies were sorted according to sex within 3 days after emerging by collecting and transferring individual flies in glass tubes to clear plastic 12-L cages that had a mesh-covered ca. 80 cm2 window for ventilation26,27. Approximately 200 flies in each 12-L cage were provided continuous access to dry blended mixture of granular sucrose and yeast hydrolysate (3:1). Cages were supplied with water-soaked cotton wool in a 70-mL clear plastic sample container. No calling, courting, or mating was observed in cages prior to separating the sexes.

Mating trials were conducted at 4, 6, 8, 10, 12, 15, and 20 days post emergence. Mating in Q-flies takes place at dusk89. On each mating day, at least four hours before the onset of dusk, twenty males from each treatment group were placed individually in clear plastic 1.125 L containers that had a mesh-covered window (ca. 28 cm2) for ventilation27. Each male fly was paired with a sexually mature virgin (12–17 days old) female fly20. In case of early matings, periodic observations were carried out every 15–20 min from when pairs were set up, and continuous observations in which each cage was observed at least once each minute began 90 min prior to the onset of dusk27. To assess copula latency, the time of onset of copulation was recorded for each mating pair27,28. To assess copula duration for each mating pair, observations continued until the last pair had separated27,28. Overall, 140 male flies were tested on each day, providing a total of 980 test pairs across all ages. The experiment was performed twice using batches of pupae obtained two months apart.

Reproductive organ development

Application of treatments for assessment of reproductive development was similar to that for assessment of mating propensity (above). To assess the effect of caffeine on male reproductive organ development, we measured area and length of testes and ejaculatory apodeme. Ten males were collected from each treatment at 4, 6, 8, 10, 12, 15, and 20 days post emergence and were dissected in phosphate-buffered saline (PBS; pH 7.4) using fine forceps on a microscope slide under a Leica MZ6 stereomicroscope. Then the dissected ejaculatory apodeme and testes were photographed using a 1.3-megapixel camera (Model-AM4023CT C-Mount camera; Dino-Lite digital microscope, Taiwan) through the phototube of the stereomicroscope. Images were calibrated and measured using Image J (Version1.49, NIH, Maryland, USA). Ejaculatory apodeme length was measured from where the ejaculatory sac joins the apodeme to the farthest point, and area was measured by tracing the outline of the apodeme following Radhakrishnan and Taylor75. Length of the testes was measured by tracing a midline through the centre of the organ from the base to the curved tip, and the area of testes was measured by tracing the outline75. The experiment was performed twice using batches of pupae obtained 2 months apart.

Statistical analysis

All analyses were conducted using R v3.5.1. Survival of the flies (log-transformed) was assessed using a general linear mixed model (GLMM). Data were not censored and followed a Gaussian distribution (based on model residuals). Separate models were considered for each caffeine supplement with each having control as dose of zero. Dose was included as a categorical variable due to a sharp drop off in survival in two treatments. Replicate was included as a fixed effect and cage identity was included as a random effect. Post-hoc comparisons were then performed comparing the control to each dose using Dunnett’s correction.

Mating probability (binary outcome) was assessed using a general linear model with a binomial distribution. For both mating latency and mating duration (square-root transformed) a linear model (Gaussian distribution) was used. Latency was re-defined as the time from 30 min post-dusk as the square-root of this variable was normally distributed, but all latency results are back-transformed to the original definition (time to initiate mating). Separate models were run for each caffeine supplement. However, the same control flies were included in each model and defined as a dose of zero. The predictors were the same for each model: dose (ordinal), age (ordinal), and replicate (nominal). Post-hoc comparisons for each dose compared with the control were then performed using least-square means with Dunnett’s correction.

Area and length (both log-transformed) of ejaculatory apodeme and testis were analysed in separate general linear models (GLM, Gaussian distribution) for each caffeine supplement. As above, the control was included as dose of zero for each treatment. Replicate was also included as fixed effect. Post-hoc comparisons for each dose compared with the control were then performed using least-square means with Dunnett’s correction.