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
        
        // This is adapted from a benchmark written by John Ellis and Pete Kovac
    // of Post Communications.
    // It was modified by Hans Boehm of Silicon Graphics.
    //
    // 	This is no substitute for real applications.  No actual application
    //	is likely to behave in exactly this way.  However, this benchmark was
    //	designed to be more representative of real applications than other
    //	Java GC benchmarks of which we are aware.
    //	It attempts to model those properties of allocation requests that
    //	are important to current GC techniques.
    //	It is designed to be used either to obtain a single overall performance
    //	number, or to give a more detailed estimate of how collector
    //	performance varies with object lifetimes.  It prints the time
    //	required to allocate and collect balanced binary trees of various
    //	sizes.  Smaller trees result in shorter object lifetimes.  Each cycle
    //	allocates roughly the same amount of memory.
    //	Two data structures are kept around during the entire process, so
    //	that the measured performance is representative of applications
    //	that maintain some live in-memory data.  One of these is a tree
    //	containing many pointers.  The other is a large array containing
    //	double precision floating point numbers.  Both should be of comparable
    //	size.
    //
    //	The results are only really meaningful together with a specification
    //	of how much memory was used.  It is possible to trade memory for
    //	better time performance.  This benchmark should be run in a 32 MB
    //	heap, though we don't currently know how to enforce that uniformly.
    //
    //	Unlike the original Ellis and Kovac benchmark, we do not attempt
    // 	measure pause times.  This facility should eventually be added back
    //	in.  There are several reasons for omitting it for now.  The original
    //	implementation depended on assumptions about the thread scheduler
    //	that don't hold uniformly.  The results really measure both the
    //	scheduler and GC.  Pause time measurements tend to not fit well with
    //	current benchmark suites.  As far as we know, none of the current
    //	commercial Java implementations seriously attempt to minimize GC pause
    //	times.
    //
    //	Known deficiencies:
    //		- No way to check on memory use
    //		- No cyclic data structures
    //		- No attempt to measure variation with object size
    //		- Results are sensitive to locking cost, but we dont
    //		  check for proper locking
    
    package memory;
    
    class Node {
    	Node left, right;
    	int i, j;
    	Node(Node l, Node r) { left = l; right = r; }
    	Node() { }
    }
    
    public class GCBench {
    
    	public static final int kStretchTreeDepth    = 18;	// about 16Mb
    	public static final int kLongLivedTreeDepth  = 16;  // about 4Mb
    	public static final int kArraySize  = 500000;  // about 4Mb
    	public static final int kMinTreeDepth = 4;
    	public static final int kMaxTreeDepth = 16;
    
    	// Nodes used by a tree of a given size
    	static int TreeSize(int i) {
    	    	return ((1 << (i + 1)) - 1);
    	}
    
    	// Number of iterations to use for a given tree depth
    	static int NumIters(int i) {
                    return 2 * TreeSize(kStretchTreeDepth) / TreeSize(i);
            }
    
    	// Build tree top down, assigning to older objects. 
        static void Populate(Node thisNode, int iDepth) {
    		if (iDepth<=0) {
    			return;
    		} else {
    			iDepth--;
    			thisNode.left  = new Node();
    			thisNode.right = new Node();
    			Populate (thisNode.left, iDepth);
    			Populate (thisNode.right, iDepth);
    		}
        } 
    
    	// Build tree bottom-up
    	static Node MakeTree(int iDepth) {
    		if (iDepth<=0) {
    			return new Node();
    		} else {
    			return new Node(MakeTree(iDepth-1),
    					MakeTree(iDepth-1));
    		}
    	}
    
    	static void PrintDiagnostics() {
    		long lFreeMemory = Runtime.getRuntime().freeMemory();
    		long lTotalMemory = Runtime.getRuntime().totalMemory();
    
    		System.out.print(" Total memory available="
    				 + lTotalMemory + " bytes");
    		System.out.println("  Free memory=" + lFreeMemory + " bytes");
    	}
    
    	static void TimeConstruction(int depth) {
    		Node    root;
    		long    tStart, tFinish;
    		int 	iNumIters = NumIters(depth);
    		Node	tempTree;
    
    		System.out.println("Creating " + iNumIters +
    				   " trees of depth " + depth);
    		tStart = System.currentTimeMillis();
    		for (int i = 0; i < iNumIters; ++i) {
    			tempTree = new Node();
    			Populate( tempTree, depth);
    			tempTree = null;
    		}
    		tFinish = System.currentTimeMillis();
    		System.out.println("\tTop down construction took "
    				   + (tFinish - tStart) + "msecs");
    		tStart = System.currentTimeMillis();
                    for (int i = 0; i < iNumIters; ++i) {
                            tempTree = MakeTree(depth);
                            tempTree = null;
                    }
                    tFinish = System.currentTimeMillis();
                    System.out.println("\tBottom up construction took "
                                       + (tFinish - tStart) + "msecs");
    		
    	}
    
    	public static void main(String args[]) {
    		Node	root;
    		Node	longLivedTree;
    		Node	tempTree;
    		long	tStart, tFinish;
    		long	tElapsed;
    
    
    		System.out.println("Garbage Collector Test");
    		System.out.println(
    			" Stretching memory with a binary tree of depth "
    			+ kStretchTreeDepth);
    		PrintDiagnostics();
    		tStart = System.currentTimeMillis();
    
    		// Stretch the memory space quickly
    		tempTree = MakeTree(kStretchTreeDepth);
    		tempTree = null;
    
    		// Create a long lived object
    		System.out.println(
    			" Creating a long-lived binary tree of depth " +
      			kLongLivedTreeDepth);
    		longLivedTree = new Node();
    		Populate( longLivedTree, kLongLivedTreeDepth);
    
    		// Create long-lived array, filling half of it
    		System.out.println(
                            " Creating a long-lived array of "
    			+ kArraySize + " doubles");
    		double array[] = new double[kArraySize];
    		for (int i = 0; i < kArraySize/2; ++i) {
    			array[i] = 1.0/i;
    		}
    		PrintDiagnostics();
    
    		for (int d = kMinTreeDepth; d <= kMaxTreeDepth; d += 2) {
    			TimeConstruction(d);
    		}
    
    		if (longLivedTree == null || array[1000] != 1.0/1000)
    			System.out.println("Failed");
    					// fake reference to LongLivedTree
    					// and array
    					// to keep them from being optimized away
    
    		tFinish = System.currentTimeMillis();
    		tElapsed = tFinish-tStart;
    		PrintDiagnostics();
    		System.out.println("Completed in " + tElapsed + "ms.");
    	}
    } // class JavaGC