Program: 5777
Project: 5777
Buggy source:
public static void main(String[] args) throws IOException {
  if (args.length == 0) {
    System.out.println("String_Node_Str");
    System.exit(1);
  }
  ComponentRegistry registry=new ComponentRegistry();
  final MSP430 cpu=new MSP430(0);
  CommandHandler ch=new CommandHandler();
  registry.registerComponent("String_Node_Str",cpu);
  registry.registerComponent("String_Node_Str",ch);
  registry.registerComponent("String_Node_Str",new DebugCommands());
  cpu.setMonitorExec(true);
  ELF elf=null;
  int[] memory=cpu.getMemory();
  if (args[0].endsWith("String_Node_Str")) {
    IHexReader reader=new IHexReader();
    reader.readFile(memory,args[0]);
  }
 else {
    elf=ELF.readELF(args[0]);
    elf.loadPrograms(memory);
    MapTable map=elf.getMap();
    cpu.getDisAsm().setMap(map);
    cpu.setMap(map);
    registry.registerComponent("String_Node_Str",map);
  }
  String fileName=args[0];
  int ix=fileName.lastIndexOf('.');
  if (ix > 0) {
    fileName=fileName.substring(0,ix);
  }
  fileName=fileName + "String_Node_Str";
  System.out.println("String_Node_Str" + fileName);
  cpu.reset();
  SkyNode node=new SkyNode(cpu,fileName);
  node.gui=new SkyGui(node);
  ControlUI control=new ControlUI(cpu,elf);
  HighlightSourceViewer sourceViewer=new HighlightSourceViewer();
  sourceViewer.addSearchPath(new File("String_Node_Str"));
  control.setSourceViewer(sourceViewer);
  if (args.length > 1) {
    MapTable map=new MapTable(args[1]);
    cpu.getDisAsm().setMap(map);
    registry.registerComponent("String_Node_Str",map);
  }
  DataChart dataChart=new DataChart("String_Node_Str","String_Node_Str");
  dataChart.setupChipFrame(node.stats,cpu);
  registry.start();
  cpu.cpuloop();
}

Fixed version (ground truth):
public static void main(String[] args) throws IOException {
  if (args.length == 0) {
    System.out.println("String_Node_Str");
    System.exit(1);
  }
  ComponentRegistry registry=new ComponentRegistry();
  final MSP430 cpu=new MSP430(0);
  CommandHandler ch=new CommandHandler();
  registry.registerComponent("String_Node_Str",cpu);
  registry.registerComponent("String_Node_Str",ch);
  registry.registerComponent("String_Node_Str",new DebugCommands());
  cpu.setMonitorExec(true);
  ELF elf=null;
  int[] memory=cpu.getMemory();
  if (args[0].endsWith("String_Node_Str")) {
    IHexReader reader=new IHexReader();
    reader.readFile(memory,args[0]);
  }
 else {
    elf=ELF.readELF(args[0]);
    elf.loadPrograms(memory);
    MapTable map=elf.getMap();
    cpu.getDisAsm().setMap(map);
    cpu.setMap(map);
    registry.registerComponent("String_Node_Str",map);
  }
  String fileName=args[0];
  int ix=fileName.lastIndexOf('.');
  if (ix > 0) {
    fileName=fileName.substring(0,ix);
  }
  fileName=fileName + "String_Node_Str";
  System.out.println("String_Node_Str" + fileName);
  cpu.reset();
  SkyNode node=new SkyNode(cpu,fileName);
  node.elf=elf;
  node.gui=new SkyGui(node);
  ControlUI control=new ControlUI(cpu,elf);
  HighlightSourceViewer sourceViewer=new HighlightSourceViewer();
  sourceViewer.addSearchPath(new File("String_Node_Str"));
  control.setSourceViewer(sourceViewer);
  if (args.length > 1) {
    MapTable map=new MapTable(args[1]);
    cpu.getDisAsm().setMap(map);
    registry.registerComponent("String_Node_Str",map);
  }
  DataChart dataChart=new DataChart("String_Node_Str","String_Node_Str");
  dataChart.setupChipFrame(node.stats,cpu);
  registry.start();
  cpu.cpuloop();
}