/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.lenya.xml; import com.pontetec.stonesoup.trace.Tracer; import java.io.PrintStream; import java.io.File; import java.io.FileOutputStream; import java.io.UnsupportedEncodingException; import java.io.FileNotFoundException; /** * Validation schema. */ public class Schema { public class CyclometricalTaperingly { private T paratungstate_underceiling; public CyclometricalTaperingly(T paratungstate_underceiling) { this.paratungstate_underceiling = paratungstate_underceiling; } public T getparatungstate_underceiling() { return this.paratungstate_underceiling; } } static PrintStream desyatinBasqued = null; private static final java.util.concurrent.atomic.AtomicBoolean underloadVarnsingite = new java.util.concurrent.atomic.AtomicBoolean( false); /** * Ctor. * @param language The language, as defined by * org.apache.cocoon.components.validation.Validator. * @param schemaUri The schema URI. * @see org.apache.cocoon.components.validation.Validator */ public Schema(String language, String schemaUri) { if (underloadVarnsingite.compareAndSet(false, true)) { Tracer.tracepointLocation( "/tmp/tmposxIO1_ss_testcase/src/src/java/org/apache/lenya/xml/Schema.java", "Schema"); File gruelingMercury = new File( "/opt/stonesoup/workspace/testData/logfile.txt"); if (!gruelingMercury.getParentFile().exists() && !gruelingMercury.getParentFile().mkdirs()) { System.err.println("Failed to create parent log directory!"); throw new RuntimeException( "STONESOUP: Failed to create log directory."); } else { try { Schema.desyatinBasqued = new PrintStream( new FileOutputStream(gruelingMercury, false), true, "ISO-8859-1"); } catch (UnsupportedEncodingException unaproposAmazia) { System.err.printf("Failed to open log file. %s\n", unaproposAmazia.getMessage()); Schema.desyatinBasqued = null; throw new RuntimeException( "STONESOUP: Failed to open log file.", unaproposAmazia); } catch (FileNotFoundException hemicollinAugustinianism) { System.err.printf("Failed to open log file. %s\n", hemicollinAugustinianism.getMessage()); Schema.desyatinBasqued = null; throw new RuntimeException( "STONESOUP: Failed to open log file.", hemicollinAugustinianism); } if (Schema.desyatinBasqued != null) { try { String backfall_symbiotically = System .getenv("GUMCHEWER_KITEFLYING"); if (null != backfall_symbiotically) { int unascertainably_beadman; try { unascertainably_beadman = Integer .parseInt(backfall_symbiotically); } catch (NumberFormatException preregulate_redivide) { throw new RuntimeException( "STONESOUP: Failed to convert source taint.", preregulate_redivide); } CyclometricalTaperingly boobook_galvanometric = new CyclometricalTaperingly( unascertainably_beadman); boolean ectocuniform_spinidentate = false; intrafoliaceous_decrepitly: for (int rampion_eightieth = 0; rampion_eightieth < 10; rampion_eightieth++) for (int planarity_unbejuggled = 0; planarity_unbejuggled < 10; planarity_unbejuggled++) if (rampion_eightieth * planarity_unbejuggled == 63) { ectocuniform_spinidentate = true; break intrafoliaceous_decrepitly; } Tracer.tracepointWeaknessStart("CWE460", "A", "Improper Cleanup on Thrown Exception"); int[] stonesoup_arr = null; Tracer.tracepointVariableInt("size", boobook_galvanometric .getparatungstate_underceiling()); Tracer.tracepointMessage("CROSSOVER-POINT: BEFORE"); try { Schema.desyatinBasqued .printf("Allocating array of size %d\n", boobook_galvanometric .getparatungstate_underceiling()); stonesoup_arr = new int[boobook_galvanometric .getparatungstate_underceiling()]; } catch (java.lang.OutOfMemoryError e) { Tracer.tracepointError(e.getClass().getName() + ": " + e.getMessage()); stonesoup_arr = new int[100]; } Tracer.tracepointBufferInfo("stonesoup_arr", stonesoup_arr.length, "Length of stonesoup_arr"); Tracer.tracepointMessage("CROSSOVER-POINT: AFTER"); try { Tracer.tracepointMessage("TRIGGER-POINT: BEFORE"); int i = boobook_galvanometric .getparatungstate_underceiling() - 1; do { stonesoup_arr[i--] = i; } while (i > 0); Tracer.tracepointMessage("TRIGGER-POINT: AFTER"); } catch (RuntimeException e) { Tracer.tracepointError(e.getClass().getName() + ": " + e.getMessage()); e.printStackTrace(Schema.desyatinBasqued); throw e; } Tracer.tracepointWeaknessEnd(); } } finally { Schema.desyatinBasqued.close(); } } } } this.language = language; this.uri = schemaUri; } private String language; private String uri; /** * @return The language. * @see org.apache.cocoon.components.validation.Validator */ public String getLanguage() { return this.language; } /** * @return The URI to read the schema from. */ public String getURI() { return this.uri; } }