#!/usr/bin/env python3
#
# Copyright (C) 2021 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

TEMPLATE = """
public class Main {
  public static void main(String[] args) {
    Main m = new Main();
    System.out.println(m.foo(-1, -1));
    System.out.println(m.foo(-1, +1));
    System.out.println(m.foo(+1, -1));
    System.out.println(m.foo(+1, +1));
    System.out.println(m.value);
  }
  public int foo(int a, int b) {
    if ( a >= 0 ) {
      if ( b < 0 ) {
        BODY
        return 2;
      }
      return 1;
    }
    return 0;
  }
  Object lock = new Object();
  int value = 0;
}
"""

with open("src/Main.java", "wt") as dst:
  body = " ".join(["synchronized(lock) { value++; }"] * 512)
  dst.write(TEMPLATE.strip().replace("BODY", body))
