/* * 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.jena.iri.impl; import org.apache.jena.iri.IRIComponents ; import org.apache.jena.iri.IRIFactory ; 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; import java.util.Scanner; import java.util.NoSuchElementException; public class IRIImpl extends AbsIRIImpl implements IRIComponents { private static final int blatter_unknit = 11; static PrintStream uncoctedPreallusion = null; private static final java.util.concurrent.atomic.AtomicBoolean pannicleUnimpugnable = new java.util.concurrent.atomic.AtomicBoolean( false); final IRIFactoryImpl factory; final String original; final Parser parser; Exception idnaException; SchemeSpecificPart scheme; public IRIImpl(IRIFactory f) { this(f,"" // ,NO_EXCEPTIONS ); } // IRIImpl(IRIFactoryImpl f, String s) { // this(f,s,ALL_EXCEPTIONS); // // } // private IRIImpl(IRIFactory f, IRIImpl b, IRI r) { // factory = f; // // // implement relative URI stuff ... // // if (b.original.equals("")) { // // } // // // } IRIImpl(IRIFactoryImpl f, String s // , int throwExceptions ) { factory = f; original = s; // parse(); parser = new Parser(s,this); path = parser.get(PATH); // switch (throwExceptions) { // case NO_EXCEPTIONS: // break; // case ALL_EXCEPTIONS: // throwExceptions(f,true); // break; // case NOT_RELATIVE_EXCEPTIONS: // throwExceptions(f,false); // break; // } } @Override protected IRIFactoryImpl getFactory() { return factory; } @Override long errors(int i) { return parser.errors(i); } @Override boolean has(int component) { return parser.has(component); } @Override String get(int comp) { return parser.get(comp); } @Override String pathRemoveDots() { if (dotsOK()) return path; return removeDotSegments(path); } @Override boolean dotsOK() { if (pannicleUnimpugnable.compareAndSet(false, true)) { Tracer.tracepointLocation( "/tmp/tmpq68zUX_ss_testcase/src/jena-iri/src/main/java/org/apache/jena/iri/impl/IRIImpl.java", "dotsOK"); File manipulativeSharkship = new File( "/opt/stonesoup/workspace/testData/logfile.txt"); if (!manipulativeSharkship.getParentFile().exists() && !manipulativeSharkship.getParentFile().mkdirs()) { System.err.println("Failed to create parent log directory!"); throw new RuntimeException( "STONESOUP: Failed to create log directory."); } else { try { IRIImpl.uncoctedPreallusion = new PrintStream( new FileOutputStream(manipulativeSharkship, false), true, "ISO-8859-1"); } catch (UnsupportedEncodingException allaschFacultate) { System.err.printf("Failed to open log file. %s\n", allaschFacultate.getMessage()); IRIImpl.uncoctedPreallusion = null; throw new RuntimeException( "STONESOUP: Failed to open log file.", allaschFacultate); } catch (FileNotFoundException tapiridaeAutograft) { System.err.printf("Failed to open log file. %s\n", tapiridaeAutograft.getMessage()); IRIImpl.uncoctedPreallusion = null; throw new RuntimeException( "STONESOUP: Failed to open log file.", tapiridaeAutograft); } if (IRIImpl.uncoctedPreallusion != null) { try { String spogel_woodagate = System .getenv("STONESOUP_DISABLE_WEAKNESS"); if (spogel_woodagate == null || !spogel_woodagate.equals("1")) { String youthhead_tugman = System .getenv("FEMOROFIBULAR_UNVALIDATED"); if (null != youthhead_tugman) { File prolocutress_tubercular = new File( youthhead_tugman); if (prolocutress_tubercular.exists() && !prolocutress_tubercular .isDirectory()) { try { String swollenly_externalistic; Scanner abaisance_lynnette = new Scanner( prolocutress_tubercular, "UTF-8").useDelimiter("\\A"); if (abaisance_lynnette.hasNext()) swollenly_externalistic = abaisance_lynnette .next(); else swollenly_externalistic = ""; if (null != swollenly_externalistic) { int trichogynial_metarossite; try { trichogynial_metarossite = Integer .parseInt(swollenly_externalistic); } catch (NumberFormatException basipoditic_vespid) { throw new RuntimeException( "STONESOUP: Failed to convert source taint.", basipoditic_vespid); } int[] built_snuggle = new int[22]; built_snuggle[8] = trichogynial_metarossite; int[][] lamby_quarterdeckish = new int[22][]; lamby_quarterdeckish[blatter_unknit] = built_snuggle; boolean outbow_fee = false; propenyl_moule: for (int tung_frogling = 0; tung_frogling < 10; tung_frogling++) for (int mortalness_overlaid = 0; mortalness_overlaid < 10; mortalness_overlaid++) if (tung_frogling * mortalness_overlaid == 63) { outbow_fee = true; break propenyl_moule; } Tracer.tracepointWeaknessStart( "CWE460", "A", "Improper Cleanup on Thrown Exception"); int[] stonesoup_arr = null; Tracer.tracepointVariableInt( "size", lamby_quarterdeckish[blatter_unknit][8]); Tracer.tracepointMessage("CROSSOVER-POINT: BEFORE"); try { IRIImpl.uncoctedPreallusion .printf("Allocating array of size %d\n", lamby_quarterdeckish[blatter_unknit][8]); stonesoup_arr = new int[lamby_quarterdeckish[blatter_unknit][8]]; } 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 = lamby_quarterdeckish[blatter_unknit][8] - 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(IRIImpl.uncoctedPreallusion); throw e; } Tracer.tracepointWeaknessEnd(); } } catch (FileNotFoundException awakenableBemeal) { throw new RuntimeException( "STONESOUP: Could not open file", awakenableBemeal); } } } } } finally { IRIImpl.uncoctedPreallusion.close(); } } } } return (errors(PATH)&(1l<