Reviewed By: mbouaziz Differential Revision: D7843528 fbshipit-source-id: 46e23c3master
							parent
							
								
									9c14e9d384
								
							
						
					
					
						commit
						dbc8f29835
					
				| @ -0,0 +1,22 @@ | |||||||
|  | /* | ||||||
|  |  * Copyright (c) 2018 - present Facebook, Inc. | ||||||
|  |  * All rights reserved. | ||||||
|  |  * | ||||||
|  |  * This source code is licensed under the BSD style license found in the | ||||||
|  |  * LICENSE file in the root directory of this source tree. An additional grant | ||||||
|  |  * of patent rights can be found in the PATENTS file in the same directory. | ||||||
|  |  */ | ||||||
|  | public class ArrayCost { | ||||||
|  | 
 | ||||||
|  |     private void ArrayCost_FP(int signum, int[] mag) { | ||||||
|  |         if (mag.length > 0) { | ||||||
|  | 
 | ||||||
|  |             int i = 0; | ||||||
|  | 
 | ||||||
|  |             while (i < mag.length && mag[i] == 0) { | ||||||
|  |                 i++; | ||||||
|  |             } | ||||||
|  | 
 | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,15 @@ | |||||||
|  | # Copyright (c) 2018 - present Facebook, Inc.
 | ||||||
|  | # All rights reserved.
 | ||||||
|  | #
 | ||||||
|  | # This source code is licensed under the BSD style license found in the
 | ||||||
|  | # LICENSE file in the root directory of this source tree. An additional grant
 | ||||||
|  | # of patent rights can be found in the PATENTS file in the same directory.
 | ||||||
|  | 
 | ||||||
|  | TESTS_DIR = ../../.. | ||||||
|  | 
 | ||||||
|  | ANALYZER = checkers | ||||||
|  | INFER_OPTIONS = --cost-only --debug-exceptions | ||||||
|  | INFERPRINT_OPTIONS = --issues-tests | ||||||
|  | SOURCES = $(wildcard *.java) | ||||||
|  | 
 | ||||||
|  | include $(TESTS_DIR)/javac.make | ||||||
| @ -0,0 +1 @@ | |||||||
|  | codetoanalyze/java/performance/ArrayCost.java, void ArrayCost.ArrayCost_FP(int,int[]), 0, INFINITE_EXECUTION_TIME_CALL, ERROR, [] | ||||||
					Loading…
					
					
				
		Reference in new issue