Buggy code:
public class SignJar extends Task { protected File jar ; protected String alias ; private String keystore ; protected String storepass ; protected String storetype ; protected String keypass ; protected String sigfile ; protected File signedjar ; protected boolean verbose ; protected boolean internalsf ; protected boolean sectionsonly ; private String maxMemory ; protected Vector filesets = new Vector ( ) ; protected boolean lazy ; public void setMaxmemory ( String max ) { } public void setJar ( final File jar ) { } public void setAlias ( final String alias ) { } public void setKeystore ( final String keystore ) { } public void setStorepass ( final String storepass ) { } public void setStoretype ( final String storetype ) { } public void setKeypass ( final String keypass ) { } public void setSigfile ( final String sigfile ) { } public void setSignedjar ( final File signedjar ) { } public void setVerbose ( final boolean verbose ) { } public void setInternalsf ( final boolean internalsf ) { } public void setSectionsonly ( final boolean sectionsonly ) { } public void setLazy ( final boolean lazy ) { } public void addFileset ( final FileSet set ) { } public void execute ( ) throws BuildException { } private void doOneJar ( File jarSource , File jarTarget ) throws BuildException { if ( JavaEnvUtils . isJavaVersion ( JAVA_1_1 ) ) { throw new BuildException ( ( "The<seq2seq4repair_space>signjar<seq2seq4repair_space>task<seq2seq4repair_space>is<seq2seq4repair_space>only<seq2seq4repair_space>available<seq2seq4repair_space>on<seq2seq4repair_space>" + "JDK<seq2seq4repair_space>versions<seq2seq4repair_space>1.2<seq2seq4repair_space>or<seq2seq4repair_space>greater" ) ) ; } if ( null == ( alias ) ) { throw new BuildException ( "alias<seq2seq4repair_space>attribute<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>set" ) ; } if ( null == ( storepass ) ) { throw new BuildException ( "storepass<seq2seq4repair_space>attribute<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>set" ) ; } if ( isUpToDate ( jarSource , jarTarget ) ) { return ; } final ExecTask cmd = ( ( ExecTask ) ( getProject ( ) . createTask ( "exec" ) ) ) ; <START_BUG> cmd . setExecutable ( "jarsigner" ) ; <END_BUG> if ( ( maxMemory ) != null ) { cmd . createArg ( ) . setValue ( ( "-J-Xmx" + ( maxMemory ) ) ) ; } if ( null != ( keystore ) ) { File keystoreFile = getProject ( ) . resolveFile ( keystore ) ; if ( keystoreFile . exists ( ) ) { cmd . createArg ( ) . setValue ( "-keystore" ) ; cmd . createArg ( ) . setValue ( keystoreFile . getPath ( ) ) ; } else { cmd . createArg ( ) . setValue ( "-keystore" ) ; cmd . createArg ( ) . setValue ( keystore ) ; } } if ( null != ( storepass ) ) { cmd . createArg ( ) . setValue ( "-storepass" ) ; cmd . createArg ( ) . setValue ( storepass ) ; } if ( null != ( storetype ) ) { cmd . createArg ( ) . setValue ( "-storetype" ) ; cmd . createArg ( ) . setValue ( storetype ) ; } if ( null != ( keypass ) ) { cmd . createArg ( ) . setValue ( "-keypass" ) ; cmd . createArg ( ) . setValue ( keypass ) ; } if ( null != ( sigfile ) ) { cmd . createArg ( ) . setValue ( "-sigfile" ) ; cmd . createArg ( ) . setValue ( sigfile ) ; } if ( null != jarTarget ) { cmd . createArg ( ) . setValue ( "-signedjar" ) ; cmd . createArg ( ) . setValue ( jarTarget . toString ( ) ) ; } if ( verbose ) { cmd . createArg ( ) . setValue ( "-verbose" ) ; } if ( internalsf ) { cmd . createArg ( ) . setValue ( "-internalsf" ) ; } if ( sectionsonly ) { cmd . createArg ( ) . setValue ( "-sectionsonly" ) ; } cmd . createArg ( ) . setValue ( jarSource . toString ( ) ) ; cmd . createArg ( ) . setValue ( alias ) ; log ( ( "Signing<seq2seq4repair_space>Jar<seq2seq4repair_space>:<seq2seq4repair_space>" + ( jarSource . getAbsolutePath ( ) ) ) ) ; cmd . setFailonerror ( true ) ; cmd . setTaskName ( getTaskName ( ) ) ; cmd . execute ( ) ; } protected boolean isUpToDate ( File jarFile , File signedjarFile ) { } protected boolean isSigned ( File file ) { } }

Fix:
cmd . setExecutable ( JavaEnvUtils . getJdkExecutable ( "jarsigner" ) ) ;