Buggy code:
public class SignQuickAction extends XmlSecurityActionAdapter { private ITextEditor editor = null ; private IFile file = null ; private String resource ; private String xpath = "" ; private String signatureType ; private Keystore keystore ; private char [ ] keystorePassword ; private String keyName ; private char [ ] keyPassword ; private String canonicalizationAlgorithm ; private String transformationAlgorithm ; private String messageDigestAlgorithm ; private String signatureAlgorithm ; private String signatureID ; private boolean completePrefs = false ; private static final String ERROR_TEXT = "An<seq2seq4repair_space>error<seq2seq4repair_space>occured<seq2seq4repair_space>during<seq2seq4repair_space>quick<seq2seq4repair_space>signing" ; private static final String ACTION = "sign" ; public void selectionChanged ( final IAction action , final ISelection selection ) { } public void run ( final IAction action ) { } private void getPreferenceValues ( ) { } private void quickSign ( ) throws Exception { final Signature signatureWizard = new Signature ( ) ; signatureWizard . setResource ( resource ) ; signatureWizard . setXpath ( xpath ) ; signatureWizard . setSignatureType ( signatureType ) ; signatureWizard . setBsp ( false ) ; signatureWizard . setKeystore ( keystore ) ; <START_BUG> signatureWizard . setKeyAlias ( keyName ) ; <END_BUG> signatureWizard . setKeystorePassword ( keystorePassword ) ; signatureWizard . setKeyPassword ( keyPassword ) ; signatureWizard . setCanonicalizationAlgorithm ( canonicalizationAlgorithm ) ; signatureWizard . setTransformationAlgorithm ( transformationAlgorithm ) ; signatureWizard . setMessageDigestAlgorithm ( messageDigestAlgorithm ) ; signatureWizard . setSignatureAlgorithm ( signatureAlgorithm ) ; signatureWizard . setSignatureId ( signatureID ) ; IWorkbenchPart workbenchPart = getWorkbenchPart ( ) ; if ( ( workbenchPart != null ) && ( workbenchPart instanceof ITextEditor ) ) { editor = ( ( ITextEditor ) ( workbenchPart ) ) ; } else { editor = null ; } if ( ( ( editor ) != null ) && ( editor . isEditable ( ) ) ) { boolean validSelection = false ; if ( editor . isDirty ( ) ) { saveEditorContent ( editor ) ; } IEditorInput input = editor . getEditorInput ( ) ; final IDocument document = editor . getDocumentProvider ( ) . getDocument ( input ) ; file = ( ( IFile ) ( input . getAdapter ( IFile . class ) ) ) ; final ITextSelection textSelection = ( ( ITextSelection ) ( editor . getSelectionProvider ( ) . getSelection ( ) ) ) ; if ( ( ( ( ( resource . equals ( "selection" ) ) && ( textSelection != null ) ) && ( ! ( textSelection . isEmpty ( ) ) ) ) && ( ( textSelection . getLength ( ) ) > 0 ) ) && ( ( file ) != null ) ) { validSelection = parseSelection ( textSelection . getText ( ) ) ; } if ( ( ( ( file ) != null ) && ( resource . equals ( "selection" ) ) ) && validSelection ) { signatureWizard . setFile ( file . getLocation ( ) . toString ( ) ) ; IRunnableWithProgress op = new IRunnableWithProgress ( ) { public void run ( final IProgressMonitor monitor ) { try { monitor . beginTask ( signatureTaskInfo , 5 ) ; CreateSignature content = new CreateSignature ( ) ; Document doc = content . sign ( signatureWizard , textSelection , monitor ) ; if ( doc != null ) { document . set ( Utils . docToString ( doc , false ) ) ; } } catch ( final Exception ex ) { getShell ( ) . getDisplay ( ) . asyncExec ( new Runnable ( ) { public void run ( ) { showErrorDialog ( error , signingError , ex ) ; log ( SignQuickAction . ERROR_TEXT , ex ) ; } } ) ; } finally { monitor . done ( ) ; } } } ; try { PlatformUI . getWorkbench ( ) . getProgressService ( ) . runInUI ( XmlSecurityPlugin . getActiveWorkbenchWindow ( ) , op , XmlSecurityPlugin . getWorkspace ( ) . getRoot ( ) ) ; } catch ( InvocationTargetException ite ) { log ( SignQuickAction . ERROR_TEXT , ite ) ; } catch ( InterruptedException ie ) { log ( SignQuickAction . ERROR_TEXT , ie ) ; } } else if ( ( ( file ) != null ) && ( ! ( resource . equals ( "selection" ) ) ) ) { signatureWizard . setFile ( file . getLocation ( ) . toString ( ) ) ; IRunnableWithProgress op = new IRunnableWithProgress ( ) { public void run ( final IProgressMonitor monitor ) { try { monitor . beginTask ( signatureTaskInfo , 5 ) ; CreateSignature content = new CreateSignature ( ) ; Document doc = content . sign ( signatureWizard , null , monitor ) ; if ( doc != null ) { document . set ( Utils . docToString ( doc , false ) ) ; } } catch ( final Exception ex ) { getShell ( ) . getDisplay ( ) . asyncExec ( new Runnable ( ) { public void run ( ) { showErrorDialog ( error , signingError , ex ) ; log ( SignQuickAction . ERROR_TEXT , ex ) ; } } ) ; } finally { monitor . done ( ) ; } } } ; try { PlatformUI . getWorkbench ( ) . getProgressService ( ) . runInUI ( XmlSecurityPlugin . getActiveWorkbenchWindow ( ) , op , XmlSecurityPlugin . getWorkspace ( ) . getRoot ( ) ) ; } catch ( InvocationTargetException ite ) { log ( SignQuickAction . ERROR_TEXT , ite ) ; } catch ( InterruptedException ie ) { log ( SignQuickAction . ERROR_TEXT , ie ) ; } } else if ( ( resource . equals ( "selection" ) ) && ( ! validSelection ) ) { showInfo ( invalidTextSelection , invalidTextSelectionText ) ; } else { showInfo ( quickSignatureImpossible , NLS . bind ( protectedDoc , SignQuickAction . ACTION ) ) ; } }

Fix:
signatureWizard . setKeyName ( keyName ) ;