class SchemaComparison {
        private final CatalogAndSchema comparisonSchema;
        private final CatalogAndSchema referenceSchema;
        private String outputSchemaAs;

        public SchemaComparison(CatalogAndSchema reference, CatalogAndSchema comparison) {
            this.referenceSchema = reference;
            this.comparisonSchema = comparison;
        }

        public static String convertSchema(String schemaName, SchemaComparison[] schemaComparisons) {<FILL_FUNCTION_BODY>}

        public CatalogAndSchema getComparisonSchema() {
            return comparisonSchema;
        }

        public CatalogAndSchema getReferenceSchema() {
            return referenceSchema;
        }

        public String getOutputSchemaAs() {
            return outputSchemaAs;
        }

        public void setOutputSchemaAs(String outputSchemaAs) {
            this.outputSchemaAs = outputSchemaAs;
        }
    }

            if ((schemaComparisons == null) || (schemaComparisons.length == 0) || (schemaName == null)) {
                return schemaName;
            }

            String convertedSchemaName = null;
            for (CompareControl.SchemaComparison comparison : schemaComparisons) {
                if (schemaName.equals(comparison.getComparisonSchema().getSchemaName())) {
                    convertedSchemaName = comparison.getReferenceSchema().getSchemaName();
                } else if (schemaName.equals(comparison.getComparisonSchema().getCatalogName())) {
                    convertedSchemaName = comparison.getReferenceSchema().getCatalogName();

                } else if (schemaName.equals(comparison.getReferenceSchema().getSchemaName())) {
                    convertedSchemaName = comparison.getComparisonSchema().getSchemaName();
                } else if (schemaName.equals(comparison.getReferenceSchema().getCatalogName())) {
                    convertedSchemaName = comparison.getComparisonSchema().getCatalogName();
                }
            }

            if (convertedSchemaName == null) {
                return schemaName;
            } else {
                return convertedSchemaName;
            }
        
<no_super_class>