Buggy code:
public class FileBasedChangePackageImpl extends EObjectImpl implements FileBasedChangePackage { protected LogMessage logMessage ; private static Map < Object , Object > loadingOptions ; private ESChangePackage apiImpl ; private boolean needsInit ; protected static final String FILE_PATH_EDEFAULT = null ; protected String filePath = FileBasedChangePackageImpl . FILE_PATH_EDEFAULT ; protected EList < OperationProxy > operationProxies ; protected FileBasedChangePackageImpl ( ) { } @ Override protected EClass eStaticClass ( ) { } public LogMessage getLogMessage ( ) { } public LogMessage basicGetLogMessage ( ) { } public NotificationChain basicSetLogMessage ( LogMessage newLogMessage , NotificationChain msgs ) { } public void setLogMessage ( LogMessage newLogMessage ) { } public String getFilePath ( ) { } public void setFilePath ( String newFilePath ) { } public EList < OperationProxy > getOperationProxies ( ) { } @ Override public NotificationChain eInverseRemove ( InternalEObject otherEnd , int featureID , NotificationChain msgs ) { } @ Override public Object eGet ( int featureID , boolean resolve , boolean coreType ) { } @ SuppressWarnings ( "unchecked" ) @ Override public void eSet ( int featureID , Object newValue ) { } @ Override public void eUnset ( int featureID ) { } @ Override public boolean eIsSet ( int featureID ) { } @ Override public String toString ( ) { } public ESChangePackage toAPI ( ) { } public ESChangePackage createAPI ( ) { } public void addAll ( List < AbstractOperation > ops ) { } public void add ( final AbstractOperation op ) { } public FileBasedChangePackage reverse ( ) { } public FileBasedChangePackage copy ( ) { final FileBasedChangePackage changePackage = eINSTANCE . createFileBasedChangePackage ( ) ; try { final File tempFile = File . createTempFile ( "temp-" , ".eoc" ) ; tempFile . deleteOnExit ( ) ; changePackage . initialize ( tempFile . getAbsolutePath ( ) ) ; } catch ( final IOException ex ) { ex . printStackTrace ( ) ; } <START_BUG> final ESCloseableIterable < AbstractOperation > operationsHandle = reversedOperations ( ) ; <END_BUG> try { final Iterable < AbstractOperation > operations = operationsHandle . iterable ( ) ; for ( final AbstractOperation operation : operations ) { changePackage . add ( operation ) ; } } finally { operationsHandle . close ( ) ; } return changePackage ; } public ESCloseableIterable < AbstractOperation > reversedOperations ( ) { } private static Map < Object , Object > loadingOptions ( ) { } private static byte [ ] asBytes ( String s ) { } private static Resource createVirtualResource ( ) { } public int size ( ) { } public ESCloseableIterable < AbstractOperation > operations ( ) { } public boolean isEmpty ( ) { } public List < AbstractOperation > removeAtEnd ( int n ) { } public void clear ( ) { } public void attachToProjectSpace ( HasChangePackage changePackageHolder ) { } public int leafSize ( ) { } private static int getSize ( CompositeOperation compositeOperation ) { } private static int countLeafOperations ( Iterable < AbstractOperation > operations ) { } public void initialize ( String filePath ) { } public void apply ( Project project ) { } public void apply ( Project project , boolean forceApplication ) { } }

Fix:
final ESCloseableIterable < AbstractOperation > operationsHandle = operations ( ) ;