Buggy code:
public class BatchImageBuilder extends AbstractImageBuilder { protected BatchImageBuilder ( JavaBuilder javaBuilder ) { } public void build ( ) { } protected void addAllSourceFiles ( final ArrayList sourceFiles ) throws CoreException { } protected void cleanOutputFolders ( boolean copyBack ) throws CoreException { } protected void copyExtraResourcesBack ( ClasspathMultiDirectory sourceLocation , final boolean deletedAll ) throws CoreException { notifier . subTask ( Util . bind ( "build.copyingResources" ) ) ; final int segmentCount = sourceLocation . sourceFolder . getFullPath ( ) . segmentCount ( ) ; final char [ ] [ ] exclusionPatterns = sourceLocation . exclusionPatterns ; final char [ ] [ ] inclusionPatterns = sourceLocation . inclusionPatterns ; final IContainer outputFolder = sourceLocation . binaryFolder ; final boolean isAlsoProject = sourceLocation . sourceFolder . equals ( javaBuilder . currentProject ) ; sourceLocation . sourceFolder . accept ( new IResourceProxyVisitor ( ) { public boolean visit ( IResourceProxy proxy ) throws CoreException { IResource resource = null ; switch ( proxy . getType ( ) ) { case IResource . FILE : if ( ( Util . isJavaLikeFileName ( proxy . getName ( ) ) ) || ( org . eclipse . jdt . internal . compiler . util . Util . isClassFileName ( proxy . getName ( ) ) ) ) return false ; resource = proxy . requestResource ( ) ; if ( javaBuilder . filterExtraResource ( resource ) ) return false ; if ( ( exclusionPatterns != null ) || ( inclusionPatterns != null ) ) if ( Util . isExcluded ( resource , inclusionPatterns , exclusionPatterns ) ) return false ; IPath partialPath = resource . getFullPath ( ) . removeFirstSegments ( segmentCount ) ; IResource copiedResource = outputFolder . getFile ( partialPath ) ; if ( copiedResource . exists ( ) ) { if ( deletedAll ) { IResource originalResource = findOriginalResource ( partialPath ) ; String id = originalResource . getFullPath ( ) . removeFirstSegments ( 1 ) . toString ( ) ; createProblemFor ( resource , Util . bind ( "build.duplicateResource" , id ) , javaBuilder . javaProject . getOption ( JavaCore . CORE_JAVA_BUILD_DUPLICATE_RESOURCE , true ) ) ; return false ; } copiedResource . delete ( IResource . FORCE , null ) ; } resource . copy ( copiedResource . getFullPath ( ) , IResource . FORCE , null ) ; copiedResource . setDerived ( true ) ; <START_BUG> copiedResource . setReadOnly ( false ) ; <END_BUG> return false ; case IResource . FOLDER : resource = proxy . requestResource ( ) ; if ( javaBuilder . filterExtraResource ( resource ) ) return false ; IPath folderPath = resource . getFullPath ( ) ; if ( isAlsoProject && ( isExcludedFromProject ( folderPath ) ) ) return false ; if ( ( exclusionPatterns != null ) && ( Util . isExcluded ( resource , inclusionPatterns , exclusionPatterns ) ) ) return inclusionPatterns != null ; createFolder ( folderPath . removeFirstSegments ( segmentCount ) , outputFolder ) ; } return true ; } } , IResource . NONE ) ; } protected void copyPackages ( ClasspathMultiDirectory sourceLocation ) throws CoreException { } protected IResource findOriginalResource ( IPath partialPath ) { } public String toString ( ) { } }

Fix:
Util . setReadOnly ( copiedResource , false ) ;