namedScope = NamedScopesHolder.getScope(projects[0], scopeName);
} else {
namedScope = NamedScopesHolder.getScope(ProjectManager.getInstance().getDefaultProject(), scopeName);
}
}
<BUG>if (namedScope != null) {</BUG>
final String errorLevel = scopeElement.getAttributeValue(InspectionProfileImpl.LEVEL_TAG);
final String enabledInScope = scopeElement.getAttributeValue(InspectionProfileImpl.ENABLED_TAG);
<BUG>final InspectionProfileEntry InspectionProfileEntry =
</BUG>
((InspectionProfileImpl)profile).myRegistrar.createInspectionTool(myShortName, tool);

namedScope = NamedScopesHolder.getScope(projects[0], scopeName);
} else {
namedScope = NamedScopesHolder.getScope(ProjectManager.getInstance().getDefaultProject(), scopeName);
}
}
final String errorLevel = scopeElement.getAttributeValue(InspectionProfileImpl.LEVEL_TAG);
final String enabledInScope = scopeElement.getAttributeValue(InspectionProfileImpl.ENABLED_TAG);
final InspectionProfileEntry copyTool =
