The chapter
Simply He says he is the vine and they are the branches, and that a branch cut off the vine can do nothing. Then he tells them to remain in his love, and that the commandment is to love one another as he has loved them. He calls them friends rather than servants. And then he warns them: the world that hated him will hate them too.
Context The chapter has two halves that are usually quoted separately and belong together. The first is about staying close and bearing fruit, the second is about being hated for it, and the join is verse 18, which uses the same word, world, that verse 19 says they were chosen out of. Nothing in the warning is presented as a surprise: the reason given is that a servant is not greater than his master, which is the sentence he had already used in chapter 13 about washing feet, put now to the opposite use.
Verses 1-17
Simply The Father tends the vine, cutting away what bears nothing and pruning what bears fruit so it bears more. He tells them to remain in him, because a branch by itself cannot do anything. If they keep his commandments they stay in his love, as he has kept his Father's. The commandment is that they love each other as he loved them, and the measure he gives is laying down one's life for one's friends. He says he no longer calls them servants but friends, and that they did not choose him.
Context The image is agricultural and the pruning is done to the fruitful branch, not only to the barren one, which is the part usually left out when the verse is quoted for comfort. Verse 15 gives the reason for the change of title and it is about information rather than affection: a servant does not know what his master is doing, and he has told them everything he heard. Verse 16 reverses the ordinary direction of choosing, and it is stated flatly, without argument.
Verses 18-27
Simply If the world hates them, he says, it hated him first, and the reason is that they no longer belong to it. They will be treated as he was treated. He says that those who hate him hate his Father too, and that if he had not come and spoken they would have had no sin. He quotes a line from their own scripture about being hated without cause. Then he promises the Spirit of truth, who will testify about him, and says they will testify too.
Context The quotation at verse 25 is given without a reference, and the phrase it uses appears in two psalms in this app, 35:19 and 69:4, so a reader can open both and this file does not pick one for them. The logic of verses 22 and 24 is uncomfortable and the text does not ease it: the coming and the speaking are what remove the excuse, which makes the sin a consequence of the revelation rather than a state that preceded it. Verse 27 puts the disciples and the Spirit in the same sentence and gives them the same verb.