Program: 111516
Project: 111516
Buggy source:
public void getOptions(){
  autoSelect=options.autoSelect.isSelected();
  if (fullColour != options.fullColour.isSelected()) {
    formatChange=true;
    forceNonincremental=true;
  }
  fullColour=options.fullColour.isSelected();
  if (!fullColour) {
    int newLowColourLevel=(options.veryLowColour.isSelected() ? 0 : options.lowColour.isSelected() ? 1 : 2);
    if (newLowColourLevel != lowColourLevel) {
      lowColourLevel=newLowColourLevel;
      formatChange=true;
      forceNonincremental=true;
    }
  }
  int newEncoding=(options.zrle.isSelected() ? Encodings.encodingZRLE : options.hextile.isSelected() ? Encodings.encodingHextile : options.tight.isSelected() ? Encodings.encodingTight : Encodings.encodingRaw);
  if (newEncoding != currentEncoding) {
    currentEncoding=newEncoding;
    encodingChange=true;
  }
  viewer.customCompressLevel.setParam(options.customCompressLevel.isSelected());
  if (cp.customCompressLevel != viewer.customCompressLevel.getValue()) {
    cp.customCompressLevel=viewer.customCompressLevel.getValue();
    encodingChange=true;
  }
  if (Integer.parseInt(options.compressLevel.getSelectedItem().toString()) >= 0 && Integer.parseInt(options.compressLevel.getSelectedItem().toString()) <= 9) {
    viewer.compressLevel.setParam(options.compressLevel.getSelectedItem().toString());
  }
 else {
    viewer.compressLevel.setParam(viewer.compressLevel.getDefaultStr());
  }
  if (cp.compressLevel != viewer.compressLevel.getValue()) {
    cp.compressLevel=viewer.compressLevel.getValue();
    encodingChange=true;
  }
  viewer.noJpeg.setParam(!options.noJpeg.isSelected());
  if (cp.noJpeg != viewer.noJpeg.getValue()) {
    cp.noJpeg=viewer.noJpeg.getValue();
    encodingChange=true;
  }
  viewer.qualityLevel.setParam(options.qualityLevel.getSelectedItem().toString());
  if (cp.qualityLevel != viewer.qualityLevel.getValue()) {
    cp.qualityLevel=viewer.qualityLevel.getValue();
    encodingChange=true;
  }
  viewer.sendLocalUsername.setParam(options.sendLocalUsername.isSelected());
  viewer.viewOnly.setParam(options.viewOnly.isSelected());
  viewer.acceptClipboard.setParam(options.acceptClipboard.isSelected());
  viewer.sendClipboard.setParam(options.sendClipboard.isSelected());
  viewer.acceptBell.setParam(options.acceptBell.isSelected());
  String scaleString=options.scalingFactor.getSelectedItem().toString();
  String oldScaleFactor=viewer.scalingFactor.getValue();
  if (scaleString.equalsIgnoreCase("String_Node_Str")) {
    scaleString=new String("String_Node_Str");
  }
 else   if (scaleString.equalsIgnoreCase("String_Node_Str")) {
    scaleString=new String("String_Node_Str");
  }
 else {
    scaleString=scaleString.substring(0,scaleString.length() - 1);
  }
  if (!oldScaleFactor.equals(scaleString)) {
    viewer.scalingFactor.setParam(scaleString);
    if ((options.fullScreen.isSelected() == fullScreen) && (desktop != null))     recreateViewport();
  }
  clipboardDialog.setSendingEnabled(viewer.sendClipboard.getValue());
  viewer.menuKey.setParam(MenuKey.getMenuKeySymbols()[options.menuKey.getSelectedIndex()].name);
  F8Menu.f8.setText("String_Node_Str" + KeyEvent.getKeyText(MenuKey.getMenuKeyCode()));
  setShared(options.shared.isSelected());
  viewer.useLocalCursor.setParam(options.useLocalCursor.isSelected());
  if (cp.supportsLocalCursor != viewer.useLocalCursor.getValue()) {
    cp.supportsLocalCursor=viewer.useLocalCursor.getValue();
    encodingChange=true;
    if (desktop != null)     desktop.resetLocalCursor();
  }
  checkEncodings();
  if (state() != RFBSTATE_NORMAL) {
    if (options.encNone.isSelected()) {
      if (options.secNone.isSelected())       Security.EnableSecType(Security.secTypeNone);
      if (options.secVnc.isSelected())       Security.EnableSecType(Security.secTypeVncAuth);
      if (options.secPlain.isSelected())       Security.EnableSecType(Security.secTypePlain);
      if (options.secIdent.isSelected())       Security.EnableSecType(Security.secTypeIdent);
    }
 else {
      Security.DisableSecType(Security.secTypeNone);
      Security.DisableSecType(Security.secTypeVncAuth);
      Security.DisableSecType(Security.secTypePlain);
      Security.DisableSecType(Security.secTypeIdent);
    }
    if (options.encTLS.isSelected()) {
      if (options.secNone.isSelected())       Security.EnableSecType(Security.secTypeTLSNone);
      if (options.secVnc.isSelected())       Security.EnableSecType(Security.secTypeTLSVnc);
      if (options.secPlain.isSelected())       Security.EnableSecType(Security.secTypeTLSPlain);
      if (options.secIdent.isSelected())       Security.EnableSecType(Security.secTypeTLSIdent);
    }
 else {
      Security.DisableSecType(Security.secTypeTLSNone);
      Security.DisableSecType(Security.secTypeTLSVnc);
      Security.DisableSecType(Security.secTypeTLSPlain);
      Security.DisableSecType(Security.secTypeTLSIdent);
    }
    if (options.encX509.isSelected()) {
      if (options.secNone.isSelected())       Security.EnableSecType(Security.secTypeX509None);
      if (options.secVnc.isSelected())       Security.EnableSecType(Security.secTypeX509Vnc);
      if (options.secPlain.isSelected())       Security.EnableSecType(Security.secTypeX509Plain);
      if (options.secIdent.isSelected())       Security.EnableSecType(Security.secTypeX509Ident);
    }
 else {
      Security.DisableSecType(Security.secTypeX509None);
      Security.DisableSecType(Security.secTypeX509Vnc);
      Security.DisableSecType(Security.secTypeX509Plain);
      Security.DisableSecType(Security.secTypeX509Ident);
    }
    if (options.secNone.isSelected()) {
      if (options.encNone.isSelected())       Security.EnableSecType(Security.secTypeNone);
      if (options.encTLS.isSelected())       Security.EnableSecType(Security.secTypeTLSNone);
      if (options.encX509.isSelected())       Security.EnableSecType(Security.secTypeX509None);
    }
 else {
      Security.DisableSecType(Security.secTypeNone);
      Security.DisableSecType(Security.secTypeTLSNone);
      Security.DisableSecType(Security.secTypeX509None);
    }
    if (options.secVnc.isSelected()) {
      if (options.encNone.isSelected())       Security.EnableSecType(Security.secTypeVncAuth);
      if (options.encTLS.isSelected())       Security.EnableSecType(Security.secTypeTLSVnc);
      if (options.encX509.isSelected())       Security.EnableSecType(Security.secTypeX509Vnc);
    }
 else {
      Security.DisableSecType(Security.secTypeVncAuth);
      Security.DisableSecType(Security.secTypeTLSVnc);
      Security.DisableSecType(Security.secTypeX509Vnc);
    }
    if (options.secPlain.isSelected()) {
      if (options.encNone.isSelected())       Security.EnableSecType(Security.secTypePlain);
      if (options.encTLS.isSelected())       Security.EnableSecType(Security.secTypeTLSPlain);
      if (options.encX509.isSelected())       Security.EnableSecType(Security.secTypeX509Plain);
    }
 else {
      Security.DisableSecType(Security.secTypePlain);
      Security.DisableSecType(Security.secTypeTLSPlain);
      Security.DisableSecType(Security.secTypeX509Plain);
    }
    if (options.secIdent.isSelected()) {
      if (options.encNone.isSelected())       Security.EnableSecType(Security.secTypeIdent);
      if (options.encTLS.isSelected())       Security.EnableSecType(Security.secTypeTLSIdent);
      if (options.encX509.isSelected())       Security.EnableSecType(Security.secTypeX509Ident);
    }
 else {
      Security.DisableSecType(Security.secTypeIdent);
      Security.DisableSecType(Security.secTypeTLSIdent);
      Security.DisableSecType(Security.secTypeX509Ident);
    }
  }
  if (options.desktopSize.isSelected()) {
    String desktopSize=options.desktopWidth.getText() + "String_Node_Str" + options.desktopHeight.getText();
    viewer.desktopSize.setParam(desktopSize);
  }
  if (options.fullScreen.isSelected() ^ fullScreen)   toggleFullScreen();
}

Fixed version (ground truth):
public void getOptions(){
  autoSelect=options.autoSelect.isSelected();
  if (fullColour != options.fullColour.isSelected()) {
    formatChange=true;
    forceNonincremental=true;
  }
  fullColour=options.fullColour.isSelected();
  if (!fullColour) {
    int newLowColourLevel=(options.veryLowColour.isSelected() ? 0 : options.lowColour.isSelected() ? 1 : 2);
    if (newLowColourLevel != lowColourLevel) {
      lowColourLevel=newLowColourLevel;
      formatChange=true;
      forceNonincremental=true;
    }
  }
  int newEncoding=(options.zrle.isSelected() ? Encodings.encodingZRLE : options.hextile.isSelected() ? Encodings.encodingHextile : options.tight.isSelected() ? Encodings.encodingTight : Encodings.encodingRaw);
  if (newEncoding != currentEncoding) {
    currentEncoding=newEncoding;
    encodingChange=true;
  }
  viewer.customCompressLevel.setParam(options.customCompressLevel.isSelected());
  if (cp.customCompressLevel != viewer.customCompressLevel.getValue()) {
    cp.customCompressLevel=viewer.customCompressLevel.getValue();
    encodingChange=true;
  }
  if (Integer.parseInt(options.compressLevel.getSelectedItem().toString()) >= 0 && Integer.parseInt(options.compressLevel.getSelectedItem().toString()) <= 9) {
    viewer.compressLevel.setParam(options.compressLevel.getSelectedItem().toString());
  }
 else {
    viewer.compressLevel.setParam(viewer.compressLevel.getDefaultStr());
  }
  if (cp.compressLevel != viewer.compressLevel.getValue()) {
    cp.compressLevel=viewer.compressLevel.getValue();
    encodingChange=true;
  }
  viewer.noJpeg.setParam(!options.noJpeg.isSelected());
  if (cp.noJpeg != viewer.noJpeg.getValue()) {
    cp.noJpeg=viewer.noJpeg.getValue();
    encodingChange=true;
  }
  viewer.qualityLevel.setParam(options.qualityLevel.getSelectedItem().toString());
  if (cp.qualityLevel != viewer.qualityLevel.getValue()) {
    cp.qualityLevel=viewer.qualityLevel.getValue();
    encodingChange=true;
  }
  viewer.sendLocalUsername.setParam(options.sendLocalUsername.isSelected());
  viewer.viewOnly.setParam(options.viewOnly.isSelected());
  viewer.acceptClipboard.setParam(options.acceptClipboard.isSelected());
  viewer.sendClipboard.setParam(options.sendClipboard.isSelected());
  viewer.acceptBell.setParam(options.acceptBell.isSelected());
  String scaleString=options.scalingFactor.getSelectedItem().toString();
  String oldScaleFactor=viewer.scalingFactor.getValue();
  if (scaleString.equalsIgnoreCase("String_Node_Str")) {
    scaleString=new String("String_Node_Str");
  }
 else   if (scaleString.equalsIgnoreCase("String_Node_Str")) {
    scaleString=new String("String_Node_Str");
  }
 else {
    scaleString=scaleString.substring(0,scaleString.length() - 1);
  }
  if (!oldScaleFactor.equals(scaleString)) {
    viewer.scalingFactor.setParam(scaleString);
    if ((options.fullScreen.isSelected() == fullScreen) && (desktop != null))     recreateViewport();
  }
  clipboardDialog.setSendingEnabled(viewer.sendClipboard.getValue());
  viewer.menuKey.setParam(MenuKey.getMenuKeySymbols()[options.menuKey.getSelectedIndex()].name);
  F8Menu.f8.setText("String_Node_Str" + KeyEvent.getKeyText(MenuKey.getMenuKeyCode()));
  setShared(options.shared.isSelected());
  viewer.useLocalCursor.setParam(options.useLocalCursor.isSelected());
  if (cp.supportsLocalCursor != viewer.useLocalCursor.getValue()) {
    cp.supportsLocalCursor=viewer.useLocalCursor.getValue();
    encodingChange=true;
    if (desktop != null)     desktop.resetLocalCursor();
  }
  checkEncodings();
  if (state() != RFBSTATE_NORMAL) {
    if (options.encNone.isSelected()) {
      if (options.secNone.isSelected())       Security.EnableSecType(Security.secTypeNone);
      if (options.secVnc.isSelected())       Security.EnableSecType(Security.secTypeVncAuth);
      if (options.secPlain.isSelected())       Security.EnableSecType(Security.secTypePlain);
      if (options.secIdent.isSelected())       Security.EnableSecType(Security.secTypeIdent);
    }
 else {
      Security.DisableSecType(Security.secTypeNone);
      Security.DisableSecType(Security.secTypeVncAuth);
      Security.DisableSecType(Security.secTypePlain);
      Security.DisableSecType(Security.secTypeIdent);
    }
    if (options.encTLS.isSelected()) {
      if (options.secNone.isSelected())       Security.EnableSecType(Security.secTypeTLSNone);
      if (options.secVnc.isSelected())       Security.EnableSecType(Security.secTypeTLSVnc);
      if (options.secPlain.isSelected())       Security.EnableSecType(Security.secTypeTLSPlain);
      if (options.secIdent.isSelected())       Security.EnableSecType(Security.secTypeTLSIdent);
    }
 else {
      Security.DisableSecType(Security.secTypeTLSNone);
      Security.DisableSecType(Security.secTypeTLSVnc);
      Security.DisableSecType(Security.secTypeTLSPlain);
      Security.DisableSecType(Security.secTypeTLSIdent);
    }
    if (options.encX509.isSelected()) {
      if (options.secNone.isSelected())       Security.EnableSecType(Security.secTypeX509None);
      if (options.secVnc.isSelected())       Security.EnableSecType(Security.secTypeX509Vnc);
      if (options.secPlain.isSelected())       Security.EnableSecType(Security.secTypeX509Plain);
      if (options.secIdent.isSelected())       Security.EnableSecType(Security.secTypeX509Ident);
    }
 else {
      Security.DisableSecType(Security.secTypeX509None);
      Security.DisableSecType(Security.secTypeX509Vnc);
      Security.DisableSecType(Security.secTypeX509Plain);
      Security.DisableSecType(Security.secTypeX509Ident);
    }
    if (options.secNone.isSelected()) {
      if (options.encNone.isSelected())       Security.EnableSecType(Security.secTypeNone);
      if (options.encTLS.isSelected())       Security.EnableSecType(Security.secTypeTLSNone);
      if (options.encX509.isSelected())       Security.EnableSecType(Security.secTypeX509None);
    }
 else {
      Security.DisableSecType(Security.secTypeNone);
      Security.DisableSecType(Security.secTypeTLSNone);
      Security.DisableSecType(Security.secTypeX509None);
    }
    if (options.secVnc.isSelected()) {
      if (options.encNone.isSelected())       Security.EnableSecType(Security.secTypeVncAuth);
      if (options.encTLS.isSelected())       Security.EnableSecType(Security.secTypeTLSVnc);
      if (options.encX509.isSelected())       Security.EnableSecType(Security.secTypeX509Vnc);
    }
 else {
      Security.DisableSecType(Security.secTypeVncAuth);
      Security.DisableSecType(Security.secTypeTLSVnc);
      Security.DisableSecType(Security.secTypeX509Vnc);
    }
    if (options.secPlain.isSelected()) {
      if (options.encNone.isSelected())       Security.EnableSecType(Security.secTypePlain);
      if (options.encTLS.isSelected())       Security.EnableSecType(Security.secTypeTLSPlain);
      if (options.encX509.isSelected())       Security.EnableSecType(Security.secTypeX509Plain);
    }
 else {
      Security.DisableSecType(Security.secTypePlain);
      Security.DisableSecType(Security.secTypeTLSPlain);
      Security.DisableSecType(Security.secTypeX509Plain);
    }
    if (options.secIdent.isSelected()) {
      if (options.encNone.isSelected())       Security.EnableSecType(Security.secTypeIdent);
      if (options.encTLS.isSelected())       Security.EnableSecType(Security.secTypeTLSIdent);
      if (options.encX509.isSelected())       Security.EnableSecType(Security.secTypeX509Ident);
    }
 else {
      Security.DisableSecType(Security.secTypeIdent);
      Security.DisableSecType(Security.secTypeTLSIdent);
      Security.DisableSecType(Security.secTypeX509Ident);
    }
  }
  String desktopSize=(options.desktopSize.isSelected()) ? options.desktopWidth.getText() + "String_Node_Str" + options.desktopHeight.getText() : "String_Node_Str";
  viewer.desktopSize.setParam(desktopSize);
  if (options.fullScreen.isSelected() ^ fullScreen)   toggleFullScreen();
}