Buggy code:
public class CopyResourceElementsOperation extends MultiOperation { protected ArrayList fRenamedCompilationUnits = null ; protected Map fDeltasPerProject = new HashMap ( 1 ) ; protected DOMFactory fFactory ; protected ArrayList fCreatedElements ; public CopyResourceElementsOperation ( IJavaElement [ ] resourcesToCopy , IJavaElement [ ] destContainers , boolean force ) { } public CopyResourceElementsOperation ( IJavaElement [ ] resourcesToCopy , IJavaElement destContainer , boolean force ) { } private IResource [ ] collectResourcesOfInterest ( IPackageFragment source ) throws JavaModelException { } private void createNeededPackageFragments ( IPackageFragmentRoot root , String newFragName , boolean moveFolder ) throws JavaModelException { } private JavaElementDelta getDeltaFor ( IJavaProject javaProject ) { } protected String getMainTaskName ( ) { } protected void prepareDeltas ( IJavaElement sourceElement , IJavaElement destinationElement ) { } private void processCompilationUnitResource ( ICompilationUnit source , IPackageFragment dest ) throws JavaModelException { } protected void processDeltas ( ) { } protected void processElement ( IJavaElement element ) throws JavaModelException { } protected void processElements ( ) throws JavaModelException { } private void processPackageFragmentResource ( IPackageFragment source , IPackageFragmentRoot root , String newName ) throws JavaModelException { try { String newFragName = ( newName == null ) ? source . getElementName ( ) : newName ; IPackageFragment newFrag = root . getPackageFragment ( newFragName ) ; IResource [ ] resources = collectResourcesOfInterest ( source ) ; boolean shouldMoveFolder = ( isMove ( ) ) && ( ! ( newFrag . getResource ( ) . exists ( ) ) ) ; IFolder srcFolder = ( ( IFolder ) ( source . getResource ( ) ) ) ; IPath destPath = newFrag . getPath ( ) ; if ( shouldMoveFolder ) { if ( srcFolder . getFullPath ( ) . isPrefixOf ( destPath ) ) { shouldMoveFolder = false ; } else { IResource [ ] members = srcFolder . members ( ) ; for ( int i = 0 ; i < ( members . length ) ; i ++ ) { if ( ( members [ i ] ) instanceof IFolder ) { shouldMoveFolder = false ; break ; } } } } createNeededPackageFragments ( root , newFragName , shouldMoveFolder ) ; if ( shouldMoveFolder ) { <START_BUG> srcFolder . move ( destPath , fForce , getSubProgressMonitor ( 1 ) ) ; <END_BUG> this . hasModifiedResource = true ; } else { if ( ( resources . length ) > 0 ) { if ( isRename ( ) ) { if ( ! ( destPath . equals ( source . getUnderlyingResource ( ) . getFullPath ( ) ) ) ) { moveResources ( resources , destPath ) ; } } else if ( isMove ( ) ) { for ( int i = 0 , max = resources . length ; i < max ; i ++ ) { IResource destinationResource = getWorkspace ( ) . getRoot ( ) . findMember ( destPath . append ( resources [ i ] . getName ( ) ) ) ; if ( destinationResource != null ) { if ( fForce ) { deleteResource ( destinationResource , IResource . KEEP_HISTORY ) ; } else { throw new JavaModelException ( new JavaModelStatus ( IJavaModelStatusConstants . NAME_COLLISION ) ) ; } } } moveResources ( resources , destPath ) ; } else { for ( int i = 0 , max = resources . length ; i < max ; i ++ ) { IResource destinationResource = getWorkspace ( ) . getRoot ( ) . findMember ( destPath . append ( resources [ i ] . getName ( ) ) ) ; if ( destinationResource != null ) { if ( fForce ) { deleteResource ( destinationResource , IResource . KEEP_HISTORY ) ; } else { throw new JavaModelException ( new JavaModelStatus ( IJavaModelStatusConstants . NAME_COLLISION ) ) ; } } } copyResources ( resources , destPath ) ; } } } if ( isMove ( ) ) { boolean isEmpty ; if ( ! ( srcFolder . exists ( ) ) ) { isEmpty = true ; } else { isEmpty = true ; IResource [ ] remaingFiles = srcFolder . members ( ) ; for ( int i = 0 , length = remaingFiles . length ; i < length ; i ++ ) { IResource file = remaingFiles [ i ] ; if ( file instanceof IFile ) { this . deleteResource ( file , ( ( IResource . FORCE ) | ( IResource . KEEP_HISTORY ) ) ) ; } else { isEmpty = false ; } } } if ( isEmpty ) { deleteEmptyPackageFragment ( source , false ) ; } } if ( ! ( newFrag . getElementName ( ) . equals ( source . getElementName ( ) ) ) ) { for ( int i = 0 ; i < ( resources . length ) ; i ++ ) { if ( resources [ i ] . getName ( ) . endsWith ( ".java" ) ) { ICompilationUnit cu = newFrag . getCompilationUnit ( resources [ i ] . getName ( ) ) ; IDOMCompilationUnit domCU = fFactory . createCompilationUnit ( cu . getSource ( ) , cu . getElementName ( ) ) ; if ( domCU != null ) { updatePackageStatement ( domCU , newFragName ) ; IBuffer buffer = cu . getBuffer ( ) ; if ( buffer == null ) continue ; String bufferContents = buffer . getContents ( ) ; if ( bufferContents == null ) continue ; String domCUContents = domCU . getContents ( ) ; String cuContents = null ; if ( domCUContents != null ) { cuContents = org . eclipse . jdt . internal . core . Util . normalizeCRs ( domCU . getContents ( ) , bufferContents ) ; } else { cuContents = bufferContents ; } buffer . setContents ( cuContents ) ; cu . save ( null , false ) ; } } } } prepareDeltas ( source , newFrag ) ; }

Fix:
srcFolder . move ( destPath , fForce , true , getSubProgressMonitor ( 1 ) ) ;