Source:
<code>private AbstractChangePackage downloadAndResolveChangePackage(final ChangePackageProxy proxy, final Optional<SessionId> maybeSession, Optional<ProjectId> maybeProjectId) throws ESException { if (!maybeSession.isPresent()) { throw new ESException(Messages.XmlRpcClientManager_NoValidSessionId); <START> } <END> int fragmentIndex = 0; final FileBasedChangePackage changePackage = VersioningFactory.eINSTANCE .createFileBasedChangePackage(); changePackage.initialize(FileUtil.createLocationForTemporaryChangePackage()); final File file = new File(changePackage.getTempFilePath()); FileWriter writer = null; try { writer = new FileWriter(file); ChangePackageEnvelope envelope; do { envelope = executeCall("downloadChangePackageFragment", ChangePackageEnvelope.class, new Object[] { maybeSession.get(), maybeProjectId.get(), proxy.getId(), fragmentIndex }); for (final String s : envelope.getFragment()) { writer.write(s + System.getProperty("line.separator")); } fragmentIndex += 1; } while (!envelope.isLast()); } catch (final IOException ex) { throw new ESException(Messages.XmlRpcClientManager_DownloadOfFragmentFailed, ex); } finally { if (writer != null) { try { writer.close(); } catch (final IOException ex) { throw new ESException(Messages.XmlRpcClientManager_DownloadOfFragmentFailed, ex); } } } try { changePackage.setLogMessage( ModelUtil.clone(proxy.getLogMessage())); changePackage.save(); } catch (final IOException ex) { throw new ESException(Messages.XmlRpcClientManager_SaveChangePackageFailed, ex); } return changePackage; }</code><technical_language>I guess check for maybeProjectId.isPresent()</technical_language>

Target:
private AbstractChangePackage downloadAndResolveChangePackage(final ChangePackageProxy proxy, final Optional<SessionId> maybeSession, Optional<ProjectId> maybeProjectId) throws ESException { if (!maybeSession.isPresent()) { throw new ESException(Messages.XmlRpcClientManager_NoValidSessionId); } if (!maybeProjectId.isPresent()) { throw new ESException(Messages.XmlRpcClientManager_NoValidProjectId); } int fragmentIndex = 0; final FileBasedChangePackage changePackage = VersioningFactory.eINSTANCE .createFileBasedChangePackage(); changePackage.initialize(FileUtil.createLocationForTemporaryChangePackage()); final File file = new File(changePackage.getTempFilePath()); FileWriter writer = null; try { writer = new FileWriter(file); ChangePackageEnvelope envelope; do { envelope = executeCall("downloadChangePackageFragment", ChangePackageEnvelope.class, new Object[] { maybeSession.get(), maybeProjectId.get(), proxy.getId(), fragmentIndex }); for (final String s : envelope.getFragment()) { writer.write(s + System.getProperty("line.separator")); } fragmentIndex += 1; } while (!envelope.isLast()); } catch (final IOException ex) { throw new ESException(Messages.XmlRpcClientManager_DownloadOfFragmentFailed, ex); } finally { if (writer != null) { try { writer.close(); } catch (final IOException ex) { throw new ESException(Messages.XmlRpcClientManager_DownloadOfFragmentFailed, ex); } } } try { changePackage.setLogMessage( ModelUtil.clone(proxy.getLogMessage())); changePackage.save(); } catch (final IOException ex) { throw new ESException(Messages.XmlRpcClientManager_SaveChangePackageFailed, ex); } return changePackage; }