These are the egg laying scars made by the cicada Amphipsalta cingulata. In this example, the stem is from mahoe but it is similar in appearance to the damage caused to apple or pear stems.