<commit_before>@Override
public boolean onTouch(View v, MotionEvent event) {
  switch(event.getActionMasked()){
  case MotionEvent.ACTION_DOWN:
    // Nothing here
    break;
  case MotionEvent.ACTION_UP:
    // To suppress warnings
    v.performClick();
    break;
  case MotionEvent.ACTION_MOVE:
    rawYCoordinate = (int) event.getY();
    yCoordinate = 255 - (rawYCoordinate / nFactor);
    android.provider.Settings.System.putInt(mContext.getContentResolver(), 
        android.provider.Settings.System.SCREEN_BRIGHTNESS, yCoordinate);
    break;
  }
  return true;
}<commit_msg>Moved some things around and added a helper function to get max window height<commit_after>.
.

// Global variables
private int rawYCoordinate;
private int yCoordinate;
private int maxHeight; 
private int nFactor;

.
.

// Helper method to get maxHeight
private void getWindowData (Context context) {
  private WindowManager windowManager;
  windowManager = (WindowManager)context.getSystemService(Context.WINDOW_SERVICE);
  maxHeight = windowManager.getDefaultDisplay().getHeight();
}

@Override
public boolean onTouch(View v, MotionEvent event) {
  switch(event.getActionMasked()){
  case MotionEvent.ACTION_DOWN:
    // Nothing here
    break;
  case MotionEvent.ACTION_UP:
    // To suppress warnings
    v.performClick();
    break;
  case MotionEvent.ACTION_MOVE:
    rawYCoordinate = (int) event.getY();
    yCoordinate = 255 - (rawYCoordinate / nFactor);
    android.provider.Settings.System.putInt(mContext.getContentResolver(), 
        android.provider.Settings.System.SCREEN_BRIGHTNESS, yCoordinate);
    break;
  }
  return true;
}

.
.
{'fraction_non_alphanumeric': 0.09859154929577464, 'fraction_numerical': 0.003674219228413962, 'mean_word_length': 4.027692307692308, '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': '1184010', 'n_tokens_mistral': 502, 'n_tokens_neox': 491, 'n_words': 115}