Try this:
Clip clip4 = null; // Make this a member variable.
...
if (message.equals("rock1")) {
AudioInputStream inputStream = AudioSystem.getAudioInputStream(new File("D:/Andrd/Music/TheAll-AmericanRejects-Swing,Swing.wav"));
clip4 = AudioSystem.getClip();
clip4.open(inputStream);
clip4.start();
} else if (message.equals("stop") && clip4 != null && clip4.isRunning())
clip4.stop();
}
EDIT
Notice that Clip clip4 = null;
is not a member variable. It is declared inside the while loop. Each time the loop iterates, it is being redeclared. If you declare it as a Class level "member variable" you will get a different result.