@@ -0,0 +1,1398 @@
+package de.evorepair.analysis.provider;%0D%0A%0D%0Aimport java.util.HashMap;%0D%0A%0D%0Aimport org.eclipse.core.resources.IContainer;%0D%0Aimport org.eclipse.core.resources.IFile;%0D%0Aimport org.eclipse.core.resources.IProject;%0D%0Aimport org.eclipse.core.resources.IResource;%0D%0Aimport org.eclipse.core.runtime.CoreException;%0D%0Aimport org.eclipse.emf.common.util.URI;%0D%0Aimport org.eclipse.emf.ecore.EObject;%0D%0A%0D%0Aimport de.christophseidl.util.ecore.EcoreIOUtil;%0D%0A%0D%0Apublic class EvoResourceProvider %7B%0D%0A%09private HashMap%3CURI, EObject%3E resources = new HashMap%3CURI, EObject%3E();%0D%0A%0D%0A%09private void loadAllResourcesRecursive(IResource%5B%5D resources, String fileExtension) throws CoreException %7B%0D%0A%09%09for(IResource resource : resources) %7B%0D%0A%09%09%09if(resource instanceof IContainer)%0D%0A%09%09%09%09loadAllResourcesRecursive(((IContainer)resource).members(), fileExtension);%0D%0A%09%09%09else if(resource instanceof IFile) %7B%0D%0A%09%09%09%09IFile file = (IFile)resource;%0D%0A%0D%0A%09%09%09%09if(file.getFileExtension().equals(fileExtension)) %7B%0D%0A%09%09%09%09%09EObject object = EcoreIOUtil.loadModel(file);%0D%0A%0D%0A%09%09%09%09%09this.resources.put(object.eResource().getURI(), object);%0D%0A%09%09%09%09%7D%0D%0A%09%09%09%7D%0D%0A%09%09%7D%0D%0A%09%7D%0D%0A%0D%0A%09public void loadAllResources(IProject project, String fileExtension) %7B%0D%0A%09%09try %7B%0D%0A%09%09%09loadAllResourcesRecursive(project.members(), fileExtension);%0D%0A%09%09%7D catch (CoreException e) %7B%0D%0A%09%09%09e.printStackTrace();%0D%0A%09%09%7D%0D%0A%09%7D%0D%0A%0D%0A%09public EObject getResource(URI mappingFile) %7B%0D%0A%09%09return resources.get(mappingFile);%0D%0A%09%7D%0D%0A%7D%0D%0A

Refactor code