<commit_before>package info.schnatterer.itunes4j;

import info.schnatterer.itunes4j.entity.Playlist;
import info.schnatterer.itunes4j.entity.Track;
import info.schnatterer.itunes4j.exception.ITunesException;

import java.io.IOException;

import com4j.ComException;
import com4j.itunes.ClassFactory;
import com4j.itunes.IITFileOrCDTrack;
import com4j.itunes.IITOperationStatus;
import com4j.itunes.IITPlaylist;
import com4j.itunes.IITTrack;
import com4j.itunes.IITUserPlaylist;
import com4j.itunes.ITPlaylistKind;
import com4j.itunes.ITTrackKind;
import com4j.itunes.IiTunes;

/**
 * Convenience wrapper to iTunes interface.
 * 
 * @author schnatterer
 *
 */
public class ITunes {
	private final IiTunes iTunes;

	public ITunes() {
		iTunes = ClassFactory.createiTunesApp();
	}

	// /**
	// * Returns the track that is currently played in iTues.
	// *
	// * @return a reference to the currently played track if present.
	// */
	// public Optional<IITTrack> getCurrentTrack() {
	// return Optional.ofNullable(iTunes.currentTrack());
	// }

	/**
	 * Synchronously add a single file. Blocking operation! When a file at the
	 * same path is already present, a reference to the existing object is
	 * returned. This will not result in duplicate tracks.
	 * 
	 * @param filePath
	 * @return waits for file to be added and returns reference to the file
	 * @throws ITunesException
	 *             when iTunes returns an unexpected type of track
	 * @throws IOException
	 *             adding file did not return an iTunes track. Most likely the
	 *             file does not exist, is not a media file or is corrupt.
	 */
	public Track addFile(String filePath) throws ITunesException, IOException {
<commit_msg>Added a small piece of information to javadoc for IOException in addFile()<commit_after>package info.schnatterer.itunes4j;

import info.schnatterer.itunes4j.entity.Playlist;
import info.schnatterer.itunes4j.entity.Track;
import info.schnatterer.itunes4j.exception.ITunesException;

import java.io.IOException;

import com4j.ComException;
import com4j.itunes.ClassFactory;
import com4j.itunes.IITFileOrCDTrack;
import com4j.itunes.IITOperationStatus;
import com4j.itunes.IITPlaylist;
import com4j.itunes.IITTrack;
import com4j.itunes.IITUserPlaylist;
import com4j.itunes.ITPlaylistKind;
import com4j.itunes.ITTrackKind;
import com4j.itunes.IiTunes;

/**
 * Convenience wrapper to iTunes interface.
 * 
 * @author schnatterer
 *
 */
public class ITunes {
	private final IiTunes iTunes;

	public ITunes() {
		iTunes = ClassFactory.createiTunesApp();
	}

	// /**
	// * Returns the track that is currently played in iTues.
	// *
	// * @return a reference to the currently played track if present.
	// */
	// public Optional<IITTrack> getCurrentTrack() {
	// return Optional.ofNullable(iTunes.currentTrack());
	// }

	/**
	 * Synchronously add a single file. Blocking operation! When a file at the
	 * same path is already present, a reference to the existing object is
	 * returned. This will not result in duplicate tracks.
	 * 
	 * @param filePath
	 * @return waits for file to be added and returns reference to the file
	 * @throws ITunesException
	 *             when iTunes returns an unexpected type of track
	 * @throws IOException
	 *             adding file did not return an iTunes track. Most likely the
	 *             file does not exist, is not a (supported) media file or is
	 *             corrupt.
	 */
	public Track addFile(String filePath) throws ITunesException, IOException {

{'fraction_non_alphanumeric': 0.08555078683834048, 'fraction_numerical': 0.008011444921316165, 'mean_word_length': 3.711590296495957, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5758667', 'n_tokens_mistral': 1116, 'n_tokens_neox': 1057, 'n_words': 334}