Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  Blort.java

  Sprache: JAVA
 

import java.io.IOException;
class Blort {
    private static void arrayCopyTest(int k) {
        // A local variable assigned from an argument
        int j = k;
        // These two locals are defined once and used multiple times
        String[] stringArray = new String[8];
        Object[] objectArray = new Object[8];
        // Should cause another move to be inserted
        Object anotherOne = objectArray;

        if (anotherOne != null) {
            System.out.println("foo");
        }

        // "i" is used in a loop
        for (int i = 0; i < stringArray.length; i++)
            stringArray[i] = new String(Integer.toString(i));

        System.out.println("string -> object");
        System.arraycopy(stringArray, 0, objectArray, 0, stringArray.length);
        System.out.println("object -> string");
        System.arraycopy(objectArray, 0, stringArray, 0, stringArray.length);
        System.out.println("object -> string (modified)");
        objectArray[4] = new Object();
        try {
            System.arraycopy(objectArray, 0, stringArray, 0,stringArray.length);
        } catch (ArrayStoreException ase) {
            // "ase" is an unused local which still must be preserved
            System.out.println("caught ArrayStoreException (expected)");
        }
    }

    private void testConstructor() {
        Blort foo = null;
        try {
            foo = new Blort();
        } catch (Exception ex) {
        }
        System.err.println(foo);
    }
    /**
     * Stolen from
     * java/android/org/apache/http/impl/io/AbstractMessageParser.java
     * Simplified.
     *
     * Checks to see that local variable assignment is preserved through
     * phi's. The key component here is the assignment of previous = current.
     */

    public static void parseHeaderGroup(
            final Object headGroup,
            final Object inbuffer,
            int maxHeaderCount,
            int maxLineLen)
        throws  IOException {

        StringBuilder current = null;
        StringBuilder previous = null;
        for (;;) {
            if (current == null) {
                current = new StringBuilder(64);
            } else {
                current.length();
            }
            int l = inbuffer.hashCode();
            if (l == -1 || current.length() < 1) {
                break;
            }

            if ((current.charAt(0) == ' ' || current.charAt(0) == '\t') && previous != null) {
                int i = 0;
                while (i < current.length()) {
                    char ch = current.charAt(i);
                    if (ch != ' ' && ch != '\t') {
                        break;
                    }
                    i++;
                }
                if (maxLineLen > 0
                        && previous.length() + 1 + current.length() - i > maxLineLen) {
                    throw new IOException("Maximum line length limit exceeded");
                }
                previous.append(' ');
                previous.append(current, i, current.length() - i);
            } else {
                previous = current;
                current = null;
            }
            if (maxHeaderCount > 0) {
                throw new IOException("Maximum header count exceeded");
            }
        }
    }
}

Messung V0.5 in Prozent
C=98 H=86 G=91

¤ Dauer der Verarbeitung: 0.10 Sekunden  (vorverarbeitet am  2026-06-27) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik