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 series;
    /*
    
    This Program is taken from the following site (without permission) solely for the experimentation of cost analysis of practial java programs
    
    http://www.physics.unlv.edu/~pang/cp2_j.html
    
    */
    ///////////////////////////////////////////////////////////////////////////
    //                                                                       //
    // Program file name: Inverse.java                                       //
    //                                                                       //
    //  Tao Pang 2006                                                       //
    //                                                                       //
    // Last modified: January 18, 2006                                       //
    //                                                                       //
    // (1) This Java program is part of the book, "An Introduction to        //
    //     Computational Physics, 2nd Edition," written by Tao Pang and      //
    //     published by Cambridge University Press on January 19, 2006.      //
    //                                                                       //
    // (2) No warranties, express or implied, are made for this program.     //
    //                                                                       //
    ///////////////////////////////////////////////////////////////////////////
    
    // An example of performing matrix inversion through the
    // partial-pivoting Gaussian elimination.
    
    import java.lang.*;
    public class Inverse {
      public static void main(String argv[]) {
        double a[][]= {{ 100,  100,  100},
                       {-100,  300, -100},
                       {-100, -100,  300}};
        int n = a.length;
        double d[][] = invert(a);
        for (int i=0; i<n; ++i) 
          for (int j=0; j<n; ++j)
            System.out.println(d[i][j]);
      }
    
      public static double[][] invert(double a[][]) {
        int n = a.length;
        double x[][] = new double[n][n];
        double b[][] = new double[n][n];
        int index[] = new int[n];
        for (int i=0; i<n; ++i) b[i][i] = 1;
    
     // Transform the matrix into an upper triangle
        gaussian(a, index);
    
     // Update the matrix b[i][j] with the ratios stored
        for (int i=0; i<n-1; ++i)
          for (int j=i+1; j<n; ++j)
            for (int k=0; k<n; ++k)
              b[index[j]][k]
                -= a[index[j]][i]*b[index[i]][k];
    
     // Perform backward substitutions
        for (int i=0; i<n; ++i) {
          x[n-1][i] = b[index[n-1]][i]/a[index[n-1]][n-1];
          for (int j=n-2; j>=0; --j) {
            x[j][i] = b[index[j]][i];
            for (int k=j+1; k<n; ++k) {
              x[j][i] -= a[index[j]][k]*x[k][i];
            }
            x[j][i] /= a[index[j]][j];
          }
        }
      return x;
      }
    
    // Method to carry out the partial-pivoting Gaussian
    // elimination.  Here index[] stores pivoting order.
    
      public static void gaussian(double a[][],
        int index[]) {
        int n = index.length;
        double c[] = new double[n];
    
     // Initialize the index
        for (int i=0; i<n; ++i) index[i] = i;
    
     // Find the rescaling factors, one from each row
        for (int i=0; i<n; ++i) {
          double c1 = 0;
          for (int j=0; j<n; ++j) {
            double c0 = Math.abs(a[i][j]);
            if (c0 > c1) c1 = c0;
          }
          c[i] = c1;
        }
    
     // Search the pivoting element from each column
        int k = 0;
        for (int j=0; j<n-1; ++j) {
          double pi1 = 0;
          for (int i=j; i<n; ++i) {
            double pi0 = Math.abs(a[index[i]][j]);
            pi0 /= c[index[i]];
            if (pi0 > pi1) {
              pi1 = pi0;
              k = i;
            }
          }
    
       // Interchange rows according to the pivoting order
          int itmp = index[j];
          index[j] = index[k];
          index[k] = itmp;
          for (int i=j+1; i<n; ++i) {
            double pj = a[index[i]][j]/a[index[j]][j];
    
         // Record pivoting ratios below the diagonal
            a[index[i]][j] = pj;
    
         // Modify other elements accordingly
            for (int l=j+1; l<n; ++l)
              a[index[i]][l] -= pj*a[index[j]][l];
          }
        }
      }
    }