Program: 5549
Project: 5549
Buggy source:
public MSP430Core(int type,ComponentRegistry registry,MSP430Config config){
  super("String_Node_Str","String_Node_Str",null);
  MAX_INTERRUPT=config.maxInterruptVector;
  MAX_MEM_IO=config.maxMemIO;
  MAX_MEM=config.maxMem;
  memOut=new IOUnit[MAX_MEM_IO];
  memIn=new IOUnit[MAX_MEM_IO];
  MSP430XArch=config.MSP430XArch;
  memory=new int[MAX_MEM];
  breakPoints=new CPUMonitor[MAX_MEM];
  IOUnit voidIO=new IOUnit(id,memory,0){
    public void interruptServiced(    int vector){
    }
    public void write(    int address,    int value,    boolean word,    long cycles){
      logw("String_Node_Str" + address);
    }
    public int read(    int address,    boolean word,    long cycles){
      logw("String_Node_Str" + address);
      return 0;
    }
  }
;
  for (int i=0; i < MAX_MEM_IO; i++) {
    memOut[i]=voidIO;
    memIn[i]=voidIO;
  }
  this.registry=registry;
  this.config=config;
  addChip(this);
  setModeNames(MODE_NAMES);
  ioUnits=new ArrayList<IOUnit>();
  Timer ta=new Timer(this,memory,config.timerConfig[0]);
  Timer tb=new Timer(this,memory,config.timerConfig[1]);
  for (int i=0, n=0x20; i < n; i++) {
    memOut[config.timerConfig[0].offset + i]=ta;
    memIn[config.timerConfig[0].offset + i]=ta;
    memOut[config.timerConfig[1].offset + i]=tb;
    memIn[config.timerConfig[1].offset + i]=tb;
  }
  flash=new Flash(this,memory,new FlashRange(0x4000,0x10000,512,64),new FlashRange(0x1000,0x01100,128,64));
  for (int i=0x128; i < 0x12e; i++) {
    memOut[i]=flash;
    memIn[i]=flash;
  }
  sfr=new SFR(this,memory);
  for (int i=0, n=0x10; i < n; i++) {
    memOut[i]=sfr;
    memIn[i]=sfr;
  }
  watchdog=new Watchdog(this);
  memOut[0x120]=watchdog;
  memIn[0x120]=watchdog;
  memIn[Timer.TAIV]=ta;
  memOut[Timer.TAIV]=ta;
  memIn[Timer.TBIV]=tb;
  memOut[Timer.TBIV]=tb;
  bcs=new BasicClockModule(this,memory,0,new Timer[]{ta,tb});
  for (int i=0x56, n=0x59; i < n; i++) {
    memOut[i]=bcs;
    memIn[i]=bcs;
  }
  Multiplier mp=new Multiplier(this,memory,0);
  for (int i=0x130, n=0x13f; i < n; i++) {
    memOut[i]=mp;
    memIn[i]=mp;
  }
  ioUnits.add(sfr);
  ioUnits.add(bcs);
  config.setup(this,ioUnits);
  ioUnits.add(ta);
  ioUnits.add(tb);
  ADC12 adc12=new ADC12(this);
  ioUnits.add(adc12);
  ioUnits.add(watchdog);
  for (int i=0, n=16; i < n; i++) {
    memOut[0x80 + i]=adc12;
    memIn[0x80 + i]=adc12;
    memOut[0x140 + i]=adc12;
    memIn[0x140 + i]=adc12;
    memOut[0x150 + i]=adc12;
    memIn[0x150 + i]=adc12;
  }
  for (int i=0, n=8; i < n; i++) {
    memOut[0x1A0 + i]=adc12;
    memIn[0x1A0 + i]=adc12;
  }
}

Fixed version (ground truth):
public MSP430Core(int type,ComponentRegistry registry,MSP430Config config){
  super("String_Node_Str","String_Node_Str",null);
  MAX_INTERRUPT=config.maxInterruptVector;
  MAX_MEM_IO=config.maxMemIO;
  MAX_MEM=config.maxMem;
  memOut=new IOUnit[MAX_MEM_IO];
  memIn=new IOUnit[MAX_MEM_IO];
  MSP430XArch=config.MSP430XArch;
  memory=new int[MAX_MEM];
  breakPoints=new CPUMonitor[MAX_MEM];
  System.out.println("String_Node_Str" + MAX_MEM + "String_Node_Str");
  IOUnit voidIO=new IOUnit(id,memory,0){
    public void interruptServiced(    int vector){
    }
    public void write(    int address,    int value,    boolean word,    long cycles){
      logw("String_Node_Str" + address);
    }
    public int read(    int address,    boolean word,    long cycles){
      logw("String_Node_Str" + address);
      return 0;
    }
  }
;
  for (int i=0; i < MAX_MEM_IO; i++) {
    memOut[i]=voidIO;
    memIn[i]=voidIO;
  }
  this.registry=registry;
  this.config=config;
  addChip(this);
  setModeNames(MODE_NAMES);
  ioUnits=new ArrayList<IOUnit>();
  Timer ta=new Timer(this,memory,config.timerConfig[0]);
  Timer tb=new Timer(this,memory,config.timerConfig[1]);
  for (int i=0, n=0x20; i < n; i++) {
    memOut[config.timerConfig[0].offset + i]=ta;
    memIn[config.timerConfig[0].offset + i]=ta;
    memOut[config.timerConfig[1].offset + i]=tb;
    memIn[config.timerConfig[1].offset + i]=tb;
  }
  flash=new Flash(this,memory,new FlashRange(0x4000,0x10000,512,64),new FlashRange(0x1000,0x01100,128,64));
  for (int i=0x128; i < 0x12e; i++) {
    memOut[i]=flash;
    memIn[i]=flash;
  }
  sfr=new SFR(this,memory);
  for (int i=0, n=0x10; i < n; i++) {
    memOut[i]=sfr;
    memIn[i]=sfr;
  }
  watchdog=new Watchdog(this);
  memOut[0x120]=watchdog;
  memIn[0x120]=watchdog;
  memIn[Timer.TAIV]=ta;
  memOut[Timer.TAIV]=ta;
  memIn[Timer.TBIV]=tb;
  memOut[Timer.TBIV]=tb;
  bcs=new BasicClockModule(this,memory,0,new Timer[]{ta,tb});
  for (int i=0x56, n=0x59; i < n; i++) {
    memOut[i]=bcs;
    memIn[i]=bcs;
  }
  Multiplier mp=new Multiplier(this,memory,0);
  for (int i=0x130, n=0x13f; i < n; i++) {
    memOut[i]=mp;
    memIn[i]=mp;
  }
  ioUnits.add(sfr);
  ioUnits.add(bcs);
  config.setup(this,ioUnits);
  ioUnits.add(ta);
  ioUnits.add(tb);
  ADC12 adc12=new ADC12(this);
  ioUnits.add(adc12);
  ioUnits.add(watchdog);
  for (int i=0, n=16; i < n; i++) {
    memOut[0x80 + i]=adc12;
    memIn[0x80 + i]=adc12;
    memOut[0x140 + i]=adc12;
    memIn[0x140 + i]=adc12;
    memOut[0x150 + i]=adc12;
    memIn[0x150 + i]=adc12;
  }
  for (int i=0, n=8; i < n; i++) {
    memOut[0x1A0 + i]=adc12;
    memIn[0x1A0 + i]=adc12;
  }
}