<commit_before>/*
 *                    BioJava development code
 *
 * This code may be freely distributed and modified under the
 * terms of the GNU Lesser General Public Licence.  This should
 * be distributed with the code.  If you do not have a copy,
 * see:
 *
 *      http://www.gnu.org/copyleft/lesser.html
 *
 * Copyright for this code is held jointly by the individual
 * authors.  These should be listed in @author doc comments.
 *
 * For more information on the BioJava project and its aims,
 * or to join the biojava-l mailing list, visit the home page
 * at:
 *
 *      http://www.biojava.org/
 *
 */

import java.awt.*;
import java.net.*;
import java.util.*;

import javax.swing.*;
import javax.swing.event.*;
import javax.swing.tree.*;

import org.acedb.*;

public class AceTreeView {
    public static void main(String[] args) throws Exception {
      try {
	if (args.length != 6)
	    throw new RuntimeException("AceTreeView hostname port username class object");

	String host = args[0];
	String port = args[1];
	String user = args[2];
	String passwd = args[3];
	String clazzName = args[4];
	String objName = args[5];

	Ace.registerDriver(new org.acedb.socket.SocketDriver());
	URL _dbURL = new URL("acedb://" + host + ":" + port);
  AceURL dbURL = new AceURL(_dbURL, user, passwd, null);
	AceURL seqURL = dbURL.relativeURL(clazzName + "/" + objName);
	AceObject seqObj = (AceObject) Ace.fetch(seqURL);
	AceTreeModel tm = new AceTreeModel(seqObj);

	JFrame myFrame = new JFrame("ACeDB " + clazzName + " " + objName);
	JTree myTree = new JTree();
	myTree.setModel(tm);
	myTree.setCellRenderer(new AceNodeNameRenderer());
	myTree.setEditable(false);
	myFrame.getContentPane().add(new JScrollPane(myTree));
	myFrame.pack();
	myFrame.setVisible(true);
	System.out.println("Going...");
    } catch (Throwable t) {
      t.printStackTrace();
    }
    }
    
}
<commit_msg>Use AceURL throughout.<commit_after>/*
 *                    BioJava development code
 *
 * This code may be freely distributed and modified under the
 * terms of the GNU Lesser General Public Licence.  This should
 * be distributed with the code.  If you do not have a copy,
 * see:
 *
 *      http://www.gnu.org/copyleft/lesser.html
 *
 * Copyright for this code is held jointly by the individual
 * authors.  These should be listed in @author doc comments.
 *
 * For more information on the BioJava project and its aims,
 * or to join the biojava-l mailing list, visit the home page
 * at:
 *
 *      http://www.biojava.org/
 *
 */

import java.awt.*;
import java.net.*;
import java.util.*;

import javax.swing.*;
import javax.swing.event.*;
import javax.swing.tree.*;

import org.acedb.*;

public class AceTreeView {
    public static void main(String[] args) throws Exception {
      try {
	if (args.length != 6)
	    throw new RuntimeException("AceTreeView hostname port username class object");

	String host = args[0];
	String port = args[1];
	String user = args[2];
	String passwd = args[3];
	String clazzName = args[4];
	String objName = args[5];

	Ace.registerDriver(new org.acedb.socket.SocketDriver());
	// URL _dbURL = new URL("acedb://" + host + ":" + port);
	// AceURL dbURL = new AceURL(_dbURL, user, passwd, null);
	AceURL dbURL = new AceURL("acedb://" + user + ':' + passwd + '@' + host + ':' + port);
	AceURL seqURL = dbURL.relativeURL(clazzName + "/" + objName);
	AceObject seqObj = (AceObject) Ace.fetch(seqURL);
	AceTreeModel tm = new AceTreeModel(seqObj);

	JFrame myFrame = new JFrame("ACeDB " + clazzName + " " + objName);
	JTree myTree = new JTree();
	myTree.setModel(tm);
	myTree.setCellRenderer(new AceNodeNameRenderer());
	myTree.setEditable(false);
	myFrame.getContentPane().add(new JScrollPane(myTree));
	myFrame.pack();
	myFrame.setVisible(true);
	System.out.println("Going...");
    } catch (Throwable t) {
      t.printStackTrace();
    }
    }
    
}

{'fraction_non_alphanumeric': 0.13171487603305784, 'fraction_numerical': 0.003615702479338843, 'mean_word_length': 3.4982578397212545, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '3922937', 'n_tokens_mistral': 1277, 'n_tokens_neox': 1245, 'n_words': 378}