<commit_before>package org.jetel.component.fileoperation;

import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.net.URL;
import java.net.URLDecoder;

public class SMB2Path {

	private String share = "";
	private String path = "";
	private String originalPath = "";

	public SMB2Path(URI uri) {
		this(uri.getPath());
	}
	
	public SMB2Path(URL url) {
		this(url.getPath());
	}
	
	private SMB2Path(String uriPath) {
		if (uriPath != null) {
			if (uriPath.startsWith("/")) {
				uriPath = uriPath.substring(1);
			}

			String[] parts = uriPath.split("/", 2);
			if (parts.length > 0) {
				this.share = parts[0];
			}
			if (parts.length > 1) {
				this.originalPath = parts[1];
			}

			this.path = originalPath;
			if (this.path.endsWith(URIUtils.PATH_SEPARATOR)) {
				this.path = this.path.substring(0, this.path.length() - 1);
			}
			this.path = this.path.replace('/', '\\');
			try {
				this.path = URLDecoder.decode(this.path, "UTF-8");
			} catch (UnsupportedEncodingException e) {
			}
		}
	}

	public String getPath() {
		return this.path;
	}
	
	public String getShare() {
		return this.share;
	}

	@Override
	public String toString() {
		return share + "/" + path;
	}

}<commit_msg>FIX: Properly placed URL decoding<commit_after>package org.jetel.component.fileoperation;

import java.net.URI;
import java.net.URL;

public class SMB2Path {

	private String share = "";
	private String path = "";
	private String originalPath = "";

	public SMB2Path(URI uri) {
		this(uri.getPath());
	}
	
	public SMB2Path(URL url) {
		this(URIUtils.urlDecode(url.getPath()));
	}
	
	private SMB2Path(String uriPath) {
		if (uriPath != null) {
			if (uriPath.startsWith("/")) {
				uriPath = uriPath.substring(1);
			}

			String[] parts = uriPath.split("/", 2);
			if (parts.length > 0) {
				this.share = parts[0];
			}
			if (parts.length > 1) {
				this.originalPath = parts[1];
			}

			this.path = originalPath;
			if (this.path.endsWith(URIUtils.PATH_SEPARATOR)) {
				this.path = this.path.substring(0, this.path.length() - 1);
			}
			this.path = this.path.replace('/', '\\');
		}
	}

	public String getPath() {
		return this.path;
	}
	
	public String getShare() {
		return this.share;
	}

	@Override
	public String toString() {
		return share + "/" + path;
	}

}
{'fraction_non_alphanumeric': 0.15851528384279476, 'fraction_numerical': 0.010917030567685589, 'mean_word_length': 3.1882998171846437, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '7589957', 'n_tokens_mistral': 935, 'n_tokens_neox': 807, 'n_words': 169}