Buggy code:
public class Jar extends Zip { private static final String INDEX_NAME = "META-INF//INDEX.LIST" ; private static final String MANIFEST_NAME = "META-INF//MANIFEST.MF" ; private List serviceList = new ArrayList ( ) ; private Manifest configuredManifest ; private Manifest savedConfiguredManifest ; private Manifest filesetManifest ; private Manifest originalManifest ; private Jar . FilesetManifestConfig filesetManifestConfig ; private boolean mergeManifestsMain = true ; private Manifest manifest ; private String manifestEncoding ; private File manifestFile ; private boolean index = false ; private boolean indexMetaInf = false ; private boolean createEmpty = false ; private Vector rootEntries ; private Path indexJars ; private Jar . StrictMode strict = new Jar . StrictMode ( "ignore" ) ; private static final ZipExtraField [ ] JAR_MARKER = new ZipExtraField [ ] { JarMarker . getInstance ( ) } ; public Jar ( ) { } public void setWhenempty ( WhenEmpty we ) { } public void setWhenmanifestonly ( WhenEmpty we ) { } public void setStrict ( Jar . StrictMode strict ) { } public void setJarfile ( File jarFile ) { } public void setIndex ( boolean flag ) { } public void setIndexMetaInf ( boolean flag ) { } public void setManifestEncoding ( String manifestEncoding ) { } public void addConfiguredManifest ( Manifest newManifest ) throws ManifestException { } public void setManifest ( File manifestFile ) { } private Manifest getManifest ( File manifestFile ) { } private Manifest getManifestFromJar ( File jarFile ) throws IOException { } private Manifest getManifest ( Reader r ) { } private boolean jarHasIndex ( File jarFile ) throws IOException { } public void setFilesetmanifest ( Jar . FilesetManifestConfig config ) { } public void addMetainf ( ZipFileSet fs ) { } public void addConfiguredIndexJars ( Path p ) { } public void addConfiguredService ( Service service ) { } private void writeServices ( ZipOutputStream zOut ) throws IOException { } protected void initZipOutputStream ( ZipOutputStream zOut ) throws IOException , BuildException { } private Manifest createManifest ( ) throws BuildException { try { Manifest finalManifest = Manifest . getDefaultManifest ( ) ; if ( ( manifest ) == null ) { if ( ( manifestFile ) != null ) { manifest = getManifest ( manifestFile ) ; } } if ( isInUpdateMode ( ) ) { finalManifest . merge ( originalManifest ) ; } finalManifest . merge ( filesetManifest ) ; <START_BUG> finalManifest . merge ( configuredManifest ) ; <END_BUG> finalManifest . merge ( manifest , ( ! ( mergeManifestsMain ) ) ) ; return finalManifest ; } catch ( ManifestException e ) { log ( ( "Manifest<seq2seq4repair_space>is<seq2seq4repair_space>invalid:<seq2seq4repair_space>" + ( e . getMessage ( ) ) ) , MSG_ERR ) ; throw new BuildException ( "Invalid<seq2seq4repair_space>Manifest" , e , getLocation ( ) ) ; } } private void writeManifest ( ZipOutputStream zOut , Manifest manifest ) throws IOException { } protected void finalizeZipOutputStream ( ZipOutputStream zOut ) throws IOException , BuildException { } private void createIndexList ( ZipOutputStream zOut ) throws IOException { } protected void zipFile ( InputStream is , ZipOutputStream zOut , String vPath , long lastModified , File fromArchive , int mode ) throws IOException { } private void filesetManifest ( File file , InputStream is ) throws IOException { } protected ArchiveState getResourcesToAdd ( ResourceCollection [ ] rcs , File zipFile , boolean needsUpdate ) throws BuildException { } protected boolean createEmptyZip ( File zipFile ) throws BuildException { } protected void cleanUp ( ) { } private void checkJarSpec ( ) { } public void reset ( ) { } public static class FilesetManifestConfig extends EnumeratedAttribute { public String [ ] getValues ( ) { } } protected final void writeIndexLikeList ( List dirs , List files , PrintWriter writer ) throws IOException { } protected static String findJarName ( String fileName , String [ ] classpath ) { } protected static void grabFilesAndDirs ( String file , List dirs , List files ) throws IOException { } public static class StrictMode extends EnumeratedAttribute { public StrictMode ( ) { } public StrictMode ( String value ) { } public String [ ] getValues ( ) { } public int getLogLevel ( ) { } } }

Fix:
finalManifest . merge ( configuredManifest , ( ! ( mergeManifestsMain ) ) ) ;