if (active){
if (statusToCheck == UploadDO.AKTIVE_UEBERTRAGUNG){ children.add(uploadsForThread[i]); } else if (active){
    public UploadDO[] getChildrenByStatus(int statusToCheck, boolean active){        if (uploads == null) {            return null;        }        else {            ArrayList children = new ArrayList();            UploadDO[] uploadsForThread = (UploadDO[]) uploads.values().                toArray(new UploadDO[uploads.size()]);            for (int i = 0; i < uploadsForThread.length; i++) {                if (uploadsForThread[i].getStatus() ==                    statusToCheck) {                    if (active){                        if (uploadsForThread[i].getDirectState() == UploadDO.STATE_DIREKT_VERBUNDEN){                            children.add(uploadsForThread[i]);                        }                    }                    else{                        if (uploadsForThread[i].getDirectState() != UploadDO.STATE_DIREKT_VERBUNDEN){                            children.add(uploadsForThread[i]);                        }                    }                }            }            return (UploadDO[]) children.toArray(new UploadDO[children.                size()]);        }    }