<commit_before>package ed25519.application;

import java.math.BigInteger;

public class BigPoint {

	private BigInteger x;
	private BigInteger y;
	
	private BigInteger bigPrime;

	public BigPoint(BigInteger first, BigInteger second) {
		x = first;
		y = second;
		// 2^255 - 19
		bigPrime = BigInteger.valueOf(2).pow(255).subtract(BigInteger.valueOf(19));
	}

	//Lets make base-point baseValue...
	public BigPoint() {
		this(BigInteger.valueOf(0),BigInteger.valueOf(0));
		y = invertPoint(BigInteger.valueOf(5).multiply(BigInteger.valueOf(4)));
		//x = xrecover(y);
	
	}
	
	public BigInteger expmod(BigInteger multiplier, BigInteger primePart) {
		BigInteger returnValue;
		if(primePart.equals(BigInteger.valueOf(0))) {
			return BigInteger.valueOf(1);
		}
		returnValue = expmod(multiplier, primePart.divide(BigInteger.valueOf(2)));
		returnValue = returnValue.pow(2);
		returnValue = returnValue.mod(bigPrime);
		if(primePart.testBit(0)) {
			returnValue = multiplier.multiply(returnValue);
			returnValue = returnValue.mod(bigPrime);
		}
		return returnValue;
	}
	
	public BigInteger getBigPrime() {
		return bigPrime;
	}
	
	public BigInteger invertPoint(BigInteger point) {
		return expmod(point, bigPrime.subtract(BigInteger.valueOf(2)));
	}
	
	public BigInteger recoverX(BigInteger yValue) {
		//BigInteger x = 
		return null;
	}
	
	public BigInteger getXX(BigInteger input) {
		BigInteger modY = input.multiply(input);
		BigInteger part = modY.subtract(BigInteger.valueOf(1));
		
		//d*y*y+1
		BigInteger returnValue = part.multiply(invertPoint(input.add(BigInteger.valueOf(1))));
		return returnValue;
	}

	public BigInteger getY() {
		return y;
	}

	public BigInteger getX() {
		return x;
	}
	
	@Override
	public boolean equals(Object aThat){
		if(this.getClass() == aThat.getClass()){
			BigPoint otherPoint = (BigPoint) aThat;
			if(getX()==otherPoint.getX() && getY()==otherPoint.getY()) {
				return true;
			}
		}
		return false;
	}
}<commit_msg>Fixed getXX method<commit_after>package ed25519.application;

import java.math.BigInteger;

public class BigPoint {

	private BigInteger x;
	private BigInteger y;
	
	private BigInteger bigPrime;

	public BigPoint(BigInteger first, BigInteger second) {
		x = first;
		y = second;
		// 2^255 - 19
		bigPrime = BigInteger.valueOf(2).pow(255).subtract(BigInteger.valueOf(19));
	}

	//Lets make base-point baseValue...
	public BigPoint() {
		this(BigInteger.valueOf(0),BigInteger.valueOf(0));
		y = invertPoint(BigInteger.valueOf(5).multiply(BigInteger.valueOf(4)));
		//x = xrecover(y);
	
	}
	
	public BigInteger expmod(BigInteger multiplier, BigInteger primePart) {
		BigInteger returnValue;
		if(primePart.equals(BigInteger.valueOf(0))) {
			return BigInteger.valueOf(1);
		}
		returnValue = expmod(multiplier, primePart.divide(BigInteger.valueOf(2)));
		returnValue = returnValue.pow(2);
		returnValue = returnValue.mod(bigPrime);
		if(primePart.testBit(0)) {
			returnValue = multiplier.multiply(returnValue);
			returnValue = returnValue.mod(bigPrime);
		}
		return returnValue;
	}
	
	public BigInteger getBigPrime() {
		return bigPrime;
	}
	
	public BigInteger invertPoint(BigInteger point) {
		return expmod(point, bigPrime.subtract(BigInteger.valueOf(2)));
	}
	
	public BigInteger recoverX(BigInteger yValue) {
		//BigInteger x = 
		return null;
	}
	
	public BigInteger getXX(BigInteger input) {
		BigInteger y2 = modY(input);
		BigInteger first = y2.subtract(BigInteger.valueOf(1));
		
		BigInteger d = BigInteger.valueOf(-121665).multiply(invertPoint(BigInteger.valueOf(121666)));
		BigInteger xPart = y2.multiply(d).add(BigInteger.valueOf(1));
		BigInteger second = invertPoint(xPart);
		return first.multiply(second);
	}
	
	private BigInteger modY(BigInteger input) {
		return input.multiply(input);
	}

	public BigInteger getY() {
		return y;
	}

	public BigInteger getX() {
		return x;
	}
	
	@Override
	public boolean equals(Object aThat){
		if(this.getClass() == aThat.getClass()){
			BigPoint otherPoint = (BigPoint) aThat;
			if(getX()==otherPoint.getX() && getY()==otherPoint.getY()) {
				return true;
			}
		}
		return false;
	}
}
{'fraction_non_alphanumeric': 0.1288358499756454, 'fraction_numerical': 0.01802240623477837, 'mean_word_length': 4.527590847913863, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6423220', 'n_tokens_mistral': 1556, 'n_tokens_neox': 1365, 'n_words': 269}