Source:
<code>public void updateStatData() { URI curStatPathURI = null; URI oldStatPathURI = null; StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append(PerfPlugin.PERF_COMMAND); stringBuilder.append("%s."); stringBuilder.append(PerfSaveStatsHandler.DATA_EXT); String statNameFormat = stringBuilder.toString(); IPath workingDir = getWorkDir(); String curStatName = String.format(statNameFormat, ""); IPath curStatPath = workingDir.append(curStatName); IRemoteFileProxy proxy = null; try { curStatPathURI = new URI(curStatPath.toPortableString()); proxy = RemoteProxyManager.getInstance().getFileProxy(curStatPathURI); IFileStore curFileStore = proxy.getResource(curStatPathURI.getPath()); if (curFileStore.fetchInfo().exists()) { String oldStatName = String.format(statNameFormat, ".old"); IPath oldStatPath = workingDir.append(oldStatName); oldStatPathURI = new URI(oldStatPath.toPortableString()); IFileStore oldFileStore = proxy.getResource(oldStatPathURI.getPath()); if (oldFileStore.fetchInfo().exists()) { oldFileStore.delete(EFS.NONE, null); } <START> curFileStore.copy(oldFileStore, EFS.NONE, null); <END> } PerfSaveStatsHandler saveStats = new PerfSaveStatsHandler(); saveStats.saveData(PerfPlugin.PERF_COMMAND); } catch (URISyntaxException e) { MessageDialog.openError(Display.getCurrent().getActiveShell(), Messages.MsgProxyError, Messages.MsgProxyError); } catch (CoreException e) { MessageDialog.openError(Display.getCurrent().getActiveShell(), Messages.MsgProxyError, Messages.MsgProxyError); } }</code><technical_language>I current "perf.stat" file deleted copy finished. (I'm guessing a rename/move API ? ). reason for this is data/stat files read-only. In current state, if files read-only commit 9801a86b845660a447b2a4dd6285bb58e526e742 does, this fail overwriting location of existing file permitted</technical_language>

Target:
public void updateStatData() { URI curStatPathURI = null; URI oldStatPathURI = null; StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append(PerfPlugin.PERF_COMMAND); stringBuilder.append("%s."); stringBuilder.append(PerfSaveStatsHandler.DATA_EXT); String statNameFormat = stringBuilder.toString(); IPath workingDir = getWorkDir(); String curStatName = String.format(statNameFormat, ""); IPath curStatPath = workingDir.append(curStatName); IRemoteFileProxy proxy = null; try { curStatPathURI = new URI(curStatPath.toPortableString()); proxy = RemoteProxyManager.getInstance().getFileProxy(curStatPathURI); IFileStore curFileStore = proxy.getResource(curStatPathURI.getPath()); if (curFileStore.fetchInfo().exists()) { String oldStatName = String.format(statNameFormat, ".old"); IPath oldStatPath = workingDir.append(oldStatName); oldStatPathURI = new URI(oldStatPath.toPortableString()); IFileStore oldFileStore = proxy.getResource(oldStatPathURI.getPath()); if (oldFileStore.fetchInfo().exists()) { oldFileStore.delete(EFS.NONE, null); } curFileStore.copy(oldFileStore, EFS.NONE, null); curFileStore.delete(EFS.NONE, null); } PerfSaveStatsHandler saveStats = new PerfSaveStatsHandler(); saveStats.saveData(PerfPlugin.PERF_COMMAND); } catch (URISyntaxException e) { MessageDialog.openError(Display.getCurrent().getActiveShell(), Messages.MsgProxyError, Messages.MsgProxyError); } catch (CoreException e) { MessageDialog.openError(Display.getCurrent().getActiveShell(), Messages.MsgProxyError, Messages.MsgProxyError); } }