test_class.file: server-core/src/test/java/io/onedev/server/util/MatrixRunnerTest.java
test_class.identifier: MatrixRunnerTest
test_case.body: @Test
  	public void test() {
  		Map<String, List<String>> matrix = new LinkedHashMap<>();
  		
  		List<Map<String, String>> usedParams = new ArrayList<>();
  		new MatrixRunner<String>(matrix) {
  			
  			@Override
  			public void run(Map<String, String> params) {
  				usedParams.add(params);
  			}
  			
  		}.run();
  		
  		assertEquals(1, usedParams.size());
  		assertTrue(usedParams.iterator().next().isEmpty());
  		
  		matrix.put("db", Lists.newArrayList("oracle", "mysql"));
  		matrix.put("os", Lists.newArrayList("windows", "linux"));
  		
  		usedParams.clear();
  		
  		new MatrixRunner<String>(matrix) {
  			
  			@Override
  			public void run(Map<String, String> params) {
  				usedParams.add(params);
  			}
  			
  		}.run();
  		assertEquals(4, usedParams.size());
  		Map<String, String> params = new HashMap<>();
  		params.put("db", "oracle");
  		params.put("os", "windows");
  		assertEquals(params, usedParams.get(0));
  
  		params.put("db", "oracle");
  		params.put("os", "linux");
  		assertEquals(params, usedParams.get(1));
  		
  		params.put("db", "mysql");
  		params.put("os", "windows");
  		assertEquals(params, usedParams.get(2));
  
  		params.put("db", "mysql");
  		params.put("os", "linux");
  		assertEquals(params, usedParams.get(3));
  	}
test_case.class_method_signature: MatrixRunnerTest.test()
test_case.full_signature: @Test public void test()
test_case.identifier: test
test_case.invocations: run add assertEquals size assertTrue isEmpty next iterator put newArrayList put newArrayList clear run add assertEquals size put put assertEquals get put put assertEquals get put put assertEquals get put put assertEquals get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void test()
focal_class.declarator: paramMap
focal_class.modifier: private final
focal_class.original_string: private final Map<String, T> paramMap;
focal_class.type: Map<String, T>
focal_class.var_name: paramMap
focal_class.declarator: paramMatrix
focal_class.modifier: private final
focal_class.original_string: private final Map<String, List<T>> paramMatrix;
focal_class.type: Map<String, List<T>>
focal_class.var_name: paramMatrix
focal_class.file: server-core/src/main/java/io/onedev/server/util/MatrixRunner.java
focal_class.identifier: MatrixRunner
focal_class.class_method_signature: MatrixRunner.MatrixRunner(Map<String, List<T>> paramMatrix)
focal_class.full_signature: public  MatrixRunner(Map<String, List<T>> paramMatrix)
focal_class.identifier: MatrixRunner
focal_class.modifiers: public
focal_class.parameters: (Map<String, List<T>> paramMatrix)
focal_class.signature:  MatrixRunner(Map<String, List<T>> paramMatrix)
focal_class.class_method_signature: MatrixRunner.MatrixRunner(Map<String, T> paramMap, Map<String, List<T>> paramMatrix)
focal_class.full_signature: private  MatrixRunner(Map<String, T> paramMap, Map<String, List<T>> paramMatrix)
focal_class.identifier: MatrixRunner
focal_class.modifiers: private
focal_class.parameters: (Map<String, T> paramMap, Map<String, List<T>> paramMatrix)
focal_class.signature:  MatrixRunner(Map<String, T> paramMap, Map<String, List<T>> paramMatrix)
focal_class.class_method_signature: MatrixRunner.run()
focal_class.full_signature: public void run()
focal_class.identifier: run
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void run()
focal_class.class_method_signature: MatrixRunner.run(Map<String, T> paramMap)
focal_class.full_signature: protected abstract void run(Map<String, T> paramMap)
focal_class.identifier: run
focal_class.modifiers: protected abstract
focal_class.parameters: (Map<String, T> paramMap)
focal_class.return: void
focal_class.signature: void run(Map<String, T> paramMap)
focal_method.body: public void run() {
  		if (!paramMatrix.isEmpty()) {
  			Map.Entry<String, List<T>> entry = paramMatrix.entrySet().iterator().next();
  			for (T value: entry.getValue()) {
  				Map<String, T> paramsCopy = new LinkedHashMap<>(paramMap);
  				paramsCopy.put(entry.getKey(), value);
  				Map<String, List<T>> matrixCopy = new LinkedHashMap<>(paramMatrix);
  				matrixCopy.remove(entry.getKey());
  				new MatrixRunner<T>(paramsCopy, matrixCopy) {
  
  					@Override
  					protected void run(Map<String, T> paramMap) {
  						MatrixRunner.this.run(paramMap);
  					}
  					
  				}.run();
  			}
  		} else {
  			run(paramMap);
  		}
  	}
focal_method.class_method_signature: MatrixRunner.run()
focal_method.full_signature: public void run()
focal_method.identifier: run
focal_method.invocations: isEmpty next iterator entrySet getValue put getKey remove getKey run run run
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void run()