<commit_before>package com.javanetworking;

import java.io.StringReader;
import java.net.HttpURLConnection;
import java.util.List;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;

import org.w3c.dom.Document;
import org.xml.sax.InputSource;


/**
 {@link XMLURLConnectionOperation} is a {@link HttpURLConnectionOperation} subclass for downloading XML content.
 
 By default {@link XMLURLConnectionOperation} accepts the following MIME content types:
 
 - `application/xml`
 - `text/xml`
 */
public class XMLURLConnectionOperation extends HttpURLConnectionOperation {
	
	/**
	 A static constructor method that creates and returns a {@link XMLURLConnectionOperation} instance.
	 */
	public static XMLURLConnectionOperation operationWithHttpURLConnection(HttpURLConnection urlConnection, HttpCompletion completion) {
		return new XMLURLConnectionOperation(urlConnection, completion);
	}
	
	/**
	 Instantiate this class and sets the {@link HttpURLConnection}, and the {@link XMLCompletion} interface.
	 
	 This is the preferred constructor.
	 
	 @param urlConnection An open {@link HttpURLConnection} to be used for HTTP network access.
	 @param completion A {@link XMLCompletion} instance that handles the completion interface methods.
	 */
	public XMLURLConnectionOperation(HttpURLConnection urlConnection, HttpCompletion completion) {
		super(urlConnection, null);
		
		this.setCompletion(completion);
	}
	
	/**
	 Get acceptable content types list for current connection. Default values for {@link XMLURLConnectionOperation} is:
	 
 	 - `application/xml`
 	 - `text/xml`
	 
	 @return A {@code List<String>} with acceptable content types.
	 */
	@Override<commit_msg>Added constructor with request body<commit_after>package com.javanetworking;

import java.io.StringReader;
import java.net.HttpURLConnection;
import java.util.List;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;

import org.w3c.dom.Document;
import org.xml.sax.InputSource;


/**
 {@link XMLURLConnectionOperation} is a {@link HttpURLConnectionOperation} subclass for downloading XML content.
 
 By default {@link XMLURLConnectionOperation} accepts the following MIME content types:
 
 - `application/xml`
 - `text/xml`
 */
public class XMLURLConnectionOperation extends HttpURLConnectionOperation {
	
	/**
	 A static constructor method that creates and returns a {@link XMLURLConnectionOperation} instance.
	 */
	public static XMLURLConnectionOperation operationWithHttpURLConnection(HttpURLConnection urlConnection, HttpCompletion completion) {
		return new XMLURLConnectionOperation(urlConnection, completion);
	}

	/**
	 A static constructor method that creates and returns a {@link XMLURLConnectionOperation} instance.
	 */
	public static XMLURLConnectionOperation operationWithHttpURLConnection(HttpURLConnection urlConnection, String requestBody, HttpCompletion completion) {
		return new XMLURLConnectionOperation(urlConnection, requestBody, completion);
	}

	/**
	 Instantiate this class and sets the {@link HttpURLConnection}, and the {@link XMLCompletion} interface.
	 
	 This is the preferred constructor.
	 
	 @param urlConnection An open {@link HttpURLConnection} to be used for HTTP network access.
	 @param completion A {@link XMLCompletion} instance that handles the completion interface methods.
	 */
	public XMLURLConnectionOperation(HttpURLConnection urlConnection, HttpCompletion completion) {
		this(urlConnection, null, completion);
	}

	/**
	 Instantiate this class and sets the {@link HttpURLConnection}, and the {@link XMLCompletion} interface.

	 This is the preferred constructor.

	 @param urlConnection An open {@link HttpURLConnection} to be used for HTTP network access.
	 @param requestBody A string representation of POST/PUT HTTP request body.
	 @param completion A {@link XMLCompletion} instance that handles the completion interface methods.
	 */
	public XMLURLConnectionOperation(HttpURLConnection urlConnection, String requestBody, HttpCompletion completion) {
		super(urlConnection, requestBody, null);

		this.setCompletion(completion);
	}
	
	/**
	 Get acceptable content types list for current connection. Default values for {@link XMLURLConnectionOperation} is:
	 
 	 - `application/xml`
 	 - `text/xml`
	 
	 @return A {@code List<String>} with acceptable content types.
	 */
	@Override
{'fraction_non_alphanumeric': 0.07553628480146052, 'fraction_numerical': 0.00045641259698767686, 'mean_word_length': 5.288378766140602, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 14}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6648923', 'n_tokens_mistral': 1133, 'n_tokens_neox': 1037, 'n_words': 379}