nus-yam/ex-repair huggingface dataset:
Program: 184244
Project: 184244
Buggy source:
public void finishTask(TaskInstance task,boolean b,Map<String,Object> pVars,Map<String,Object> aVars,Map<AttachmentInstance,byte[]> attachments) throws TaskNotFoundException, IllegalTaskStateException, InstanceNotFoundException, VariableNotFoundException, Exception {
  logger.debug("String_Node_Str");
  initContext();
  if (task.isTaskAssigned() == false && task.getTaskCandidates().contains(currentUserUID)) {
    getRuntimeAPI().startTask(task.getUUID(),true);
  }
  setProcessAndActivityInstanceVariables(task,pVars,aVars);
  if (attachments != null) {
    for (    AttachmentInstance a : attachments.keySet()) {
      logger.debug(a.getProcessInstanceUUID() + "String_Node_Str" + a.getName()+ "String_Node_Str"+ a.getFileName()+ "String_Node_Str"+ attachments.get(a).length);
    }
    getRuntimeAPI().addAttachments(attachments);
  }
  getRuntimeAPI().finishTask(task.getUUID(),false);
}

Fixed version (ground truth):
public void finishTask(TaskInstance task,boolean b,Map<String,Object> pVars,Map<String,Object> aVars,Map<AttachmentInstance,byte[]> attachments) throws TaskNotFoundException, IllegalTaskStateException, InstanceNotFoundException, VariableNotFoundException, Exception {
  logger.debug("String_Node_Str");
  initContext();
  if (task.isTaskAssigned() == false && task.getTaskCandidates().contains(currentUserUID)) {
    LightTaskInstance lightTaskInstance=getQueryRuntimeAPI().getLightTaskInstance(task.getUUID());
    if (lightTaskInstance.getState() != ActivityState.EXECUTING)     getRuntimeAPI().startTask(task.getUUID(),true);
  }
  setProcessAndActivityInstanceVariables(task,pVars,aVars);
  if (attachments != null) {
    for (    AttachmentInstance a : attachments.keySet()) {
      logger.debug(a.getProcessInstanceUUID() + "String_Node_Str" + a.getName()+ "String_Node_Str"+ a.getFileName()+ "String_Node_Str"+ attachments.get(a).length);
    }
    getRuntimeAPI().addAttachments(attachments);
  }
  getRuntimeAPI().finishTask(task.getUUID(),true);
}
Program: 184245
Project: 184245
Buggy source:
public void addAttachment(ProcessInstanceUUID instanceUUID,String name,String fileName,String mimeType,byte[] value) throws Exception {
  logger.debug("String_Node_Str");
  initContext();
  Map<String,String> metadata=new Hashtable<String,String>();
  metadata.put("String_Node_Str",mimeType);
  getRuntimeAPI().addAttachment(instanceUUID,name,null,null,fileName,metadata,value);
}

Fixed version (ground truth):
public void addAttachment(ProcessInstanceUUID instanceUUID,String name,String fileName,String mimeType,byte[] value) throws Exception {
  if (value.length == 0)   return;
  logger.debug("String_Node_Str");
  initContext();
  Map<String,String> metadata=new Hashtable<String,String>();
  metadata.put("String_Node_Str",mimeType);
  getRuntimeAPI().addAttachment(instanceUUID,name,null,null,fileName,metadata,value);
}
Program: 184246
Project: 184246
Buggy source:
public Void execute(Environment e) throws Exception {
  DocumentationManager documentatinManager=EnvTool.getDocumentationManager();
  List<Folder> folders=documentatinManager.getFolders(documetName);
  if (folders != null) {
    for (    Folder f : folders) {
      for (      Document d : documentatinManager.getChildrenDocuments(f.getId())) {
        documentatinManager.deleteDocument(d.getId(),true);
      }
      documentatinManager.deleteFolder(f);
    }
  }
  return null;
}

Fixed version (ground truth):
public Void execute(Environment e) throws Exception {
  DocumentationManager documentatinManager=EnvTool.getDocumentationManager();
  List<Folder> folders=documentatinManager.getFolders(documetName);
  if (folders != null) {
    for (    Folder f : folders) {
      delFolder(documentatinManager,f);
    }
  }
  return null;
}
Program: 184247
Project: 184247
Buggy source:
public XMLProcessDefinition getXmlProcessDefinition(){
  return xmlProcessDefinition;
}

Fixed version (ground truth):
public XMLProcessDefinition getXmlProcessDefinition(String name){
  return xmlProcessDefinition.get(name);
}
Program: 184248
Project: 184248
Buggy source:
public void setXmlProcessDefinition(XMLProcessDefinition xmlProcessDefinition){
  this.xmlProcessDefinition=xmlProcessDefinition;
}

Fixed version (ground truth):
public void setXmlProcessDefinition(String name,XMLProcessDefinition xmlProcessDefinition){
  if (this.xmlProcessDefinition == null)   this.xmlProcessDefinition=new Hashtable<String,XMLProcessDefinition>();
  this.xmlProcessDefinition.put(name,xmlProcessDefinition);
}
Program: 184249
Project: 184249
Buggy source:
public void openStartPage(LightProcessDefinition process){
  try {
    String url=ProcessbaseApplication.getCurrent().getBpmModule().getProcessMetaData(process.getUUID()).get(process.getUUID().toString());
    if (url != null && !url.isEmpty() && url.length() > 0) {
      ProcessbaseApplication.getCurrent().removeSessionAttribute("String_Node_Str");
      ProcessbaseApplication.getCurrent().removeSessionAttribute("String_Node_Str");
      ProcessbaseApplication.getCurrent().setSessionAttribute("String_Node_Str",process.getUUID().toString());
      this.getWindow().open(new ExternalResource(url));
    }
 else {
      BarResource barResource=new BarResource(process.getUUID());
      XMLProcessDefinition xmlProcess=barResource.getXmlProcessDefinition();
      if (!xmlProcess.isByPassFormsGeneration()) {
        GeneratedWindow genWindow=new GeneratedWindow(process.getLabel());
        genWindow.setProcessDef(process);
        genWindow.setBarResource(barResource);
        this.getApplication().getMainWindow().addWindow(genWindow);
        genWindow.initUI();
      }
 else {
        ProcessbaseApplication.getCurrent().getBpmModule().startNewProcess(process.getUUID());
        showImportantInformation(ProcessbaseApplication.getCurrent().getPbMessages().getString("String_Node_Str"));
      }
    }
  }
 catch (  Exception ex) {
    ex.printStackTrace();
    showError(ex.getMessage());
    throw new RuntimeException(ex);
  }
}

Fixed version (ground truth):
public void openStartPage(LightProcessDefinition process){
  try {
    String url=ProcessbaseApplication.getCurrent().getBpmModule().getProcessMetaData(process.getUUID()).get(process.getUUID().toString());
    if (url != null && !url.isEmpty() && url.length() > 0) {
      ProcessbaseApplication.getCurrent().removeSessionAttribute("String_Node_Str");
      ProcessbaseApplication.getCurrent().removeSessionAttribute("String_Node_Str");
      ProcessbaseApplication.getCurrent().setSessionAttribute("String_Node_Str",process.getUUID().toString());
      this.getWindow().open(new ExternalResource(url));
    }
 else {
      BarResource barResource=new BarResource(process.getUUID());
      XMLProcessDefinition xmlProcess=barResource.getXmlProcessDefinition(process.getName());
      if (!xmlProcess.isByPassFormsGeneration()) {
        GeneratedWindow genWindow=new GeneratedWindow(process.getLabel());
        genWindow.setProcessDef(process);
        genWindow.setBarResource(barResource);
        this.getApplication().getMainWindow().addWindow(genWindow);
        genWindow.initUI();
      }
 else {
        ProcessbaseApplication.getCurrent().getBpmModule().startNewProcess(process.getUUID());
        showImportantInformation(ProcessbaseApplication.getCurrent().getPbMessages().getString("String_Node_Str"));
      }
    }
  }
 catch (  Exception ex) {
    ex.printStackTrace();
    showError(ex.getMessage());
    throw new RuntimeException(ex);
  }
}
Program: 184250
Project: 184250
Buggy source:
public void openTaskPage(LightTaskInstance task){
  try {
    String url=ProcessbaseApplication.getCurrent().getBpmModule().getProcessMetaData(task.getProcessDefinitionUUID()).get(task.getActivityDefinitionUUID().toString());
    ProcessbaseApplication.getCurrent().removeSessionAttribute("String_Node_Str");
    ProcessbaseApplication.getCurrent().setSessionAttribute("String_Node_Str",task.getUUID().toString());
    if (url != null && !url.isEmpty() && url.length() > 0) {
      this.getWindow().open(new ExternalResource(url));
    }
 else {
      BarResource barResource=new BarResource(task.getProcessDefinitionUUID());
      XMLProcessDefinition xmlProcess=barResource.getXmlProcessDefinition();
      XMLTaskDefinition taskDef=xmlProcess.getTasks().get(task.getActivityName());
      if (!taskDef.isByPassFormsGeneration()) {
        showError(ProcessbaseApplication.getCurrent().getPbMessages().getString("String_Node_Str"));
      }
 else       if (!taskDef.isByPassFormsGeneration()) {
        GeneratedWindow genWindow=new GeneratedWindow(task.getActivityLabel());
        genWindow.setTask(ProcessbaseApplication.getCurrent().getBpmModule().getTaskInstance(task.getUUID()));
        genWindow.setBarResource(barResource);
        this.getApplication().getMainWindow().addWindow(genWindow);
        genWindow.initUI();
      }
    }
  }
 catch (  Exception ex) {
    ex.printStackTrace();
    showError(ex.getMessage());
    throw new RuntimeException(ex);
  }
}

Fixed version (ground truth):
public void openTaskPage(LightTaskInstance task){
  try {
    BPMModule bpmModule=ProcessbaseApplication.getCurrent().getBpmModule();
    String url=bpmModule.getProcessMetaData(task.getProcessDefinitionUUID()).get(task.getActivityDefinitionUUID().toString());
    ProcessbaseApplication.getCurrent().removeSessionAttribute("String_Node_Str");
    ProcessbaseApplication.getCurrent().setSessionAttribute("String_Node_Str",task.getUUID().toString());
    if (url != null && !url.isEmpty() && url.length() > 0) {
      this.getWindow().open(new ExternalResource(url));
    }
 else {
      BarResource barResource=new BarResource(task.getProcessDefinitionUUID());
      ProcessDefinition processDefinition=bpmModule.getProcessDefinition(task.getProcessDefinitionUUID());
      XMLProcessDefinition xmlProcess=barResource.getXmlProcessDefinition(processDefinition.getName());
      XMLTaskDefinition taskDef=xmlProcess.getTasks().get(task.getActivityName());
      if (!taskDef.isByPassFormsGeneration()) {
        showError(ProcessbaseApplication.getCurrent().getPbMessages().getString("String_Node_Str"));
      }
 else       if (!taskDef.isByPassFormsGeneration()) {
        GeneratedWindow genWindow=new GeneratedWindow(task.getActivityLabel());
        genWindow.setTask(bpmModule.getTaskInstance(task.getUUID()));
        genWindow.setBarResource(barResource);
        this.getApplication().getMainWindow().addWindow(genWindow);
        genWindow.initUI();
      }
    }
  }
 catch (  Exception ex) {
    ex.printStackTrace();
    showError(ex.getMessage());
    throw new RuntimeException(ex);
  }
}
Program: 184252
Project: 184252
Buggy source:
public XMLProcessDefinition getProcess(){
  return process;
}

Fixed version (ground truth):
public Map<String,XMLProcessDefinition> getProcess(){
  return processPoolMap;
}
Program: 184254
Project: 184254
Buggy source:
private void initContext() throws Exception {
  if (Constants.APP_SERVER.startsWith("String_Node_Str")) {
    Class authClass=tryClass("String_Node_Str");
    if (authClass != null) {
      Method login=authClass.getMethod("String_Node_Str");
      login.invoke(authClass.newInstance(),currentUserUID,"String_Node_Str".toCharArray(),"String_Node_Str",false);
    }
  }
  DomainOwner.setDomain(Constants.BONITA_DOMAIN);
  UserOwner.setUser(currentUserUID);
}

Fixed version (ground truth):
private void initContext() throws Exception {
  if (Constants.APP_SERVER.startsWith("String_Node_Str")) {
  }
  DomainOwner.setDomain(Constants.BONITA_DOMAIN);
  UserOwner.setUser(currentUserUID);
}
Program: 184255
Project: 184255
Buggy source:
public TaskInstance nextUserTask(ProcessInstanceUUID processInstanceUUID,String currentUserName) throws Exception {
  initContext();
  Set<LightActivityInstance> activities=queryRuntimeAPI.getLightActivityInstances(processInstanceUUID);
  for (  LightActivityInstance instance : activities) {
    if (instance.getState() == ActivityState.READY || instance.getState() == ActivityState.EXECUTING || instance.getState() == ActivityState.SUSPENDED) {
      LightTaskInstance task=instance.getTask();
      if (!task.isTaskAssigned())       return assignAndStartTask(task.getUUID(),currentUserName);
    }
  }
  return null;
}

Fixed version (ground truth):
public TaskInstance nextUserTask(ProcessInstanceUUID processInstanceUUID,String currentUserName) throws Exception {
  initContext();
  Set<ActivityInstance> activities=queryRuntimeAPI.getActivityInstances(processInstanceUUID);
  for (  ActivityInstance instance : activities) {
    if (instance.getState() == ActivityState.READY || instance.getState() == ActivityState.EXECUTING || instance.getState() == ActivityState.SUSPENDED) {
      TaskInstance task=instance.getTask();
      if (task.getTaskCandidates().contains(currentUserName))       return assignAndStartTask(task.getUUID(),currentUserName);
    }
  }
  return null;
}
Program: 184256
Project: 184256
Buggy source:
private void commit(){
  for (  GridLayout grid : pages) {
    commitPage(grid);
  }
}

Fixed version (ground truth):
private void commit(){
  for (  VerticalLayout grid : pages) {
    commitPage(grid);
  }
}
Program: 184257
Project: 184257
Buggy source:
private void commitPage(GridLayout page){
  for (Iterator<Component> iterator=page.getComponentIterator(); iterator.hasNext(); ) {
    Component comp=iterator.next();
    if (comp instanceof AbstractField) {
      try {
        ((AbstractField)comp).setComponentError(null);
        ((AbstractField)comp).validate();
      }
 catch (      InvalidValueException ex) {
        if (ex instanceof EmptyValueException) {
          ((AbstractField)comp).setComponentError(new UserError(((AbstractField)comp).getRequiredError()));
        }
        throw ex;
      }
    }
  }
}

Fixed version (ground truth):
private void commitPage(VerticalLayout page){
  for (Iterator<Component> iterator=page.getComponentIterator(); iterator.hasNext(); ) {
    Component comp=iterator.next();
    if (comp instanceof AbstractField) {
      try {
        ((AbstractField)comp).setComponentError(null);
        ((AbstractField)comp).validate();
      }
 catch (      InvalidValueException ex) {
        if (ex instanceof EmptyValueException) {
          ((AbstractField)comp).setComponentError(new UserError(((AbstractField)comp).getRequiredError()));
        }
        throw ex;
      }
    }
  }
}
Program: 184259
Project: 184259
Buggy source:
@Override public void refreshTable(){
  treeTable.removeAllItems();
  try {
    Set<Category> categories=ProcessbaseApplication.getCurrent().getBpmModule().getAllCategories();
    Collection<LightProcessDefinition> processes=ProcessbaseApplication.getCurrent().getBpmModule().getAllowedLightProcessDefinitions();
    for (    Category category : categories) {
      CategoryAndProcessDefinition capParent=new CategoryAndProcessDefinition(category,null);
      addTableRow(capParent,null);
      for (      LightProcessDefinition process : processes) {
        if (process.getCategoryNames().contains(category.getName())) {
          CategoryAndProcessDefinition cap=new CategoryAndProcessDefinition(category,process);
          addTableRow(cap,capParent);
        }
      }
    }
    for (    Object id : treeTable.getItemIds()) {
      if (treeTable.getParent(id) == null && !treeTable.hasChildren(id)) {
        treeTable.removeItem(id);
      }
    }
    this.rowCount=processes.size();
  }
 catch (  Exception ex) {
    ex.printStackTrace();
  }
  treeTable.setSortContainerPropertyId("String_Node_Str");
  treeTable.setSortAscending(true);
  treeTable.sort();
}

Fixed version (ground truth):
@Override public void refreshTable(){
  treeTable.removeAllItems();
  try {
    Set<Category> categories=ProcessbaseApplication.getCurrent().getBpmModule().getAllCategories();
    Collection<LightProcessDefinition> processes=ProcessbaseApplication.getCurrent().getBpmModule().getAllowedLightProcessDefinitions();
    for (    Category category : categories) {
      CategoryAndProcessDefinition capParent=new CategoryAndProcessDefinition(category,null);
      addTableRow(capParent,null);
      for (      LightProcessDefinition process : processes) {
        if (process.getCategoryNames().contains(category.getName()) || (process.getCategoryNames().size() == 0 && category.getName().equalsIgnoreCase("String_Node_Str"))) {
          CategoryAndProcessDefinition cap=new CategoryAndProcessDefinition(category,process);
          addTableRow(cap,capParent);
        }
      }
    }
    for (    Object id : treeTable.getItemIds()) {
      if (treeTable.getParent(id) == null && !treeTable.hasChildren(id)) {
        treeTable.removeItem(id);
      }
    }
    this.rowCount=processes.size();
  }
 catch (  Exception ex) {
    ex.printStackTrace();
  }
  treeTable.setSortContainerPropertyId("String_Node_Str");
  treeTable.setSortAscending(true);
  treeTable.sort();
}
Program: 184260
Project: 184260
Buggy source:
/** 
 * Application entry point.
 * @param args ignored
 */
public static void main(final String[] args){
  EventQueue.invokeLater(new Runnable(){
    @Override public void run(){
      UIManager.put("String_Node_Str",UI.BACKGROUND);
      int device=0;
      if (args.length > 0) {
        device=Integer.parseInt(args[0]);
      }
      MainFrame f=createOnMonitor(device);
      f.setAlwaysOnTop(true);
      f.showFlowGame();
      if (args.length > 1 && args[1].equals("String_Node_Str")) {
        startChaosRobot(f);
      }
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Application entry point.
 * @param args ignored
 */
public static void main(final String[] args){
  EventQueue.invokeLater(new Runnable(){
    @Override public void run(){
      UIManager.put("String_Node_Str",UI.BACKGROUND);
      int device=0;
      if (args.length > 0) {
        device=Integer.parseInt(args[0]);
      }
      MainFrame f=createOnMonitor(device);
      f.setAlwaysOnTop(true);
      f.showCover();
      if (args.length > 1 && args[1].equals("String_Node_Str")) {
        startChaosRobot(f);
      }
    }
  }
);
}
Program: 184261
Project: 184261
Buggy source:
@Override public void run(){
  UIManager.put("String_Node_Str",UI.BACKGROUND);
  int device=0;
  if (args.length > 0) {
    device=Integer.parseInt(args[0]);
  }
  MainFrame f=createOnMonitor(device);
  f.setAlwaysOnTop(true);
  f.showFlowGame();
  if (args.length > 1 && args[1].equals("String_Node_Str")) {
    startChaosRobot(f);
  }
}

Fixed version (ground truth):
@Override public void run(){
  UIManager.put("String_Node_Str",UI.BACKGROUND);
  int device=0;
  if (args.length > 0) {
    device=Integer.parseInt(args[0]);
  }
  MainFrame f=createOnMonitor(device);
  f.setAlwaysOnTop(true);
  f.showCover();
  if (args.length > 1 && args[1].equals("String_Node_Str")) {
    startChaosRobot(f);
  }
}
Program: 184262
Project: 184262
Buggy source:
public MainFrame(GraphicsConfiguration gc){
  super(gc);
  cardLayout=new CardLayout();
  setLayout(cardLayout);
  coverPanel=new CoverPanel(){
    private static final long serialVersionUID=1L;
    @Override public void onPlayClicked(){
      showRingRoadGame();
    }
  }
;
  add(coverPanel,COVER_CARD);
  ringRoadGamePanel=new RingRoadGamePanel(){
    private static final long serialVersionUID=1L;
    @Override public void goToNextLevel(){
      showFlowGame();
    }
  }
;
  add(ringRoadGamePanel,RING_ROAD_GAME_CARD);
  flowGamePanel=new URoadGamePanel(){
    private static final long serialVersionUID=1L;
    @Override protected void onBackClicked(){
      showRingRoadGame();
    }
    @Override protected void onNextClicked(){
      showCover();
    }
  }
;
  add(flowGamePanel,FLOW_GAME_CARD);
  inactivityTimer=new Timer(INACTIVITY_TIMEOUT_MS,new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      showCover();
    }
  }
);
  Toolkit.getDefaultToolkit().addAWTEventListener(new AWTEventListener(){
    @Override public void eventDispatched(    AWTEvent event){
      inactivityTimer.restart();
    }
  }
,AWTEvent.MOUSE_MOTION_EVENT_MASK + AWTEvent.MOUSE_EVENT_MASK);
  inactivityTimer.start();
}

Fixed version (ground truth):
public MainFrame(GraphicsConfiguration gc){
  super(gc);
  cardLayout=new CardLayout();
  setLayout(cardLayout);
  coverPanel=new CoverPanel(){
    private static final long serialVersionUID=1L;
    @Override public void onPlayClicked(){
      showRingRoadGame();
    }
  }
;
  add(coverPanel,COVER_CARD);
  ringRoadGamePanel=new RingRoadGamePanel(){
    private static final long serialVersionUID=1L;
    @Override public void onBackClicked(){
      showCover();
    }
    @Override public void onNextClicked(){
      showFlowGame();
    }
  }
;
  add(ringRoadGamePanel,RING_ROAD_GAME_CARD);
  flowGamePanel=new URoadGamePanel(){
    private static final long serialVersionUID=1L;
    @Override protected void onBackClicked(){
      showRingRoadGame();
    }
    @Override protected void onNextClicked(){
    }
  }
;
  add(flowGamePanel,FLOW_GAME_CARD);
  inactivityTimer=new Timer(INACTIVITY_TIMEOUT_MS,new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      showCover();
    }
  }
);
  Toolkit.getDefaultToolkit().addAWTEventListener(new AWTEventListener(){
    @Override public void eventDispatched(    AWTEvent event){
      inactivityTimer.restart();
    }
  }
,AWTEvent.MOUSE_MOTION_EVENT_MASK + AWTEvent.MOUSE_EVENT_MASK);
  inactivityTimer.start();
}
Program: 184263
Project: 184263
Buggy source:
@Override protected void onNextClicked(){
  showCover();
}

Fixed version (ground truth):
@Override protected void onNextClicked(){
}
Program: 184265
Project: 184265
Buggy source:
@Override public void onNextClicked(){
  goToNextLevel();
}

Fixed version (ground truth):
/** 
 * Called when the user presses the next button.
 */
public abstract void onNextClicked();
Program: 184266
Project: 184266
Buggy source:
/** 
 * For testing 
 */
public static void main(String[] args){
  JFrame f=new JFrame("String_Node_Str");
  f.setSize(800,600);
  f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  RingRoadGamePanel p=new RingRoadGamePanel(){
    private static final long serialVersionUID=1L;
    @Override public void goToNextLevel(){
    }
  }
;
  f.add(p);
  f.setVisible(true);
  p.start();
}

Fixed version (ground truth):
/** 
 * For testing 
 */
public static void main(String[] args){
  JFrame f=new JFrame("String_Node_Str");
  f.setSize(800,600);
  f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  RingRoadGamePanel p=new RingRoadGamePanel(){
    private static final long serialVersionUID=1L;
    @Override public void onNextClicked(){
    }
    @Override public void onBackClicked(){
    }
  }
;
  f.add(p);
  f.setVisible(true);
  p.start();
}
Program: 184270
Project: 184270
Buggy source:
public int compare(Track o1,Track o2){
  return o1.getNumber() - o2.getNumber();
}

Fixed version (ground truth):
@Override public int compare(Track o1,Track o2){
  return o1.getNumber() - o2.getNumber();
}
Program: 184271
Project: 184271
Buggy source:
public int compare(Marker o1,Marker o2){
  return o1.getPosition() - o2.getPosition();
}

Fixed version (ground truth):
@Override public int compare(Marker o1,Marker o2){
  return o1.getPosition() - o2.getPosition();
}
Program: 184272
Project: 184272
Buggy source:
public static void main(String... args) throws IOException {
  PrintStream log=System.out;
  MixmeisterPlaylist mmp=MixmeisterPlaylist.open(new File("String_Node_Str"));
  log.println(mmp);
  Track track=mmp.getTracks().get(0);
  String trackId=track.getHeader().getArchiveKey();
  System.out.println(trackId);
  File archiveFile=new File("String_Node_Str" + trackId + "String_Node_Str");
  RiffFile riff=new RiffFile(archiveFile);
  riff.read();
  Chunk plot=null;
  for (  Chunk p : ((ChunkContainer)riff).getChunks()) {
    if ("String_Node_Str".equals(p.getIdentifier())) {
      plot=p;
      break;
    }
  }
  display(riff);
}

Fixed version (ground truth):
public static void main(String... args) throws IOException {
  PrintStream log=System.out;
  MixmeisterPlaylist mmp=MixmeisterPlaylist.open(new File("String_Node_Str"));
  log.println(mmp);
  Track track=mmp.getTracks().get(0);
  String trackId=track.getHeader().getArchiveKey();
  System.out.println(trackId);
  File archiveFile=new File("String_Node_Str" + trackId + "String_Node_Str");
  RiffFile riff=new RiffFile(archiveFile);
  riff.read();
  Chunk plot=null;
  for (  Chunk p : ((ChunkContainer)riff).getChunks()) {
    if ("String_Node_Str".equalsIgnoreCase(p.getIdentifier())) {
      plot=p;
      break;
    }
  }
  System.out.println(plot);
  display(riff);
}
Program: 184274
Project: 184274
Buggy source:
@Deployment public static WebArchive createDeployment(){
  WebArchive war=ShrinkWrap.create(WebArchive.class,"String_Node_Str").addClass(AddressAgentTest.class).addClasses(AddressMock.class,AddressOperation.class,Address.class).addAsLibraries(SOLDER).addAsWebInfResource("String_Node_Str","String_Node_Str").addAsWebInfResource("String_Node_Str","String_Node_Str").addAsWebInfResource(EmptyAsset.INSTANCE,"String_Node_Str");
  System.out.println(war.toString(true));
  return war;
}

Fixed version (ground truth):
@Deployment public static WebArchive createDeployment(){
  WebArchive war=ShrinkWrap.create(WebArchive.class,"String_Node_Str").addClass(AddressAgentTest.class).addClasses(AddressMock.class,AddressOperation.class,Address.class).addClasses(Address_.class).addAsLibraries(SOLDER).addAsWebInfResource("String_Node_Str","String_Node_Str").addAsWebInfResource("String_Node_Str","String_Node_Str").addAsWebInfResource(EmptyAsset.INSTANCE,"String_Node_Str");
  System.out.println(war.toString(true));
  return war;
}
Program: 184275
Project: 184275
Buggy source:
@Deployment public static WebArchive createDeployment(){
  return ShrinkWrap.create(WebArchive.class,"String_Node_Str").addPackages(true,DataContainer.class.getPackage()).addAsLibraries(ALL).addAsWebInfResource("String_Node_Str","String_Node_Str").addAsWebInfResource(EmptyAsset.INSTANCE,"String_Node_Str");
}

Fixed version (ground truth):
@Deployment public static WebArchive createDeployment(){
  return ShrinkWrap.create(WebArchive.class,"String_Node_Str").addPackages(true,DataContainer.class.getPackage()).addAsLibraries(INTERNATIONAL).addAsLibraries(FACES).addAsLibraries(SOLDER).addAsWebInfResource("String_Node_Str","String_Node_Str").addAsWebInfResource("String_Node_Str","String_Node_Str").addAsWebInfResource(EmptyAsset.INSTANCE,"String_Node_Str");
}
Program: 184276
Project: 184276
Buggy source:
@Deployment public static WebArchive createDeployment(){
  return ShrinkWrap.create(WebArchive.class,"String_Node_Str").addPackages(true,DataContainer.class.getPackage()).addAsLibraries(JAVAEE).addAsLibraries(SOLDER).addAsLibraries(INTERNATIONAL).addAsLibraries(RICHFACES).addAsWebInfResource("String_Node_Str","String_Node_Str").addAsWebInfResource(EmptyAsset.INSTANCE,"String_Node_Str");
}

Fixed version (ground truth):
@Deployment public static WebArchive createDeployment(){
  return ShrinkWrap.create(WebArchive.class,"String_Node_Str").addPackages(true,DataContainer.class.getPackage()).addAsLibraries(INTERNATIONAL).addAsLibraries(FACES).addAsLibraries(SOLDER).addAsWebInfResource("String_Node_Str","String_Node_Str").addAsWebInfResource("String_Node_Str","String_Node_Str").addAsWebInfResource(EmptyAsset.INSTANCE,"String_Node_Str");
}
Program: 184277
Project: 184277
Buggy source:
@Deployment public static WebArchive createDeployment(){
  return ShrinkWrap.create(WebArchive.class,"String_Node_Str").addPackages(true,DataContainer.class.getPackage()).addAsLibraries(JAVAEE).addAsLibraries(SOLDER).addAsLibraries(INTERNATIONAL).addAsLibraries(RICHFACES).addAsWebInfResource("String_Node_Str","String_Node_Str").addAsWebInfResource(EmptyAsset.INSTANCE,"String_Node_Str");
}

Fixed version (ground truth):
@Deployment public static WebArchive createDeployment(){
  return ShrinkWrap.create(WebArchive.class,"String_Node_Str").addPackages(true,DataContainer.class.getPackage()).addAsLibraries(INTERNATIONAL).addAsLibraries(FACES).addAsLibraries(SOLDER).addAsWebInfResource("String_Node_Str","String_Node_Str").addAsWebInfResource("String_Node_Str","String_Node_Str").addAsWebInfResource(EmptyAsset.INSTANCE,"String_Node_Str");
}
Program: 184278
Project: 184278
Buggy source:
@Deployment public static WebArchive createDeployment(){
  return ShrinkWrap.create(WebArchive.class,"String_Node_Str").addPackages(true,DataContainer.class.getPackage()).addAsLibraries(JAVAEE).addAsLibraries(SOLDER).addAsLibraries(INTERNATIONAL).addAsLibraries(RICHFACES).addAsWebInfResource("String_Node_Str","String_Node_Str").addAsWebInfResource(EmptyAsset.INSTANCE,"String_Node_Str");
}

Fixed version (ground truth):
@Deployment public static WebArchive createDeployment(){
  return ShrinkWrap.create(WebArchive.class,"String_Node_Str").addPackages(true,DataContainer.class.getPackage()).addAsLibraries(INTERNATIONAL).addAsLibraries(FACES).addAsLibraries(SOLDER).addAsWebInfResource("String_Node_Str","String_Node_Str").addAsWebInfResource("String_Node_Str","String_Node_Str").addAsWebInfResource(EmptyAsset.INSTANCE,"String_Node_Str");
}
Program: 184279
Project: 184279
Buggy source:
@Override public Article toObject(UIComponent arg0,String arg1){
  for (  Article article : articles)   if (article.getCode().equals(arg1))   return article;
  return null;
}

Fixed version (ground truth):
@Override public Article toObject(UIComponent arg0,String arg1){
  for (  Article article : articleAllSearch.getAllArticles())   if (article.getCode().equals(arg1))   return article;
  return null;
}
Program: 184280
Project: 184280
Buggy source:
@Override public Customer toObject(UIComponent arg0,String arg1){
  for (  Customer jar : customers)   if (jar.getCode().equals(arg1))   return jar;
  return null;
}

Fixed version (ground truth):
@Override public Customer toObject(UIComponent arg0,String arg1){
  for (  Customer jar : customerAllSearch.getAllCustomers())   if (jar.getCode().equals(arg1))   return jar;
  return null;
}
Program: 184281
Project: 184281
Buggy source:
@Override public Magazzino toObject(UIComponent arg0,String arg1){
  for (  Magazzino jar : jars)   if (jar.getNumber().equals(arg1))   return jar;
  return null;
}

Fixed version (ground truth):
@Override public Magazzino toObject(UIComponent arg0,String arg1){
  for (  Magazzino jar : magazzinoAllSearch.getAllJars())   if (jar.getNumber().equals(arg1))   return jar;
  return null;
}
Program: 184282
Project: 184282
Buggy source:
@Override public Receipt toObject(UIComponent arg0,String arg1){
  for (  Receipt receipt : receipts)   if (receipt.getNumber().equals(arg1))   return receipt;
  return null;
}

Fixed version (ground truth):
@Override public Receipt toObject(UIComponent arg0,String arg1){
  for (  Receipt receipt : receiptAllSearch.getAllReceipts())   if (receipt.getNumber().equals(arg1))   return receipt;
  return null;
}
Program: 184283
Project: 184283
Buggy source:
public void register(){
  if (verifyNumberIsAvailable()) {
    registered=true;
    em.persist(newReceipt);
    messages.info(new DefaultBundleKey("String_Node_Str")).defaults("String_Node_Str").params(newReceipt.getNumber());
    log.receiptConfirmed(newReceipt.getNumber(),newReceipt.getCause());
  }
 else {
    registrationInvalid=true;
  }
}

Fixed version (ground truth):
public void register(){
  if (verifyNumberIsAvailable()) {
    em.persist(newReceipt);
    registered=true;
    messages.info(new DefaultBundleKey("String_Node_Str")).defaults("String_Node_Str").params(newReceipt.getNumber());
    log.receiptConfirmed(newReceipt.getNumber(),newReceipt.getCause());
  }
 else {
    registrationInvalid=true;
  }
}
Program: 184284
Project: 184284
Buggy source:
@Override public String toString(){
  return "String_Node_Str" + code + "String_Node_Str";
}

Fixed version (ground truth):
@Override public String toString(){
  return description;
}
Program: 184285
Project: 184285
Buggy source:
@Override public String toString(){
  return "String_Node_Str" + code + "String_Node_Str";
}

Fixed version (ground truth):
@Override public String toString(){
  return ragSocial;
}
Program: 184286
Project: 184286
Buggy source:
private static int getMaxLeftDiagProd(int[][] grid){
  int product=1;
  int maxProduct=0;
  for (int r=0; r < grid.length - 4; r++) {
    for (int c=0; c < grid[r].length - 4; c++) {
      product*=grid[r][c];
      product*=grid[r + 1][c + 1];
      product*=grid[r + 2][c + 2];
      product*=grid[r + 3][c + 3];
      maxProduct=Math.max(product,maxProduct);
      product=1;
    }
  }
  return maxProduct;
}

Fixed version (ground truth):
private static int getMaxLeftDiagProd(int[][] grid){
  int product=1;
  int maxProduct=0;
  for (int r=0; r < grid.length - 3; r++) {
    for (int c=0; c < grid[r].length - 3; c++) {
      product*=grid[r][c];
      product*=grid[r + 1][c + 1];
      product*=grid[r + 2][c + 2];
      product*=grid[r + 3][c + 3];
      maxProduct=Math.max(product,maxProduct);
      product=1;
    }
  }
  return maxProduct;
}
Program: 184287
Project: 184287
Buggy source:
private static int getMaxRightDiagProd(int[][] grid){
  int product=1;
  int maxProduct=0;
  for (int r=grid.length - 1; r > 4; r--) {
    for (int c=grid[r].length - 1; c > 4; c--) {
      product*=grid[r][c];
      product*=grid[r - 1][c - 1];
      product*=grid[r - 2][c - 2];
      product*=grid[r - 3][c - 3];
      maxProduct=Math.max(product,maxProduct);
      product=1;
    }
  }
  return maxProduct;
}

Fixed version (ground truth):
private static int getMaxRightDiagProd(int[][] grid){
  int product=1;
  int maxProduct=0;
  for (int r=grid.length - 1; r > 2; r--) {
    for (int c=grid[r].length - 1; c > 2; c--) {
      product*=grid[r][c];
      product*=grid[r - 1][c - 1];
      product*=grid[r - 2][c - 2];
      product*=grid[r - 3][c - 3];
      maxProduct=Math.max(product,maxProduct);
      product=1;
    }
  }
  return maxProduct;
}
Program: 184289
Project: 184289
Buggy source:
private static int getMaxHorProd(int[][] grid){
  int product=1;
  int maxProduct=0;
  for (  int[] element : grid) {
    for (int c=0; c < element.length - 4; c++) {
      for (int i=c; i < c + 4; i++) {
        product*=element[i];
      }
      maxProduct=Math.max(product,maxProduct);
      product=1;
    }
  }
  return maxProduct;
}

Fixed version (ground truth):
private static int getMaxHorProd(int[][] grid){
  int product=1;
  int maxProduct=0;
  for (  int[] element : grid) {
    for (int c=0; c < element.length - 3; c++) {
      for (int i=c; i < c + 4; i++) {
        product*=element[i];
      }
      maxProduct=Math.max(product,maxProduct);
      product=1;
    }
  }
  return maxProduct;
}
Program: 184290
Project: 184290
Buggy source:
private static int getMaxVertProd(int[][] grid){
  int product=1;
  int maxProduct=0;
  for (int c=0; c < grid[0].length; c++) {
    for (int r=0; r < grid[c].length - 4; r++) {
      for (int i=r; i < r + 4; i++) {
        product*=grid[i][c];
      }
      maxProduct=Math.max(product,maxProduct);
      product=1;
    }
  }
  return maxProduct;
}

Fixed version (ground truth):
private static int getMaxVertProd(int[][] grid){
  int product=1;
  int maxProduct=0;
  for (int c=0; c < grid[0].length; c++) {
    for (int r=0; r < grid.length - 3; r++) {
      for (int i=r; i < r + 4; i++) {
        product*=grid[i][c];
      }
      maxProduct=Math.max(product,maxProduct);
      product=1;
    }
  }
  return maxProduct;
}
Program: 184291
Project: 184291
Buggy source:
/** 
 * @param args
 */
public static void main(String[] args){
  BigInteger number=BigInteger.valueOf(2L);
  number.pow(7830457);
  number.multiply(BigInteger.valueOf(28433L));
  number.add(BigInteger.valueOf(1L));
  String result=number.toString();
  System.out.println(result.substring(result.length() - 11));
}

Fixed version (ground truth):
/** 
 * @param args
 */
public static void main(String[] args){
  BigInteger number=BigInteger.valueOf(2L);
  number=number.pow(7830457);
  number=number.multiply(BigInteger.valueOf(28433L));
  number=number.add(BigInteger.ONE);
  String result=number.toString();
  System.out.println(result.length());
  System.out.println(result.substring(result.length() - 11));
}
Program: 184292
Project: 184292
Buggy source:
private static int getMaxLeftDiagProd(int[][] grid){
  int product=1;
  int maxProduct=0;
  for (int r=0; r < grid.length - 3; r++) {
    for (int c=0; c < grid[r].length - 3; c++) {
      product*=grid[r][c];
      product*=grid[r + 1][c + 1];
      product*=grid[r + 2][c + 2];
      product*=grid[r + 3][c + 3];
      maxProduct=Math.max(product,maxProduct);
      product=1;
    }
  }
  return maxProduct;
}

Fixed version (ground truth):
/** 
 * diagonal that is NW -> SE
 * @param grid
 * @return
 */
private static int getMaxLeftDiagProd(int[][] grid){
  int product=1;
  int maxProduct=0;
  for (int r=0; r <= grid.length - 4; r++) {
    for (int c=0; c <= grid[r].length - 4; c++) {
      product*=grid[r][c];
      product*=grid[r + 1][c + 1];
      product*=grid[r + 2][c + 2];
      product*=grid[r + 3][c + 3];
      maxProduct=Math.max(product,maxProduct);
      product=1;
    }
  }
  return maxProduct;
}
Program: 184293
Project: 184293
Buggy source:
private static int getMaxRightDiagProd(int[][] grid){
  int product=1;
  int maxProduct=0;
  for (int r=grid.length - 1; r > 2; r--) {
    for (int c=grid[r].length - 1; c > 2; c--) {
      product*=grid[r][c];
      product*=grid[r - 1][c - 1];
      product*=grid[r - 2][c - 2];
      product*=grid[r - 3][c - 3];
      maxProduct=Math.max(product,maxProduct);
      product=1;
    }
  }
  return maxProduct;
}

Fixed version (ground truth):
/** 
 * diagonal that is NE -> SW
 * @param grid
 * @return
 */
private static int getMaxRightDiagProd(int[][] grid){
  int product=1;
  int maxProduct=0;
  for (int r=3; r <= grid.length - 1; r++) {
    for (int c=0; c <= grid[r].length - 4; c++) {
      product*=grid[r][c];
      product*=grid[r - 1][c + 1];
      product*=grid[r - 2][c + 2];
      product*=grid[r - 3][c + 3];
      maxProduct=Math.max(product,maxProduct);
      product=1;
    }
  }
  return maxProduct;
}
Program: 184295
Project: 184295
Buggy source:
private static int getMaxHorProd(int[][] grid){
  int product=1;
  int maxProduct=0;
  for (  int[] element : grid) {
    for (int c=0; c < element.length - 3; c++) {
      for (int i=c; i < c + 4; i++) {
        product*=element[i];
      }
      maxProduct=Math.max(product,maxProduct);
      product=1;
    }
  }
  return maxProduct;
}

Fixed version (ground truth):
private static int getMaxHorProd(int[][] grid){
  int product=1;
  int maxProduct=0;
  for (  int[] element : grid) {
    for (int c=0; c <= element.length - 4; c++) {
      product*=element[c];
      product*=element[c + 1];
      product*=element[c + 2];
      product*=element[c + 3];
      maxProduct=Math.max(product,maxProduct);
      product=1;
    }
  }
  return maxProduct;
}
Program: 184296
Project: 184296
Buggy source:
private static int getMaxVertProd(int[][] grid){
  int product=1;
  int maxProduct=0;
  for (int c=0; c < grid[0].length; c++) {
    for (int r=0; r < grid.length - 3; r++) {
      for (int i=r; i < r + 4; i++) {
        product*=grid[i][c];
      }
      maxProduct=Math.max(product,maxProduct);
      product=1;
    }
  }
  return maxProduct;
}

Fixed version (ground truth):
private static int getMaxVertProd(int[][] grid){
  int product=1;
  int maxProduct=0;
  for (int c=0; c < grid[0].length; c++) {
    for (int r=0; r < grid.length - 3; r++) {
      product*=grid[r][c];
      product*=grid[r + 1][c];
      product*=grid[r + 2][c];
      product*=grid[r + 3][c];
      maxProduct=Math.max(product,maxProduct);
      product=1;
    }
  }
  return maxProduct;
}
Program: 184297
Project: 184297
Buggy source:
/** 
 * @param args
 */
public static void main(String[] args){
  try {
    System.setOut(new PrintStream(new File("String_Node_Str")));
  }
 catch (  FileNotFoundException e) {
    e.printStackTrace();
  }
  int maxChainLength=0;
  int maxChainStart=0;
  int chainLength=0;
  ArrayList<Integer> chain;
  for (int i=999999; i > 0; i--) {
    chain=getChain(i);
    System.out.println(chain);
    chainLength=chain.size();
    if (chainLength >= maxChainLength) {
      maxChainStart=i;
      maxChainLength=chainLength;
    }
  }
  System.err.println(maxChainStart + "String_Node_Str" + maxChainLength);
}

Fixed version (ground truth):
/** 
 * @param args
 */
public static void main(String[] args){
  int maxChainLength=0;
  int maxChainStart=0;
  int chainLength=0;
  ArrayList<Integer> chain;
  for (int i=999999; i > 0; i--) {
    chain=getChain(i);
    chainLength=chain.size();
    System.out.println(String.format("String_Node_Str",maxChainLength,chainLength,i));
    if (chainLength >= maxChainLength) {
      maxChainStart=i;
      maxChainLength=chainLength;
    }
  }
  System.err.println(maxChainStart + "String_Node_Str" + maxChainLength);
}
Program: 184300
Project: 184300
Buggy source:
public static String md5(String in){
  MessageDigest digest;
  try {
    digest=MessageDigest.getInstance("String_Node_Str");
    digest.reset();
    digest.update(in.getBytes());
    byte messageDigest[]=digest.digest();
    StringBuffer hexString=new StringBuffer();
    for (int i=0; i < messageDigest.length; i++)     hexString.append(Integer.toHexString(0xFF & messageDigest[i]));
    return hexString.toString();
  }
 catch (  NoSuchAlgorithmException e) {
    e.printStackTrace();
  }
  return null;
}

Fixed version (ground truth):
public static Hex md5(String in){
  MessageDigest digest;
  try {
    digest=MessageDigest.getInstance("String_Node_Str");
    digest.reset();
    digest.update(in.getBytes());
    byte messageDigest[]=digest.digest();
    return new Hex(messageDigest);
  }
 catch (  NoSuchAlgorithmException e) {
    e.printStackTrace();
  }
  return null;
}
Program: 184301
Project: 184301
Buggy source:
public Hex(byte[] input){
  int len=input.length;
  StringBuilder sb=new StringBuilder(len << 1);
  for (int i=0; i < len; i++) {
    sb.append(Character.forDigit((input[i] & 0xf0) >> 4,16));
    sb.append(Character.forDigit((input[i] & 0x0f),16));
  }
  hex=sb.toString();
}

Fixed version (ground truth):
public Hex(byte[] input){
  int len=input.length;
  StringBuilder sb=new StringBuilder(len << 1);
  for (int i=0; i < len; i++) {
    sb.append(Character.forDigit((input[i] & 0xf0) >> 4,16));
    sb.append(Character.forDigit(input[i] & 0x0f,16));
  }
  hex=sb.toString();
}
Program: 184303
Project: 184303
Buggy source:
public boolean add(String k){
  if (top == null) {
    top=cell(k,null,null);
    return true;
  }
  Cell s=splay(top,k);
  Iterator snapShot=new snapShotIterator();
  while (snapShot.hasNext() && snapShot.key.compareTo(k) != 0) {
  }
  return false;
  throw new RuntimeException("String_Node_Str");
}

Fixed version (ground truth):
public boolean add(String k){
  if (top == null) {
    top=cell(k,null,null);
    return true;
  }
  Cell s=splay(top,k);
  Iterator snapShot=snapShotIterator();
  throw new RuntimeException("String_Node_Str");
}
Program: 184304
Project: 184304
Buggy source:
@Override public Resource resolve(String path){
  if (log.isTraceEnabled()) {
    log.trace("String_Node_Str" + path);
  }
  String[] paths=path.split("String_Node_Str");
  String typeName=null;
switch (paths.length) {
case 5:
    return makeResouce(paths[ATTACHTO_TYPENAME],paths[ATTACHTO_ID],paths[ATTACH_TYPENAME]);
case 4:
  typeName=paths[TYPENAME];
if ("String_Node_Str".equals(typeName)) {
  return makeTypeResouce(typeName,paths[ID]);
}
 else {
  return makeResouce(typeName,paths[ID]);
}
case 3:
typeName=paths[TYPENAME];
if ("String_Node_Str".equals(typeName)) {
return makeTypeResouce(typeName);
}
 else {
return makeResouce(typeName);
}
default :
return null;
}
}

Fixed version (ground truth):
@Override public Resource resolve(String path){
  if (log.isTraceEnabled()) {
    log.trace("String_Node_Str" + path);
  }
  String[] paths=path.split("String_Node_Str");
  String typeName=null;
switch (paths.length) {
case 5:
    return makeAttachedEntityListResouce(paths[ATTACHTO_TYPENAME],paths[ATTACHTO_ID],paths[ATTACH_TYPENAME]);
case 4:
  typeName=paths[TYPENAME];
if ("String_Node_Str".equalsIgnoreCase(paths[ID])) {
  return makeEntityNewResouce(typeName);
}
if ("String_Node_Str".equals(typeName)) {
return makeTypeResouce(typeName,paths[ID]);
}
 else {
return makeEntityResouce(typeName,paths[ID]);
}
case 3:
typeName=paths[TYPENAME];
if ("String_Node_Str".equals(typeName)) {
return makeTypeResouce(typeName);
}
 else {
return makeEntityListResouce(typeName);
}
default :
return null;
}
}
Program: 184305
Project: 184305
Buggy source:
public EntityResouce(Broker<DataHelper<Entity,Reader,Writer>> json,Broker<DataStore<Entity>> datas,String key){
  super("String_Node_Str",0,0);
  this.jsonHolder=json;
  this.datastoreHolder=datas;
  this.key=key;
}

Fixed version (ground truth):
public EntityResouce(Broker<DataHelper<Entity,Reader,Writer>> json,Broker<DataStore<Entity>> datas,String key){
  super("String_Node_Str",1,1);
  this.jsonHolder=json;
  this.datastoreHolder=datas;
  this.key=key;
}
Program: 184306
Project: 184306
Buggy source:
protected void unlink(Type topType){
  for (  Type oldType : topType.subTypes) {
    for (    Field f : oldType.fields) {
      f.type.references.remove(f);
      if (f.attrs.containsKey(Type.ATTACH_TO)) {
        f.type.attachedBy.remove(oldType);
      }
    }
  }
}

Fixed version (ground truth):
protected void unlink(Type topType){
  for (  Field f : topType.fields) {
    f.type.references.remove(f);
    if (f.attrs.containsKey(Type.ATTACH)) {
      f.type.attachedBy.remove(topType);
    }
  }
  for (  Type oldType : topType.subTypes) {
    for (    Field f : oldType.fields) {
      f.type.references.remove(f);
      if (f.attrs.containsKey(Type.ATTACH)) {
        f.type.attachedBy.remove(oldType);
      }
    }
  }
}
Program: 184307
Project: 184307
Buggy source:
public EntityAction compile(CompilerContext context,Type type,String actionName,Code code){
  String name=type.name + "String_Node_Str" + NamesEncoding.encode(actionName)+ "String_Node_Str"+ String.valueOf(count++);
  try {
    byte[] b=this.doCompile(name,code,context);
    if (log.isDebugEnabled()) {
      try {
        FileOutputStream fos=new FileOutputStream("String_Node_Str" + name + "String_Node_Str");
        fos.write(b);
        fos.close();
      }
 catch (      FileNotFoundException e) {
        log.error(e);
        throw new RuntimeException(e);
      }
catch (      IOException e) {
        log.error(e);
        throw new RuntimeException(e);
      }
    }
    Class<?> expClass=NebulaClassLoader.defineClass(name,b);
    EntityAction expr=(EntityAction)expClass.newInstance();
    return expr;
  }
 catch (  ClassFormatError e) {
    throw new RuntimeException(e);
  }
catch (  InstantiationException e) {
    throw new RuntimeException(e);
  }
catch (  IllegalAccessException e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
public EntityAction compile(CompilerContext context,Type type,String actionName,Code code){
  if (code instanceof Compiler.Block && ((Compiler.Block)code).statements.size() == 0) {
    return this.noop;
  }
  String name=this.getClass().getSimpleName() + "String_Node_Str" + type.name+ "String_Node_Str"+ NamesEncoding.encode(actionName)+ "String_Node_Str"+ String.valueOf(count++);
  try {
    byte[] b=this.doCompile(name,code,context);
    if (log.isDebugEnabled()) {
      try {
        FileOutputStream fos=new FileOutputStream("String_Node_Str" + name + "String_Node_Str");
        fos.write(b);
        fos.close();
      }
 catch (      FileNotFoundException e) {
        log.error(e);
        throw new RuntimeException(e);
      }
catch (      IOException e) {
        log.error(e);
        throw new RuntimeException(e);
      }
    }
    Class<?> expClass=NebulaClassLoader.defineClass(name,b);
    EntityAction expr=(EntityAction)expClass.newInstance();
    return expr;
  }
 catch (  ClassFormatError e) {
    throw new RuntimeException(e);
  }
catch (  InstantiationException e) {
    throw new RuntimeException(e);
  }
catch (  IllegalAccessException e) {
    throw new RuntimeException(e);
  }
}