private static String diff( Map<String, String> defaults1, Map<String, String> defaults2 ) {
		TreeSet<String> keys = new TreeSet<>();
		keys.addAll( defaults1.keySet() );
		keys.addAll( defaults2.keySet() );

		StringBuilder buf = new StringBuilder( 10000 );

		// diff header values
		for( String key : new String[] { "Class", "ID", "Name", "Java", "OS" } )
			appendDiff( buf, diffValue( key, defaults1.remove( key ), defaults2.remove( key ) ), null );

		// diff values
		ArrayList<Diff> diffs = new ArrayList<>( 100 );
		for( String key : keys ) {
			Diff diff = diffValue( key, defaults1.get( key ), defaults2.get( key ) );
			if( diff != null )
				diffs.add( diff );
		}

		// output diff values
		for( int i = 0; i < diffs.size(); i++ ) {
			Diff prevDiff = (i > 0) ? diffs.get( i - 1 ) : null;
			Diff diff = diffs.get( i );
			appendDiff( buf, diff, prevDiff );
		}

		return buf.toString();
	}
Dumps look and feel UI defaults to files.

@author Karl Tauber
flatlaf-testing/src/main/java/com/formdev/flatlaf/testing/uidefaults/UIDefaultsDump.java