Evidence of composition fluctuations around threading dislocations at scales ranging from atomic distances to tens of nanometers is provided by z-contrast imaging, strain measurement, and energy dispersive x-ray spectroscopy in AlxIn1-x N/GaN heterostructures. The atomic core rings of edge-type dislocations are shown to lie across highly antisymmetric elemental environments, and the indium-rich pit centers of mixed dislocation are found to lie on the tensile side of their atomic core ring. The observed composition fluctuations around pure-edge dislocations are compared with an elastostatic free energy model calculation and a good qualitative and quantitative agreement is obtained. Hydrostatic stress is shown to be their principal cause: Tensile stress regions are indium rich and compressive stress regions are aluminum rich. We show that the stress field of a mixed dislocation can impact the composition of the alloy more than a hundred nanometers away from its core. Indium core segregation on pure-screw threading dislocation is also evidenced and explained by the model, as shear stress is also expected to affect composition. Furthermore, threading dislocations are shown to bend less in the AlxIn1-x N alloy than in GaN, suggesting that they are "pinned" by stress-induced fluctuations. Such concentration modulations can have an important impact on optical and electrical properties of Group-III nitride devices that generally contain a high dislocation density (in the 10(8) to 10(10) cm(-2) range). We propose that stress-induced composition modulation could be the origin of defect insensitivity in indium-containing nitride ternary alloys.