Buggy code:
class CachePropertyAssociationsSwitch extends AadlProcessingSwitchWithProgress { private List < Property > propertyFilter ; private HashMap < InstanceObject , InstantiatedClassifier > classifierCache ; private final HashMap < ModeInstance , List < SystemOperationMode > > mode2som ; private final SCProperties scProps ; CachePropertyAssociationsSwitch ( final IProgressMonitor pm , final AnalysisErrorReporterManager errManager , final List < Property > filter , final HashMap < InstanceObject , InstantiatedClassifier > classifierCache , final SCProperties scProps , final HashMap < ModeInstance , List < SystemOperationMode > > mode2som ) { } @ Override protected void initSwitches ( ) { } SCProperties getSemanticConnectionProperties ( ) { } protected void cachePropertyAssociations ( InstanceObject io ) { } private PropertyAssociation getDeclarativePA ( PropertyAssociation pa ) { } protected void cacheConnectionPropertyAssociations ( final ConnectionInstance conni ) { PropertyAssociation setPA ; PropertyExpression defaultvalue ; try { for ( Property prop : propertyFilter ) { setPA = null ; defaultvalue = prop . getDefaultValue ( ) ; for ( final ConnectionReference connRef : conni . getConnectionReferences ( ) ) { if ( connRef . acceptsProperty ( prop ) ) { final PropertyAssociation propAssociation = scProps . retrieveSCProperty ( conni , prop , connRef . getConnection ( ) ) ; final EvaluationContext ctx = new EvaluationContext ( connRef , classifierCache , propAssociation ) ; PropertyEvaluationResult result = prop . evaluate ( ctx ) ; List < EvaluatedProperty > evaluated = result . getEvaluated ( ) ; if ( ! ( evaluated . isEmpty ( ) ) ) { PropertyAssociationInstance newPA = eINSTANCE . createPropertyAssociationInstance ( ) ; newPA . setProperty ( prop ) ; newPA . setPropertyAssociation ( getDeclarativePA ( result . getPa ( ) ) ) ; fillPropertyValue ( connRef , newPA , evaluated ) ; if ( ! ( newPA . getOwnedValues ( ) . isEmpty ( ) ) ) { for ( Iterator < Element > content = EcoreUtil . getAllProperContents ( newPA , false ) ; content . hasNext ( ) ; ) { Element elem = content . next ( ) ; if ( elem instanceof ModalPropertyValue ) { ModalPropertyValue mpv = ( ( ModalPropertyValue ) ( elem ) ) ; if ( ( mpv . getOwnedValue ( ) ) instanceof ListValue ) { ListValue lv = ( ( ListValue ) ( mpv . getOwnedValue ( ) ) ) ; for ( Element e : lv . getOwnedListElements ( ) ) { if ( e instanceof ReferenceValue ) { PropertyExpression irv = ( ( ReferenceValue ) ( e ) ) . instantiate ( conni . getContainingComponentInstance ( ) ) ; if ( irv != null ) { lv . getOwnedListElements ( ) . remove ( e ) ; lv . getOwnedListElements ( ) . add ( irv ) ; } } } } } if ( elem instanceof ReferenceValue ) { PropertyExpression irv = ( ( ReferenceValue ) ( elem ) ) . instantiate ( conni . getContainingComponentInstance ( ) ) ; if ( irv != null ) { EcoreUtil . replace ( elem , irv ) ; } } } scProps . recordSCProperty ( conni , prop , connRef . getConnection ( ) , newPA ) ; if ( setPA == null ) { setPA = newPA ; conni . getOwnedPropertyAssociations ( ) . add ( newPA ) ; } else { for ( Mode m : conni . getSystemInstance ( ) . getSystemOperationModes ( ) ) { PropertyExpression newVal = newPA . valueInMode ( m ) ; PropertyExpression setVal = setPA . valueInMode ( m ) ; if ( ! ( newVal . sameAs ( setVal ) ) ) { error ( conni , ( ( "Value<seq2seq4repair_space>for<seq2seq4repair_space>property<seq2seq4repair_space>" + ( setPA . getProperty ( ) . getQualifiedName ( ) ) ) + "<seq2seq4repair_space>not<seq2seq4repair_space>consistent<seq2seq4repair_space>along<seq2seq4repair_space>connection" ) ) ; break ; } } } } } } } checkIfCancelled ( ) ; if ( cancelled ( ) ) { break ; } } } catch ( IllegalStateException e ) { error ( conni , e . getMessage ( ) ) ; System . out . println ( "IllegalStateException<seq2seq4repair_space>raised<seq2seq4repair_space>in<seq2seq4repair_space>cacheConnectionPropertyAssociations" ) ; } catch ( InvalidModelException e ) { <START_BUG> error ( e . getElement ( ) , e . getMessage ( ) ) ; <END_BUG> System . out . println ( "IllegalStateException<seq2seq4repair_space>raised<seq2seq4repair_space>in<seq2seq4repair_space>cacheConnectionPropertyAssociations" ) ; } } private void fillPropertyValue ( InstanceObject io , PropertyAssociation pa , List < EvaluatedProperty > values ) { } }

Fix:
error ( conni , e . getMessage ( ) ) ;