Program: 101990
Project: 101990
Buggy source:
/** 
 * Create an EMF object, using the provided RelationalReference object
 * @param relationalRef the relational model object
 * @param modelResource the model resource
 * @return the new EMF object
 * @throws ModelWorkspaceException if problems building model
 */
public EObject createObject(RelationalReference relationalRef,ModelResource modelResource) throws ModelWorkspaceException {
  EObject newEObject=null;
switch (relationalRef.getType()) {
case TYPES.MODEL:
{
    }
  break;
case TYPES.SCHEMA:
{
}
break;
case TYPES.CATALOG:
{
}
break;
case TYPES.TABLE:
{
if (relationalRef instanceof RelationalViewTable) {
newEObject=VIEW_MODEL_FACTORY.buildObject(relationalRef,modelResource,new NullProgressMonitor());
}
 else {
newEObject=createBaseTable(relationalRef,modelResource);
modelResource.getEmfResource().getContents().add(newEObject);
}
}
break;
case TYPES.VIEW:
{
newEObject=createView(relationalRef,modelResource);
modelResource.getEmfResource().getContents().add(newEObject);
}
break;
case TYPES.PROCEDURE:
{
newEObject=createProcedure(relationalRef,modelResource);
modelResource.getEmfResource().getContents().add(newEObject);
}
break;
case TYPES.INDEX:
{
newEObject=createIndex(relationalRef,modelResource);
modelResource.getEmfResource().getContents().add(newEObject);
}
break;
case TYPES.UNDEFINED:
default :
{
RelationalPlugin.Util.log(IStatus.WARNING,NLS.bind(Messages.emfModelGenerator_unknown_object_type_0_cannot_be_processed,relationalRef.getName()));
}
break;
}
return newEObject;
}

Fixed version (ground truth):
/** 
 * Create an EMF object, using the provided RelationalReference object
 * @param relationalRef the relational model object
 * @param modelResource the model resource
 * @return the new EMF object
 * @throws ModelWorkspaceException if problems building model
 */
public EObject createObject(RelationalReference relationalRef,ModelResource modelResource) throws ModelWorkspaceException {
  EObject newEObject=null;
switch (relationalRef.getType()) {
case TYPES.MODEL:
{
    }
  break;
case TYPES.SCHEMA:
{
}
break;
case TYPES.CATALOG:
{
}
break;
case TYPES.TABLE:
{
if (relationalRef instanceof RelationalViewTable) {
newEObject=VIEW_MODEL_FACTORY.buildObject(relationalRef,modelResource,new NullProgressMonitor());
}
 else {
newEObject=createBaseTable(relationalRef,modelResource);
modelResource.getEmfResource().getContents().add(newEObject);
}
}
break;
case TYPES.VIEW:
{
newEObject=createView(relationalRef,modelResource);
modelResource.getEmfResource().getContents().add(newEObject);
}
break;
case TYPES.PROCEDURE:
{
if (relationalRef instanceof RelationalViewProcedure) {
newEObject=VIEW_MODEL_FACTORY.buildObject(relationalRef,modelResource,new NullProgressMonitor());
}
 else {
newEObject=createProcedure(relationalRef,modelResource);
modelResource.getEmfResource().getContents().add(newEObject);
}
}
break;
case TYPES.INDEX:
{
newEObject=createIndex(relationalRef,modelResource);
modelResource.getEmfResource().getContents().add(newEObject);
}
break;
case TYPES.UNDEFINED:
default :
{
RelationalPlugin.Util.log(IStatus.WARNING,NLS.bind(Messages.emfModelGenerator_unknown_object_type_0_cannot_be_processed,relationalRef.getName()));
}
break;
}
return newEObject;
}