<commit_before>package ceylon.language;

import com.redhat.ceylon.compiler.java.Util;
import com.redhat.ceylon.compiler.java.metadata.Ceylon;
import com.redhat.ceylon.compiler.java.metadata.Class;
import com.redhat.ceylon.compiler.java.metadata.Defaulted;
import com.redhat.ceylon.compiler.java.metadata.Ignore;
import com.redhat.ceylon.compiler.java.metadata.Name;
import com.redhat.ceylon.compiler.java.metadata.SatisfiedTypes;
import com.redhat.ceylon.compiler.java.metadata.TypeInfo;
import com.redhat.ceylon.compiler.java.metadata.ValueType;
import com.redhat.ceylon.compiler.java.runtime.model.ReifiedType;
import com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor;

@Ceylon(major = 6)
@SatisfiedTypes({
    "ceylon.language::Scalar<ceylon.language::Integer>",
    "ceylon.language::Integral<ceylon.language::Integer>",
    "ceylon.language::Binary<ceylon.language::Integer>",
    "ceylon.language::Exponentiable<ceylon.language::Integer,ceylon.language::Integer>"
})
@Class(extendsType="ceylon.language::Object")
@ValueType
public final class Integer
    implements Scalar<Integer>, Integral<Integer>,
               Binary<Integer>,
               Exponentiable<Integer,Integer>, ReifiedType {

    @Ignore
    public final static TypeDescriptor $TypeDescriptor$ = TypeDescriptor.klass(Integer.class);

    @Ignore
    final long value;

    public Integer(@Name("integer") long integer) {
        value = integer;
    }

    @Ignore
    @Override
    public Scalar$impl<Integer> $ceylon$language$Scalar$impl(){
        // drags Numeric<Integer> Comparable<Integer> Number
        throw Util.makeUnimplementedMixinAccessException();
    }

    @Ignore
    @Override
    public Numeric$impl<Integer> $ceylon$language$Numeric$impl(){
        // drags Summable<Integer> Invertable<Integer>
        throw Util.makeUnimplementedMixinAccessException();
    }

    @Ignore
    @Override
    public Summable$impl<Integer> $ceylon$language$Summable$impl(){
        throw Util.makeUnimplementedMixinAccessException();
    }

    @Ignore
    @Override
    public Invertable$impl<Integer> $ceylon$language$Invertable$impl(){
        throw Util.makeUnimplementedMixinAccessException();
    }

    @Ignore
    @Override
    public Comparable$impl<Integer> $ceylon$language$Comparable$impl(){
        throw Util.makeUnimplementedMixinAccessException();
    }

    @Ignore
    @Override
    public Number$impl $ceylon$language$Number$impl(){
        throw Util.makeUnimplementedMixinAccessException();
    }

    @Ignore
    @Override
    public Integral$impl<Integer> $ceylon$language$Integral$impl(){
        // drags Numeric<Integer> Enumerable<Integer>
        throw Util.makeUnimplementedMixinAccessException();
    }

    @Ignore
    @Override
    public Ordinal$impl<Integer> $ceylon$language$Ordinal$impl(){
        throw Util.makeUnimplementedMixinAccessException();
    }

    @Ignore
    @Override
    public Enumerable$impl<Integer> $ceylon$language$Enumerable$impl(){
        // drags Ordinal<Integer>
        throw Util.makeUnimplementedMixinAccessException();
    }

    @Ignore
    @Override
    public Binary$impl<Integer> $ceylon$language$Binary$impl(){
        throw Util.makeUnimplementedMixinAccessException();
    }

    @Ignore
    @Override
    public Exponentiable$impl<Integer,Integer> $ceylon$language$Exponentiable$impl(){
        throw Util.makeUnimplementedMixinAccessException();
    }

    @Ignore
    public static Integer instance(long l) {
        return new Integer(l);
    }

    @Ignore
    public long longValue() {
        return value;
    }

    @Override
    public Integer plus(@Name("other") Integer other) {
        return instance(value + other.value);
    }

    @Ignore
    public static long plus(long value, long otherValue) {
        return value + otherValue;
    }

    @Override
    public Integer minus(@Name("other") Integer other) {
        return instance(value - other.value);
    }

    @Ignore
    public static long minus(long value, long otherValue) {
        return value - otherValue;
    }

    @Override
    public Integer times(@Name("other") Integer other) {
        return instance(value * other.value);
    }

    @Ignore
    public static long times(long value, long otherValue) {
        return value * otherValue;
    }

    @Override
    public Integer divided(@Name("other") Integer other) {
        return instance(value / other.value);
    }

    @Ignore
    public static long divided(long value, long otherValue) {
        return value / otherValue;
    }

    private static final long POWER_BY_SQUARING_BREAKEVEN = 6;

    private static long powerBySquaring(long base, long power) {
        long result = 1;
        long x = base;
        while (power != 0) {
            if ((power & 1L) == 1L) {
                result *= x;
                power -= 1;
            }
            x *= x;
            power /= 2;
        }
        return result;
    }

    private static long powerByMultiplying(long base, long power) {
        long result = 1;
        while (power > 0) {
            result *= base;
            power--;
        }
        return result;
    }

    @Override
    public Integer power(@Name("other") Integer other) {
        return instance(power(value, other.value));
    }

    @Ignore
    public static long power(long value, long otherValue) {
        long power = otherValue;
        if (value == -1) {
            return power % 2 == 0 ? 1 : -1;
        } else if (value == 1) {
            return 1L;
        }
        if (power < 0) {
            throw new RuntimeException(value + "**" + power + " cannot be represented as an Integer");
        } else if (power == 0L) {
            return 1L;
        }
        if (power >= POWER_BY_SQUARING_BREAKEVEN) {<commit_msg>minor<commit_after>package ceylon.language;

import com.redhat.ceylon.compiler.java.Util;
import com.redhat.ceylon.compiler.java.metadata.Ceylon;
import com.redhat.ceylon.compiler.java.metadata.Class;
import com.redhat.ceylon.compiler.java.metadata.Defaulted;
import com.redhat.ceylon.compiler.java.metadata.Ignore;
import com.redhat.ceylon.compiler.java.metadata.Name;
import com.redhat.ceylon.compiler.java.metadata.SatisfiedTypes;
import com.redhat.ceylon.compiler.java.metadata.TypeInfo;
import com.redhat.ceylon.compiler.java.metadata.ValueType;
import com.redhat.ceylon.compiler.java.runtime.model.ReifiedType;
import com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor;

@Ceylon(major = 6)
@SatisfiedTypes({
    "ceylon.language::Scalar<ceylon.language::Integer>",
    "ceylon.language::Integral<ceylon.language::Integer>",
    "ceylon.language::Binary<ceylon.language::Integer>",
    "ceylon.language::Exponentiable<ceylon.language::Integer,ceylon.language::Integer>"
})
@Class(extendsType="ceylon.language::Object")
@ValueType
public final class Integer
    implements Scalar<Integer>, Integral<Integer>,
               Binary<Integer>,
               Exponentiable<Integer,Integer>, ReifiedType {

    @Ignore
    public final static TypeDescriptor $TypeDescriptor$ = TypeDescriptor.klass(Integer.class);

    @Ignore
    final long value;

    public Integer(@Name("integer") long integer) {
        value = integer;
    }

    @Ignore
    @Override
    public Scalar$impl<Integer> $ceylon$language$Scalar$impl(){
        // drags Numeric<Integer> Comparable<Integer> Number
        throw Util.makeUnimplementedMixinAccessException();
    }

    @Ignore
    @Override
    public Numeric$impl<Integer> $ceylon$language$Numeric$impl(){
        // drags Summable<Integer> Invertable<Integer>
        throw Util.makeUnimplementedMixinAccessException();
    }

    @Ignore
    @Override
    public Summable$impl<Integer> $ceylon$language$Summable$impl(){
        throw Util.makeUnimplementedMixinAccessException();
    }

    @Ignore
    @Override
    public Invertable$impl<Integer> $ceylon$language$Invertable$impl(){
        throw Util.makeUnimplementedMixinAccessException();
    }

    @Ignore
    @Override
    public Comparable$impl<Integer> $ceylon$language$Comparable$impl(){
        throw Util.makeUnimplementedMixinAccessException();
    }

    @Ignore
    @Override
    public Number$impl $ceylon$language$Number$impl(){
        throw Util.makeUnimplementedMixinAccessException();
    }

    @Ignore
    @Override
    public Integral$impl<Integer> $ceylon$language$Integral$impl(){
        // drags Numeric<Integer> Enumerable<Integer>
        throw Util.makeUnimplementedMixinAccessException();
    }

    @Ignore
    @Override
    public Ordinal$impl<Integer> $ceylon$language$Ordinal$impl(){
        throw Util.makeUnimplementedMixinAccessException();
    }

    @Ignore
    @Override
    public Enumerable$impl<Integer> $ceylon$language$Enumerable$impl(){
        // drags Ordinal<Integer>
        throw Util.makeUnimplementedMixinAccessException();
    }

    @Ignore
    @Override
    public Binary$impl<Integer> $ceylon$language$Binary$impl(){
        throw Util.makeUnimplementedMixinAccessException();
    }

    @Ignore
    @Override
    public Exponentiable$impl<Integer,Integer> $ceylon$language$Exponentiable$impl(){
        throw Util.makeUnimplementedMixinAccessException();
    }

    @Ignore
    public static Integer instance(long l) {
        return new Integer(l);
    }

    @Ignore
    public long longValue() {
        return value;
    }

    @Override
    public Integer plus(@Name("other") Integer other) {
        return instance(value + other.value);
    }

    @Ignore
    public static long plus(long value, long otherValue) {
        return value + otherValue;
    }

    @Override
    public Integer minus(@Name("other") Integer other) {
        return instance(value - other.value);
    }

    @Ignore
    public static long minus(long value, long otherValue) {
        return value - otherValue;
    }

    @Override
    public Integer times(@Name("other") Integer other) {
        return instance(value * other.value);
    }

    @Ignore
    public static long times(long value, long otherValue) {
        return value * otherValue;
    }

    @Override
    public Integer divided(@Name("other") Integer other) {
        return instance(value / other.value);
    }

    @Ignore
    public static long divided(long value, long otherValue) {
        return value / otherValue;
    }

    private static final long POWER_BY_SQUARING_BREAKEVEN = 6;

    private static long powerBySquaring(long base, long power) {
        long result = 1;
        long x = base;
        while (power != 0) {
            if ((power & 1L) == 1L) {
                result *= x;
                power -= 1;
            }
            x *= x;
            power /= 2;
        }
        return result;
    }

    private static long powerByMultiplying(long base, long power) {
        long result = 1;
        while (power > 0) {
            result *= base;
            power--;
        }
        return result;
    }

    @Override
    public Integer power(@Name("other") Integer other) {
        return instance(power(value, other.value));
    }

    @Ignore
    public static long power(long value, long otherValue) {
        long power = otherValue;
        if (value == -1) {
            return power % 2 == 0 ? 1 : -1;
        } else if (value == 1) {
            return 1L;
        }
        if (power < 0) {
            throw new AssertionException(value + "^" + power + " cannot be represented as an Integer");
        } else if (power == 0L) {
            return 1L;
        }
        if (power >= POWER_BY_SQUARING_BREAKEVEN) {
{'fraction_non_alphanumeric': 0.10916803739935936, 'fraction_numerical': 0.003462903644706086, 'mean_word_length': 2.816319788569541, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 57, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2475153', 'n_tokens_mistral': 3415, 'n_tokens_neox': 3282, 'n_words': 712}