Species:
 
Bactrocera cucurbitae (Coquillett)
   
Common Name:
 
Melon fly
   
Damaging Stage:
 
Maggots/larvae
   
Crops Afected:
 
Cucurbits, solanaceous and legumes
   
Characteristics Damage:
 
Attacks flowers, stem  and fruits
   
Eggs are deposited inside the fruits and tissues around the oviposition site become necrotic.
   
Eggs are hatched into maggots which live and develop inside the fruit, internal feeding causes yellowing and decomposition/rotting of the fruit.
   
Control and Management:
 
Monitor the area regularly.
   
Maintain good field sanitation.
   
Wrap the fruits with newspaper, paper bag or polyethylene sleeves to prevent females in laying eggs.
   
Suppress male population by using attractants (pheromones) like cue lure (4-(p-acetoxyphenyl)-2-butanone) or to methyl eugenol (4-allyl-1,2-dimethoxybenzene).
   
Spray neem seed kernel extract to deter oviposition.
   
Apply insecticides such as dimethoate (e.g. Perfekthion ®), fenthion (e.g. Lebaycid®) and diazinon (e.g. Parapest®) when necessary.
   
References:

https://en.wikipedia.org/wiki/Fruit_fly

http://www.cabi.org/isc/datasheet/17683

https://en.wikipedia.org/wiki/Melon_fly