The most common. For me. Mostly from comments in source code.
Updated with 1.7 code.
Attribute->cleanPositions(int $id_attribute_group, bool $useLastAttribute = true) : bool
Reorder attribute position in group $id_attribute_group. Call it after deleting an attribute from a group.