The stress induced diffusion process of In-Ga segregation in In x Ga 1-x N layer deposited on GaN is simulated step by step by using a 3D nonlinear FE method. From the thermodynamical point of view this process is governed by the driving force induced by the gradient of residual stresses operating in an anisotropic nonlinear elastic structure. The source of stresses we consider is the set of threading dislocations examined in the plane view HRTEM investigation of GaN layer deposited on sapphire.