Configurational ordering of defects in solids