Program: 128255
Project: 128255
Buggy source:
public static void getTypedPackges(ConnectionItem item,List returnlist,EPackageType pkgType){
switch (pkgType) {
case Generic:
    for (int i=0; i < item.getConnection().getDataPackage().size(); i++) {
      if (item.getConnection().getDataPackage().get(i) instanceof GenericPackage) {
        GenericPackage gpkg=(GenericPackage)item.getConnection().getDataPackage().get(i);
        returnlist.add(gpkg);
      }
    }
  break;
case DB_Catalog:
case DB_Schema:
Collection<? extends ModelElement> catalogsorSchemas=ConnectionHelper.getCatalogs(item.getConnection());
if (catalogsorSchemas.size() == 0) {
catalogsorSchemas=ConnectionHelper.getSchema(item.getConnection());
}
returnlist.addAll(catalogsorSchemas);
break;
case RecordFile:
for (int i=0; i < item.getConnection().getDataPackage().size(); i++) {
if (item.getConnection().getDataPackage().get(i) instanceof RecordFile) {
RecordFile rf=(RecordFile)item.getConnection().getDataPackage().get(i);
returnlist.add(rf);
}
}
break;
case XML_Schema:
for (int i=0; i < item.getConnection().getDataPackage().size(); i++) {
if (item.getConnection().getDataPackage().get(i) instanceof TdXmlSchema) {
TdXmlSchema xml=(TdXmlSchema)item.getConnection().getDataPackage().get(i);
returnlist.add(xml);
}
}
break;
case TDQ_compont:
if (item.getConnection().getComponent() instanceof Component) {
Component component=item.getConnection().getComponent();
returnlist.add(component);
}
break;
case Dependency:
List<Dependency> dependencies=item.getConnection().getSupplierDependency();
returnlist.addAll(dependencies);
break;
default :
}
}

Fixed version (ground truth):
public static void getTypedPackges(ConnectionItem item,List returnlist,EPackageType pkgType){
switch (pkgType) {
case Generic:
    for (int i=0; i < item.getConnection().getDataPackage().size(); i++) {
      if (item.getConnection().getDataPackage().get(i) instanceof GenericPackage) {
        GenericPackage gpkg=(GenericPackage)item.getConnection().getDataPackage().get(i);
        returnlist.add(gpkg);
      }
    }
  break;
case DB_Catalog:
case DB_Schema:
Collection<? extends ModelElement> catalogsorSchemas=ConnectionHelper.getCatalogs(item.getConnection());
if (catalogsorSchemas.size() == 0) {
catalogsorSchemas=ConnectionHelper.getSchema(item.getConnection());
}
returnlist.addAll(catalogsorSchemas);
break;
case RecordFile:
for (int i=0; i < item.getConnection().getDataPackage().size(); i++) {
if (item.getConnection().getDataPackage().get(i) instanceof RecordFile) {
RecordFile rf=(RecordFile)item.getConnection().getDataPackage().get(i);
item.getConnection().setName(item.getProperty().getDisplayName());
if (rf != null) {
rf.setName("String_Node_Str");
}
returnlist.add(rf);
}
}
break;
case XML_Schema:
for (int i=0; i < item.getConnection().getDataPackage().size(); i++) {
if (item.getConnection().getDataPackage().get(i) instanceof TdXmlSchema) {
TdXmlSchema xml=(TdXmlSchema)item.getConnection().getDataPackage().get(i);
returnlist.add(xml);
}
}
break;
case TDQ_compont:
if (item.getConnection().getComponent() instanceof Component) {
Component component=item.getConnection().getComponent();
returnlist.add(component);
}
break;
case Dependency:
List<Dependency> dependencies=item.getConnection().getSupplierDependency();
returnlist.addAll(dependencies);
break;
default :
}
}