The apples that remain on the tree for the longest time are the ones that are most affected by codling moths. Early-ripe apples are the ones that are least plagued. The number of these pests increases with each generation of fruit produced.