nus-yam/ex-repair huggingface dataset:
Program: 46481
Project: 46481
Buggy source:
public Object[] rdb_load_length(ByteBuffer file){
  Boolean isEncoded=false;
  byte buffer=file.get();
  byte type=(byte)((buffer & 0xC0) >> 6);
switch (type) {
case REDIS_RDB_6BITLEN:
    return new Object[]{isEncoded,buffer & 0x3F};
case REDIS_RDB_ENCVAL:
  isEncoded=true;
return new Object[]{isEncoded,buffer & 0x3F};
case REDIS_RDB_14BITLEN:
return new Object[]{isEncoded,((buffer & 0x3f) << 8) | file.get()};
default :
int retVal=0;
for (int i=0; i < 4; i++) retVal=retVal << 8 | file.get();
return new Object[]{isEncoded,retVal};
}
}

Fixed version (ground truth):
public Object[] rdb_load_length(ByteBuffer file){
  Boolean isEncoded=false;
  byte buffer=file.get();
  byte type=(byte)((buffer & 0xC0) >> 6);
switch (type) {
case REDIS_RDB_6BITLEN:
    return new Object[]{isEncoded,buffer & 0x3F};
case REDIS_RDB_ENCVAL:
  isEncoded=true;
return new Object[]{isEncoded,(buffer & 0x3F)};
case REDIS_RDB_14BITLEN:
return new Object[]{isEncoded,(((buffer & 0x3f) << 8) | (file.get()) & 0xFF)};
default :
int retVal=0;
for (int i=0; i < 4; i++) retVal=retVal << 8 | file.get();
return new Object[]{isEncoded,retVal};
}
}
Program: 46482
Project: 46482
Buggy source:
public Replicator(final InetAddress host,final int port){
  keys=new HashMap<String,String>();
  try {
    this.socket=new Socket(host,port);
    Thread thread=new Thread(new Runnable(){
      @Override public void run(){
        try {
          connect();
          while (socket.isConnected()) {
            InputStream in=socket.getInputStream();
            String line=readLine(in);
            if (line.charAt(0) == '*') {
              int argumentCount=Integer.parseInt(line.substring(1).trim());
              line=readLine(in);
              int command_length=Integer.parseInt(line.substring(1).trim());
              String command=readFor(in,command_length);
              if (!command.equals("String_Node_Str"))               break;
              skipBytes(in,2);
              line=readLine(in);
              int keyLength=Integer.parseInt(line.substring(1).trim());
              String key=readFor(in,keyLength);
              skipBytes(in,2);
              line=readLine(in);
              int valueLength=Integer.parseInt(line.substring(1).trim());
              String value=readFor(in,valueLength);
              skipBytes(in,2);
              keys.put(key,value);
              System.out.println("String_Node_Str" + key + "String_Node_Str"+ value);
            }
          }
        }
 catch (        Exception e) {
          e.printStackTrace();
        }
      }
    }
,"String_Node_Str");
    thread.start();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public Replicator(final InetAddress host,final int port){
  keys=new HashMap<String,String>();
  try {
    this.socket=new Socket(host,port);
    Thread thread=new Thread(new Runnable(){
      @Override public void run(){
        try {
          connect();
          while (socket.isConnected()) {
            InputStream in=socket.getInputStream();
            String line=readLine(in);
            if (line.charAt(0) == '*') {
              Integer.parseInt(line.substring(1).trim());
              line=readLine(in);
              int command_length=Integer.parseInt(line.substring(1).trim());
              String command=readFor(in,command_length);
              if (!command.equals("String_Node_Str"))               break;
              skipBytes(in,2);
              line=readLine(in);
              int keyLength=Integer.parseInt(line.substring(1).trim());
              String key=readFor(in,keyLength);
              skipBytes(in,2);
              line=readLine(in);
              int valueLength=Integer.parseInt(line.substring(1).trim());
              String value=readFor(in,valueLength);
              skipBytes(in,2);
              keys.put(key,value);
              System.out.println("String_Node_Str" + key + "String_Node_Str"+ value);
            }
          }
        }
 catch (        Exception e) {
          e.printStackTrace();
        }
      }
    }
,"String_Node_Str");
    thread.start();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 46483
Project: 46483
Buggy source:
@Override public void run(){
  try {
    connect();
    while (socket.isConnected()) {
      InputStream in=socket.getInputStream();
      String line=readLine(in);
      if (line.charAt(0) == '*') {
        int argumentCount=Integer.parseInt(line.substring(1).trim());
        line=readLine(in);
        int command_length=Integer.parseInt(line.substring(1).trim());
        String command=readFor(in,command_length);
        if (!command.equals("String_Node_Str"))         break;
        skipBytes(in,2);
        line=readLine(in);
        int keyLength=Integer.parseInt(line.substring(1).trim());
        String key=readFor(in,keyLength);
        skipBytes(in,2);
        line=readLine(in);
        int valueLength=Integer.parseInt(line.substring(1).trim());
        String value=readFor(in,valueLength);
        skipBytes(in,2);
        keys.put(key,value);
        System.out.println("String_Node_Str" + key + "String_Node_Str"+ value);
      }
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    connect();
    while (socket.isConnected()) {
      InputStream in=socket.getInputStream();
      String line=readLine(in);
      if (line.charAt(0) == '*') {
        Integer.parseInt(line.substring(1).trim());
        line=readLine(in);
        int command_length=Integer.parseInt(line.substring(1).trim());
        String command=readFor(in,command_length);
        if (!command.equals("String_Node_Str"))         break;
        skipBytes(in,2);
        line=readLine(in);
        int keyLength=Integer.parseInt(line.substring(1).trim());
        String key=readFor(in,keyLength);
        skipBytes(in,2);
        line=readLine(in);
        int valueLength=Integer.parseInt(line.substring(1).trim());
        String value=readFor(in,valueLength);
        skipBytes(in,2);
        keys.put(key,value);
        System.out.println("String_Node_Str" + key + "String_Node_Str"+ value);
      }
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 46484
Project: 46484
Buggy source:
public String rdbLoadLzfStringObject(ByteBuffer file){
  try {
    Integer compressed_length=(Integer)rdb_load_length(file)[1];
    Integer length=(Integer)rdb_load_length(file)[1];
    byte[] buffer=new byte[compressed_length];
    byte[] output=new byte[length];
    output=LZFDecoder.decode(buffer);
    return new String(output);
  }
 catch (  Exception ex) {
    return null;
  }
}

Fixed version (ground truth):
public String rdbLoadLzfStringObject(ByteBuffer file){
  try {
    int i=0;
    byte Z_BYTE='Z';
    byte V_BYTE='V';
    byte COMPRESSED_TYPE_BYTE=1;
    int compressed_length=(Integer)rdb_load_length(file)[1];
    int length=(Integer)(rdb_load_length(file)[1]);
    byte[] buffer=new byte[compressed_length + 7];
    byte[] output;
    buffer[i++]=Z_BYTE;
    buffer[i++]=V_BYTE;
    buffer[i++]=COMPRESSED_TYPE_BYTE;
    buffer[i++]=(byte)(compressed_length >> 8);
    buffer[i++]=(byte)(compressed_length);
    buffer[i++]=(byte)(length >> 8);
    buffer[i++]=(byte)(length);
    for (; i < compressed_length + 7; i++)     buffer[i]=file.get();
    output=LZFDecoder.decode(buffer);
    return new String(output);
  }
 catch (  Exception ex) {
    ex.printStackTrace();
    return null;
  }
}
Program: 46485
Project: 46485
Buggy source:
/** 
 * Perform lexical analysis on the file given by filename
 * @param filename Name of source file to be parsed
 */
public Lexer(String filename){
  try {
    Scanner in=new Scanner(new File(filename));
    System.out.println(parseStm(in.nextLine().replaceAll("String_Node_Str","String_Node_Str")));
  }
 catch (  IOException ioe) {
    ioe.printStackTrace();
    System.exit(-3);
  }
}

Fixed version (ground truth):
/** 
 * Perform lexical analysis on the file given by filename
 * @param filename Name of source file to be parsed
 */
public Lexer(String filename){
  try {
    Scanner in=new Scanner(new File(filename));
    System.out.println("String_Node_Str");
    System.out.println("String_Node_Str");
    System.out.println("String_Node_Str");
    System.out.println(parseStm(in.nextLine().replaceAll("String_Node_Str","String_Node_Str")));
    System.out.println("String_Node_Str");
  }
 catch (  IOException ioe) {
    ioe.printStackTrace();
    System.exit(-3);
  }
}
Program: 46486
Project: 46486
Buggy source:
public Assign(Object O1,Object O2){
  o1=Lexer.parseExp(O1);
  o2=Lexer.parseStm(O2);
}

Fixed version (ground truth):
public Assign(String O1,Object O2){
  o1=O1;
  o2=Lexer.parseStm(O2);
}
Program: 46489
Project: 46489
Buggy source:
private File getuserDirectory(X509Certificate x509) throws IOException {
  String dn=x509.getSubjectDN().getName();
  String dnHash=HashUtil.sha512UrlInBase64(dn);
  File userDir=new File(baseDir,dnHash);
  if (!userDir.exists()) {
    userDir.mkdirs();
    File userCfg=new File(userDir,"String_Node_Str");
    FileWriter fw=new FileWriter(userCfg);
    fw.write("String_Node_Str" + dn + "String_Node_Str"+ dnHash+ "String_Node_Str");
    fw.close();
  }
  return userDir;
}

Fixed version (ground truth):
private File getuserDirectory(X509Certificate x509) throws IOException {
  String dn=x509.getSubjectDN().getName();
  String dnHash=HashUtil.sha512UrlInBase64(dn);
  File userDir=new File(baseDir,dnHash);
  if (!userDir.exists()) {
    if (!userDir.mkdirs()) {
      throw new IOException("String_Node_Str" + userDir.getAbsolutePath() + "String_Node_Str");
    }
    File userCfg=new File(userDir,"String_Node_Str");
    FileWriter fw=new FileWriter(userCfg);
    fw.write("String_Node_Str" + dn + "String_Node_Str"+ dnHash+ "String_Node_Str");
    fw.close();
  }
  return userDir;
}
Program: 46490
Project: 46490
Buggy source:
@Override public void run(){
  try {
    mgr=VirtualBoxManager.createInstance(null);
    mgr.connect("String_Node_Str","String_Node_Str","String_Node_Str");
    vbox=mgr.getVBox();
    connected=true;
    LOG.info("String_Node_Str",vbox.getVersion());
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str" + e.getMessage() + "String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    mgr=VirtualBoxManager.createInstance(null);
    mgr.connect("String_Node_Str","String_Node_Str","String_Node_Str");
    vbox=mgr.getVBox();
    connected=true;
    LOG.info("String_Node_Str",vbox.getVersion());
    IEventSource es=vbox.getEventSource();
    IEventListener listener=es.createListener();
    ArrayList<VBoxEventType> types=new ArrayList<VBoxEventType>();
    types.add(VBoxEventType.MachineEvent);
    es.registerListener(listener,types,false);
    while (connected) {
      IEvent ev=es.getEvent(listener,1000);
      if (ev != null) {
        IMachineEvent machineId=IMachineEvent.queryInterface(ev);
switch (ev.getType()) {
case OnGuestPropertyChanged:
          IGuestPropertyChangedEvent x=IGuestPropertyChangedEvent.queryInterface(ev);
        LOG.debug("String_Node_Str" + x.getName() + "String_Node_Str"+ x.getValue()+ "String_Node_Str",ev.getType(),machineId.getMachineId());
      break;
default :
    LOG.debug("String_Node_Str",ev.getType(),machineId.getMachineId());
  break;
}
es.eventProcessed(listener,ev);
}
}
}
 catch (Exception e) {
LOG.error("String_Node_Str" + e.getMessage() + "String_Node_Str",e);
}
}
Program: 46491
Project: 46491
Buggy source:
public void reconnect(){
  new Thread(new Runnable(){
    @Override public void run(){
      ShellUtil su=new ShellUtil();
      try {
        su.run(null,0,"String_Node_Str","String_Node_Str","String_Node_Str");
      }
 catch (      Exception e) {
        LOG.error("String_Node_Str");
      }
      try {
        su.run(null,0,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
        su.run(null,0,"String_Node_Str");
      }
 catch (      Exception e) {
        LOG.error("String_Node_Str");
      }
      LOG.error("String_Node_Str");
    }
  }
,"String_Node_Str").start();
  new Thread(new Runnable(){
    @Override public void run(){
      try {
        mgr=VirtualBoxManager.createInstance(null);
        mgr.connect("String_Node_Str","String_Node_Str","String_Node_Str");
        vbox=mgr.getVBox();
        connected=true;
        LOG.info("String_Node_Str",vbox.getVersion());
      }
 catch (      Exception e) {
        LOG.error("String_Node_Str" + e.getMessage() + "String_Node_Str",e);
      }
    }
  }
,"String_Node_Str").start();
}

Fixed version (ground truth):
public void reconnect(){
  new Thread(new Runnable(){
    @Override public void run(){
      ShellUtil su=new ShellUtil();
      try {
        su.run(null,0,"String_Node_Str","String_Node_Str","String_Node_Str");
      }
 catch (      Exception e) {
        LOG.error("String_Node_Str");
      }
      try {
        su.run(null,0,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
        su.run(null,0,"String_Node_Str");
      }
 catch (      Exception e) {
        LOG.error("String_Node_Str");
      }
      LOG.error("String_Node_Str");
    }
  }
,"String_Node_Str").start();
  new Thread(new Runnable(){
    @Override public void run(){
      try {
        mgr=VirtualBoxManager.createInstance(null);
        mgr.connect("String_Node_Str","String_Node_Str","String_Node_Str");
        vbox=mgr.getVBox();
        connected=true;
        LOG.info("String_Node_Str",vbox.getVersion());
        IEventSource es=vbox.getEventSource();
        IEventListener listener=es.createListener();
        ArrayList<VBoxEventType> types=new ArrayList<VBoxEventType>();
        types.add(VBoxEventType.MachineEvent);
        es.registerListener(listener,types,false);
        while (connected) {
          IEvent ev=es.getEvent(listener,1000);
          if (ev != null) {
            IMachineEvent machineId=IMachineEvent.queryInterface(ev);
switch (ev.getType()) {
case OnGuestPropertyChanged:
              IGuestPropertyChangedEvent x=IGuestPropertyChangedEvent.queryInterface(ev);
            LOG.debug("String_Node_Str" + x.getName() + "String_Node_Str"+ x.getValue()+ "String_Node_Str",ev.getType(),machineId.getMachineId());
          break;
default :
        LOG.debug("String_Node_Str",ev.getType(),machineId.getMachineId());
      break;
  }
  es.eventProcessed(listener,ev);
}
}
}
 catch (Exception e) {
LOG.error("String_Node_Str" + e.getMessage() + "String_Node_Str",e);
}
}
}
,"String_Node_Str").start();
}
Program: 46497
Project: 46497
Buggy source:
@Override public void showBootPasswordDialog(){
  LOG.debug("String_Node_Str");
synchronized (lock) {
    closeCurrentDialog();
    hideNavigationBarAndVms();
    final BootPasswordDialog msgdialog=new BootPasswordDialog(getDefaultParentFrame());
    msgdialog.addPasswordDialogListener(new BootPasswordListener(){
      @Override public void closed(){
        showNavigationBarAndVms(true);
      }
    }
);
    dialog=msgdialog;
    swingOpen(msgdialog);
  }
}

Fixed version (ground truth):
@Override public void showBootPasswordDialog(){
  LOG.debug("String_Node_Str");
synchronized (lock) {
    closeCurrentDialog();
    hideNavigationBarAndVms();
    final BootPasswordDialog msgdialog=new BootPasswordDialog(getDefaultParentFrame());
    msgdialog.addPasswordDialogListener(new BootPasswordListener(){
      @Override public void closed(){
        closeCurrentDialog();
        showNavigationBarAndVms(true);
      }
    }
);
    dialog=msgdialog;
    swingOpen(msgdialog);
  }
}
Program: 46498
Project: 46498
Buggy source:
@Override public void closed(){
  showNavigationBarAndVms(true);
}

Fixed version (ground truth):
@Override public void closed(){
  closeCurrentDialog();
  showNavigationBarAndVms(true);
}
Program: 46500
Project: 46500
Buggy source:
public synchronized AudioEntry getAudio(String key,Type type){
  return getVolumeEntry(key,type);
}

Fixed version (ground truth):
public synchronized AudioEntry getAudio(String vmId,Type type){
  return getVolumeEntry(vmId,type);
}
Program: 46501
Project: 46501
Buggy source:
public synchronized void setVolume(String key,final Type type,int vol){
  final AudioEntry ve=getVolumeEntry(key,type);
  if (ve != null) {
    int v=(int)(65536d * (double)(vol / 100d));
    if (v > 65536) {
      vol=100;
      v=65536;
    }
    final String s=String.format("String_Node_Str",v);
    ShellUtil pacmd=new ShellUtil();
    try {
      pacmd.run("String_Node_Str","String_Node_Str" + type.cmd + "String_Node_Str",ve.index + "String_Node_Str","String_Node_Str" + s);
      ve.setVolume(vol);
    }
 catch (    Exception e) {
    }
  }
}

Fixed version (ground truth):
public synchronized void setVolume(String vmId,final Type type,int volPC){
  final AudioEntry volEntry=getVolumeEntry(vmId,type);
  if (volEntry != null) {
    ShellUtil pacmd=new ShellUtil();
    try {
      pacmd.run("String_Node_Str","String_Node_Str" + type.cmd + "String_Node_Str",volEntry.getIndex() + "String_Node_Str",volPC + "String_Node_Str");
    }
 catch (    Exception e) {
      LOG.error("String_Node_Str",e);
    }
  }
}
Program: 46502
Project: 46502
Buggy source:
public synchronized void setMuted(String key,final Type type,final boolean muted){
  final AudioEntry ve=getVolumeEntry(key,type);
  if (ve != null) {
    ShellUtil pacmd=new ShellUtil();
    try {
      pacmd.run("String_Node_Str","String_Node_Str" + type.cmd + "String_Node_Str",ve.index + "String_Node_Str",muted + "String_Node_Str");
      ve.setMuted(muted);
    }
 catch (    Exception e) {
      LOG.error(e.toString());
    }
  }
}

Fixed version (ground truth):
public synchronized void setMuted(String vmId,final Type type,final boolean muted){
  final AudioEntry ve=getVolumeEntry(vmId,type);
  if (ve != null) {
    ShellUtil pacmd=new ShellUtil();
    try {
      pacmd.run("String_Node_Str","String_Node_Str" + type.cmd + "String_Node_Str",ve.getIndex() + "String_Node_Str",muted + "String_Node_Str");
    }
 catch (    Exception e) {
      LOG.error("String_Node_Str",e);
    }
  }
}
Program: 46503
Project: 46503
Buggy source:
private void run() throws Exception {
  CubeUIDefaults.initDefaults();
  new File(CubeCommonProperties.getProperty("String_Node_Str")).mkdirs();
  new File(CubeCommonProperties.getProperty("String_Node_Str")).mkdirs();
  new File(CubeCommonProperties.getProperty("String_Node_Str")).mkdirs();
  DmcryptContainerFactory.cleanup();
  ioc.addBean(new XrandrCLI());
  ioc.addBean(new CubeUI());
  ioc.addBean(new CubeClient());
  ioc.addBean(new ClientFacade());
  ioc.addBean(new VmControl());
  ioc.addBean(new VmMonitor());
  ioc.addBean(new VmActionListener());
  ioc.addBean(new CubeActionListener());
  ioc.addBean(XWindowManager.getInstance());
  ioc.addBean(new WindowManager());
  ioc.addBean(new CubeCore());
  ioc.addBean(new SessionManager());
  ioc.addBean(new LoginMachine());
  ioc.addBean(new ScAuthModule());
  ioc.addBean(new DmcryptContainerFactory());
  ioc.addBean(new ScTokenDevice());
  ioc.addBean(new CNMStateMachine());
  ioc.setupDependenciesOnAllBeans();
  VmAbstractAction.addVmActionListener(ioc.getBean(VmActionListener.class));
  CubeAbstractAction.addCubeActionListener(ioc.getBean(CubeActionListener.class));
  ioc.getBean(IXrandr.class).start();
  ioc.getBean(ICubeUI.class).start();
  ioc.getBean(XWindowManager.class).start();
  ioc.getBean(ISessionManager.class).start();
  ioc.getBean(ITokenDevice.class).start();
  ioc.getBean(IAuthModule.class).start();
  ioc.getBean(ILogin.class).start();
}

Fixed version (ground truth):
private void run() throws Exception {
  new VmAudioControl().setMainVolume(120);
  CubeUIDefaults.initDefaults();
  new File(CubeCommonProperties.getProperty("String_Node_Str")).mkdirs();
  new File(CubeCommonProperties.getProperty("String_Node_Str")).mkdirs();
  new File(CubeCommonProperties.getProperty("String_Node_Str")).mkdirs();
  DmcryptContainerFactory.cleanup();
  ioc.addBean(new XrandrCLI());
  ioc.addBean(new CubeUI());
  ioc.addBean(new CubeClient());
  ioc.addBean(new ClientFacade());
  ioc.addBean(new VmControl());
  ioc.addBean(new VmMonitor());
  ioc.addBean(new VmActionListener());
  ioc.addBean(new CubeActionListener());
  ioc.addBean(XWindowManager.getInstance());
  ioc.addBean(new WindowManager());
  ioc.addBean(new CubeCore());
  ioc.addBean(new SessionManager());
  ioc.addBean(new LoginMachine());
  ioc.addBean(new ScAuthModule());
  ioc.addBean(new DmcryptContainerFactory());
  ioc.addBean(new ScTokenDevice());
  ioc.addBean(new CNMStateMachine());
  ioc.setupDependenciesOnAllBeans();
  VmAbstractAction.addVmActionListener(ioc.getBean(VmActionListener.class));
  CubeAbstractAction.addCubeActionListener(ioc.getBean(CubeActionListener.class));
  ioc.getBean(IXrandr.class).start();
  ioc.getBean(ICubeUI.class).start();
  ioc.getBean(XWindowManager.class).start();
  ioc.getBean(ISessionManager.class).start();
  ioc.getBean(ITokenDevice.class).start();
  ioc.getBean(IAuthModule.class).start();
  ioc.getBean(ILogin.class).start();
}
Program: 46504
Project: 46504
Buggy source:
@Override protected JPanel createCenterContentPanel(){
  ImageIcon icon=null;
  JPanel contentPnl=new JPanel();
  SpringLayout layout=new SpringLayout();
  contentPnl.setLayout(layout);
  JLabel iconLb=new JLabel(icon);
  contentPnl.add(iconLb);
  layout.putConstraint(SpringLayout.NORTH,iconLb,40,SpringLayout.NORTH,contentPnl);
  layout.putConstraint(SpringLayout.WEST,iconLb,20,SpringLayout.WEST,contentPnl);
  int yoffset=0;
  for (  Type t : Type.values()) {
    JLabel label=t.label;
    JSlider slider=t.slider;
    JCheckBox cbox=t.cbox;
    contentPnl.add(label);
    contentPnl.add(slider);
    contentPnl.add(cbox);
    layout.putConstraint(SpringLayout.NORTH,label,20,SpringLayout.NORTH,slider);
    layout.putConstraint(SpringLayout.WEST,label,20,SpringLayout.WEST,slider);
    layout.putConstraint(SpringLayout.NORTH,cbox,-5,SpringLayout.NORTH,slider);
    layout.putConstraint(SpringLayout.WEST,cbox,200,SpringLayout.WEST,slider);
    layout.putConstraint(SpringLayout.NORTH,slider,0 + yoffset,SpringLayout.NORTH,iconLb);
    layout.putConstraint(SpringLayout.WEST,slider,20,SpringLayout.EAST,iconLb);
    setMinimumSize(MINIMUM_DIALOG_SIZE);
    yoffset+=50;
  }
  return contentPnl;
}

Fixed version (ground truth):
@Override protected JPanel createCenterContentPanel(){
  ImageIcon icon=null;
  JPanel contentPnl=new JPanel();
  SpringLayout layout=new SpringLayout();
  contentPnl.setLayout(layout);
  JLabel iconLb=new JLabel(icon);
  contentPnl.add(iconLb);
  layout.putConstraint(SpringLayout.NORTH,iconLb,40,SpringLayout.NORTH,contentPnl);
  layout.putConstraint(SpringLayout.WEST,iconLb,20,SpringLayout.WEST,contentPnl);
  int yoffset=0;
  for (  TypeUI t : TypeUI.values()) {
    JLabel label=t.label;
    JSlider slider=t.slider;
    JCheckBox cbox=t.cbox;
    contentPnl.add(label);
    contentPnl.add(slider);
    contentPnl.add(cbox);
    layout.putConstraint(SpringLayout.NORTH,label,20,SpringLayout.NORTH,slider);
    layout.putConstraint(SpringLayout.WEST,label,20,SpringLayout.WEST,slider);
    layout.putConstraint(SpringLayout.NORTH,cbox,-5,SpringLayout.NORTH,slider);
    layout.putConstraint(SpringLayout.WEST,cbox,200,SpringLayout.WEST,slider);
    layout.putConstraint(SpringLayout.NORTH,slider,0 + yoffset,SpringLayout.NORTH,iconLb);
    layout.putConstraint(SpringLayout.WEST,slider,20,SpringLayout.EAST,iconLb);
    setMinimumSize(MINIMUM_DIALOG_SIZE);
    yoffset+=50;
  }
  return contentPnl;
}
Program: 46505
Project: 46505
Buggy source:
public AudioDialog(JFrame owner){
  super(owner);
}

Fixed version (ground truth):
public AudioDialog(JFrame owner,String vmId,VmAudioControl vmc){
  super(owner);
  this.vmId=vmId;
  this.vmc=vmc;
  initSlider(TypeUI.AUDIO,vmc.getAudio(vmId,Type.AUDIO),Type.AUDIO);
  initSlider(TypeUI.MIC,vmc.getAudio(vmId,Type.MIC),Type.MIC);
}
Program: 46506
Project: 46506
Buggy source:
@Override public void stateChanged(ChangeEvent e){
  JSlider source=(JSlider)e.getSource();
  if (!source.getValueIsAdjusting()) {
    int o=source.getValue();
    if (sliderListener != null)     sliderListener.actionPerformed(new ActionEvent(new Integer(o),1,"String_Node_Str"));
  }
}

Fixed version (ground truth):
@Override public void stateChanged(ChangeEvent e){
  JSlider source=(JSlider)e.getSource();
  if (!source.getValueIsAdjusting()) {
    int o=source.getValue();
    vmc.setVolume(vmId,type,new Integer(o));
  }
}
Program: 46508
Project: 46508
Buggy source:
@Override public void connecting(){
  try {
    product.connectNic(vm,false);
  }
 catch (  VmException e) {
    LOG.error("String_Node_Str",e);
  }
  vm.setVpnState(VmVpnState.CONNECTING);
  vmModel.fireVmStateUpdatedEvent(vm);
}

Fixed version (ground truth):
@Override public void connecting(){
  try {
    product.connectNic(vm,false);
    vm.setVpnState(VmVpnState.CONNECTING);
  }
 catch (  VmException e) {
    LOG.error("String_Node_Str",e);
    vm.setVpnState(VmVpnState.NOT_CONNECTED);
  }
  vmModel.fireVmStateUpdatedEvent(vm);
}
Program: 46509
Project: 46509
Buggy source:
@Override public void notifyConnectionState(INetworkManager.NetworkConnectionState state){
  lock();
  try {
    if (mode == Mode.SESSION) {
      LOG.debug("String_Node_Str" + state + "String_Node_Str");
      clientFacade.notifyConnectionStateUpdate(state);
    }
  }
  finally {
    unlock();
  }
}

Fixed version (ground truth):
@Override public void notifyConnectionState(INetworkManager.NetworkConnectionState state){
  lock();
  try {
    lastConnectionState=state;
    if (mode == Mode.SESSION) {
      LOG.debug("String_Node_Str" + state + "String_Node_Str");
      clientFacade.notifyConnectionStateUpdate(state);
    }
  }
  finally {
    unlock();
  }
}
Program: 46510
Project: 46510
Buggy source:
/** 
 * Display VM of active session
 */
private void displayVmsOfActiveSession(){
  setCurrentCallback(null);
  if (activeSession == null) {
    LOG.debug("String_Node_Str");
  }
 else {
    LOG.debug("String_Node_Str" + activeSession + "String_Node_Str");
    List<Vm> vms=activeSession.getModel().getVmList();
    clientFacade.displayTabs(vms);
  }
}

Fixed version (ground truth):
/** 
 * Display VM of active session
 */
private void displayVmsOfActiveSession(){
  setCurrentCallback(null);
  if (activeSession == null) {
    LOG.debug("String_Node_Str");
  }
 else {
    LOG.debug("String_Node_Str" + activeSession + "String_Node_Str");
    List<Vm> vms=activeSession.getModel().getVmList();
    clientFacade.displayTabs(vms);
    if (lastConnectionState != null) {
      clientFacade.notifyConnectionStateUpdate(lastConnectionState);
    }
  }
}
Program: 46511
Project: 46511
Buggy source:
@Override public void start(){
  setCurrentState(NetworkConnectionState.NOT_CONNECTED);
  try {
    nmApplet.connect();
    nmApplet.addSignalHanlder(DBusConnection.SYSTEM,StateChanged.class,new StateChangedHandler());
    nmApplet.addSignalHanlder(DBusConnection.SYSTEM,VpnStateChanged.class,new VpnStateChangedHandler());
    nmApplet.addSignalHanlder(DBusConnection.SYSTEM,org.freedesktop.NetworkManager.Device.StateChanged.class,new DeviceStateChangedHandler());
  }
 catch (  DBusException e) {
    LOG.error("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Override public void start(){
  setCurrentState(NetworkConnectionState.NOT_CONNECTED);
  try {
    nmApplet.connect();
    nmApplet.addSignalHanlder(DBusConnection.SYSTEM,StateChanged.class,new StateChangedHandler());
    nmApplet.addSignalHanlder(DBusConnection.SYSTEM,VpnStateChanged.class,new VpnStateChangedHandler());
    nmApplet.addSignalHanlder(DBusConnection.SYSTEM,org.freedesktop.NetworkManager.Device.StateChanged.class,new DeviceStateChangedHandler());
    new Thread(new Runnable(){
      @Override public void run(){
        try {
          nmApplet.enable(false);
        }
 catch (        Exception e) {
        }
        try {
          nmApplet.enable(true);
        }
 catch (        Exception e) {
        }
      }
    }
);
  }
 catch (  DBusException e) {
    LOG.error("String_Node_Str",e);
  }
}
Program: 46512
Project: 46512
Buggy source:
public void start(){
  networkManager.addListener(new Listener(){
    @Override public void stateChanged(    NetworkConnectionState old,    NetworkConnectionState state){
      Collection<CacheEntry> vpns=new ArrayList<VpnManager.CacheEntry>();
synchronized (vpnCache) {
        vpns.addAll(vpnCache.values());
      }
switch (state) {
case CONNECTED:
        LOG.debug("String_Node_Str");
      for (      CacheEntry e : vpns) {
        if (e.keyring.isOpen()) {
          try {
            openVpn(e.vm,e.keyring,e.listener);
          }
 catch (          VmException e1) {
            LOG.error("String_Node_Str");
          }
        }
 else {
          LOG.error("String_Node_Str");
        }
      }
    break;
case CONNECTING:
  break;
case CONNECTING_VPN:
break;
case NOT_CONNECTED:
for (CacheEntry e : vpns) {
try {
  closeVpn(e.vm);
}
 catch (VmException e1) {
  LOG.error("String_Node_Str");
}
}
break;
default :
break;
}
}
}
);
}

Fixed version (ground truth):
public void start(){
  networkManager.addListener(new Listener(){
    @Override public void stateChanged(    NetworkConnectionState old,    NetworkConnectionState state){
      Collection<CacheEntry> vpns=new ArrayList<VpnManager.CacheEntry>();
synchronized (vpnCache) {
        vpns.addAll(vpnCache.values());
      }
switch (state) {
case CONNECTED:
        LOG.debug("String_Node_Str");
      for (      final CacheEntry e : vpns) {
        exs.execute(new Runnable(){
          @Override public void run(){
            if (e.keyring.isOpen()) {
              try {
                openVpn(e.vm,e.keyring,e.listener);
              }
 catch (              VmException e1) {
                LOG.error("String_Node_Str");
              }
            }
 else {
              LOG.error("String_Node_Str");
            }
          }
        }
);
      }
    break;
case CONNECTING:
  break;
case CONNECTING_VPN:
break;
case NOT_CONNECTED:
for (final CacheEntry e : vpns) {
exs.execute(new Runnable(){
  @Override public void run(){
    try {
      closeVpn(e.vm);
    }
 catch (    VmException e1) {
      LOG.error("String_Node_Str");
    }
  }
}
);
}
break;
default :
break;
}
}
}
);
}
Program: 46513
Project: 46513
Buggy source:
@Override public void stateChanged(NetworkConnectionState old,NetworkConnectionState state){
  Collection<CacheEntry> vpns=new ArrayList<VpnManager.CacheEntry>();
synchronized (vpnCache) {
    vpns.addAll(vpnCache.values());
  }
switch (state) {
case CONNECTED:
    LOG.debug("String_Node_Str");
  for (  CacheEntry e : vpns) {
    if (e.keyring.isOpen()) {
      try {
        openVpn(e.vm,e.keyring,e.listener);
      }
 catch (      VmException e1) {
        LOG.error("String_Node_Str");
      }
    }
 else {
      LOG.error("String_Node_Str");
    }
  }
break;
case CONNECTING:
break;
case CONNECTING_VPN:
break;
case NOT_CONNECTED:
for (CacheEntry e : vpns) {
try {
closeVpn(e.vm);
}
 catch (VmException e1) {
LOG.error("String_Node_Str");
}
}
break;
default :
break;
}
}

Fixed version (ground truth):
@Override public void stateChanged(NetworkConnectionState old,NetworkConnectionState state){
  Collection<CacheEntry> vpns=new ArrayList<VpnManager.CacheEntry>();
synchronized (vpnCache) {
    vpns.addAll(vpnCache.values());
  }
switch (state) {
case CONNECTED:
    LOG.debug("String_Node_Str");
  for (  final CacheEntry e : vpns) {
    exs.execute(new Runnable(){
      @Override public void run(){
        if (e.keyring.isOpen()) {
          try {
            openVpn(e.vm,e.keyring,e.listener);
          }
 catch (          VmException e1) {
            LOG.error("String_Node_Str");
          }
        }
 else {
          LOG.error("String_Node_Str");
        }
      }
    }
);
  }
break;
case CONNECTING:
break;
case CONNECTING_VPN:
break;
case NOT_CONNECTED:
for (final CacheEntry e : vpns) {
exs.execute(new Runnable(){
@Override public void run(){
try {
  closeVpn(e.vm);
}
 catch (VmException e1) {
  LOG.error("String_Node_Str");
}
}
}
);
}
break;
default :
break;
}
}
Program: 46514
Project: 46514
Buggy source:
/** 
 * Starts the cube application.
 * @param args the command line arguments
 */
public static void main(String[] args){
  try {
    LOG.info("String_Node_Str");
    LOG.info("String_Node_Str");
    LOG.info("String_Node_Str");
    LOG.info("String_Node_Str");
    LOG.info("String_Node_Str");
    LOG.info("String_Node_Str");
    LOG.info("String_Node_Str");
    LOG.info("String_Node_Str");
    LOG.info("String_Node_Str" + MachineUuid.getMachineUuid().getUuidAsString());
    LOG.info("String_Node_Str");
    LOG.info("String_Node_Str");
    Cube d=new Cube();
    d.run();
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Starts the cube application.
 * @param args the command line arguments
 */
public static void main(String[] args){
  try {
    LOG.info("String_Node_Str");
    LOG.info("String_Node_Str");
    LOG.info("String_Node_Str");
    LOG.info("String_Node_Str");
    LOG.info("String_Node_Str");
    LOG.info("String_Node_Str");
    LOG.info("String_Node_Str");
    LOG.info("String_Node_Str");
    LOG.info("String_Node_Str" + MachineUuid.getMachineUuid().getUuidAsString());
    LOG.info("String_Node_Str");
    LOG.info("String_Node_Str");
    for (    Object k : System.getProperties().keySet()) {
      LOG.info(String.format("String_Node_Str",k,System.getProperty((String)k)));
    }
    Cube d=new Cube();
    d.run();
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e);
  }
}
Program: 46515
Project: 46515
Buggy source:
@Override public void notifyConnectionState(INetworkManager.NetworkConnectionState state){
  lock();
  try {
    LOG.debug("String_Node_Str" + state + "String_Node_Str");
    clientFacade.notifyConnectionStateUpdate(state);
  }
  finally {
    unlock();
  }
}

Fixed version (ground truth):
@Override public void notifyConnectionState(INetworkManager.NetworkConnectionState state){
  lock();
  try {
    if (mode == Mode.SESSION) {
      LOG.debug("String_Node_Str" + state + "String_Node_Str");
      clientFacade.notifyConnectionStateUpdate(state);
    }
  }
  finally {
    unlock();
  }
}
Program: 46517
Project: 46517
Buggy source:
@Override public void notifyConnectionState(NetworkConnectionState state){
  this.connectionState=state;
synchronized (this) {
    if (descWs != null) {
switch (state) {
case CONNECTED:
        descWs.enable(true);
      break;
case NOT_CONNECTED:
    descWs.enable(false);
  break;
default :
break;
}
}
}
}

Fixed version (ground truth):
@Override public void notifyConnectionState(NetworkConnectionState state){
  this.connectionState=state;
synchronized (this) {
    if (descWs != null) {
switch (state) {
case CONNECTED_TO_CUBE:
case CONNECTED_TO_CUBE_BY_VPN:
        descWs.enable(true);
      break;
case NOT_CONNECTED:
    descWs.enable(false);
  break;
default :
break;
}
}
}
}
Program: 46518
Project: 46518
Buggy source:
private void checkVpnNeeded(){
  if (nmApplet.isIpReachable(CubeClientCoreProperties.getProperty(VPN_IP_CHECK_PROPERTIE))) {
    LOG.debug("String_Node_Str");
    setCurrentState(NetworkConnectionState.CONNECTED);
  }
 else {
    LOG.debug("String_Node_Str");
    setCurrentState(NetworkConnectionState.CONNECTING_VPN);
    try {
      nmApplet.startVpn();
    }
 catch (    Exception e) {
      LOG.error("String_Node_Str",e);
      setCurrentState(NetworkConnectionState.NOT_CONNECTED);
    }
  }
}

Fixed version (ground truth):
private void checkVpnNeeded(){
  if (nmApplet.isIpReachable(CubeClientCoreProperties.getProperty(VPN_IP_CHECK_PROPERTIE))) {
    LOG.debug("String_Node_Str");
    setCurrentState(NetworkConnectionState.CONNECTED_TO_CUBE);
  }
 else {
    LOG.debug("String_Node_Str");
    setCurrentState(NetworkConnectionState.CONNECTING_VPN);
    try {
      nmApplet.startVpn();
    }
 catch (    Exception e) {
      LOG.error("String_Node_Str",e);
      setCurrentState(NetworkConnectionState.NOT_CONNECTED);
    }
  }
}
Program: 46519
Project: 46519
Buggy source:
private void process(CNMStateEvent action){
  LOG.debug("String_Node_Str",action);
synchronized (this) {
switch (action) {
case NM_CONNECTING:
      nmConnected=false;
    setCurrentState(NetworkConnectionState.CONNECTING);
  break;
case NM_CONNECTED:
nmConnected=true;
checkVpnNeeded();
break;
case NM_DISCONNECTED:
nmConnected=false;
setCurrentState(NetworkConnectionState.NOT_CONNECTED);
nmApplet.closeVpn();
break;
case VPN_CONNECTING:
if (nmConnected) {
setCurrentState(NetworkConnectionState.CONNECTING_VPN);
}
 else {
nmApplet.closeVpn();
}
break;
case VPN_CONNECTED:
if (nmConnected) {
setCurrentState(NetworkConnectionState.CONNECTED);
}
 else {
nmApplet.closeVpn();
}
break;
case VPN_DISCONNECTED:
if (nmConnected) {
checkVpnNeeded();
}
break;
default :
break;
}
}
}

Fixed version (ground truth):
private void process(CNMStateEvent action){
  LOG.debug("String_Node_Str",action);
synchronized (this) {
switch (action) {
case NM_CONNECTING:
      nmConnected=false;
    setCurrentState(NetworkConnectionState.CONNECTING);
  break;
case NM_CONNECTED:
nmConnected=true;
checkVpnNeeded();
break;
case NM_DISCONNECTED:
nmConnected=false;
setCurrentState(NetworkConnectionState.NOT_CONNECTED);
nmApplet.closeVpn();
break;
case VPN_CONNECTING:
if (nmConnected) {
setCurrentState(NetworkConnectionState.CONNECTING_VPN);
}
 else {
nmApplet.closeVpn();
}
break;
case VPN_CONNECTED:
if (nmConnected) {
setCurrentState(NetworkConnectionState.CONNECTED_TO_CUBE_BY_VPN);
}
 else {
nmApplet.closeVpn();
}
break;
case VPN_DISCONNECTED:
if (nmConnected) {
checkVpnNeeded();
}
break;
default :
break;
}
}
}
Program: 46520
Project: 46520
Buggy source:
public void handle(VpnConnectionState sig){
  LOG.debug("String_Node_Str",sig);
switch (sig) {
case NM_VPN_CONNECTION_STATE_ACTIVATED:
    process(CNMStateEvent.VPN_CONNECTED);
  break;
case NM_VPN_CONNECTION_STATE_PREPARE:
case NM_VPN_CONNECTION_STATE_NEED_AUTH:
case NM_VPN_CONNECTION_STATE_CONNECT:
case NM_VPN_CONNECTION_STATE_IP_CONFIG_GET:
process(CNMStateEvent.VPN_CONNECTING);
break;
default :
process(CNMStateEvent.VPN_DISCONNECTED);
break;
}
}

Fixed version (ground truth):
public void handle(VpnConnectionState sig){
  LOG.debug("String_Node_Str",sig);
switch (sig) {
case CUBEVPN_CONNECTION_STATE_ACTIVATED:
    process(CNMStateEvent.VPN_CONNECTED);
  break;
case CUBEVPN_CONNECTION_STATE_CONNECT:
process(CNMStateEvent.VPN_CONNECTING);
break;
default :
process(CNMStateEvent.VPN_DISCONNECTED);
break;
}
}
Program: 46521
Project: 46521
Buggy source:
public void start(){
  networkManager.addListener(new Listener(){
    @Override public void stateChanged(    NetworkConnectionState old,    NetworkConnectionState state){
      Collection<CacheEntry> vpns=new ArrayList<VpnManager.CacheEntry>();
synchronized (vpnCache) {
        vpns.addAll(vpnCache.values());
      }
switch (state) {
case CONNECTED:
        LOG.debug("String_Node_Str",vpns.size());
      for (      final CacheEntry e : vpns) {
        exs.execute(new Runnable(){
          @Override public void run(){
            LOG.debug("String_Node_Str");
            if (e.keyring.isOpen()) {
              try {
                openVpn(e.vm,e.keyring,e.listener);
              }
 catch (              VmException e1) {
                LOG.error("String_Node_Str");
              }
            }
 else {
              LOG.error("String_Node_Str");
            }
          }
        }
);
      }
    break;
case CONNECTING:
  break;
case CONNECTING_VPN:
break;
case NOT_CONNECTED:
LOG.debug("String_Node_Str",vpns.size());
for (final CacheEntry e : vpns) {
exs.execute(new Runnable(){
@Override public void run(){
  try {
    closeVpn(e.vm,true);
  }
 catch (  VmException e1) {
    LOG.error("String_Node_Str");
  }
}
}
);
}
break;
default :
break;
}
}
}
);
}

Fixed version (ground truth):
public void start(){
  networkManager.addListener(new Listener(){
    @Override public void stateChanged(    NetworkConnectionState old,    NetworkConnectionState state){
      Collection<CacheEntry> vpns=new ArrayList<VpnManager.CacheEntry>();
synchronized (vpnCache) {
        vpns.addAll(vpnCache.values());
      }
switch (state) {
case CONNECTED_TO_CUBE_BY_VPN:
case CONNECTED_TO_CUBE:
        LOG.debug("String_Node_Str",vpns.size());
      for (      final CacheEntry e : vpns) {
        exs.execute(new Runnable(){
          @Override public void run(){
            LOG.debug("String_Node_Str");
            if (e.keyring.isOpen()) {
              try {
                openVpn(e.vm,e.keyring,e.listener);
              }
 catch (              VmException e1) {
                LOG.error("String_Node_Str");
              }
            }
 else {
              LOG.error("String_Node_Str");
            }
          }
        }
);
      }
    break;
case CONNECTING:
  break;
case CONNECTING_VPN:
break;
case NOT_CONNECTED:
LOG.debug("String_Node_Str",vpns.size());
for (final CacheEntry e : vpns) {
exs.execute(new Runnable(){
@Override public void run(){
  try {
    closeVpn(e.vm,true);
  }
 catch (  VmException e1) {
    LOG.error("String_Node_Str");
  }
}
}
);
}
break;
default :
break;
}
}
}
);
}
Program: 46522
Project: 46522
Buggy source:
@Override public void stateChanged(NetworkConnectionState old,NetworkConnectionState state){
  Collection<CacheEntry> vpns=new ArrayList<VpnManager.CacheEntry>();
synchronized (vpnCache) {
    vpns.addAll(vpnCache.values());
  }
switch (state) {
case CONNECTED:
    LOG.debug("String_Node_Str",vpns.size());
  for (  final CacheEntry e : vpns) {
    exs.execute(new Runnable(){
      @Override public void run(){
        LOG.debug("String_Node_Str");
        if (e.keyring.isOpen()) {
          try {
            openVpn(e.vm,e.keyring,e.listener);
          }
 catch (          VmException e1) {
            LOG.error("String_Node_Str");
          }
        }
 else {
          LOG.error("String_Node_Str");
        }
      }
    }
);
  }
break;
case CONNECTING:
break;
case CONNECTING_VPN:
break;
case NOT_CONNECTED:
LOG.debug("String_Node_Str",vpns.size());
for (final CacheEntry e : vpns) {
exs.execute(new Runnable(){
@Override public void run(){
try {
closeVpn(e.vm,true);
}
 catch (VmException e1) {
LOG.error("String_Node_Str");
}
}
}
);
}
break;
default :
break;
}
}

Fixed version (ground truth):
@Override public void stateChanged(NetworkConnectionState old,NetworkConnectionState state){
  Collection<CacheEntry> vpns=new ArrayList<VpnManager.CacheEntry>();
synchronized (vpnCache) {
    vpns.addAll(vpnCache.values());
  }
switch (state) {
case CONNECTED_TO_CUBE_BY_VPN:
case CONNECTED_TO_CUBE:
    LOG.debug("String_Node_Str",vpns.size());
  for (  final CacheEntry e : vpns) {
    exs.execute(new Runnable(){
      @Override public void run(){
        LOG.debug("String_Node_Str");
        if (e.keyring.isOpen()) {
          try {
            openVpn(e.vm,e.keyring,e.listener);
          }
 catch (          VmException e1) {
            LOG.error("String_Node_Str");
          }
        }
 else {
          LOG.error("String_Node_Str");
        }
      }
    }
);
  }
break;
case CONNECTING:
break;
case CONNECTING_VPN:
break;
case NOT_CONNECTED:
LOG.debug("String_Node_Str",vpns.size());
for (final CacheEntry e : vpns) {
exs.execute(new Runnable(){
@Override public void run(){
try {
closeVpn(e.vm,true);
}
 catch (VmException e1) {
LOG.error("String_Node_Str");
}
}
}
);
}
break;
default :
break;
}
}
Program: 46523
Project: 46523
Buggy source:
@Override public void run(){
  try {
    fireVpnConnectionState(VpnConnectionState.NM_VPN_CONNECTION_STATE_PREPARE);
    ScriptUtil script=new ScriptUtil();
    ShellUtil su=script.execute("String_Node_Str","String_Node_Str","String_Node_Str",CubeClientCoreProperties.getProperty("String_Node_Str"),"String_Node_Str",CubeClientCoreProperties.getProperty("String_Node_Str"),"String_Node_Str",CubeClientCoreProperties.getProperty("String_Node_Str"),"String_Node_Str",CubeClientCoreProperties.getProperty("String_Node_Str"),"String_Node_Str",CubeClientCoreProperties.getProperty("String_Node_Str"),"String_Node_Str",CubeClientCoreProperties.getProperty("String_Node_Str"),"String_Node_Str");
    if (su.getExitValue() == 0) {
      fireVpnConnectionState(VpnConnectionState.NM_VPN_CONNECTION_STATE_ACTIVATED);
    }
 else {
      fireVpnConnectionState(VpnConnectionState.NM_VPN_CONNECTION_STATE_FAILED);
    }
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e);
    fireVpnConnectionState(VpnConnectionState.NM_VPN_CONNECTION_STATE_FAILED);
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    LOG.debug("String_Node_Str");
    fireVpnConnectionState(VpnConnectionState.CUBEVPN_CONNECTION_STATE_PREPARE);
    ScriptUtil script=new ScriptUtil();
    ShellUtil su=script.execute("String_Node_Str","String_Node_Str","String_Node_Str",CubeClientCoreProperties.getProperty("String_Node_Str"),"String_Node_Str",CubeClientCoreProperties.getProperty("String_Node_Str"),"String_Node_Str",CubeClientCoreProperties.getProperty("String_Node_Str"),"String_Node_Str",CubeClientCoreProperties.getProperty("String_Node_Str"),"String_Node_Str",CubeClientCoreProperties.getProperty("String_Node_Str"),"String_Node_Str",CubeClientCoreProperties.getProperty("String_Node_Str"),"String_Node_Str");
    if (su.getExitValue() == 0) {
      fireVpnConnectionState(VpnConnectionState.CUBEVPN_CONNECTION_STATE_ACTIVATED);
    }
 else {
      fireVpnConnectionState(VpnConnectionState.CUBEVPN_CONNECTION_STATE_FAILED);
    }
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str",e);
    fireVpnConnectionState(VpnConnectionState.CUBEVPN_CONNECTION_STATE_FAILED);
  }
}
Program: 46524
Project: 46524
Buggy source:
public void startVpn(){
  exec.execute(new Runnable(){
    @Override public void run(){
      try {
        fireVpnConnectionState(VpnConnectionState.NM_VPN_CONNECTION_STATE_PREPARE);
        ScriptUtil script=new ScriptUtil();
        ShellUtil su=script.execute("String_Node_Str","String_Node_Str","String_Node_Str",CubeClientCoreProperties.getProperty("String_Node_Str"),"String_Node_Str",CubeClientCoreProperties.getProperty("String_Node_Str"),"String_Node_Str",CubeClientCoreProperties.getProperty("String_Node_Str"),"String_Node_Str",CubeClientCoreProperties.getProperty("String_Node_Str"),"String_Node_Str",CubeClientCoreProperties.getProperty("String_Node_Str"),"String_Node_Str",CubeClientCoreProperties.getProperty("String_Node_Str"),"String_Node_Str");
        if (su.getExitValue() == 0) {
          fireVpnConnectionState(VpnConnectionState.NM_VPN_CONNECTION_STATE_ACTIVATED);
        }
 else {
          fireVpnConnectionState(VpnConnectionState.NM_VPN_CONNECTION_STATE_FAILED);
        }
      }
 catch (      Exception e) {
        LOG.error("String_Node_Str",e);
        fireVpnConnectionState(VpnConnectionState.NM_VPN_CONNECTION_STATE_FAILED);
      }
    }
  }
);
}

Fixed version (ground truth):
public void startVpn(){
  exec.execute(new Runnable(){
    @Override public void run(){
      try {
        LOG.debug("String_Node_Str");
        fireVpnConnectionState(VpnConnectionState.CUBEVPN_CONNECTION_STATE_PREPARE);
        ScriptUtil script=new ScriptUtil();
        ShellUtil su=script.execute("String_Node_Str","String_Node_Str","String_Node_Str",CubeClientCoreProperties.getProperty("String_Node_Str"),"String_Node_Str",CubeClientCoreProperties.getProperty("String_Node_Str"),"String_Node_Str",CubeClientCoreProperties.getProperty("String_Node_Str"),"String_Node_Str",CubeClientCoreProperties.getProperty("String_Node_Str"),"String_Node_Str",CubeClientCoreProperties.getProperty("String_Node_Str"),"String_Node_Str",CubeClientCoreProperties.getProperty("String_Node_Str"),"String_Node_Str");
        if (su.getExitValue() == 0) {
          fireVpnConnectionState(VpnConnectionState.CUBEVPN_CONNECTION_STATE_ACTIVATED);
        }
 else {
          fireVpnConnectionState(VpnConnectionState.CUBEVPN_CONNECTION_STATE_FAILED);
        }
      }
 catch (      Exception e) {
        LOG.error("String_Node_Str",e);
        fireVpnConnectionState(VpnConnectionState.CUBEVPN_CONNECTION_STATE_FAILED);
      }
    }
  }
);
}