First of all,
-Tone := T
-Semi-Tone:= ST.
Suppose you have the well know C major scale pattern:
T T ST T T T ST
Well, this is just one example of what we can do in music: creation of scale patterns. The creation of the scale itself, can be motivated by any sorts of influences.
Now, suppose you have the song "X" and you know that the melody of this song is composed by:
D1 A1 C#1 D2 A1 C#1 D2 A2
Given this melody, you create a pattern which is just the distance between the notes of the melody:
T 3.5T 2T ST -2.5T 2T ST 3.5T
My question is: knowing that the song "X" is in D; if you use the pattern created, but starting in key A1, it will be plagiarism? Because, the whole melody will change but will be alike.