<commit_before>// FIXME make import more specific
import javax.imageio.*;
import java.io.*;
import java.awt.image.BufferedImage;


public class ImageNoteExtractor {
  private static BufferedImage m_image;
  
  public ImageNoteExtractor() {
    
  }
  public ImageNoteExtractor(String fileName) {
    try {
      m_image = ImageIO.read(new File("strawberry.jpg"));
    }
    catch (IOException ioException) {
      System.err.println("ImageNoteExtractor: error opening image");
    }
  }
  
  // TODO: remove main method
  public static void main(String[] args) {
    try {
      m_image = ImageIO.read(new File("../tests/strawberry.jpg"));
    }
    catch (IOException ioException) {
      System.err.println("ImageNoteExtractor: error opening image");
    }
    System.out.println("image height: " + m_image.getHeight());
    System.out.println("image width: " + m_image.getWidth());
    for (int i = 0; i < m_image.getHeight() / 2; ++i) {
      for (int j = 0; j < m_image.getWidth() / 2; ++j) {
        System.out.println("pixel at: [" + i +", " + j + "]: " + 
                           m_image.getRGB(i, j));
      }
    }
    System.out.println("ToString: " + m_image.toString());
  }
}<commit_msg>defined skeleton of the class<commit_after>// FIXME make import more specific
import javax.imageio.*;
import java.io.*;
import java.awt.image.BufferedImage;
import java.util.ArrayList;


public class ImageNoteExtractor {
  public static final int DETECT_MODE_VERTICAL =   0;
  public static final int DETECT_MODE_HORIZONTAL = 1;
  public static final int DETECT_MODE_DIAGONAL =   2;
  
  public static final int DETECT_TRESHOLD_DEFAULT =         3;
  public static final int VERTICAL_RESOLUTION_DEFAULT =    10;
  public static final int HORIZONTAL_RESOULUTION_DEFAULT = 10;


  private BufferedImage  m_image;
  private int            m_detectMode;
  private int            m_detectionTreshold;
  private int            m_verticalResolution;
  private int            m_horizontalResolution;
  private String         m_fileName;
  private ArrayList<Integer> m_edges;


  public ImageNoteExtractor() {
    m_image = null;
    m_detectMode = DETECT_MODE_VERTICAL;
    m_detectionTreshold = DETECT_TRESHOLD_DEFAULT;
    m_verticalResolution = VERTICAL_RESOLUTION_DEFAULT;
    m_horizontalResolution = HORIZONTAL_RESOULUTION_DEFAULT;
    m_fileName = null;
  }
  public ImageNoteExtractor(String fileName) {
    m_detectMode = DETECT_MODE_VERTICAL;
    m_detectionTreshold = DETECT_TRESHOLD_DEFAULT;
    m_verticalResolution = VERTICAL_RESOLUTION_DEFAULT;
    m_horizontalResolution = HORIZONTAL_RESOULUTION_DEFAULT;
    m_fileName = fileName;
    try {
      m_image = ImageIO.read(new File(m_fileName));
    }
    catch (IOException ioException) {
      System.err.println("ImageNoteExtractor: error opening image");
    }
  }
}
{'fraction_non_alphanumeric': 0.096113074204947, 'fraction_numerical': 0.004240282685512367, 'mean_word_length': 3.2829046898638428, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 4, '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': '4412301', 'n_tokens_mistral': 919, 'n_tokens_neox': 890, 'n_words': 201}