<commit_before>// Copyright (c) 1999 <NAME> (<EMAIL>)
// Portions Copyright (c) 1999 Network Associates, Inc.

import java.net.*;
import java.io.*;
import java.util.*;
import DNS.*;

public class update {

static final int ZONE = Section.QUESTION;
static final int PREREQ = Section.ANSWER;
static final int UPDATE = Section.AUTHORITY;
static final int ADDITIONAL = Section.ADDITIONAL;

Message query, response;
Resolver res;
String server = "localhost";
Name origin;
int defaultTTL;
short defaultClass = DClass.IN;

public
update(InputStream in) throws IOException {
	Vector inputs = new Vector();

	query = new Message();
	query.getHeader().setOpcode(Opcode.UPDATE);

	InputStreamReader isr = new InputStreamReader(in);
	BufferedReader br = new BufferedReader(isr);
	BufferedReader brOrig = br;

	inputs.addElement(br);

	while (true) {
		String line = null;
		do {
			br = (BufferedReader)inputs.lastElement();

			if (in == System.in && brOrig == br)
				System.out.print("> ");

			line = IO.readExtendedLine(br);
			if (line == null) {
				inputs.removeElement(br);
				if (inputs.isEmpty())
					return;
			}
		} while (line == null);

		MyStringTokenizer st = new MyStringTokenizer(line);
		if (!st.hasMoreTokens())
			continue;
		String operation = st.nextToken();<commit_msg>close files before losing the stream<commit_after>// Copyright (c) 1999 <NAME> (<EMAIL>)
// Portions Copyright (c) 1999 Network Associates, Inc.

import java.net.*;
import java.io.*;
import java.util.*;
import DNS.*;

public class update {

static final int ZONE = Section.QUESTION;
static final int PREREQ = Section.ANSWER;
static final int UPDATE = Section.AUTHORITY;
static final int ADDITIONAL = Section.ADDITIONAL;

Message query, response;
Resolver res;
String server = "localhost";
Name origin;
int defaultTTL;
short defaultClass = DClass.IN;

public
update(InputStream in) throws IOException {
	Vector inputs = new Vector();

	query = new Message();
	query.getHeader().setOpcode(Opcode.UPDATE);

	InputStreamReader isr = new InputStreamReader(in);
	BufferedReader br = new BufferedReader(isr);
	BufferedReader brOrig = br;

	inputs.addElement(br);

	while (true) {
		String line = null;
		do {
			br = (BufferedReader)inputs.lastElement();

			if (in == System.in && brOrig == br)
				System.out.print("> ");

			line = IO.readExtendedLine(br);
			if (line == null) {
				br.close();
				inputs.removeElement(br);
				if (inputs.isEmpty())
					return;
			}
		} while (line == null);

		MyStringTokenizer st = new MyStringTokenizer(line);
		if (!st.hasMoreTokens())
			continue;
		String operation = st.nextToken();
{'fraction_non_alphanumeric': 0.12811660912926737, 'fraction_numerical': 0.006137322593018795, 'mean_word_length': 4.174603174603175, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '3159889', 'n_tokens_mistral': 915, 'n_tokens_neox': 811, 'n_words': 245}