Program: 111528
Project: 111528
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")) {
    if (!oldScaleFactor.equals(scaleString)) {
      viewer.scalingFactor.setParam("String_Node_Str");
      if (desktop != null && !(options.fullScreen.isSelected() && fullScreen))       reconfigureViewport();
    }
  }
 else   if (scaleString.equalsIgnoreCase("String_Node_Str")) {
    if (!oldScaleFactor.equalsIgnoreCase("String_Node_Str")) {
      viewer.scalingFactor.setParam("String_Node_Str");
      if (desktop != null && !(options.fullScreen.isSelected() && fullScreen))       reconfigureViewport();
    }
  }
 else {
    scaleString=scaleString.substring(0,scaleString.length() - 1);
    if (!oldScaleFactor.equals(scaleString)) {
      viewer.scalingFactor.setParam(scaleString);
      if ((desktop != null) && (!oldScaleFactor.equalsIgnoreCase("String_Node_Str") || !oldScaleFactor.equalsIgnoreCase("String_Node_Str"))) {
        if (!(options.fullScreen.isSelected() && fullScreen))         reconfigureViewport();
      }
    }
  }
  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.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 != 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.fullScreen.isSelected() ^ fullScreen)   toggleFullScreen();
}