nus-yam/ex-repair huggingface dataset:
Program: 38858
Project: 38858
Buggy source:
public static BinaryAcknowledge fromEncodedMessage(EncodedAISMessage encodedMessage){
  if (!encodedMessage.isValid())   throw new InvalidEncodedMessage(encodedMessage);
  if (!encodedMessage.getMessageType().equals(AISMessageType.BinaryAcknowledge))   throw new UnsupportedMessageType(encodedMessage.getMessageType().getCode());
  Integer repeatIndicator=DecoderImpl.convertToUnsignedInteger(encodedMessage.getBits(6,8));
  MMSI sourceMmsi=MMSI.valueOf(DecoderImpl.convertToUnsignedLong(encodedMessage.getBits(8,38)));
  MMSI mmsi1=MMSI.valueOf(DecoderImpl.convertToUnsignedLong(encodedMessage.getBits(40,70)));
  MMSI mmsi2=MMSI.valueOf(DecoderImpl.convertToUnsignedLong(encodedMessage.getBits(72,102)));
  MMSI mmsi3=MMSI.valueOf(DecoderImpl.convertToUnsignedLong(encodedMessage.getBits(104,134)));
  MMSI mmsi4=MMSI.valueOf(DecoderImpl.convertToUnsignedLong(encodedMessage.getBits(136,166)));
  return new BinaryAcknowledge(repeatIndicator,sourceMmsi,mmsi1,mmsi2,mmsi3,mmsi4);
}

Fixed version (ground truth):
public static BinaryAcknowledge fromEncodedMessage(EncodedAISMessage encodedMessage){
  if (!encodedMessage.isValid())   throw new InvalidEncodedMessage(encodedMessage);
  if (!encodedMessage.getMessageType().equals(AISMessageType.BinaryAcknowledge))   throw new UnsupportedMessageType(encodedMessage.getMessageType().getCode());
  Integer repeatIndicator=DecoderImpl.convertToUnsignedInteger(encodedMessage.getBits(6,8));
  MMSI sourceMmsi=MMSI.valueOf(DecoderImpl.convertToUnsignedLong(encodedMessage.getBits(8,38)));
  int spare=DecoderImpl.convertToUnsignedInteger(encodedMessage.getBits(38,40));
  MMSI mmsi1=MMSI.valueOf(DecoderImpl.convertToUnsignedLong(encodedMessage.getBits(40,70)));
  int sequence1=DecoderImpl.convertToUnsignedInteger(encodedMessage.getBits(70,72));
  int numOfAcks=1;
  MMSI mmsi2=null;
  int sequence2=0;
  if (encodedMessage.getNumberOfBits() > 72) {
    mmsi2=MMSI.valueOf(DecoderImpl.convertToUnsignedLong(encodedMessage.getBits(72,102)));
    sequence2=DecoderImpl.convertToUnsignedInteger(encodedMessage.getBits(102,104));
    numOfAcks++;
  }
  MMSI mmsi3=null;
  int sequence3=0;
  if (encodedMessage.getNumberOfBits() > 104) {
    mmsi3=MMSI.valueOf(DecoderImpl.convertToUnsignedLong(encodedMessage.getBits(104,134)));
    sequence3=DecoderImpl.convertToUnsignedInteger(encodedMessage.getBits(134,136));
    numOfAcks++;
  }
  MMSI mmsi4=null;
  int sequence4=0;
  if (encodedMessage.getNumberOfBits() > 136) {
    mmsi4=MMSI.valueOf(DecoderImpl.convertToUnsignedLong(encodedMessage.getBits(136,166)));
    sequence4=DecoderImpl.convertToUnsignedInteger(encodedMessage.getBits(166,168));
    numOfAcks++;
  }
  return new BinaryAcknowledge(repeatIndicator,sourceMmsi,spare,mmsi1,sequence1,mmsi2,sequence2,mmsi3,sequence3,mmsi4,sequence4,numOfAcks);
}
Program: 38859
Project: 38859
Buggy source:
public GNSSBinaryBroadcastMessage(Integer repeatIndicator,MMSI sourceMmsi,Float latitude,Float longitude,String binaryData){
  super(AISMessageType.GNSSBinaryBroadcastMessage,repeatIndicator,sourceMmsi);
  this.latitude=latitude;
  this.longitude=longitude;
  this.binaryData=binaryData;
}

Fixed version (ground truth):
public GNSSBinaryBroadcastMessage(Integer repeatIndicator,MMSI sourceMmsi,int spare1,Float latitude,Float longitude,int spare2,int mType,int stationId,int zCount,int sequenceNumber,int numOfWords,int health,String binaryData){
  super(AISMessageType.GNSSBinaryBroadcastMessage,repeatIndicator,sourceMmsi);
  this.spare1=spare1;
  this.latitude=latitude;
  this.longitude=longitude;
  this.spare2=spare2;
  this.mType=mType;
  this.stationId=stationId;
  this.zCount=zCount;
  this.sequenceNumber=sequenceNumber;
  this.numOfWords=numOfWords;
  this.health=health;
  this.binaryData=binaryData;
}
Program: 38860
Project: 38860
Buggy source:
public static GNSSBinaryBroadcastMessage fromEncodedMessage(EncodedAISMessage encodedMessage){
  if (!encodedMessage.isValid())   throw new InvalidEncodedMessage(encodedMessage);
  if (!encodedMessage.getMessageType().equals(AISMessageType.GNSSBinaryBroadcastMessage))   throw new UnsupportedMessageType(encodedMessage.getMessageType().getCode());
  Integer repeatIndicator=DecoderImpl.convertToUnsignedInteger(encodedMessage.getBits(6,8));
  MMSI sourceMmsi=MMSI.valueOf(DecoderImpl.convertToUnsignedLong(encodedMessage.getBits(8,38)));
  Float longitude=DecoderImpl.convertToFloat(encodedMessage.getBits(40,58)) / 10f;
  Float latitude=DecoderImpl.convertToFloat(encodedMessage.getBits(58,75)) / 10f;
  String binaryData=DecoderImpl.convertToBitString(encodedMessage.getBits(80,816));
  return new GNSSBinaryBroadcastMessage(repeatIndicator,sourceMmsi,latitude,longitude,binaryData);
}

Fixed version (ground truth):
public static GNSSBinaryBroadcastMessage fromEncodedMessage(EncodedAISMessage encodedMessage){
  if (!encodedMessage.isValid())   throw new InvalidEncodedMessage(encodedMessage);
  if (!encodedMessage.getMessageType().equals(AISMessageType.GNSSBinaryBroadcastMessage))   throw new UnsupportedMessageType(encodedMessage.getMessageType().getCode());
  Integer repeatIndicator=DecoderImpl.convertToUnsignedInteger(encodedMessage.getBits(6,8));
  MMSI sourceMmsi=MMSI.valueOf(DecoderImpl.convertToUnsignedLong(encodedMessage.getBits(8,38)));
  int spare1=DecoderImpl.convertToUnsignedInteger(encodedMessage.getBits(38,40));
  Float longitude=DecoderImpl.convertToFloat(encodedMessage.getBits(40,58)) / 10f;
  Float latitude=DecoderImpl.convertToFloat(encodedMessage.getBits(58,75)) / 10f;
  int spare2=DecoderImpl.convertToUnsignedInteger(encodedMessage.getBits(75,80));
  int mType=0;
  int stationId=0;
  int zCount=0;
  int sequenceNumber=0;
  int numOfWords=0;
  int health=0;
  if (encodedMessage.getNumberOfBits() > 80) {
    mType=DecoderImpl.convertToUnsignedInteger(encodedMessage.getBits(80,86));
    stationId=DecoderImpl.convertToUnsignedInteger(encodedMessage.getBits(86,96));
    zCount=DecoderImpl.convertToUnsignedInteger(encodedMessage.getBits(96,109));
    sequenceNumber=DecoderImpl.convertToUnsignedInteger(encodedMessage.getBits(109,112));
    numOfWords=DecoderImpl.convertToUnsignedInteger(encodedMessage.getBits(112,117));
    health=DecoderImpl.convertToUnsignedInteger(encodedMessage.getBits(117,120));
  }
  String binaryData=DecoderImpl.convertToBitString(encodedMessage.getBits(80,encodedMessage.getNumberOfBits()));
  return new GNSSBinaryBroadcastMessage(repeatIndicator,sourceMmsi,spare1,latitude,longitude,spare2,mType,stationId,zCount,sequenceNumber,numOfWords,health,binaryData);
}
Program: 38861
Project: 38861
Buggy source:
private void removeTag(final Dtos.TaskTag tag){
  filterObject.remove(tag);
  tagsFilter.remove(new PanelWithCheckboxes.Predicate(){
    @Override public boolean toRemove(    FilterCheckBox w){
      Dtos.TaskTag candidate=(Dtos.TaskTag)w.getEntity();
      return objEq(candidate.getName(),tag.getName());
    }
  }
);
}

Fixed version (ground truth):
private void removeTag(final Dtos.TaskTag tag){
  filterObject.deleteFromStorage(tag);
  tagsFilter.remove(new PanelWithCheckboxes.Predicate(){
    @Override public boolean toRemove(    FilterCheckBox w){
      Dtos.TaskTag candidate=(Dtos.TaskTag)w.getEntity();
      return objEq(candidate.getName(),tag.getName());
    }
  }
);
  filterObject.storeFilterData();
}
Program: 38862
Project: 38862
Buggy source:
private TaskTagsManager(){
  AddedEditedListener addedEditedListener=new AddedEditedListener();
  MessageBus.registerListener(TaskAddedMessage.class,addedEditedListener);
  MessageBus.registerListener(TaskEditedMessage.class,addedEditedListener);
  MessageBus.registerListener(TaskDeletedMessage.class,new RemovedListener());
}

Fixed version (ground truth):
private TaskTagsManager(){
  AddedOrEditedListener addedOrEditedListener=new AddedOrEditedListener();
  MessageBus.registerListener(TaskAddedMessage.class,addedOrEditedListener);
  MessageBus.registerListener(TaskEditedMessage.class,addedOrEditedListener);
  MessageBus.registerListener(TaskDeletedMessage.class,new RemovedListener());
}
Program: 38863
Project: 38863
Buggy source:
List<Filtered<BoardWithProjectsDto>> getBoardWithProjectsDto();

Fixed version (ground truth):
List<BoardWithProjectsWithSelectedDto> getBoardWithProjectsDto();
Program: 38864
Project: 38864
Buggy source:
void setUsers(List<Dtos.Filtered<Dtos.UserDto>> users);

Fixed version (ground truth):
void setUsers(List<UserWithSelectedDto> users);
Program: 38865
Project: 38865
Buggy source:
List<Dtos.Filtered<Dtos.UserDto>> getUsers();

Fixed version (ground truth):
List<UserWithSelectedDto> getUsers();
Program: 38866
Project: 38866
Buggy source:
void setBoardWithProjectsDto(List<Filtered<BoardWithProjectsDto>> boardWithProjectsDto);

Fixed version (ground truth):
void setBoardWithProjectsDto(List<BoardWithProjectsWithSelectedDto> boardWithProjectsDto);
Program: 38867
Project: 38867
Buggy source:
void setBoards(List<Filtered<BoardDto>> boards);

Fixed version (ground truth):
void setBoards(List<BoardWithSelectedDto> boards);
Program: 38868
Project: 38868
Buggy source:
void setClassesOfServices(List<Filtered<Dtos.ClassOfServiceDto>> classesOfServices);

Fixed version (ground truth):
void setClassesOfServices(List<ClassOfServiceWithSelectedDto> classesOfServices);
Program: 38869
Project: 38869
Buggy source:
List<Filtered<Dtos.ClassOfServiceDto>> getClassesOfServices();

Fixed version (ground truth):
List<ClassOfServiceWithSelectedDto> getClassesOfServices();
Program: 38870
Project: 38870
Buggy source:
List<Filtered<BoardDto>> getBoards();

Fixed version (ground truth):
List<BoardWithSelectedDto> getBoards();
Program: 38871
Project: 38871
Buggy source:
@Override public void messageArrived(Message<BoardsFilter> message){
  List<Dtos.Filtered<Dtos.BoardDto>> visibleBoards=message.getPayload().getFilterDataDto().getBoards();
  setVisible(false);
  if (visibleBoards == null || visibleBoards.size() == 0) {
    return;
  }
  for (  Dtos.Filtered<Dtos.BoardDto> visibleBoard : visibleBoards) {
    if (visibleBoard.getData().getId().equals(boardDto.getId())) {
      setVisible(true);
      break;
    }
  }
}

Fixed version (ground truth):
@Override public void messageArrived(Message<BoardsFilter> message){
  List<Dtos.BoardWithSelectedDto> visibleBoards=message.getPayload().getFilterDataDto().getBoards();
  setVisible(false);
  if (visibleBoards == null || visibleBoards.size() == 0) {
    return;
  }
  for (  Dtos.BoardWithSelectedDto visibleBoard : visibleBoards) {
    if (!visibleBoard.isSelected()) {
      continue;
    }
    if (visibleBoard.getBoard().getId().equals(boardDto.getId())) {
      setVisible(true);
      break;
    }
  }
}
Program: 38872
Project: 38872
Buggy source:
public void add(Dtos.BoardWithProjectsDto entity){
  int id=findById(entity);
  if (id == -1) {
    filterDataDto.getBoardWithProjectsDto().add(DtoFactory.filtered(entity,true));
  }
}

Fixed version (ground truth):
public void add(Dtos.BoardWithProjectsDto entity){
  int id=findById(entity);
  if (id == -1) {
    filterDataDto.getBoardWithProjectsDto().add(DtoFactory.withSelected(entity,true));
  }
 else {
    filterDataDto.getBoardWithProjectsDto().get(id).setSelected(true);
  }
}
Program: 38873
Project: 38873
Buggy source:
public boolean taskMatches(Dtos.TaskDto task){
  List<Dtos.FilteredEntity> filteredEntities=filterDataDto.getFullTextFilter().getFilteredEntities();
  if (filteredEntities != null && filteredEntities.size() != 0) {
    boolean matches=false;
    if (filteredEntities.contains(Dtos.FilteredEntity.SHORT_DESCRIPTION)) {
      if (stringMatches(filterDataDto.getFullTextFilter(),task.getName())) {
        matches=true;
      }
    }
    if (!matches && filteredEntities.contains(Dtos.FilteredEntity.LONG_DESCRIPTION)) {
      if (stringMatches(filterDataDto.getFullTextFilter(),new HTML(task.getDescription()).getText())) {
        matches=true;
      }
    }
    if (!matches && filteredEntities.contains(Dtos.FilteredEntity.TICKET_ID)) {
      if (stringMatches(filterDataDto.getFullTextFilter(),task.getTicketId())) {
        matches=true;
      }
    }
    if (!matches) {
      return false;
    }
  }
  if (!checkDueDates(task)) {
    return false;
  }
  boolean classOfServiceMatches=(task.getClassOfService() != null && findById(task.getClassOfService()) != -1);
  if (!classOfServiceMatches) {
    return false;
  }
  boolean userMatches=findById(task.getAssignee()) != -1;
  return userMatches;
}

Fixed version (ground truth):
public boolean taskMatches(Dtos.TaskDto task){
  List<Dtos.FilteredEntity> filteredEntities=filterDataDto.getFullTextFilter().getFilteredEntities();
  if (filteredEntities != null && filteredEntities.size() != 0) {
    boolean matches=false;
    if (filteredEntities.contains(Dtos.FilteredEntity.SHORT_DESCRIPTION)) {
      if (stringMatches(filterDataDto.getFullTextFilter(),task.getName())) {
        matches=true;
      }
    }
    if (!matches && filteredEntities.contains(Dtos.FilteredEntity.LONG_DESCRIPTION)) {
      if (stringMatches(filterDataDto.getFullTextFilter(),new HTML(task.getDescription()).getText())) {
        matches=true;
      }
    }
    if (!matches && filteredEntities.contains(Dtos.FilteredEntity.TICKET_ID)) {
      if (stringMatches(filterDataDto.getFullTextFilter(),task.getTicketId())) {
        matches=true;
      }
    }
    if (!matches) {
      return false;
    }
  }
  if (!checkDueDates(task)) {
    return false;
  }
  int classOfServicePosition=task.getClassOfService() == null ? -1 : findById(task.getClassOfService());
  boolean classOfServiceMatches=task.getClassOfService() != null && classOfServicePosition != -1 && filterDataDto.getClassesOfServices().get(classOfServicePosition).isSelected();
  if (!classOfServiceMatches) {
    return false;
  }
  int assigneePosition=findById(task.getAssignee());
  boolean userMatches=assigneePosition != -1 && filterDataDto.getUsers().get(assigneePosition).isSelected();
  return userMatches;
}
Program: 38874
Project: 38874
Buggy source:
public boolean projectOnBoardMatches(Dtos.ProjectDto projectDto,Dtos.BoardDto boardDto){
  Dtos.BoardWithProjectsDto boardWithProjectsDto=DtoFactory.boardWithProjectsDto();
  boardWithProjectsDto.setBoard(boardDto);
  List<Dtos.ProjectDto> projects=new ArrayList<Dtos.ProjectDto>();
  projects.add(projectDto);
  boardWithProjectsDto.setProjectsOnBoard(DtoFactory.projectsDto(projects));
  return findById(boardWithProjectsDto) != -1;
}

Fixed version (ground truth):
public boolean projectOnBoardMatches(Dtos.ProjectDto projectDto,Dtos.BoardDto boardDto){
  Dtos.BoardWithProjectsDto boardWithProjectsDto=DtoFactory.boardWithProjectsDto();
  boardWithProjectsDto.setBoard(boardDto);
  List<Dtos.ProjectDto> projects=new ArrayList<Dtos.ProjectDto>();
  projects.add(projectDto);
  boardWithProjectsDto.setProjectsOnBoard(DtoFactory.projectsDto(projects));
  int projectOnBoardPosition=findById(boardWithProjectsDto);
  return projectOnBoardPosition != -1 && filterDataDto.getBoardWithProjectsDto().get(projectOnBoardPosition).isSelected();
}
Program: 38875
Project: 38875
Buggy source:
public void remove(Dtos.BoardWithProjectsDto entity){
  int id=findById(entity);
  if (id != -1) {
    filterDataDto.getBoardWithProjectsDto().get(id).setSelected(false);
  }
}

Fixed version (ground truth):
public void remove(Dtos.BoardWithProjectsDto entity){
  int id=findById(entity);
  if (id != -1) {
    filterDataDto.getBoardWithProjectsDto().get(id).setSelected(false);
  }
 else {
    filterDataDto.getBoardWithProjectsDto().add(DtoFactory.withSelected(entity,false));
  }
}
Program: 38876
Project: 38876
Buggy source:
public int findById(Dtos.BoardWithProjectsDto boardWithProjectsDto){
  int id=0;
  String boardId=boardWithProjectsDto.getBoard().getId();
  String projectId=boardWithProjectsDto.getProjectsOnBoard().getValues().get(0).getId();
  for (  Dtos.Filtered<Dtos.BoardWithProjectsDto> candidate : filterDataDto.getBoardWithProjectsDto()) {
    if (candidate.getData().getBoard().getId().equals(boardId) && candidate.getData().getProjectsOnBoard().getValues().get(0).getId().equals(projectId)) {
      return id;
    }
    id++;
  }
  return -1;
}

Fixed version (ground truth):
public int findById(Dtos.BoardWithProjectsDto boardWithProjectsDto){
  int id=0;
  String boardId=boardWithProjectsDto.getBoard().getId();
  String projectId=boardWithProjectsDto.getProjectsOnBoard().getValues().get(0).getId();
  for (  Dtos.BoardWithProjectsWithSelectedDto candidate : filterDataDto.getBoardWithProjectsDto()) {
    if (candidate.getBoardWithProjects().getBoard().getId().equals(boardId) && candidate.getBoardWithProjects().getProjectsOnBoard().getValues().get(0).getId().equals(projectId)) {
      return id;
    }
    id++;
  }
  return -1;
}
Program: 38877
Project: 38877
Buggy source:
public UserFilterCheckBox(Dtos.UserDto entity,BoardsFilter filter){
  super(entity,filter);
  setValue(filter.findById(entity) != -1);
}

Fixed version (ground truth):
public UserFilterCheckBox(Dtos.UserDto entity,BoardsFilter filter){
  super(entity,filter);
  setValue(filter.isSelected(entity));
}
Program: 38878
Project: 38878
Buggy source:
private boolean createFilterObject(){
  boolean loaded=true;
  filterObject=new BoardsFilter();
  Dtos.FilterDataDto filterDataDto=filterObject.loadFilterData();
  if (filterDataDto == null) {
    filterDataDto=DtoFactory.filterDataDto();
    filterDataDto.setFullTextFilter(DtoFactory.fullTextMatcherDataDto());
    List<Dtos.FilteredEntity> entities=new ArrayList<Dtos.FilteredEntity>();
    entities.add(Dtos.FilteredEntity.LONG_DESCRIPTION);
    entities.add(Dtos.FilteredEntity.SHORT_DESCRIPTION);
    filterDataDto.getFullTextFilter().setCaseSensitive(false);
    filterDataDto.getFullTextFilter().setInverse(false);
    filterDataDto.getFullTextFilter().setRegex(false);
    filterDataDto.getFullTextFilter().setString("String_Node_Str");
    filterDataDto.getFullTextFilter().setFilteredEntities(entities);
    filterDataDto.setClassesOfServices(new ArrayList<Dtos.Filtered<Dtos.ClassOfServiceDto>>());
    filterDataDto.setUsers(new ArrayList<Dtos.Filtered<Dtos.UserDto>>());
    filterDataDto.setBoards(new ArrayList<Dtos.Filtered<Dtos.BoardDto>>());
    filterDataDto.setBoardWithProjectsDto(new ArrayList<Dtos.Filtered<Dtos.BoardWithProjectsDto>>());
    Dtos.DateMatcherDataDto dueDateFilter=DtoFactory.dateMatcherDataDto();
    dueDateFilter.setCondition(0);
    dueDateFilter.setDateFrom("String_Node_Str");
    dueDateFilter.setDateTo("String_Node_Str");
    filterDataDto.setDueDate(dueDateFilter);
    loaded=false;
  }
  filterObject.setFilterDataDto(filterDataDto);
  return loaded;
}

Fixed version (ground truth):
private boolean createFilterObject(){
  boolean loaded=true;
  filterObject=new BoardsFilter();
  Dtos.FilterDataDto filterDataDto=filterObject.loadFilterData();
  if (filterDataDto == null) {
    filterDataDto=DtoFactory.filterDataDto();
    filterDataDto.setFullTextFilter(DtoFactory.fullTextMatcherDataDto());
    List<Dtos.FilteredEntity> entities=new ArrayList<Dtos.FilteredEntity>();
    entities.add(Dtos.FilteredEntity.LONG_DESCRIPTION);
    entities.add(Dtos.FilteredEntity.SHORT_DESCRIPTION);
    filterDataDto.getFullTextFilter().setCaseSensitive(false);
    filterDataDto.getFullTextFilter().setInverse(false);
    filterDataDto.getFullTextFilter().setRegex(false);
    filterDataDto.getFullTextFilter().setString("String_Node_Str");
    filterDataDto.getFullTextFilter().setFilteredEntities(entities);
    filterDataDto.setClassesOfServices(new ArrayList<Dtos.ClassOfServiceWithSelectedDto>());
    filterDataDto.setUsers(new ArrayList<Dtos.UserWithSelectedDto>());
    filterDataDto.setBoards(new ArrayList<Dtos.BoardWithSelectedDto>());
    filterDataDto.setBoardWithProjectsDto(new ArrayList<Dtos.BoardWithProjectsWithSelectedDto>());
    Dtos.DateMatcherDataDto dueDateFilter=DtoFactory.dateMatcherDataDto();
    dueDateFilter.setCondition(0);
    dueDateFilter.setDateFrom("String_Node_Str");
    dueDateFilter.setDateTo("String_Node_Str");
    filterDataDto.setDueDate(dueDateFilter);
    loaded=false;
  }
  filterObject.setFilterDataDto(filterDataDto);
  return loaded;
}
Program: 38879
Project: 38879
Buggy source:
public static <T>String asJson(T dto){
  AutoBean<T> bean=AutoBeanUtils.getAutoBean(dto);
  return "String_Node_Str" + URL.encodePathSegment(AutoBeanCodex.encode(bean).getPayload());
}

Fixed version (ground truth):
public static <T>String asJson(T dto){
  return "String_Node_Str" + URL.encodePathSegment(asRawJson(dto));
}
Program: 38880
Project: 38880
Buggy source:
private int findById(Dtos.BoardWithProjectsDto boardWithProjectsDto){
  int id=0;
  String boardId=boardWithProjectsDto.getBoard().getId();
  String projectId=boardWithProjectsDto.getProjectsOnBoard().getValues().get(0).getId();
  for (  Dtos.BoardWithProjectsDto candidate : filterDataDto.getBoardWithProjectsDto()) {
    if (candidate.getBoard().getId().equals(boardId) && candidate.getProjectsOnBoard().getValues().get(0).getId().equals(projectId)) {
      return id;
    }
    id++;
  }
  return -1;
}

Fixed version (ground truth):
public int findById(Dtos.BoardWithProjectsDto boardWithProjectsDto){
  int id=0;
  String boardId=boardWithProjectsDto.getBoard().getId();
  String projectId=boardWithProjectsDto.getProjectsOnBoard().getValues().get(0).getId();
  for (  Dtos.BoardWithProjectsDto candidate : filterDataDto.getBoardWithProjectsDto()) {
    if (candidate.getBoard().getId().equals(boardId) && candidate.getProjectsOnBoard().getValues().get(0).getId().equals(projectId)) {
      return id;
    }
    id++;
  }
  return -1;
}
Program: 38881
Project: 38881
Buggy source:
public boolean taskMatches(Dtos.TaskDto task){
  List<Dtos.FilteredEntity> filteredEntities=filterDataDto.getFullTextFilter().getFilteredEntities();
  if (filteredEntities != null && filteredEntities.size() != 0) {
    boolean matches=false;
    if (filteredEntities.contains(Dtos.FilteredEntity.SHORT_DESCRIPTION)) {
      if (stringMatches(filterDataDto.getFullTextFilter(),task.getName())) {
        matches=true;
      }
      if (!matches && filteredEntities.contains(Dtos.FilteredEntity.LONG_DESCRIPTION)) {
        if (stringMatches(filterDataDto.getFullTextFilter(),new HTML(task.getDescription()).getText())) {
          matches=true;
        }
      }
      if (!matches && filteredEntities.contains(Dtos.FilteredEntity.TICKET_ID)) {
        if (stringMatches(filterDataDto.getFullTextFilter(),task.getTicketId())) {
          matches=true;
        }
      }
      if (!matches) {
        return false;
      }
    }
  }
  if (!checkDueDates(task)) {
    return false;
  }
  boolean classOfServiceMatches=(task.getClassOfService() != null && findById(task.getClassOfService()) != -1);
  if (!classOfServiceMatches) {
    return false;
  }
  boolean userMatches=filterDataDto.getUsers().isEmpty() || (task.getAssignee() != null && findById(task.getAssignee()) != -1);
  return userMatches;
}

Fixed version (ground truth):
public boolean taskMatches(Dtos.TaskDto task){
  List<Dtos.FilteredEntity> filteredEntities=filterDataDto.getFullTextFilter().getFilteredEntities();
  if (filteredEntities != null && filteredEntities.size() != 0) {
    boolean matches=false;
    if (filteredEntities.contains(Dtos.FilteredEntity.SHORT_DESCRIPTION)) {
      if (stringMatches(filterDataDto.getFullTextFilter(),task.getName())) {
        matches=true;
      }
      if (!matches && filteredEntities.contains(Dtos.FilteredEntity.LONG_DESCRIPTION)) {
        if (stringMatches(filterDataDto.getFullTextFilter(),new HTML(task.getDescription()).getText())) {
          matches=true;
        }
      }
      if (!matches && filteredEntities.contains(Dtos.FilteredEntity.TICKET_ID)) {
        if (stringMatches(filterDataDto.getFullTextFilter(),task.getTicketId())) {
          matches=true;
        }
      }
      if (!matches) {
        return false;
      }
    }
  }
  if (!checkDueDates(task)) {
    return false;
  }
  boolean classOfServiceMatches=(task.getClassOfService() != null && findById(task.getClassOfService()) != -1);
  if (!classOfServiceMatches) {
    return false;
  }
  boolean userMatches=(task.getAssignee() != null && findById(task.getAssignee()) != -1) || (task.getAssignee() == null && noUserSelected());
  return userMatches;
}
Program: 38882
Project: 38882
Buggy source:
public void removeTask(TaskDto task){
  for (int i=0; i < contentPanel.getWidgetCount(); i++) {
    Widget widget=contentPanel.getWidget(i);
    if (widget instanceof TaskGui) {
      if (((TaskGui)widget).getDto().equals(task)) {
        contentPanel.remove(i);
      }
    }
  }
}

Fixed version (ground truth):
public void removeTask(TaskDto task){
  int widgetIndex=getTaskIndex(task);
  if (widgetIndex != -1) {
    contentPanel.remove(widgetIndex);
  }
}
Program: 38883
Project: 38883
Buggy source:
public void messageArrived(Message<TaskDto> message){
  if (!(contentPanel instanceof TaskContainer)) {
    return;
  }
  if (!isThisPlace(message.getPayload())) {
    return;
  }
  if (message instanceof TaskDeleteRequestedMessage) {
    ((TaskContainer)contentPanel).removeTask(message.getPayload());
  }
 else   if (message instanceof TaskAddedMessage) {
    TaskGui task=new TaskGui(message.getPayload());
    dragController.makeDraggable(task,task.getHeader());
    ((TaskContainer)contentPanel).add(task);
  }
}

Fixed version (ground truth):
public void messageArrived(Message<TaskDto> message){
  if (!(contentPanel instanceof TaskContainer)) {
    return;
  }
  TaskDto taskDto=message.getPayload();
  if (!isThisPlace(taskDto)) {
    return;
  }
  if (((TaskContainer)contentPanel).containsTask(taskDto)) {
    return;
  }
  if (message instanceof TaskDeleteRequestedMessage) {
    ((TaskContainer)contentPanel).removeTask(taskDto);
  }
 else   if (message instanceof TaskAddedMessage) {
    TaskGui task=new TaskGui(taskDto);
    dragController.makeDraggable(task,task.getHeader());
    ((TaskContainer)contentPanel).add(task);
  }
}
Program: 38884
Project: 38884
Buggy source:
/** 
 * Method to create a Push button for the toolbar 
 */
private PushButton createPushButton(String url,Integer top,Integer left,Integer width,Integer height,String tip){
  Image extract=new Image(url,left,top,width,height);
  PushButton tb=new PushButton(extract);
  tb.setHeight(height + "String_Node_Str");
  tb.setWidth(width + "String_Node_Str");
  tb.addClickHandler(evHandler);
  if (tip != null) {
    tb.setTitle(tip);
  }
  return tb;
}

Fixed version (ground truth):
/** 
 * Method to create a Push button for the toolbar 
 */
private PushButton createPushButton(ImageResource imageResource,Integer width,Integer height,String tip){
  Image extract=new Image(imageResource);
  PushButton tb=new PushButton(extract);
  tb.setHeight(height + "String_Node_Str");
  tb.setWidth(width + "String_Node_Str");
  tb.addClickHandler(evHandler);
  if (tip != null) {
    tb.setTitle(tip);
  }
  return tb;
}
Program: 38886
Project: 38886
Buggy source:
/** 
 * Method to create a Toggle button for the toolbar 
 */
private ToggleButton createToggleButton(String url,Integer top,Integer left,Integer width,Integer height,String tip){
  Image extract=new Image(url,left,top,width,height);
  ToggleButton tb=new ToggleButton(extract);
  tb.setHeight(height + "String_Node_Str");
  tb.setWidth(width + "String_Node_Str");
  tb.addClickHandler(evHandler);
  if (tip != null) {
    tb.setTitle(tip);
  }
  return tb;
}

Fixed version (ground truth):
/** 
 * Method to create a Toggle button for the toolbar 
 */
private ToggleButton createToggleButton(ImageResource imageResource,Integer width,Integer height,String tip){
  Image extract=new Image(imageResource);
  ToggleButton tb=new ToggleButton(extract);
  tb.setHeight(height + "String_Node_Str");
  tb.setWidth(width + "String_Node_Str");
  tb.addClickHandler(evHandler);
  if (tip != null) {
    tb.setTitle(tip);
  }
  return tb;
}
Program: 38887
Project: 38887
Buggy source:
@Override public boolean canEnhance(Class<?> type,Class<? extends Annotation> qualifier){
  return RemoteWebDriver.class == type || ReusableRemoteWebDriver.class == type;
}

Fixed version (ground truth):
@Override public boolean canEnhance(Class<?> type,Class<? extends Annotation> qualifier){
  if (RemoteWebDriver.class == type || ReusableRemoteWebDriver.class == type) {
    return true;
  }
  if (RemoteWebDriver.class.isAssignableFrom(type) && DroneAugmented.class.isAssignableFrom(type)) {
    return true;
  }
  return false;
}
Program: 38888
Project: 38888
Buggy source:
/** 
 * Unwraps the instance
 */
@Override public RemoteWebDriver deenhance(RemoteWebDriver enhancedInstance,Class<? extends Annotation> qualifier){
  if (enhancedInstance instanceof DroneAugmented) {
    return (RemoteWebDriver)((DroneAugmented)enhancedInstance).getWrapped();
  }
  return enhancedInstance;
}

Fixed version (ground truth):
/** 
 * Unwraps the instance
 */
@Override public RemoteWebDriver deenhance(RemoteWebDriver enhancedInstance,Class<? extends Annotation> qualifier){
  if (enhancedInstance instanceof DroneAugmented) {
    RemoteWebDriver original=(RemoteWebDriver)((DroneAugmented)enhancedInstance).getWrapped();
    Capabilities capabilities=enhancedInstance.getCapabilities();
    if (capabilities != null) {
      ((DesiredCapabilities)enhancedInstance.getCapabilities()).setCapability(DRONE_AUGMENTED,Boolean.FALSE);
    }
    return original;
  }
  return enhancedInstance;
}
Program: 38889
Project: 38889
Buggy source:
/** 
 * Augments the instance
 */
@Override public RemoteWebDriver enhance(RemoteWebDriver instance,Class<? extends Annotation> qualifier){
  return (RemoteWebDriver)augmenter.augment(instance);
}

Fixed version (ground truth):
/** 
 * Augments the instance
 */
@Override public RemoteWebDriver enhance(RemoteWebDriver instance,Class<? extends Annotation> qualifier){
  RemoteWebDriver enhanced=(RemoteWebDriver)augmenter.augment(instance);
  return enhanced;
}
Program: 38890
Project: 38890
Buggy source:
@Test public void testCanEnhance(){
  assertTrue(enhancer.canEnhance(RemoteWebDriver.class,Default.class));
  assertTrue(enhancer.canEnhance(mock(RemoteWebDriver.class).getClass(),Default.class));
  assertFalse(enhancer.canEnhance(WebDriver.class,Default.class));
}

Fixed version (ground truth):
@Test public void testCanEnhance(){
  assertTrue(enhancer.canEnhance(RemoteWebDriver.class,Default.class));
  assertTrue(enhancer.canEnhance(ReusableRemoteWebDriver.class,Default.class));
  assertFalse(enhancer.canEnhance(WebDriver.class,Default.class));
  assertFalse(enhancer.canEnhance(mock(RemoteWebDriver.class).getClass(),Default.class));
}
Program: 38891
Project: 38891
Buggy source:
@Test public void whenBrowserIsCreatedAndQuitAndTriedToReuseThenItShouldThrowException(@Drone @Reusable RemoteWebDriver driver){
  driver.navigate().to(SERVER_URL.toString());
  Capabilities reusedCapabilities=serializeDeserialize(driver.getCapabilities());
  SessionId reusedSessionId=new SessionId(serializeDeserialize(driver.getSessionId().toString()));
  driver.quit();
  try {
    ReusableRemoteWebDriver.fromReusedSession(HUB_URL,reusedCapabilities,reusedSessionId);
    fail("String_Node_Str");
  }
 catch (  UnableReuseSessionException e) {
  }
}

Fixed version (ground truth):
@Test public void whenBrowserIsCreatedAndQuitAndTriedToReuseThenItShouldThrowException(@Drone @Reusable RemoteWebDriver driver){
  driver.navigate().to(SERVER_URL.toString());
  new AugmentingEnhancer().deenhance(driver,Reusable.class);
  Capabilities reusedCapabilities=serializeDeserialize(driver.getCapabilities());
  SessionId reusedSessionId=new SessionId(serializeDeserialize(driver.getSessionId().toString()));
  driver.quit();
  try {
    ReusableRemoteWebDriver.fromReusedSession(HUB_URL,reusedCapabilities,reusedSessionId);
    fail("String_Node_Str");
  }
 catch (  UnableReuseSessionException e) {
  }
}
Program: 38892
Project: 38892
Buggy source:
@Test public void whenBrowserIsCreatedThenCouldBeReused(@Drone @Reusable RemoteWebDriver driver) throws UnableReuseSessionException {
  driver.navigate().to(SERVER_URL.toString());
  Capabilities reusedCapabilities=serializeDeserialize(driver.getCapabilities());
  SessionId reusedSessionId=new SessionId(serializeDeserialize(driver.getSessionId().toString()));
  RemoteWebDriver reusedDriver=ReusableRemoteWebDriver.fromReusedSession(HUB_URL,reusedCapabilities,reusedSessionId);
  reusedDriver.navigate().to(HUB_URL.toString());
}

Fixed version (ground truth):
@Test public void whenBrowserIsCreatedThenCouldBeReused(@Drone @Reusable RemoteWebDriver driver) throws UnableReuseSessionException {
  driver.navigate().to(SERVER_URL.toString());
  new AugmentingEnhancer().deenhance(driver,Reusable.class);
  Capabilities reusedCapabilities=serializeDeserialize(driver.getCapabilities());
  SessionId reusedSessionId=new SessionId(serializeDeserialize(driver.getSessionId().toString()));
  RemoteWebDriver reusedDriver=ReusableRemoteWebDriver.fromReusedSession(HUB_URL,reusedCapabilities,reusedSessionId);
  reusedDriver.navigate().to(HUB_URL.toString());
}
Program: 38893
Project: 38893
Buggy source:
@Test public void systemPropertyTest(){
  System.setProperty("String_Node_Str","String_Node_Str");
  System.setProperty("String_Node_Str","String_Node_Str");
  System.setProperty("String_Node_Str","String_Node_Str");
  MockDroneConfiguration configuration=ConfigurationMapper.fromSystemConfiguration(new MockDroneConfiguration(),Default.class);
  validateConfiguration(configuration,54321,false,"String_Node_Str");
}

Fixed version (ground truth):
@Test public void systemPropertyTest(){
  try {
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str","String_Node_Str");
    MockDroneConfiguration configuration=ConfigurationMapper.fromSystemConfiguration(new MockDroneConfiguration(),Default.class);
    validateConfiguration(configuration,54321,false,"String_Node_Str");
  }
  finally {
    System.clearProperty("String_Node_Str");
    System.clearProperty("String_Node_Str");
    System.clearProperty("String_Node_Str");
  }
}
Program: 38894
Project: 38894
Buggy source:
@Test public void mapFromArquillianDescriptorAndSystemPropertiesTest(){
  ArquillianDescriptor descriptor=Descriptors.create(ArquillianDescriptor.class).extension("String_Node_Str").property("String_Node_Str","String_Node_Str").property("String_Node_Str","String_Node_Str").property("String_Node_Str","String_Node_Str").property("String_Node_Str","String_Node_Str").property("String_Node_Str","String_Node_Str");
  System.clearProperty("String_Node_Str");
  System.clearProperty("String_Node_Str");
  System.clearProperty("String_Node_Str");
  System.setProperty("String_Node_Str","String_Node_Str");
  MockDroneConfiguration configuration=ConfigurationMapper.fromArquillianDescriptor(descriptor,new MockDroneConfiguration(),Default.class);
  ConfigurationMapper.fromSystemConfiguration(configuration,Default.class);
  Assert.assertNotNull("String_Node_Str",configuration.getMapMap());
  Assert.assertEquals("String_Node_Str",3,configuration.getMapMap().size());
  Assert.assertEquals("String_Node_Str","String_Node_Str",configuration.getMapMap().get("String_Node_Str"));
  Assert.assertEquals("String_Node_Str","String_Node_Str",configuration.getMapMap().get("String_Node_Str"));
  Assert.assertEquals("String_Node_Str","String_Node_Str",configuration.getMapMap().get("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void mapFromArquillianDescriptorAndSystemPropertiesTest(){
  try {
    ArquillianDescriptor descriptor=Descriptors.create(ArquillianDescriptor.class).extension("String_Node_Str").property("String_Node_Str","String_Node_Str").property("String_Node_Str","String_Node_Str").property("String_Node_Str","String_Node_Str").property("String_Node_Str","String_Node_Str").property("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str","String_Node_Str");
    MockDroneConfiguration configuration=ConfigurationMapper.fromArquillianDescriptor(descriptor,new MockDroneConfiguration(),Default.class);
    ConfigurationMapper.fromSystemConfiguration(configuration,Default.class);
    Assert.assertNotNull("String_Node_Str",configuration.getMapMap());
    Assert.assertEquals("String_Node_Str",3,configuration.getMapMap().size());
    Assert.assertEquals("String_Node_Str","String_Node_Str",configuration.getMapMap().get("String_Node_Str"));
    Assert.assertEquals("String_Node_Str","String_Node_Str",configuration.getMapMap().get("String_Node_Str"));
    Assert.assertEquals("String_Node_Str","String_Node_Str",configuration.getMapMap().get("String_Node_Str"));
  }
  finally {
    System.clearProperty("String_Node_Str");
  }
}
Program: 38895
Project: 38895
Buggy source:
@Test public void qualifierSystemPropertyTest(){
  System.setProperty("String_Node_Str","String_Node_Str");
  System.setProperty("String_Node_Str","String_Node_Str");
  System.setProperty("String_Node_Str","String_Node_Str");
  System.setProperty("String_Node_Str","String_Node_Str");
  MockDroneConfiguration configuration=ConfigurationMapper.fromSystemConfiguration(new MockDroneConfiguration(),DifferentMock.class);
  validateConfiguration(configuration,0,false,"String_Node_Str");
}

Fixed version (ground truth):
@Test public void qualifierSystemPropertyTest(){
  try {
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str","String_Node_Str");
    MockDroneConfiguration configuration=ConfigurationMapper.fromSystemConfiguration(new MockDroneConfiguration(),DifferentMock.class);
    validateConfiguration(configuration,0,false,"String_Node_Str");
  }
  finally {
    System.clearProperty("String_Node_Str");
    System.clearProperty("String_Node_Str");
    System.clearProperty("String_Node_Str");
  }
}
Program: 38896
Project: 38896
Buggy source:
@Test public void mapFromSystemPropertiesTest(){
  System.setProperty("String_Node_Str","String_Node_Str");
  System.setProperty("String_Node_Str","String_Node_Str");
  System.setProperty("String_Node_Str","String_Node_Str");
  MockDroneConfiguration configuration=ConfigurationMapper.fromSystemConfiguration(new MockDroneConfiguration(),Default.class);
  Assert.assertNotNull("String_Node_Str",configuration.getMapMap());
  Assert.assertEquals("String_Node_Str",3,configuration.getMapMap().size());
  Assert.assertEquals("String_Node_Str","String_Node_Str",configuration.getMapMap().get("String_Node_Str"));
  Assert.assertEquals("String_Node_Str","String_Node_Str",configuration.getMapMap().get("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void mapFromSystemPropertiesTest(){
  try {
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str","String_Node_Str");
    System.setProperty("String_Node_Str","String_Node_Str");
    MockDroneConfiguration configuration=ConfigurationMapper.fromSystemConfiguration(new MockDroneConfiguration(),Default.class);
    Assert.assertNotNull("String_Node_Str",configuration.getMapMap());
    Assert.assertEquals("String_Node_Str",4,configuration.getMapMap().size());
    Assert.assertEquals("String_Node_Str","String_Node_Str",configuration.getMapMap().get("String_Node_Str"));
    Assert.assertEquals("String_Node_Str","String_Node_Str",configuration.getMapMap().get("String_Node_Str"));
    Assert.assertEquals("String_Node_Str","String_Node_Str",configuration.getMapMap().get("String_Node_Str"));
  }
  finally {
    System.clearProperty("String_Node_Str");
    System.clearProperty("String_Node_Str");
    System.clearProperty("String_Node_Str");
    System.clearProperty("String_Node_Str");
  }
}
Program: 38897
Project: 38897
Buggy source:
@Override public int hashCode(){
  return concept.hashCode() + literal.hashCode() + labelType.hashCode();
}

Fixed version (ground truth):
@Override public int hashCode(){
  return concept.hashCode() + literal.hashCode();
}
Program: 38899
Project: 38899
Buggy source:
void outputIssuesReport(boolean shouldWriteGraphs) throws IOException, OpenRDFException {
  File reportFile=createReportFile();
  BufferedWriter reportWriter=new BufferedWriter(new FileWriter(reportFile));
  processIssues();
  String reportSummary="String_Node_Str";
  if (includeSummary) {
    reportSummary=createReportSummary();
    logger.info("String_Node_Str" + reportSummary);
  }
  writeReportHeader(reportWriter,reportFile,reportSummary);
  writeReportBody(reportWriter,reportFile,shouldWriteGraphs);
  if (this.inDQV) {
    File DQVFile=createDQVFile();
    FileOutputStream out=new FileOutputStream(DQVFile,true);
    RDFWriter writer=Rio.createWriter(RDFFormat.TURTLE,out);
    logger.info("String_Node_Str" + "String_Node_Str");
    writeDQVReportBody(writer,DQVFile,shouldWriteGraphs);
    out.close();
  }
  reportWriter.close();
}

Fixed version (ground truth):
void outputIssuesReport(boolean shouldWriteGraphs) throws IOException, OpenRDFException {
  File reportFile=createReportFile();
  BufferedWriter reportWriter=new BufferedWriter(new FileWriter(reportFile));
  processIssues();
  String reportSummary="String_Node_Str";
  if (includeSummary) {
    reportSummary=createReportSummary();
    logger.info("String_Node_Str" + reportSummary);
  }
  writeReportHeader(reportWriter,reportFile,reportSummary);
  writeReportBody(reportWriter,reportFile,shouldWriteGraphs);
  if (this.inDQV) {
    File DQVFile=createDQVFile();
    FileOutputStream out=new FileOutputStream(DQVFile,true);
    RDFWriter writer=Rio.createWriter(RDFFormat.TURTLE,out);
    logger.info("String_Node_Str" + "String_Node_Str");
    writeDQVReportBody(writer,DQVFile,shouldWriteGraphs);
    logger.info("String_Node_Str" + "String_Node_Str" + DQVFile.getPath());
    out.close();
  }
  reportWriter.close();
}
Program: 38900
Project: 38900
Buggy source:
private void writeReportHeader(BufferedWriter reportWriter,File reportFile,String reportSummary) throws IOException {
  String issuedDate=new SimpleDateFormat("String_Node_Str").format(new Date());
  String fileName=reportFile.getAbsolutePath();
  reportWriter.write("String_Node_Str" + fileName + "String_Node_Str"+ issuedDate);
  reportWriter.newLine();
  reportWriter.newLine();
  reportWriter.write(reportSummary);
}

Fixed version (ground truth):
private void writeReportHeader(BufferedWriter reportWriter,File vocabFile,String reportSummary) throws IOException {
  String issuedDate=new SimpleDateFormat("String_Node_Str").format(new Date());
  reportWriter.write("String_Node_Str");
  Iterator<String> vocabIt=vocabFileNames.iterator();
  while (vocabIt.hasNext()) {
    String vocabFileName=vocabIt.next();
    reportWriter.write(vocabFileName);
    if (vocabIt.hasNext())     reportWriter.write("String_Node_Str");
  }
  reportWriter.write("String_Node_Str" + issuedDate);
  reportWriter.newLine();
  reportWriter.newLine();
  reportWriter.write(reportSummary);
}
Program: 38901
Project: 38901
Buggy source:
public ReportCollector(Collection<Issue> issues,String reportFileName,boolean includeSummary){
  this.issues=issues;
  this.reportFileName=reportFileName;
  this.includeSummary=includeSummary;
}

Fixed version (ground truth):
public ReportCollector(Collection<Issue> issues,String reportFileName,Collection<String> vocabFileNames,boolean includeSummary){
  this.issues=issues;
  this.reportFileName=reportFileName;
  this.includeSummary=includeSummary;
  this.vocabFileNames=vocabFileNames;
}
Program: 38902
Project: 38902
Buggy source:
private void evaluate() throws OpenRDFException, IOException {
  setup();
  String command=jc.getParsedCommand();
  reportCollector=new ReportCollector(extractMeasures(),parsedCommand.reportFileName,command.equals(CMD_NAME_ANALYZE));
  reportCollector.outputIssuesReport(shouldWriteGraphs());
}

Fixed version (ground truth):
private void evaluate() throws OpenRDFException, IOException {
  setup();
  String command=jc.getParsedCommand();
  reportCollector=new ReportCollector(extractMeasures(),parsedCommand.reportFileName,parsedCommand.vocabFilenames,command.equals(CMD_NAME_ANALYZE));
  reportCollector.outputIssuesReport(shouldWriteGraphs());
}
Program: 38903
Project: 38903
Buggy source:
private Collection<Issue> getAllIssuesForCommand(){
  List<Issue> issuesForCommand=new ArrayList<Issue>();
  for (  Issue issue : qskos.getAllIssues()) {
    String command=jc.getParsedCommand();
    if ((issue.getType() == Issue.IssueType.ANALYTICAL && command.equals(CMD_NAME_ANALYZE)) || (issue.getType() == Issue.IssueType.STATISTICAL && command.equals(CMD_NAME_SUMMARIZE))) {
      issuesForCommand.add(issue);
    }
  }
  return issuesForCommand;
}

Fixed version (ground truth):
private Collection<Issue> getAllIssuesForCommand(){
  List<Issue> issuesForCommand=new ArrayList<>();
  for (  Issue issue : qskos.getAllIssues()) {
    String command=jc.getParsedCommand();
    if ((issue.getType() == Issue.IssueType.ANALYTICAL && command.equals(CMD_NAME_ANALYZE)) || (issue.getType() == Issue.IssueType.STATISTICAL && command.equals(CMD_NAME_SUMMARIZE))) {
      issuesForCommand.add(issue);
    }
  }
  return issuesForCommand;
}
Program: 38904
Project: 38904
Buggy source:
private void createGraph() throws OpenRDFException {
  graph=new DirectedMultigraph<Resource,NamedEdge>(NamedEdge.class);
  Iterator<Resource> conceptIt=new MonitoredIterator<Resource>(involvedConcepts.getResult().getData(),progressMonitor);
  while (conceptIt.hasNext()) {
    Resource concept=conceptIt.next();
    Collection<Relation> relations=findRelations(concept);
    for (    Relation relation : relations) {
      addNodesToGraph(relation.sourceConcept,relation.targetConcept,relation.property);
    }
  }
}

Fixed version (ground truth):
private void createGraph() throws OpenRDFException {
  graph=new DirectedMultigraph<>(NamedEdge.class);
  Iterator<Resource> conceptIt=new MonitoredIterator<>(involvedConcepts.getResult().getData(),progressMonitor);
  while (conceptIt.hasNext()) {
    Resource concept=conceptIt.next();
    Collection<Relation> relations=findRelations(concept);
    for (    Relation relation : relations) {
      addNodesToGraph(relation.sourceConcept,relation.targetConcept,relation.property);
    }
  }
}
Program: 38905
Project: 38905
Buggy source:
@Override protected ClustersResult invoke() throws OpenRDFException {
  createGraph();
  Collection<Collection<Resource>> connectedSets=new ArrayList<Collection<Resource>>();
  connectedSets.addAll(new ConnectivityInspector<Resource,NamedEdge>(graph).connectedSets());
  return new ClustersResult(connectedSets,graph);
}

Fixed version (ground truth):
@Override protected ClustersResult invoke() throws OpenRDFException {
  createGraph();
  Collection<Collection<Resource>> connectedSets=new ArrayList<>();
  connectedSets.addAll(new ConnectivityInspector<>(graph).connectedSets());
  return new ClustersResult(connectedSets,graph);
}
Program: 38906
Project: 38906
Buggy source:
private Collection<Relation> findRelations(Resource concept){
  Collection<Relation> allRelations=new ArrayList<Relation>();
  try {
    TupleQuery query=repCon.prepareTupleQuery(QueryLanguage.SPARQL,createConnectionsQuery(concept));
    TupleQueryResult result=query.evaluate();
    while (result.hasNext()) {
      BindingSet bindingSet=result.next();
      Resource otherConcept=(Resource)bindingSet.getValue("String_Node_Str");
      URI semanticRelation=(URI)bindingSet.getValue("String_Node_Str");
      if (otherConcept != null && semanticRelation != null) {
        allRelations.add(new Relation(concept,otherConcept,semanticRelation));
      }
    }
  }
 catch (  OpenRDFException e) {
    logger.error("String_Node_Str" + concept + "String_Node_Str");
  }
  return allRelations;
}

Fixed version (ground truth):
private Collection<Relation> findRelations(Resource concept){
  Collection<Relation> allRelations=new ArrayList<>();
  try {
    TupleQuery query=repCon.prepareTupleQuery(QueryLanguage.SPARQL,createConnectionsQuery(concept));
    TupleQueryResult result=query.evaluate();
    while (result.hasNext()) {
      BindingSet bindingSet=result.next();
      Resource otherConcept=(Resource)bindingSet.getValue("String_Node_Str");
      URI semanticRelation=(URI)bindingSet.getValue("String_Node_Str");
      if (otherConcept != null && semanticRelation != null) {
        allRelations.add(new Relation(concept,otherConcept,semanticRelation));
      }
    }
  }
 catch (  OpenRDFException e) {
    logger.error("String_Node_Str" + concept + "String_Node_Str");
  }
  return allRelations;
}