Program: 46499
Project: 46499
Buggy source:
private AudioEntry getVolumeEntry(String key,Type type){
  if (volumeEntries.get(key + type) != null) {
    return volumeEntries.get(key + type);
  }
  int pid=getPID(key);
  ShellUtil pacmd=new ShellUtil();
  try {
    pacmd.run("String_Node_Str","String_Node_Str");
  }
 catch (  Exception e) {
    LOG.error(e.toString());
  }
  StringBuffer sb=pacmd.getStandardOutput();
  StringReader r=new StringReader(sb.toString());
  BufferedReader rr=new BufferedReader(r);
  try {
    String inp=null;
    int index=-1;
    int volume=-1;
    boolean muted=false;
    boolean proc=false;
    while ((inp=rr.readLine()) != null) {
      if (inp.contains(type.header)) {
        index=Integer.parseInt(inp.replace(type.header,"String_Node_Str").replace("String_Node_Str","String_Node_Str").trim());
        proc=true;
        continue;
      }
 else       if (!proc) {
        continue;
      }
      if (proc) {
        if (inp.contains("String_Node_Str")) {
          inp=inp.replaceAll("String_Node_Str","String_Node_Str");
          volume=Integer.parseInt(inp.replace("String_Node_Str","String_Node_Str").trim());
          continue;
        }
        if (inp.contains("String_Node_Str")) {
          inp=inp.replace("String_Node_Str","String_Node_Str");
          muted=!inp.trim().equals("String_Node_Str");
          continue;
        }
        if (inp.contains(pid + "String_Node_Str")) {
          break;
        }
      }
    }
    if (index != -1) {
      volumeEntries.put(key + type,new AudioEntry(index,volume,muted));
      return volumeEntries.get(key + type);
    }
  }
 catch (  Exception e) {
  }
  return null;
}

Fixed version (ground truth):
private AudioEntry getVolumeEntry(String vmId,Type type){
  ShellUtil pacmd=new ShellUtil();
  try {
    pacmd.run("String_Node_Str","String_Node_Str");
    StringBuffer sb=pacmd.getStandardOutput();
    StringReader r=new StringReader(sb.toString());
    BufferedReader rr=new BufferedReader(r);
    String line=null;
    Pattern titleRegex=Pattern.compile("String_Node_Str");
    Pattern volumeRegex=Pattern.compile("String_Node_Str");
    Pattern muteRegex=Pattern.compile("String_Node_Str");
    String currentHeader=null;
    String currentIndex=null;
    String currentVolume=null;
    String currentMute=null;
    boolean vmIdFound=false;
    boolean volumeFound=false;
    boolean muteFound=false;
    boolean headerFound=false;
    while ((line=rr.readLine()) != null) {
      Matcher titleMatch=titleRegex.matcher(line);
      if (titleMatch.matches()) {
        currentHeader=titleMatch.group(1);
        currentIndex=titleMatch.group(2);
        currentVolume=null;
        currentMute=null;
        vmIdFound=false;
        volumeFound=false;
        muteFound=false;
        headerFound=type.header.equals(currentHeader);
      }
      if (headerFound && line.contains(vmId)) {
        vmIdFound=true;
      }
      if (headerFound) {
        Matcher volumeMatch=volumeRegex.matcher(line);
        if (volumeMatch.matches()) {
          volumeFound=true;
          currentVolume=volumeMatch.group(1);
        }
      }
      if (headerFound) {
        Matcher muteMatch=muteRegex.matcher(line);
        if (muteMatch.matches()) {
          muteFound=true;
          currentMute=muteMatch.group(1);
        }
      }
      if (headerFound && vmIdFound && volumeFound&& muteFound) {
        AudioEntry entry=new AudioEntry(Integer.parseInt(currentIndex),Integer.parseInt(currentVolume),"String_Node_Str".equalsIgnoreCase(currentMute));
        return entry;
      }
    }
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e);
  }
  return null;
}