The sentence is taken from the Manga Death Note:
(I put spaces where the sentence parts are separated within the speech bubble...)
「ワタリには 自分の身にもしもの事があった場合 自分でできれば自分でできなければ 一定時間ワタリが携わらない事で自動的に 全データを消すように言ってあります...」
There is a small space between the 「自分でできれば自分で」and the 「できなければ」. While I get what the sentence means I was wondering where the second 「自分」 belongs to. From my interpretation the 「自分でできれば自分で」 is one constituent and in 「できなければ」an additional 「自分」is simply omitted because we do not need it to understand the sentence, isn't it?
In other terms: Could the part be replaced by: 「...自分でできれば自分で 自分できなければ...」? I fully understand that this sound rather clumsy, but it is not grammatically incorrect or is it?
Edit:
Adressing the answer already given:
I did not want to say that in 「自分でできれば自分で」 the second 「自分」is modified by 「自分でできれば」I thought that it is more or less an abbreviated form of 「自分でできれば自分で全データを消すように言ってあります」. I am not sure whether that is grammatically possible; however, I assumed that one could use that to put a certain stress on the phrase. I guess you could translate it as: If he can do it himself, he will delete all data by himself. So, my general idea was that 「自分でできれば自分で」can put a certain stress on who does the action.
Addressing the second part of the answer:
I think I was not clear enough in the original question, but I did not intend to say that 「自分で自分できなければ」is correct. I fully understand why that is ungrammatical, but I did not consider these to form a constituent in the first place; what I meant was that 「自分でできれば自分で」form a constituent; The second 「自分」would be part of 「自分でできれば自分で」not of 「自分で自分できなければ」.