<commit_before>import java.util.*;

public aspect MethodInterceptor {
      Stack<String> st = new Stack<String>();

	//pointcut traced() : !within(MethodInterceptor) && execution(public * *.*(..)) ;
	pointcut traced() : !within(MethodInterceptor) && execution( * *.*(..));



private String previousClass;
private String currentClass;
private int callDepth=1;




	before() : traced() {


        String prefix=null;
			if(callDepth==1){
        prefix="NEW_CALL:";

		}
		else{
		prefix="NESTED_CALL:";

		}
		Object o = thisJoinPoint.getThis();
        String currentClassName=null;
        if(o!=null){
        currentClassName=o.getClass().getName();
        }
        else{
      String signature=  thisJoinPointStaticPart.getSignature().toString();

      String array[]=signature.split("\\s");
         String methodName=array[1];
        System.out.println(signature);
         if(methodName.contains("."))
         currentClassName=methodName.split("\\.")[0];
        System.out.println(currentClassName);

        }
        String sender=null;

        if(previousClass==null){
        previousClass=currentClassName;
        sender=currentClassName;
	    }
       else  if(previousClass.equals(currentClassName)){
        sender=currentClassName;

        }
        else{
        sender=previousClass;
        }

      String call=  thisJoinPointStaticPart.getSignature().toString();

      String array[]=call.split("\\s");
      String methodName=array[1];
      String returnType=array[0];

      if(methodName.contains(".")){
      methodName=methodName.split("\\.")[1];
      }
      if(st.size()>0){

      sender=st.peek();
      }

      String methodCall=methodName+":"+returnType;

//System.out.println(callDepth+"::::"+prefix+":::: "+sender+"------>" + methodCall+"---->"+currentClassName);
System.out.println(sender+"->"+currentClassName+":"+methodCall);

currentClass=currentClassName;

       st.push(currentClass);


previousClass=currentClass;
		callDepth++;





	}

	after() : traced() {
		callDepth--;

      st.pop();

	}

	private void print(String prefix, Object message) {


		if(callDepth==1){
<commit_msg>Aspect J tryouts<commit_after>import java.util.*;

public aspect MethodInterceptor {
      Stack<String> st = new Stack<String>();

	//pointcut traced() : !within(MethodInterceptor) && execution(public * *.*(..)) ;
	pointcut traced() : !within(MethodInterceptor) && execution( * *.*(..));



private String previousClass;
private String currentClass;
private int callDepth=1;
private String activate;
private String deactivate;




	before() : traced() {


        String prefix=null;
			if(callDepth==1){
        prefix="NEW_CALL:";

		}
		else{
		prefix="NESTED_CALL:";

		}
		Object o = thisJoinPoint.getThis();
        String currentClassName=null;
        if(o!=null){
        currentClassName=o.getClass().getName();
        }
        else{
      String signature=  thisJoinPointStaticPart.getSignature().toString();

      String array[]=signature.split("\\s");
         String methodName=array[1];
        System.out.println(signature);
         if(methodName.contains("."))
         currentClassName=methodName.split("\\.")[0];
        System.out.println(currentClassName);

        }
        String sender=null;

        if(previousClass==null){
        previousClass=currentClassName;
        sender=currentClassName;
	    }
       else  if(previousClass.equals(currentClassName)){
        sender=currentClassName;


        }
        else{
        sender=previousClass;
        }


      String call=  thisJoinPointStaticPart.getSignature().toString();

      String array[]=call.split("\\s");
      String methodName=array[1];
      String returnType=array[0];

      if(methodName.contains(".")){
      methodName=methodName.split("\\.")[1];
      }
      if(st.size()>0){

      sender=st.peek();
      }

      String methodCall=methodName+":"+returnType;

//System.out.println(callDepth+"::::"+prefix+":::: "+sender+"------>" + methodCall+"---->"+currentClassName);
System.out.println(sender+"->"+currentClassName+":"+methodCall);

if(currentClassName !=null && !currentClassName.equals(activate)){

                System.out.println("activate "+currentClassName);
                activate=currentClassName;

}
currentClass=currentClassName;

       st.push(currentClass);


previousClass=currentClass;
		callDepth++;





	}

	after() : traced() {
		callDepth--;
if(currentClass !=null){
if(currentClass.equals(activate)){
activate=null;
}
                System.out.println("deactivate "+currentClass);
                deactivate=currentClass;



}


      st.pop();

	}

	private void print(String prefix, Object message) {


		if(callDepth==1){

{'fraction_non_alphanumeric': 0.15905712465491612, 'fraction_numerical': 0.003822467615204927, 'mean_word_length': 2.9513422818791946, 'pattern_counts': {'":': 8, '<': 7, '<?xml version=': 0, '>': 15, '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': '2966131', 'n_tokens_mistral': 1441, 'n_tokens_neox': 1336, 'n_words': 215}