Buggy code:
public class RenameResourceAction extends WorkspaceAction { private TreeEditor treeEditor ; private Tree navigatorTree ; private Text textEditor ; private Composite textEditorParent ; private TextActionHandler textActionHandler ; private IResource inlinedResource ; public static final String ID = ( PlatformUI . PLUGIN_ID ) + ".RenameResourceAction" ; private IPath newPath ; private static final String CHECK_RENAME_TITLE = WorkbenchMessages . getString ( "RenameResourceAction.checkTitle" ) ; private static final String CHECK_RENAME_MESSAGE = WorkbenchMessages . getString ( "RenameResourceAction.readOnlyCheck" ) ; private static String RESOURCE_EXISTS_TITLE = WorkbenchMessages . getString ( "RenameResourceAction.resourceExists" ) ; private static String RESOURCE_EXISTS_MESSAGE = WorkbenchMessages . getString ( "RenameResourceAction.overwriteQuestion" ) ; private static String RENAMING_MESSAGE = WorkbenchMessages . getString ( "RenameResourceAction.progressMessage" ) ; public RenameResourceAction ( Shell shell ) { } public RenameResourceAction ( Shell shell , Tree tree ) { } private boolean checkOverwrite ( final Shell shell , final IResource destination ) { } private boolean checkReadOnlyAndNull ( IResource currentResource ) { } Composite createParent ( ) { } private void createTextEditor ( final IResource resource ) { } private void disposeTextWidget ( ) { } String getOperationMessage ( ) { } String getProblemsMessage ( ) { } String getProblemsTitle ( ) { } private Tree getTree ( ) { } private boolean getUpdateValue ( IStructuredSelection selection ) { } void invokeOperation ( IResource resource , IProgressMonitor monitor ) throws CoreException { monitor . beginTask ( RenameResourceAction . RENAMING_MESSAGE , 100 ) ; IWorkspaceRoot workspaceRoot = resource . getWorkspace ( ) . getRoot ( ) ; IResource newResource = workspaceRoot . findMember ( newPath ) ; if ( newResource != null ) { if ( checkOverwrite ( getShell ( ) , newResource ) ) newResource . delete ( IResource . KEEP_HISTORY , new SubProgressMonitor ( monitor , 50 ) ) ; else { monitor . worked ( 100 ) ; return ; } } if ( ( resource . getType ( ) ) == ( IResource . PROJECT ) ) { IProject project = ( ( IProject ) ( resource ) ) ; IProjectDescription description = project . getDescription ( ) ; description . setName ( newPath . segment ( 0 ) ) ; project . move ( description , true , monitor ) ; } else <START_BUG> resource . move ( newPath , IResource . KEEP_HISTORY , new SubProgressMonitor ( monitor , 50 ) ) ; <END_BUG> } protected String queryNewResourceName ( final IResource resource ) { } private void queryNewResourceNameInline ( final IResource resource ) { } public void run ( ) { } private void runWithInlineEditor ( ) { } protected void runWithNewPath ( IPath path , IResource resource ) { } private void saveChangesAndDispose ( IResource resource ) { } protected boolean updateSelection ( IStructuredSelection selection ) { } public void setTextActionHandler ( TextActionHandler actionHandler ) { } protected List getActionResources ( ) { } }

Fix:
resource . move ( newPath , ( ( IResource . KEEP_HISTORY ) | ( IResource . SHALLOW ) ) , new SubProgressMonitor ( monitor , 50 ) ) ;