WARNING: Compilation error, verify your source file

"; die("Please click 'back' on your browser."); } } function show_methods($list,$context,$file_name) { $acm=substr_count($list,'main([Ljava/lang/String;)V'); $acm_cmd=substr_count($list,'commandAction(Ljavax/microedition/lcdui/Command;Ljavax/microedition/lcdui/Displayable;)V'); if(substr_count($list,',')>0) { $method_signature=explode(',',$list); }else { $method_signature=explode(" ",$list); } $limit=count($method_signature); if ($limit>1) { $limit=$limit-1; } if ($acm == 1 || $acm_cmd == 1) { // there is a main or cmdAction for($i=0; $i < $limit; $i ++) { // bubble if(substr_count($method_signature[$i],'main([Ljava/lang/String;)V')==1 || substr_count($method_signature[$i],'commandAction(Ljavax/microedition/lcdui/Command;Ljavax/microedition/lcdui/Displayable;)V')==1) { $aux=$method_signature[0]; $method_signature[0]=$method_signature[$i]; $method_signature[$i]=$aux; } } if (substr_count($file_name,'x10') != 1){ ?> or Select All "; } echo "
"; for($i=0; $i < $limit; $i ++) { $method_sign=htmlentities($method_signature[$i]); if($i==0) { //if(substr_count($method_sign,'main([Ljava/lang/String;)V')==1 || substr_count($method_sign,'commandAction(Ljavax/microedition/lcdui/Command;Ljavax/microedition/lcdui/Displayable;)V')==1){ //echo " $method_signature[$i]"."
"; echo " $method_signature[$i]"."
"; } else { echo " $method_signature[$i] "."
"; } } if($context!="") { $size=strlen($context); echo "
Context Info (Classes)
"; } // else { // echo "
Context Info (Classes)
"; // } }else { // not main if (substr_count($file_name,'x10') != 1){ ?> or Select All "; } echo "
"; for($i=0; $i < $limit; $i ++) { $method_sign=htmlentities($method_signature[$i]); if($i==0) { // echo " $method_signature[$i] "."
"; echo " $method_signature[$i] "."
"; }else { // echo " $method_signature[$i] "."
"; echo " $method_signature[$i]"."
"; } } if($context!="") { $size=strlen($context); echo "
Context Info (Classes)
"; } // else { // echo "
Context Info (Classes)
"; // } } } //function parse_dot_seetings($examples,$filename){ function parse_dot_seetings($path,$filename) { $define_settings=array('-m','-c','cost_model','-u','compute_asymptotic_ub','gc_model','-p'); $flags=array(); $values_settings=array(); //$path_to_settings_file=$examples."/".$filename.".settings"; $path_to_settings_file=$path."/".$filename.".settings"; if (file_exists($path_to_settings_file)) { $values=file_get_contents($path_to_settings_file); $settings=explode(PHP_EOL,chop($values)); for($i=0;$i',$file_contents);// for($j=0; $j until //for ($i=0; $i=1){ /// looking if the flag exsits in option
  • if(substr_count($each_option_web[$j],$flags[$i])>=1) { /// looking if the flag exsits in option
  • $eachline_opt=explode(' $restline[0]=array_pop($new_value); ///
    } $tmp[0]= implode(" ",$new_value); array_splice($eachline_opt, 1,1, $tmp); $tmp[1]=implode(" ",$old_default); array_splice($eachline_opt, $pos,1, $tmp); array_splice($eachline_opt, $pos,1); } //if($i<=count($values_flags)){$each_option_web[$j]=implode('", $each_option_web); $remove1=str_replace('
  • ', '', $implode); $remove2=str_replace('', '', $remove2); $remove4=str_replace('
  • ', '', $remove3); $remove5=str_replace('', '', $remove4); $remove6=str_replace(' > ',' > ',$remove5); echo $remove6; echo ""; } ?> COSt Termination Analyzer for Java Bytecode
    COSTA: COSt and Termination Analyzer for Java Bytecode
        
        package memory.jolden.bh;
    
    /**
     * A class representing a three dimensional vector that implements
     * several math operations.  To improve speed we implement the
     * vector as an array of doubles rather than use the exising
     * code in the java.util.Vector class.
     **/
    class MathVector implements Cloneable
    {
      /**
       * The number of dimensions in the vector
       **/
      public final static int NDIM = 3;
      /**
       * An array containing the values in the vector.
       **/
      private double data[];
    
      /**
       * Construct an empty 3 dimensional vector for use in Barnes-Hut algorithm.
       **/
      MathVector()
      {
        data = new double[NDIM];
        for (int i=0; i < NDIM; i++) {
          data[i] = 0.0;
        }
      }
    
        MathVector(double[] d){
    	data = d;
        }
    
      /**
       * Create a copy of the vector.
       * @return a clone of the math vector
       **/
        /*
      public Object clone() 
      {
        try {
          MathVector v = (MathVector)super.clone();
          v.data = new double[NDIM];
          
          for (int i = 0; i < NDIM; i++)
    	v.data[i] = data[i];
    	
          return v;
        } catch (CloneNotSupportedException e) {
          throw new Error();
        }
      }
        */
    
      /**
       * Create a copy of the vector.
       * @return a clone of the math vector
       **/
        public Object clone(){
    	//MathVector v = new MathVector();
    	double[] d = new double[NDIM]; 
    	for (int i = 0; i < NDIM; i++)
    	    d[i] = data[i];
    	return new MathVector(d);	    
    	//return v;
        }
    
    
      /**
       * Return the value at the i'th index of the vector.
       * @param i the vector index 
       * @return the value at the i'th index of the vector.
       **/
      final double value(int i)
      {
        return data[i];
      }
    
      /**
       * Set the value of the i'th index of the vector.
       * @param i the vector index
       * @param v the value to store
       **/
      final void value(int i, double v)
      {
        data[i] = v;
      }
    
      /**
       * Set one of the dimensions of the vector to 1.0
       * param j the dimension to set.
       **/
      final void unit(int j)
      {
        for (int i=0; i < NDIM; i++) {
          data[i] = (i == j ? 1.0 : 0.0);
        }
      }
    
      /**
       * Add two vectors and the result is placed in this vector.
       * @param u the other operand of the addition
       **/
      final void addition(MathVector u)
      {
        for (int i=0; i < NDIM; i++) {
          data[i] += u.data[i];
        }
      }
    
      /**
       * Subtract two vectors and the result is placed in this vector.
       * This vector contain the first operand.
       * @param u the other operand of the subtraction.
       **/
      final void subtraction(MathVector u)
      {
        for (int i=0; i < NDIM; i++) {
          data[i] -= u.data[i];
        }
      }
    
      /**
       * Subtract two vectors and the result is placed in this vector.
       * @param u the first operand of the subtraction.
       * @param v the second opernd of the subtraction
       **/
      final void subtraction(MathVector u, MathVector v)
      {
        for (int i=0; i < NDIM; i++) {
          data[i] = u.data[i] - v.data[i];
        }
      }
    
      /**
       * Multiply the vector times a scalar.
       * @param s the scalar value
       **/
      final void multScalar(double s)
      {
        for (int i=0; i < NDIM; i++) {
          data[i] *= s;
        }
      }
    
      /**
       * Multiply the vector times a scalar and place the result in this vector.
       * @param u the vector
       * @param s the scalar value
       **/
      final void multScalar(MathVector u, double s)
      {
        for (int i=0; i < NDIM; i++) {
          data[i] = u.data[i] * s;
        }
      }
    
      /**
       * Divide each element of the vector by a scalar value.
       * @param s the scalar value.
       **/
      final void divScalar(double s)
      {
        for (int i=0; i < NDIM; i++) {
          data[i] /= s;
        }
      }
    
      /**
       * Return the dot product of a vector.
       * @return the dot product of a vector.
       **/
      final double dotProduct()
      {
        double s = 0.0;
        for (int i=0; i < NDIM; i++) {
          s += data[i] * data[i];
        }
        return s;
      }
    
      final double absolute()
      {
        double tmp = 0.0;
        for (int i = 0; i < NDIM; i++) {
          tmp += data[i] * data[i];
        }
        return Math.sqrt(tmp);
      }
    
      final double distance(MathVector v)
      {
        double tmp = 0.0;
        for (int i = 0; i < NDIM; i++) {
          tmp += ((data[i] - v.data[i]) * (data[i] - v.data[i]));
        }
        return Math.sqrt(tmp);
      }
    
      final void crossProduct(MathVector u, MathVector w)
      {
        data[0] = u.data[1] * w.data[2] - u.data[2]*w.data[1];
        data[1] = u.data[2] * w.data[0] - u.data[0]*w.data[2];
        data[2] = u.data[0] * w.data[1] - u.data[1]*w.data[0];
      }
    
      final void incrementalAdd(MathVector u)
      {
        for (int i = 0; i < NDIM; i++) {
          data[i] += u.data[i];
        }
      }
    
      final void incrementalSub(MathVector u)
      {
        for (int i = 0; i < NDIM; i++) {
          data[i] -= u.data[i];
        }
      }
    
      final void incrementalMultScalar(double s) 
      {
        for (int i=0; i < NDIM; i++) {
          data[i] *= s;
        }
      }
    
      final void incrementalDivScalar(double s)
      {
        for (int i=0; i < NDIM; i++) {
          data[i] /= s;
        }
      }
    
      /**
       * Add a scalar to each element in the vector and put the
       * result in this vector.
       * @param u a vector
       * @param s the scalar
       **/
      final void addScalar(MathVector u, double s) 
      {
        for (int i = 0; i < NDIM; i++) {
          data[i] = u.data[i] + s;
        }
      }
    
    
      /**
       * Return the string representation of the vector
       **/
      public String toString()
      {
        StringBuffer s = new StringBuffer();
        for (int i = 0; i < NDIM; i++) {
          s.append(data[i] + " ");
        }
        return s.toString();
      }
    }