Buggy code:
public class AadlModelParser { private SystemImplementation systemImplementation ; private SystemInstance systemInstance ; private ArrayList < ThreadTypeImpl > threadTypeImplList ; private ArrayList < ComponentInstance > threadInstanceList ; private ArrayList < ConnectionInstance > connectionInstances ; private Map < ThreadTypeImpl , ThreadImplementation > threadImplementationMap ; private Map < DataSubcomponentImpl , SharedData > sharedDataMap = new HashMap < DataSubcomponentImpl , SharedData > ( ) ; private HashMap < PortImpl , DataPort > portMap = new HashMap < PortImpl , DataPort > ( ) ; private Map < ComponentInstance , ThreadInstance > threadInstanceMap ; private Set < DataClassifier > dataTypes = new HashSet < DataClassifier > ( ) ; private Model model ; private Logger logger ; public AadlModelParser ( SystemImplementation sysimpl , SystemInstance si , Model model , Logger logger ) { } private void findTopLevelComponentInstances ( SystemInstance top ) { } private void findThreadTypeImpls ( Element elem ) { } void addIrqHandler ( PortImpl port , ThreadImplementation ti ) { } InputEventPort addInputEventPort ( PortImpl port , Type datatype , ThreadImplementation ti ) { } void addPort ( PortImpl port , ThreadImplementation ti ) { } private void setDispatchProtocol ( ThreadTypeImpl tti , ThreadImplementation ti , boolean isPassive ) { } private void createOptPeriodicHandler ( ThreadTypeImpl tti , ThreadImplementation ti ) { } public void constructWarning ( String threadName , String featureType , String featureName , String supportDate ) { } public class SendsToWalker extends SendsToBaseListener { ArrayList < OutgoingDispatchContract > contracts = new ArrayList < > ( ) ; List < OutputEventPort > ports ; public SendsToWalker ( List < OutputEventPort > ports ) { } public ArrayList < OutgoingDispatchContract > getContracts ( ) { } public OutputEventPort findMatchingPort ( String id ) { } @ Override public void enterSends_to_tl ( SendsToParser . Sends_to_tlContext ctx ) { } } private AadlModelParser . SendsToWalker constructDispatchLimit ( String sendsEventsTo , List < OutputEventPort > outputPorts ) { } private void constructDispatchLimits ( ThreadTypeImpl tti , ThreadImplementation ti ) { try { String sendsEventsTo = Util . getStringValueOpt ( tti , SMACCM_SYS_SENDS_EVENTS_TO ) ; List < OutputEventPort > outputs = ti . getAllOutputEventPorts ( ) ; AadlModelParser . SendsToWalker threadSurrogate = null ; if ( sendsEventsTo != null ) { threadSurrogate = constructDispatchLimit ( sendsEventsTo , outputs ) ; } List < Dispatcher > dispList = ti . getDispatcherList ( ) ; for ( Dispatcher d : dispList ) { if ( ( d . getOptSendsEventsToString ( ) ) != null ) { String set = d . getOptSendsEventsToString ( ) ; AadlModelParser . SendsToWalker s = constructDispatchLimit ( set , outputs ) ; d . setDispatchLimits ( s . getContracts ( ) ) ; } else if ( threadSurrogate != null ) { d . setDispatchLimits ( threadSurrogate . getContracts ( ) ) ; } else { <START_BUG> throw new Aadl2RtosException ( ( "No<seq2seq4repair_space>dispatch<seq2seq4repair_space>limit<seq2seq4repair_space>(Sends_Outputs_To)<seq2seq4repair_space>specified<seq2seq4repair_space>for<seq2seq4repair_space>dispatcher<seq2seq4repair_space>" + ( d . getName ( ) ) ) ) ; <END_BUG> } } } catch ( Exception ae ) { Aadl2RtosException excp = new Aadl2RtosException ( ( ( ( "In<seq2seq4repair_space>thread<seq2seq4repair_space>" + ( ti . getName ( ) ) ) + ":<seq2seq4repair_space>" ) + ae ) ) ; throw excp ; } } private void createOptInitializeEntrypoint ( ThreadTypeImpl tti , ThreadImplementation ti ) { } private ThreadImplementation constructThreadImplementation ( ThreadTypeImpl tti ) { } private Map < ThreadTypeImpl , List < ComponentInstance > > constructThreadImplToInstanceMap ( ) { } private void constructThreadImplMap ( ) { } public Map < ThreadTypeImpl , ThreadImplementation > getThreadImplementationMap ( ) { } private AccessType getDataAccessRights ( DataAccessImpl destAccessImpl ) { } ThreadInstance getThreadInstance ( ComponentInstance inst ) { } private PortConnection constructPortConnection ( ConnectionInstance ci ) { } private SharedDataAccessor constructAccess ( ConnectionInstance ci ) { } private RemoteProcedureGroup lookupRemoteProcedureGroup ( SubprogramGroupTypeImpl subGroup ) { } private EndpointConnection constructSubprogramAccess ( ConnectionInstance ci ) { } private void initializeConnections ( ) { } public Map < DataSubcomponentImpl , SharedData > getDataMap ( ) { } public Map < String , Type > getAstTypes ( ) { } private Type getDataType ( PortImpl portImpl ) { } private Type getDataType ( DataSubcomponentImpl dataImpl ) { } public void harvestModelTypeData ( ) { } public void collectDataTypes ( Element elem ) { } public Type lookupType ( DataClassifier dc ) { } private String getDataClassifierName ( DataClassifier dc ) { } public Type createAstType ( DataClassifier dc ) { } private void initializeFiles ( ) { } private void initializeLegacyIRQs ( ) { } private void initializeThreadCalendar ( ) { } No newline ; at end ; of file ; }

Fix:
throw new Aadl2RtosException ( ( "No<seq2seq4repair_space>dispatch<seq2seq4repair_space>limit<seq2seq4repair_space>(Sends_Events_To)<seq2seq4repair_space>specified<seq2seq4repair_space>for<seq2seq4repair_space>dispatcher<seq2seq4repair_space>" + ( d . getName ( ) ) ) ) ;