I think you have other problems that you need to fix first, I added a couple print statements (a very useful debugging tool, just print out values and check they are correct):
System.out.println("tx: " + TargetShip.getOriginX() + " ty: " + TargetShip.getOriginY());
System.out.println("px: " + OriginPositionX + " py: " + OriginPositionY);
And I get the following output every time, without change, even attempting to target other ships:
tx: 5120 ty: 5120
px: 6120 py: 5120
Any bullets of course will travel horizontally.
Also, you are storing bullet positions as integers which is problematic because the result of a trig function may not be enough to push it over to the next integer. This means the possible angles it can travel are limited, but it will be as close as it can be. Use floats or doubles. When changing the ship to target the mouse, this problem became clear, as you can visually see the relation between the target and the angle of the shots.