Program: 102255
Project: 102255
Buggy source:
void synchronizeModelEntry(final IProgressMonitor monitor){
  final IFile workspaceFile=findFileInWorkspace();
  if (workspaceFile == null)   return;
  clean();
  try {
    final Resource model=findModel();
    if (ModelUtil.isPhysical(model)) {
      final ModelResource mr=ModelerCore.getModelEditor().findModelResource(workspaceFile);
      final ConnectionInfoHelper helper=new ConnectionInfoHelper();
      if (CoreStringUtil.isEmpty(this.translator.get())) {
        final String translator=helper.getTranslatorName(mr);
        this.translator.set(translator == null ? EMPTY_STR : translator);
      }
      Properties translatorProps=helper.getTranslatorProperties(mr);
      if (!translatorProps.isEmpty()) {
        updateTranslatorOverrides(translatorProps);
      }
    }
    IPath indexPath=new Path(IndexUtil.INDEX_PATH + indexName);
    File indexFile=indexPath.toFile();
    long indexDate=-1;
    if (indexFile.exists()) {
      indexDate=indexFile.lastModified();
    }
    if (workspaceFile.getLocalTimeStamp() > indexDate) {
      getVdb().getBuilder().buildResources(monitor,Collections.singleton(workspaceFile),ModelerCore.getModelContainer(),false);
    }
    for (    final IMarker marker : workspaceFile.findMarkers(IMarker.PROBLEM,true,IResource.DEPTH_INFINITE)) {
      Object attr=marker.getAttribute(IMarker.SEVERITY);
      if (attr == null) {
        continue;
      }
      final int severity=((Integer)attr).intValue();
      if (severity == IMarker.SEVERITY_ERROR || severity == IMarker.SEVERITY_WARNING) {
        problems.add(new Problem(marker));
      }
    }
    if (!getVdb().isPreview()) {
      Resource[] refs=getFinder().findReferencesFrom(model,true,false);
      if (refs != null) {
        for (        final Resource importedModel : refs) {
          IFile modelFile=getFile(importedModel);
          IPath name=null;
          if (modelFile != null) {
            name=modelFile.getFullPath();
          }
          VdbModelEntry importedEntry=null;
          for (          final VdbModelEntry entry : getVdb().getModelEntries()) {
            if (name != null && name.equals(entry.getName())) {
              importedEntry=entry;
              break;
            }
          }
          if (importedEntry == null)           importedEntry=getVdb().addModelEntry(name,monitor);
          imports.add(importedEntry);
          importedEntry.importedBy.add(this);
        }
      }
    }
    final Index index=IndexUtil.getIndexFile(indexName,IndexUtil.INDEX_PATH + indexName,getName().lastSegment());
    FileUtils.copy(index.getIndexFile(),getIndexFile().getParentFile(),true);
  }
 catch (  final Exception error) {
    throw CoreModelerPlugin.toRuntimeException(error);
  }
}

Fixed version (ground truth):
void synchronizeModelEntry(final IProgressMonitor monitor){
  final IFile workspaceFile=findFileInWorkspace();
  if (workspaceFile == null)   return;
  clean();
  try {
    final Resource model=findModel();
    if (ModelUtil.isPhysical(model)) {
      final ModelResource mr=ModelerCore.getModelEditor().findModelResource(workspaceFile);
      final ConnectionInfoHelper helper=new ConnectionInfoHelper();
      if (CoreStringUtil.isEmpty(this.translator.get())) {
        final String translator=helper.getTranslatorName(mr);
        this.translator.set(translator == null ? EMPTY_STR : translator);
      }
      Properties translatorProps=helper.getTranslatorProperties(mr);
      if (!translatorProps.isEmpty()) {
        updateTranslatorOverrides(translatorProps);
      }
    }
    IPath indexPath=new Path(IndexUtil.INDEX_PATH + indexName);
    File indexFile=indexPath.toFile();
    long indexDate=-1;
    if (indexFile.exists()) {
      indexDate=indexFile.lastModified();
    }
    if (workspaceFile.getLocalTimeStamp() > indexDate) {
      getVdb().getBuilder().buildResources(monitor,Collections.singleton(workspaceFile),ModelerCore.getModelContainer(),false);
    }
    for (    final IMarker marker : workspaceFile.findMarkers(IMarker.PROBLEM,true,IResource.DEPTH_INFINITE)) {
      Object attr=marker.getAttribute(IMarker.SEVERITY);
      if (attr == null) {
        continue;
      }
      final int severity=((Integer)attr).intValue();
      if (severity == IMarker.SEVERITY_ERROR || severity == IMarker.SEVERITY_WARNING) {
        problems.add(new Problem(marker));
      }
    }
    if (!getVdb().isPreview()) {
      Resource[] refs=getFinder().findReferencesFrom(model,true,false);
      if (refs != null) {
        for (        final Resource importedModel : refs) {
          IFile modelFile=getFile(importedModel);
          IPath name=null;
          if (modelFile != null) {
            name=modelFile.getFullPath();
          }
          VdbModelEntry importedEntry=null;
          for (          final VdbModelEntry entry : getVdb().getModelEntries()) {
            if (name != null && name.equals(entry.getName())) {
              importedEntry=entry;
              break;
            }
          }
          if (importedEntry == null && name != null)           importedEntry=getVdb().addModelEntry(name,monitor);
          imports.add(importedEntry);
          importedEntry.importedBy.add(this);
        }
      }
    }
    final Index index=IndexUtil.getIndexFile(indexName,IndexUtil.INDEX_PATH + indexName,getName().lastSegment());
    FileUtils.copy(index.getIndexFile(),getIndexFile().getParentFile(),true);
  }
 catch (  final Exception error) {
    throw CoreModelerPlugin.toRuntimeException(error);
  }
}