public static void main(String[] args) {

		// Create .base and .test file and fill them with data
		String line;
		try {
			File data = new File(fileDirectory + fileName + ".dat");

			if (!data.exists())
				data.createNewFile();

			FileWriter dw = new FileWriter(data.getAbsoluteFile());
			BufferedWriter dataWriter = new BufferedWriter(dw);

			BufferedReader b = new BufferedReader(new FileReader(fileDirectory + dataFile));
			ArrayList<Integer> approvedUsers = new ArrayList<Integer>();

			int currentUser = 1;
			int ratingsCount = 0;
			while ((line = b.readLine()) != null) {
				String[] s = line.split(":");
				if(Integer.valueOf(s[0]) == currentUser){
					ratingsCount++;
				}
				else{
					if(ratingsCount > minimumRatings){
						approvedUsers.add(currentUser);
					}
					currentUser = Integer.valueOf(s[0]);
					ratingsCount = 0;
				}
			}
			b.close();
			
			b = new BufferedReader(new FileReader(fileDirectory + dataFile));
			while ((line = b.readLine()) != null) {
				String[] s = line.split(":");
				if(approvedUsers.contains(Integer.valueOf(s[0]))){				
					dataWriter.write(line + "\n");
				}
			}
			
			dataWriter.close();
		} catch (NumberFormatException nfe) {
			System.err.println("input data must be of type integer.");
			nfe.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
		System.out.println("File " + fileName + ".dat has been created.");
	}