<commit_before>package org.jcryptool.core.help;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.nio.file.Files;
import java.util.Scanner;

import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.about.InstallationPage;
import org.jcryptool.core.util.fonts.FontService;
import org.osgi.framework.Bundle;

public class CreditsPage extends InstallationPage {

	private Composite comp;

	public CreditsPage() {
		// TODO Auto-generated constructor stub
	}

	
    public static final String PLUGIN_ID = "org.jcryptool.core.help"; //$NON-NLS-1$
    
    public static File getBundleFile(String path) {
    	Bundle bundle = Platform.getBundle(PLUGIN_ID);
    	URL fileURL = bundle.getEntry(path);
    	File file = null;
    	try {
    	   URL resolvedFileURL = FileLocator.toFileURL(fileURL);
    	   URI resolvedURI = new URI(resolvedFileURL.getProtocol(), resolvedFileURL.getPath(), null);
    	   file = new File(resolvedURI);
    	} catch (URISyntaxException e1) {
    	    e1.printStackTrace();
    	} catch (IOException e1) {
    	    e1.printStackTrace();
    	}	
    	return file;
    }
	private static String slurpFile(String relPath) throws FileNotFoundException {
		File bundleFile = getBundleFile(relPath);
		System.out.println("BUNDLEFILE: " + bundleFile); //$NON-NLS-1$
		FileInputStream fis = null;
		var content = new byte[0];
		try {
			fis = new FileInputStream(bundleFile);
			content = fis.readAllBytes();
		} catch (IOException e) {
			e.printStackTrace();
		} finally {
			if (fis != null) {
				try {
					fis.close();
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
		}
		return new String(content);
	}
	
	@Override
	public void createControl(Composite parent) {
		comp = new Composite(parent, SWT.NONE);
		comp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
		comp.setLayout(new GridLayout());

		Text text = new Text(comp, SWT.MULTI | SWT.V_SCROLL);
		String abouttext = "no about text could be loaded here";
		try {
			abouttext = slurpFile(Messages.CreditsPage_filename);
		} catch (FileNotFoundException e) { }

		text.setFont(FontService.getNormalMonospacedFont());
		text.setText(abouttext); //$NON-NLS-1$
		text.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
		text.setEditable(false);
	}
	
	@Override
	public Control getControl() {
		return comp;
	}

}
<commit_msg>Developer Credits page: small fix for stdout chatter<commit_after>package org.jcryptool.core.help;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.nio.file.Files;
import java.util.Scanner;

import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.about.InstallationPage;
import org.jcryptool.core.util.fonts.FontService;
import org.osgi.framework.Bundle;

public class CreditsPage extends InstallationPage {

	private Composite comp;

	public CreditsPage() {
		// TODO Auto-generated constructor stub
	}

	
    public static final String PLUGIN_ID = "org.jcryptool.core.help"; //$NON-NLS-1$
    
    public static File getBundleFile(String path) {
    	Bundle bundle = Platform.getBundle(PLUGIN_ID);
    	URL fileURL = bundle.getEntry(path);
    	File file = null;
    	try {
    	   URL resolvedFileURL = FileLocator.toFileURL(fileURL);
    	   URI resolvedURI = new URI(resolvedFileURL.getProtocol(), resolvedFileURL.getPath(), null);
    	   file = new File(resolvedURI);
    	} catch (URISyntaxException e1) {
    	    e1.printStackTrace();
    	} catch (IOException e1) {
    	    e1.printStackTrace();
    	}	
    	return file;
    }
	private static String slurpFile(String relPath) throws FileNotFoundException {
		File bundleFile = getBundleFile(relPath);
		FileInputStream fis = null;
		var content = new byte[0];
		try {
			fis = new FileInputStream(bundleFile);
			content = fis.readAllBytes();
		} catch (IOException e) {
			e.printStackTrace();
		} finally {
			if (fis != null) {
				try {
					fis.close();
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
		}
		return new String(content);
	}
	
	@Override
	public void createControl(Composite parent) {
		comp = new Composite(parent, SWT.NONE);
		comp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
		comp.setLayout(new GridLayout());

		Text text = new Text(comp, SWT.MULTI | SWT.V_SCROLL);
		String abouttext = "no about text could be loaded here";
		try {
			abouttext = slurpFile(Messages.CreditsPage_filename);
		} catch (FileNotFoundException e) { }

		text.setFont(FontService.getNormalMonospacedFont());
		text.setText(abouttext); //$NON-NLS-1$
		text.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
		text.setEditable(false);
	}
	
	@Override
	public Control getControl() {
		return comp;
	}

}

{'fraction_non_alphanumeric': 0.11615989067304407, 'fraction_numerical': 0.002562350529552443, 'mean_word_length': 3.9576629974597797, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2770093', 'n_tokens_mistral': 2067, 'n_tokens_neox': 1924, 'n_words': 414}