void (UMethod method) { if (isConstructor()) { UExpression body = method.getUastBody(); if (body == null) return; List<UExpression> statements = body instanceof UBlockExpression blockExpression ? blockExpression.getExpressions() : Collections.singletonList(body); boolean isBaseExplicitlyCalled = false; if (!statements.isEmpty()) { UExpression first = statements.get(0); if (first instanceof UCallExpression callExpression && callExpression.getKind() == UastCallKind.CONSTRUCTOR_CALL) { isBaseExplicitlyCalled = true; } } if (!isBaseExplicitlyCalled) { RefClass ownerClass = getOwnerClass(); if (ownerClass != null) { for (RefClass superClass : ownerClass.getBaseClasses()) { superClass.initializeIfNeeded(); WritableRefElement superDefaultConstructor = (WritableRefElement)superClass.getDefaultConstructor(); if (superDefaultConstructor != null) { superDefaultConstructor.addInReference(this); addOutReference(superDefaultConstructor); } } } } } }