nus-yam/ex-repair huggingface dataset:
Program: 2161
Project: 2161
Buggy source:
public int createGroup(final String name);

Fixed version (ground truth):
public Integer createGroup(final String name);
Program: 2162
Project: 2162
Buggy source:
public int createThresholdContextAttr(final int thresholdConfigId,final String attributeType) throws UniformInterfaceException ;

Fixed version (ground truth):
public Integer createThresholdContextAttr(final int thresholdConfigId,final String attributeType) throws UniformInterfaceException ;
Program: 2163
Project: 2163
Buggy source:
public int createThresholdConfig(final String name,final String monitoredEventType,final String monitoredAttributeType,@Nullable final Double minThresholdValue,@Nullable final Double maxThresholdValue,final Long minThresholdSamples,final Long maxSampleWindowMs,final Long clearingIntervalMs,final int alertingConfigId) throws UniformInterfaceException ;

Fixed version (ground truth):
public Integer createThresholdConfig(final String name,final String monitoredEventType,final String monitoredAttributeType,@Nullable final Double minThresholdValue,@Nullable final Double maxThresholdValue,final Long minThresholdSamples,final Long maxSampleWindowMs,final Long clearingIntervalMs,final int alertingConfigId) throws UniformInterfaceException ;
Program: 2164
Project: 2164
Buggy source:
public int createPerson(final String firstName,final String lastName,final String nickName) throws UniformInterfaceException ;

Fixed version (ground truth):
public Integer createPerson(final String firstName,final String lastName,final String nickName) throws UniformInterfaceException ;
Program: 2165
Project: 2165
Buggy source:
public int createAlertingConfig(final String name,final boolean repeatUntilCleared,final boolean notifyOnRecovery,final boolean enabled,final Iterable<Integer> notificationGroupsIds) throws UniformInterfaceException ;

Fixed version (ground truth):
public Integer createAlertingConfig(final String name,final boolean repeatUntilCleared,final boolean notifyOnRecovery,final boolean enabled,final Iterable<Integer> notificationGroupsIds) throws UniformInterfaceException ;
Program: 2166
Project: 2166
Buggy source:
public int createNotificationGroup(final String groupName,boolean enabled,final Iterable<Integer> notificationsIds) throws UniformInterfaceException ;

Fixed version (ground truth):
public Integer createNotificationGroup(final String groupName,boolean enabled,final Iterable<Integer> notificationsIds) throws UniformInterfaceException ;
Program: 2167
Project: 2167
Buggy source:
public AlertingConfig findAlertingConfigById(final Long id) throws UniformInterfaceException ;

Fixed version (ground truth):
public AlertingConfig findAlertingConfigById(final int id) throws UniformInterfaceException ;
Program: 2168
Project: 2168
Buggy source:
public int createEmailNotificationForPersonOrGroup(final int id,final String address);

Fixed version (ground truth):
public Integer createEmailNotificationForPersonOrGroup(final int id,final String address);
Program: 2169
Project: 2169
Buggy source:
public int createThresholdQualifyingAttr(final int thresholdConfigId,final String attributeType,final String attributeValue) throws UniformInterfaceException ;

Fixed version (ground truth):
public Integer createThresholdQualifyingAttr(final int thresholdConfigId,final String attributeType,final String attributeValue) throws UniformInterfaceException ;
Program: 2170
Project: 2170
Buggy source:
@Override public int createThresholdContextAttr(final int thresholdConfigId,final String attributeType) throws UniformInterfaceException {
  final Map<String,?> thresholdContextAttr=ImmutableMap.of("String_Node_Str",createLabel(String.format("String_Node_Str",thresholdConfigId,attributeType)),"String_Node_Str",thresholdConfigId,"String_Node_Str",attributeType);
  final URI location=doPost(THRESHOLD_CONTEXT_ATTR_PATH,thresholdContextAttr);
  return extractIdFromURI(location);
}

Fixed version (ground truth):
@Override public Integer createThresholdContextAttr(final int thresholdConfigId,final String attributeType) throws UniformInterfaceException {
  final Map<String,?> thresholdContextAttr=ImmutableMap.of("String_Node_Str",createLabel(String.format("String_Node_Str",thresholdConfigId,attributeType)),"String_Node_Str",thresholdConfigId,"String_Node_Str",attributeType);
  final URI location=doPost(THRESHOLD_CONTEXT_ATTR_PATH,thresholdContextAttr);
  return extractIdFromURI(location);
}
Program: 2171
Project: 2171
Buggy source:
private int extractIdFromURI(final URI location){
  final Iterable<String> explodedPath=PATH_SPLITTER.split(location.getPath());
  final Iterator<String> iterator=explodedPath.iterator();
  if (!iterator.hasNext()) {
    return -1;
  }
 else {
    String lastSplit=null;
    while (iterator.hasNext()) {
      lastSplit=iterator.next();
    }
    return Integer.valueOf(lastSplit);
  }
}

Fixed version (ground truth):
private Integer extractIdFromURI(final URI location){
  final Iterable<String> explodedPath=PATH_SPLITTER.split(location.getPath());
  final Iterator<String> iterator=explodedPath.iterator();
  if (!iterator.hasNext()) {
    return -1;
  }
 else {
    String lastSplit=null;
    while (iterator.hasNext()) {
      lastSplit=iterator.next();
    }
    return Integer.valueOf(lastSplit);
  }
}
Program: 2172
Project: 2172
Buggy source:
@Override public int createNotificationGroup(final String groupName,final boolean enabled,final Iterable<Integer> notificationsIds){
  final Map<String,?> group=ImmutableMap.of("String_Node_Str",createLabel(groupName),"String_Node_Str",enabled);
  final URI location=doPost(NOTIF_GROUP_PATH,group);
  final int notifGroupId=extractIdFromURI(location);
  for (  final int notifConfigId : notificationsIds) {
    final Map<String,?> mapping=ImmutableMap.of("String_Node_Str",createLabel(String.format("String_Node_Str",notifGroupId,notifConfigId)),"String_Node_Str",notifGroupId,"String_Node_Str",notifConfigId);
    doPost(NOTIF_MAPPING_PATH,mapping);
  }
  return notifGroupId;
}

Fixed version (ground truth):
@Override public Integer createNotificationGroup(final String groupName,final boolean enabled,final Iterable<Integer> notificationsIds){
  final Map<String,?> group=ImmutableMap.of("String_Node_Str",createLabel(groupName),"String_Node_Str",enabled);
  final URI location=doPost(NOTIF_GROUP_PATH,group);
  final Integer notifGroupId=extractIdFromURI(location);
  for (  final int notifConfigId : notificationsIds) {
    final Map<String,?> mapping=ImmutableMap.of("String_Node_Str",createLabel(String.format("String_Node_Str",notifGroupId,notifConfigId)),"String_Node_Str",notifGroupId,"String_Node_Str",notifConfigId);
    doPost(NOTIF_MAPPING_PATH,mapping);
  }
  return notifGroupId;
}
Program: 2173
Project: 2173
Buggy source:
@Override public int createEmailNotificationForPersonOrGroup(final int id,final String address){
  return createNotificationForPersonOrGroup(id,address,"String_Node_Str");
}

Fixed version (ground truth):
@Override public Integer createEmailNotificationForPersonOrGroup(final int id,final String address){
  return createNotificationForPersonOrGroup(id,address,"String_Node_Str");
}
Program: 2174
Project: 2174
Buggy source:
@Override public int createThresholdQualifyingAttr(final int thresholdConfigId,final String attributeType,final String attributeValue) throws UniformInterfaceException {
  final Map<String,?> thresholdQualifyingAttr=ImmutableMap.of("String_Node_Str",createLabel(String.format("String_Node_Str",thresholdConfigId,attributeType,attributeValue)),"String_Node_Str",thresholdConfigId,"String_Node_Str",attributeType,"String_Node_Str",attributeValue);
  final URI location=doPost(THRESHOLD_QUALIFYING_ATTR_PATH,thresholdQualifyingAttr);
  return extractIdFromURI(location);
}

Fixed version (ground truth):
@Override public Integer createThresholdQualifyingAttr(final int thresholdConfigId,final String attributeType,final String attributeValue) throws UniformInterfaceException {
  final Map<String,?> thresholdQualifyingAttr=ImmutableMap.of("String_Node_Str",createLabel(String.format("String_Node_Str",thresholdConfigId,attributeType,attributeValue)),"String_Node_Str",thresholdConfigId,"String_Node_Str",attributeType,"String_Node_Str",attributeValue);
  final URI location=doPost(THRESHOLD_QUALIFYING_ATTR_PATH,thresholdQualifyingAttr);
  return extractIdFromURI(location);
}
Program: 2175
Project: 2175
Buggy source:
@Override public int createSmsNotificationForPersonOrGroup(final int id,final String address){
  return createNotificationForPersonOrGroup(id,address,"String_Node_Str");
}

Fixed version (ground truth):
@Override public Integer createSmsNotificationForPersonOrGroup(final int id,final String address){
  return createNotificationForPersonOrGroup(id,address,"String_Node_Str");
}
Program: 2176
Project: 2176
Buggy source:
@Override public int createGroup(final String name){
  final Map<String,?> group=ImmutableMap.of("String_Node_Str",createLabel(name),"String_Node_Str",Boolean.TRUE);
  final URI location=doPost(PERSON_PATH,group);
  return extractIdFromURI(location);
}

Fixed version (ground truth):
@Override public Integer createGroup(final String name){
  final Map<String,?> group=ImmutableMap.of("String_Node_Str",createLabel(name),"String_Node_Str",Boolean.TRUE);
  final URI location=doPost(PERSON_PATH,group);
  return extractIdFromURI(location);
}
Program: 2177
Project: 2177
Buggy source:
@Override public int createThresholdConfig(final String name,final String monitoredEventType,final String monitoredAttributeType,@Nullable final Double minThresholdValue,@Nullable final Double maxThresholdValue,final Long minThresholdSamples,final Long maxSampleWindowMs,final Long clearingIntervalMs,final int alertingConfigId) throws UniformInterfaceException {
  final ImmutableMap.Builder<String,Object> thresholdConfigBuilder=new ImmutableMap.Builder<String,Object>().put("String_Node_Str",createLabel(name)).put("String_Node_Str",monitoredEventType).put("String_Node_Str",monitoredAttributeType).put("String_Node_Str",minThresholdSamples).put("String_Node_Str",maxSampleWindowMs).put("String_Node_Str",clearingIntervalMs).put("String_Node_Str",alertingConfigId);
  if (minThresholdValue != null) {
    thresholdConfigBuilder.put("String_Node_Str",minThresholdValue);
  }
  if (maxThresholdValue != null) {
    thresholdConfigBuilder.put("String_Node_Str",maxThresholdValue);
  }
  final Map<String,?> thresholdConfig=thresholdConfigBuilder.build();
  final URI location=doPost(THRESHOLD_CONFIG_PATH,thresholdConfig);
  return extractIdFromURI(location);
}

Fixed version (ground truth):
@Override public Integer createThresholdConfig(final String name,final String monitoredEventType,final String monitoredAttributeType,@Nullable final Double minThresholdValue,@Nullable final Double maxThresholdValue,final Long minThresholdSamples,final Long maxSampleWindowMs,final Long clearingIntervalMs,final int alertingConfigId) throws UniformInterfaceException {
  final ImmutableMap.Builder<String,Object> thresholdConfigBuilder=new ImmutableMap.Builder<String,Object>().put("String_Node_Str",createLabel(name)).put("String_Node_Str",monitoredEventType).put("String_Node_Str",monitoredAttributeType).put("String_Node_Str",minThresholdSamples).put("String_Node_Str",maxSampleWindowMs).put("String_Node_Str",clearingIntervalMs).put("String_Node_Str",alertingConfigId);
  if (minThresholdValue != null) {
    thresholdConfigBuilder.put("String_Node_Str",minThresholdValue);
  }
  if (maxThresholdValue != null) {
    thresholdConfigBuilder.put("String_Node_Str",maxThresholdValue);
  }
  final Map<String,?> thresholdConfig=thresholdConfigBuilder.build();
  final URI location=doPost(THRESHOLD_CONFIG_PATH,thresholdConfig);
  return extractIdFromURI(location);
}
Program: 2178
Project: 2178
Buggy source:
@Override public int createPerson(final String firstName,final String lastName,final String nickName) throws UniformInterfaceException {
  final Map<String,String> person=ImmutableMap.of("String_Node_Str",firstName,"String_Node_Str",lastName,"String_Node_Str",createLabel(nickName),"String_Node_Str","String_Node_Str");
  final URI location=doPost(PERSON_PATH,person);
  return extractIdFromURI(location);
}

Fixed version (ground truth):
@Override public Integer createPerson(final String firstName,final String lastName,final String nickName) throws UniformInterfaceException {
  final Map<String,String> person=ImmutableMap.of("String_Node_Str",firstName,"String_Node_Str",lastName,"String_Node_Str",createLabel(nickName),"String_Node_Str","String_Node_Str");
  final URI location=doPost(PERSON_PATH,person);
  return extractIdFromURI(location);
}
Program: 2179
Project: 2179
Buggy source:
@Override public Iterable<NotifGroup> findNotificationGroupsForAlertingConfigById(final int id) throws UniformInterfaceException {
  return fetchObject(NOTIF_GROUP_MAPPING_PATH + "String_Node_Str" + id,new GenericType<List<NotifGroup>>(){
  }
);
}

Fixed version (ground truth):
@Override public Iterable<NotifGroup> findNotificationGroupsForAlertingConfigById(final int id) throws UniformInterfaceException {
  final List<NotifGroup> notifGroups=new ArrayList<NotifGroup>();
  final List<NotifGroupMapping> notifGroupMappings=fetchObject(NOTIF_GROUP_MAPPING_PATH + "String_Node_Str" + id,new GenericType<List<NotifGroupMapping>>(){
  }
);
  for (  final NotifGroupMapping notifGroupMapping : notifGroupMappings) {
    final NotifGroup notifGroup=findNotificationGroupById(notifGroupMapping.getId());
    notifGroups.add(notifGroup);
  }
  return notifGroups;
}
Program: 2180
Project: 2180
Buggy source:
@Override public int createAlertingConfig(final String name,final boolean repeatUntilCleared,final boolean notifyOnRecovery,final boolean enabled,final Iterable<Integer> notificationGroupsIds) throws UniformInterfaceException {
  final Map<String,?> alertingConfig=ImmutableMap.of("String_Node_Str",createLabel(name),"String_Node_Str",repeatUntilCleared ? "String_Node_Str" : "String_Node_Str","String_Node_Str",notifyOnRecovery,"String_Node_Str",enabled);
  final URI location=doPost(ALERTING_CONFIG_PATH,alertingConfig);
  final int alertingConfigId=extractIdFromURI(location);
  for (  final int notifGroupId : notificationGroupsIds) {
    final Map<String,?> mapping=ImmutableMap.of("String_Node_Str",createLabel(String.format("String_Node_Str",alertingConfigId,notifGroupId)),"String_Node_Str",alertingConfigId,"String_Node_Str",notifGroupId);
    doPost(NOTIF_GROUP_MAPPING_PATH,mapping);
  }
  return alertingConfigId;
}

Fixed version (ground truth):
@Override public Integer createAlertingConfig(final String name,final boolean repeatUntilCleared,final boolean notifyOnRecovery,final boolean enabled,final Iterable<Integer> notificationGroupsIds) throws UniformInterfaceException {
  final Map<String,?> alertingConfig=ImmutableMap.of("String_Node_Str",createLabel(name),"String_Node_Str",repeatUntilCleared ? "String_Node_Str" : "String_Node_Str","String_Node_Str",notifyOnRecovery,"String_Node_Str",enabled);
  final URI location=doPost(ALERTING_CONFIG_PATH,alertingConfig);
  final Integer alertingConfigId=extractIdFromURI(location);
  for (  final int notifGroupId : notificationGroupsIds) {
    final Map<String,?> mapping=ImmutableMap.of("String_Node_Str",createLabel(String.format("String_Node_Str",alertingConfigId,notifGroupId)),"String_Node_Str",alertingConfigId,"String_Node_Str",notifGroupId);
    doPost(NOTIF_GROUP_MAPPING_PATH,mapping);
  }
  return alertingConfigId;
}
Program: 2181
Project: 2181
Buggy source:
@Override public AlertingConfig findAlertingConfigById(final Long id) throws UniformInterfaceException {
  return fetchObject(ALERTING_CONFIG_PATH + "String_Node_Str" + id,new GenericType<AlertingConfig>(){
  }
);
}

Fixed version (ground truth):
@Override public AlertingConfig findAlertingConfigById(final int id) throws UniformInterfaceException {
  return fetchObject(ALERTING_CONFIG_PATH + "String_Node_Str" + id,new GenericType<AlertingConfig>(){
  }
);
}
Program: 2182
Project: 2182
Buggy source:
private int createNotificationForPersonOrGroup(final int id,final String address,final String notificationType){
  final Map<String,?> group=ImmutableMap.of("String_Node_Str",id,"String_Node_Str",address,"String_Node_Str",notificationType,"String_Node_Str",createLabel(address));
  final URI location=doPost(NOTIF_CONFIG_PATH,group);
  return extractIdFromURI(location);
}

Fixed version (ground truth):
private Integer createNotificationForPersonOrGroup(final int id,final String address,final String notificationType){
  final Map<String,?> group=ImmutableMap.of("String_Node_Str",id,"String_Node_Str",address,"String_Node_Str",notificationType,"String_Node_Str",createLabel(address));
  final URI location=doPost(NOTIF_CONFIG_PATH,group);
  return extractIdFromURI(location);
}
Program: 2183
Project: 2183
Buggy source:
@JsonCreator public NotifGroup(@JsonProperty("String_Node_Str") final String groupName,@JsonProperty("String_Node_Str") final String enabled,@JsonProperty("String_Node_Str") final int id){
  this.groupName=groupName;
  this.enabled=!(enabled != null && enabled.equals("String_Node_Str"));
  this.id=id;
}

Fixed version (ground truth):
@JsonCreator public NotifGroup(@JsonProperty("String_Node_Str") final String groupName,@JsonProperty("String_Node_Str") final String enabled,@JsonProperty("String_Node_Str") final Integer id){
  this.groupName=groupName;
  this.enabled=!(enabled != null && enabled.equals("String_Node_Str"));
  this.id=id;
}
Program: 2184
Project: 2184
Buggy source:
public int getId(){
  return id;
}

Fixed version (ground truth):
public Integer getId(){
  return id;
}
Program: 2185
Project: 2185
Buggy source:
public int getId(){
  return id;
}

Fixed version (ground truth):
public Integer getId(){
  return id;
}
Program: 2186
Project: 2186
Buggy source:
@JsonCreator public Person(@JsonProperty("String_Node_Str") final String nickName,@JsonProperty("String_Node_Str") final String firstName,@JsonProperty("String_Node_Str") final String lastName,@JsonProperty("String_Node_Str") final String groupAlias,@JsonProperty("String_Node_Str") final int id){
  this.nickName=nickName;
  this.firstName=firstName;
  this.lastName=lastName;
  isGroupAlias=!(groupAlias != null && groupAlias.equals("String_Node_Str"));
  this.id=id;
}

Fixed version (ground truth):
@JsonCreator public Person(@JsonProperty("String_Node_Str") final String nickName,@JsonProperty("String_Node_Str") final String firstName,@JsonProperty("String_Node_Str") final String lastName,@JsonProperty("String_Node_Str") final String groupAlias,@JsonProperty("String_Node_Str") final Integer id){
  this.nickName=nickName;
  this.firstName=firstName;
  this.lastName=lastName;
  isGroupAlias=!(groupAlias != null && groupAlias.equals("String_Node_Str"));
  this.id=id;
}
Program: 2187
Project: 2187
Buggy source:
@Override public List<NotifConfig> findEmailsAndNotificationTypesForGroupById(final int id) throws UniformInterfaceException {
  return fetchObject(NOTIF_MAPPING_PATH + "String_Node_Str" + id,new GenericType<List<NotifConfig>>(){
  }
);
}

Fixed version (ground truth):
@Override public List<NotifConfig> findEmailsAndNotificationTypesForGroupById(final int id) throws UniformInterfaceException {
  final List<NotifConfig> notifConfigs=new ArrayList<NotifConfig>();
  final List<NotifMapping> notifMappings=fetchObject(NOTIF_MAPPING_PATH + "String_Node_Str" + id,new GenericType<List<NotifMapping>>(){
  }
);
  for (  final NotifMapping notifMapping : notifMappings) {
    final NotifConfig notifConfig=findNotificationById(notifMapping.getId());
    notifConfigs.add(notifConfig);
  }
  return notifConfigs;
}
Program: 2188
Project: 2188
Buggy source:
public AlertingConfigFormModel(ConfDataAlertingConfig confDataAlertingConfig){
  if (confDataAlertingConfig != null) {
    this.setPropertiesFromMap(confDataAlertingConfig.toPropertiesMap());
  }
 else {
    this.setNotifRepeatMode(NotificationRepeatMode.NO_REPEAT);
    this.setNotifOnRecovery(true);
  }
  this.allGroupNames=new ArrayList<String>();
  this.allGroups=new ArrayList<ConfDataNotifGroup>();
  this.notificationGroups=new ArrayList<ConfDataNotifGroup>();
  this.allManagingKeyNames=new ArrayList<String>();
  this.allManagingKeys=new ArrayList<ConfDataManagingKey>();
  this.managingKeys=new ArrayList<ConfDataManagingKey>();
}

Fixed version (ground truth):
public AlertingConfigFormModel(ConfDataAlertingConfig confDataAlertingConfig){
  if (confDataAlertingConfig != null) {
    this.populatePropertiesFromMap(confDataAlertingConfig.toPropertiesMap());
  }
 else {
    this.setNotifRepeatMode(NotificationRepeatMode.NO_REPEAT);
    this.setNotifOnRecovery(true);
  }
  this.allGroupNames=new ArrayList<String>();
  this.allGroups=new ArrayList<ConfDataNotifGroup>();
  this.notificationGroups=new ArrayList<ConfDataNotifGroup>();
  this.allManagingKeyNames=new ArrayList<String>();
  this.allManagingKeys=new ArrayList<ConfDataManagingKey>();
  this.managingKeys=new ArrayList<ConfDataManagingKey>();
}
Program: 2190
Project: 2190
Buggy source:
@Override public void populateItem(final ListItem item){
  final ListView<ConfDataManagingKey> thisList=this;
  final ConfDataManagingKey key=(ConfDataManagingKey)item.getModelObject();
  final DropDownChoice<String> managingKey=new DropDownChoice<String>("String_Node_Str",new Model<String>(key.getKey()),alertingConfigFormModel.getManagingKeyNameList());
  managingKey.setRequired(true);
  managingKey.setOutputMarkupId(true);
  managingKey.add(new AjaxFormComponentUpdatingBehavior("String_Node_Str"){
    @Override protected void onUpdate(    AjaxRequestTarget target){
      String selectedKeyName=managingKey.getModelObject();
      ConfDataManagingKey selectedKey=alertingConfigFormModel.getManagingKeyByManagingKeyName(selectedKeyName);
      key.setPropertiesFromMap(selectedKey.toPropertiesMap());
      target.addComponent(managingKey);
    }
  }
);
  item.add(managingKey);
  AjaxFallbackButton removeManagingKeyButton=new AjaxFallbackButton("String_Node_Str",form){
    @Override protected void onSubmit(    AjaxRequestTarget target,    Form<?> form){
      alertingConfigFormModel.getManagingKeyList().remove(item.getIndex());
      thisList.modelChanged();
      target.addComponent(managingKeyListContainer);
    }
  }
;
  removeManagingKeyButton.setDefaultFormProcessing(false);
  removeManagingKeyButton.setOutputMarkupPlaceholderTag(true);
  item.add(removeManagingKeyButton);
}

Fixed version (ground truth):
@Override public void populateItem(final ListItem item){
  final ListView<ConfDataManagingKey> thisList=this;
  final ConfDataManagingKey key=(ConfDataManagingKey)item.getModelObject();
  final DropDownChoice<String> managingKey=new DropDownChoice<String>("String_Node_Str",new Model<String>(key.getKey()),alertingConfigFormModel.getManagingKeyNameList());
  managingKey.setRequired(true);
  managingKey.setOutputMarkupId(true);
  managingKey.add(new AjaxFormComponentUpdatingBehavior("String_Node_Str"){
    @Override protected void onUpdate(    AjaxRequestTarget target){
      String selectedKeyName=managingKey.getModelObject();
      ConfDataManagingKey selectedKey=alertingConfigFormModel.getManagingKeyByManagingKeyName(selectedKeyName);
      key.populatePropertiesFromMap(selectedKey.toPropertiesMap());
      target.addComponent(managingKey);
    }
  }
);
  item.add(managingKey);
  AjaxFallbackButton removeManagingKeyButton=new AjaxFallbackButton("String_Node_Str",form){
    @Override protected void onSubmit(    AjaxRequestTarget target,    Form<?> form){
      alertingConfigFormModel.getManagingKeyList().remove(item.getIndex());
      thisList.modelChanged();
      target.addComponent(managingKeyListContainer);
    }
  }
;
  removeManagingKeyButton.setDefaultFormProcessing(false);
  removeManagingKeyButton.setOutputMarkupPlaceholderTag(true);
  item.add(removeManagingKeyButton);
}
Program: 2191
Project: 2191
Buggy source:
@Override protected void onUpdate(AjaxRequestTarget target){
  String selectedKeyName=managingKey.getModelObject();
  ConfDataManagingKey selectedKey=alertingConfigFormModel.getManagingKeyByManagingKeyName(selectedKeyName);
  key.setPropertiesFromMap(selectedKey.toPropertiesMap());
  target.addComponent(managingKey);
}

Fixed version (ground truth):
@Override protected void onUpdate(AjaxRequestTarget target){
  String selectedKeyName=managingKey.getModelObject();
  ConfDataManagingKey selectedKey=alertingConfigFormModel.getManagingKeyByManagingKeyName(selectedKeyName);
  key.populatePropertiesFromMap(selectedKey.toPropertiesMap());
  target.addComponent(managingKey);
}
Program: 2192
Project: 2192
Buggy source:
public ManagingKeyFormModel(ConfDataManagingKey confDataManagingKey){
  if (confDataManagingKey != null)   this.setPropertiesFromMap(confDataManagingKey.toPropertiesMap());
}

Fixed version (ground truth):
public ManagingKeyFormModel(ConfDataManagingKey confDataManagingKey){
  if (confDataManagingKey != null)   this.populatePropertiesFromMap(confDataManagingKey.toPropertiesMap());
}
Program: 2193
Project: 2193
Buggy source:
public NotificationGroupFormModel(ConfDataNotifGroup confDataNotifGroup){
  if (confDataNotifGroup != null)   this.setPropertiesFromMap(confDataNotifGroup.toPropertiesMap());
  this.allPersonNickNames=new ArrayList<String>();
  this.allPersons=new ArrayList<ConfDataPerson>();
  this.allNotificationConfigs=new ArrayList<ConfDataNotifConfig>();
  this.notificationConfigsByPersonNickName=new HashMap<String,List<ConfDataNotifConfig>>();
  this.notificationConfigs=new ArrayList<ConfDataNotifConfig>();
}

Fixed version (ground truth):
public NotificationGroupFormModel(ConfDataNotifGroup confDataNotifGroup){
  if (confDataNotifGroup != null)   this.populatePropertiesFromMap(confDataNotifGroup.toPropertiesMap());
  this.allPersonNickNames=new ArrayList<String>();
  this.allPersons=new ArrayList<ConfDataPerson>();
  this.allNotificationConfigs=new ArrayList<ConfDataNotifConfig>();
  this.notificationConfigsByPersonNickName=new HashMap<String,List<ConfDataNotifConfig>>();
  this.notificationConfigs=new ArrayList<ConfDataNotifConfig>();
}
Program: 2196
Project: 2196
Buggy source:
@Override protected void onUpdate(AjaxRequestTarget target){
  String selectedPerson=notificationPerson.getModelObject();
  List<String> choices=notifGroupFormModel.getNotificationConfigAddressList(selectedPerson);
  if (choices.size() == 1) {
    ConfDataNotifConfig notificationConfig=notifGroupFormModel.getNotificationConfigByAddress(choices.get(0));
    config.setPropertiesFromMap(notificationConfig.toPropertiesMap());
  }
 else   config.setAddress(null);
  notificationAddress.setChoices(choices);
  notificationAddress.modelChanged();
  target.addComponent(notificationAddress);
}

Fixed version (ground truth):
@Override protected void onUpdate(AjaxRequestTarget target){
  String selectedPerson=notificationPerson.getModelObject();
  List<String> choices=notifGroupFormModel.getNotificationConfigAddressList(selectedPerson);
  if (choices.size() == 1) {
    ConfDataNotifConfig notificationConfig=notifGroupFormModel.getNotificationConfigByAddress(choices.get(0));
    config.populatePropertiesFromMap(notificationConfig.toPropertiesMap());
  }
 else   config.setAddress(null);
  notificationAddress.setChoices(choices);
  notificationAddress.modelChanged();
  target.addComponent(notificationAddress);
}
Program: 2197
Project: 2197
Buggy source:
public PersonFormModel(ConfDataPerson confDataPerson,List<ConfDataNotifConfig> notificationConfigs){
  if (confDataPerson != null)   this.setPropertiesFromMap(confDataPerson.toPropertiesMap());
  if (notificationConfigs == null) {
    notificationConfigs=new ArrayList<ConfDataNotifConfig>();
  }
  this.notificationConfigs=notificationConfigs;
  if (this.isGroupAlias == null) {
    this.isGroupAlias=false;
  }
}

Fixed version (ground truth):
public PersonFormModel(ConfDataPerson confDataPerson,List<ConfDataNotifConfig> notificationConfigs){
  if (confDataPerson != null)   this.populatePropertiesFromMap(confDataPerson.toPropertiesMap());
  if (notificationConfigs == null) {
    notificationConfigs=new ArrayList<ConfDataNotifConfig>();
  }
  this.notificationConfigs=notificationConfigs;
  if (this.isGroupAlias == null) {
    this.isGroupAlias=false;
  }
}
Program: 2198
Project: 2198
Buggy source:
public ThresholdFormModel(ConfDataThresholdConfig confDataThresholdConfig){
  if (confDataThresholdConfig != null)   this.setPropertiesFromMap(confDataThresholdConfig.toPropertiesMap());
  this.allAlertingConfigNames=new ArrayList<String>();
  this.allAlertingConfigsByLabel=new ArrayList<ConfDataAlertingConfig>();
  this.allAlertingConfigsById=new ArrayList<ConfDataAlertingConfig>();
  this.qualifyingAttrs=new ArrayList<ConfDataThresholdQualifyingAttr>();
  this.contextAttrs=new ArrayList<ConfDataThresholdContextAttr>();
  if (confDataThresholdConfig == null) {
    this.setMinThresholdSamples(1L);
    this.setClearingIntervalMs(300000L);
    ConfDataThresholdContextAttr hostNameContextAttr=new ConfDataThresholdContextAttr();
    hostNameContextAttr.setAttributeType("String_Node_Str");
    this.contextAttrs.add(hostNameContextAttr);
  }
}

Fixed version (ground truth):
public ThresholdFormModel(ConfDataThresholdConfig confDataThresholdConfig){
  if (confDataThresholdConfig != null)   this.populatePropertiesFromMap(confDataThresholdConfig.toPropertiesMap());
  this.allAlertingConfigNames=new ArrayList<String>();
  this.allAlertingConfigsByLabel=new ArrayList<ConfDataAlertingConfig>();
  this.allAlertingConfigsById=new ArrayList<ConfDataAlertingConfig>();
  this.qualifyingAttrs=new ArrayList<ConfDataThresholdQualifyingAttr>();
  this.contextAttrs=new ArrayList<ConfDataThresholdContextAttr>();
  if (confDataThresholdConfig == null) {
    this.setMinThresholdSamples(1L);
    this.setClearingIntervalMs(300000L);
    ConfDataThresholdContextAttr hostNameContextAttr=new ConfDataThresholdContextAttr();
    hostNameContextAttr.setAttributeType("String_Node_Str");
    this.contextAttrs.add(hostNameContextAttr);
  }
}
Program: 2200
Project: 2200
Buggy source:
public static void main(String[] args) throws Exception {
  Injector injector=Guice.createInjector(Stage.PRODUCTION,new LifecycleModule(),new EmbeddedJettyJerseyModule(),new RESTEventReceiverModule(CollectorEventProcessor.class,"String_Node_Str"),new UDPEventReceiverModule(),new AbstractModule(){
    @Override protected void configure(){
      bind(MBeanServer.class).toInstance(ManagementFactory.getPlatformMBeanServer());
    }
  }
,new RMIModule(),new CollectorModule());
  EventCollectorServer server=injector.getInstance(EventCollectorServer.class);
  server.run();
}

Fixed version (ground truth):
public static void main(String[] args) throws Exception {
  Injector injector=Guice.createInjector(Stage.PRODUCTION,new LifecycleModule(),new DummyServiceLocatorModule(),new EmbeddedJettyJerseyModule(),new RESTEventReceiverModule(CollectorEventProcessor.class,"String_Node_Str"),new UDPEventReceiverModule(),new AbstractModule(){
    @Override protected void configure(){
      bind(MBeanServer.class).toInstance(ManagementFactory.getPlatformMBeanServer());
    }
  }
,new RMIModule(),new CollectorModule());
  EventCollectorServer server=injector.getInstance(EventCollectorServer.class);
  server.run();
}
Program: 2201
Project: 2201
Buggy source:
@Override public void configure(){
  UDPEventReceiverConfig config=new ConfigurationObjectFactory(System.getProperties()).build(UDPEventReceiverConfig.class);
  bind(UDPEventReceiverConfig.class).toInstance(config);
  bind(DatagramSocket.class).annotatedWith(Names.named("String_Node_Str")).toProvider(DatagramSocketProvider.class);
  bind(ExecutorService.class).annotatedWith(Names.named("String_Node_Str")).toInstance(Executors.newFixedThreadPool(config.getNumUDPThreads()));
  bind(UDPEventHandler.class).asEagerSingleton();
  LifecycledProvider<UDPServer> lifecycledProvider=new LifecycledProvider<UDPServer>(binder(),UDPServer.class);
  lifecycledProvider.addListener(LifecycleEvent.START,new LifecycleAction<UDPServer>(){
    public void doAction(    UDPServer server){
      try {
        server.start();
      }
 catch (      Exception e) {
        throw new RuntimeException(e);
      }
    }
  }
);
  lifecycledProvider.addListener(LifecycleEvent.STOP,new LifecycleAction<UDPServer>(){
    public void doAction(    UDPServer server){
      server.stop();
    }
  }
);
  bind(UDPServer.class).toProvider(lifecycledProvider).asEagerSingleton();
  ExportBuilder builder=MBeanModule.newExporter(binder());
  builder.export(UDPEventHandler.class).as("String_Node_Str");
}

Fixed version (ground truth):
@Override public void configure(){
  UDPEventReceiverConfig config=new ConfigurationObjectFactory(System.getProperties()).build(UDPEventReceiverConfig.class);
  bind(UDPEventReceiverConfig.class).toInstance(config);
  bind(DatagramSocket.class).annotatedWith(Names.named("String_Node_Str")).toProvider(DatagramSocketProvider.class);
  bind(ExecutorService.class).annotatedWith(Names.named("String_Node_Str")).toInstance(Executors.newFixedThreadPool(config.getNumUDPThreads()));
  bind(Integer.class).annotatedWith(Names.named("String_Node_Str")).toInstance(config.getPort());
  bind(UDPEventHandler.class).asEagerSingleton();
  LifecycledProvider<UDPServer> lifecycledProvider=new LifecycledProvider<UDPServer>(binder(),UDPServer.class);
  lifecycledProvider.addListener(LifecycleEvent.START,new LifecycleAction<UDPServer>(){
    public void doAction(    UDPServer server){
      try {
        server.start();
      }
 catch (      Exception e) {
        throw new RuntimeException(e);
      }
    }
  }
);
  lifecycledProvider.addListener(LifecycleEvent.STOP,new LifecycleAction<UDPServer>(){
    public void doAction(    UDPServer server){
      server.stop();
    }
  }
);
  bind(UDPServer.class).toProvider(lifecycledProvider).asEagerSingleton();
  ExportBuilder builder=MBeanModule.newExporter(binder());
  builder.export(UDPEventHandler.class).as("String_Node_Str");
}
Program: 2202
Project: 2202
Buggy source:
@Inject public CollectorEventProcessor(final CollectorConfig config,final TimelineDAO timelineDAO){
  this.timelineDAO=timelineDAO;
  accumulators=CacheBuilder.newBuilder().concurrencyLevel(4).maximumSize(config.getMaxHosts()).expireAfterWrite(config.getTimelineLength().getMillis(),TimeUnit.MILLISECONDS).removalListener(new RemovalListener<Integer,TimelineHostEventAccumulator>(){
    @Override public void onRemoval(    RemovalNotification<Integer,TimelineHostEventAccumulator> removedObjectNotification){
      TimelineHostEventAccumulator accumulator=removedObjectNotification.getValue();
      if (accumulator == null) {
        log.error("String_Node_Str");
      }
 else {
        final Integer hostId=removedObjectNotification.getKey();
        if (hostId == null) {
          log.info("String_Node_Str");
        }
 else {
          log.info("String_Node_Str" + hostId);
        }
        accumulator.extractAndSaveTimelineChunks();
      }
    }
  }
).build(new CacheLoader<Integer,TimelineHostEventAccumulator>(){
    @Override public TimelineHostEventAccumulator load(    Integer hostId) throws Exception {
      log.info("String_Node_Str" + hostId);
      return new TimelineHostEventAccumulator(timelineDAO,hostId);
    }
  }
);
}

Fixed version (ground truth):
@Inject public CollectorEventProcessor(final CollectorConfig config,final TimelineDAO timelineDAO){
  this.timelineDAO=timelineDAO;
  accumulators=CacheBuilder.newBuilder().concurrencyLevel(4).maximumSize(config.getMaxHosts()).removalListener(new RemovalListener<Integer,TimelineHostEventAccumulator>(){
    @Override public void onRemoval(    final RemovalNotification<Integer,TimelineHostEventAccumulator> removedObjectNotification){
      final TimelineHostEventAccumulator accumulator=removedObjectNotification.getValue();
      if (accumulator == null) {
        log.error("String_Node_Str");
      }
 else {
        final Integer hostId=removedObjectNotification.getKey();
        if (hostId == null) {
          log.info("String_Node_Str");
        }
 else {
          log.info("String_Node_Str" + hostId);
        }
        accumulator.extractAndSaveTimelineChunks();
      }
    }
  }
).build(new CacheLoader<Integer,TimelineHostEventAccumulator>(){
    @Override public TimelineHostEventAccumulator load(    final Integer hostId) throws Exception {
      log.info("String_Node_Str" + hostId);
      return new TimelineHostEventAccumulator(timelineDAO,hostId);
    }
  }
);
  Executors.newSingleThreadScheduledExecutor("String_Node_Str").scheduleWithFixedDelay(new Runnable(){
    @Override public void run(){
      accumulators.invalidateAll();
    }
  }
,config.getTimelineLength().getMillis(),config.getTimelineLength().getMillis(),TimeUnit.MILLISECONDS);
}
Program: 2203
Project: 2203
Buggy source:
@Override public TimelineHostEventAccumulator load(Integer hostId) throws Exception {
  log.info("String_Node_Str" + hostId);
  return new TimelineHostEventAccumulator(timelineDAO,hostId);
}

Fixed version (ground truth):
@Override public TimelineHostEventAccumulator load(final Integer hostId) throws Exception {
  log.info("String_Node_Str" + hostId);
  return new TimelineHostEventAccumulator(timelineDAO,hostId);
}
Program: 2204
Project: 2204
Buggy source:
@Override public void onRemoval(RemovalNotification<Integer,TimelineHostEventAccumulator> removedObjectNotification){
  TimelineHostEventAccumulator accumulator=removedObjectNotification.getValue();
  if (accumulator == null) {
    log.error("String_Node_Str");
  }
 else {
    final Integer hostId=removedObjectNotification.getKey();
    if (hostId == null) {
      log.info("String_Node_Str");
    }
 else {
      log.info("String_Node_Str" + hostId);
    }
    accumulator.extractAndSaveTimelineChunks();
  }
}

Fixed version (ground truth):
@Override public void onRemoval(final RemovalNotification<Integer,TimelineHostEventAccumulator> removedObjectNotification){
  final TimelineHostEventAccumulator accumulator=removedObjectNotification.getValue();
  if (accumulator == null) {
    log.error("String_Node_Str");
  }
 else {
    final Integer hostId=removedObjectNotification.getKey();
    if (hostId == null) {
      log.info("String_Node_Str");
    }
 else {
      log.info("String_Node_Str" + hostId);
    }
    accumulator.extractAndSaveTimelineChunks();
  }
}
Program: 2205
Project: 2205
Buggy source:
private void convertSamplesToScalarSamples(Map<String,Object> inputSamples,Map<Integer,ScalarSample> outputSamples){
  if (inputSamples == null) {
    return;
  }
  for (  final String sampleKind : inputSamples.keySet()) {
    final int sampleKindId=timelineRegistry.getOrAddSampleKind(sampleKind);
    final Object sample=inputSamples.get(sampleKind);
    if (sample == null) {
      outputSamples.put(sampleKindId,new ScalarSample(SampleOpcode.NULL,sample));
    }
 else     if (sample instanceof Byte) {
      outputSamples.put(sampleKindId,new ScalarSample(SampleOpcode.BYTE,sample));
    }
 else     if (sample instanceof Short) {
      outputSamples.put(sampleKindId,new ScalarSample(SampleOpcode.SHORT,sample));
    }
 else     if (sample instanceof Integer) {
      outputSamples.put(sampleKindId,new ScalarSample(SampleOpcode.INT,sample));
    }
 else     if (sample instanceof Long) {
      outputSamples.put(sampleKindId,new ScalarSample(SampleOpcode.LONG,sample));
    }
 else     if (sample instanceof Float) {
      outputSamples.put(sampleKindId,new ScalarSample(SampleOpcode.FLOAT,sample));
    }
 else     if (sample instanceof Double) {
      outputSamples.put(sampleKindId,new ScalarSample(SampleOpcode.DOUBLE,sample));
    }
 else {
      outputSamples.put(sampleKindId,new ScalarSample(SampleOpcode.STRING,sample.toString()));
    }
  }
}

Fixed version (ground truth):
private void convertSamplesToScalarSamples(final Map<String,Object> inputSamples,final Map<Integer,ScalarSample> outputSamples){
  if (inputSamples == null) {
    return;
  }
  for (  final String sampleKind : inputSamples.keySet()) {
    final int sampleKindId=timelineRegistry.getOrAddSampleKind(sampleKind);
    final Object sample=inputSamples.get(sampleKind);
    if (sample == null) {
      outputSamples.put(sampleKindId,new ScalarSample<Void>(SampleOpcode.NULL,null));
    }
 else     if (sample instanceof Byte) {
      outputSamples.put(sampleKindId,new ScalarSample<Byte>(SampleOpcode.BYTE,(Byte)sample));
    }
 else     if (sample instanceof Short) {
      outputSamples.put(sampleKindId,new ScalarSample<Short>(SampleOpcode.SHORT,(Short)sample));
    }
 else     if (sample instanceof Integer) {
      outputSamples.put(sampleKindId,new ScalarSample<Integer>(SampleOpcode.INT,(Integer)sample));
    }
 else     if (sample instanceof Long) {
      outputSamples.put(sampleKindId,new ScalarSample<Long>(SampleOpcode.LONG,(Long)sample));
    }
 else     if (sample instanceof Float) {
      outputSamples.put(sampleKindId,new ScalarSample<Float>(SampleOpcode.FLOAT,(Float)sample));
    }
 else     if (sample instanceof Double) {
      outputSamples.put(sampleKindId,new ScalarSample<Double>(SampleOpcode.DOUBLE,(Double)sample));
    }
 else {
      outputSamples.put(sampleKindId,new ScalarSample<String>(SampleOpcode.STRING,sample.toString()));
    }
  }
}
Program: 2206
Project: 2206
Buggy source:
public void processEvent(Event evt){
  if (timelineRegistry == null) {
    timelineRegistry=new TimelineRegistry(timelineDAO);
  }
  try {
    final List<Event> events=new ArrayList<Event>();
    if (evt instanceof BatchedEvent) {
      events.addAll(((BatchedEvent)evt).getEvents());
    }
 else {
      events.add(evt);
    }
    eventsReceived.getAndAdd(events.size());
    final int hostId=getHostIdFromEvent(evt);
    final Map<Integer,ScalarSample> scalarSamples=new LinkedHashMap<Integer,ScalarSample>();
    for (    final Event event : events) {
      if (event instanceof MapEvent) {
        final Map<String,Object> samplesMap=((MapEvent)evt).getMap();
        convertSamplesToScalarSamples(samplesMap,scalarSamples);
      }
 else       if (event instanceof MonitoringEvent) {
        final Map<String,Object> samplesMap=((MonitoringEvent)evt).getMap();
        convertSamplesToScalarSamples(samplesMap,scalarSamples);
      }
 else {
        log.warn("String_Node_Str" + event);
        eventsDiscarded.getAndIncrement();
      }
    }
    final HostSamplesForTimestamp hostSamples=new HostSamplesForTimestamp(hostId,evt.getEventType(),new DateTime(events.get(0).getTimestamp(),DateTimeZone.UTC),scalarSamples);
    final TimelineHostEventAccumulator accumulator=accumulators.get(hostId);
    accumulator.addHostSamples(hostSamples);
  }
 catch (  RuntimeException ruEx) {
    log.warn(ruEx);
  }
catch (  ExecutionException e) {
    log.warn(e);
  }
}

Fixed version (ground truth):
public void processEvent(final Event evt){
  if (timelineRegistry == null) {
    timelineRegistry=new TimelineRegistry(timelineDAO);
  }
  try {
    final List<Event> events=new ArrayList<Event>();
    if (evt instanceof BatchedEvent) {
      events.addAll(((BatchedEvent)evt).getEvents());
    }
 else {
      events.add(evt);
    }
    eventsReceived.getAndAdd(events.size());
    final Map<Integer,ScalarSample> scalarSamples=new LinkedHashMap<Integer,ScalarSample>();
    for (    final Event event : events) {
      scalarSamples.clear();
      final int hostId=getHostIdFromEvent(event);
      if (event instanceof MapEvent) {
        final Map<String,Object> samplesMap=((MapEvent)evt).getMap();
        convertSamplesToScalarSamples(samplesMap,scalarSamples);
      }
 else       if (event instanceof MonitoringEvent) {
        final Map<String,Object> samplesMap=((MonitoringEvent)evt).getMap();
        convertSamplesToScalarSamples(samplesMap,scalarSamples);
      }
 else {
        log.warn("String_Node_Str" + event);
        eventsDiscarded.getAndIncrement();
        continue;
      }
      final HostSamplesForTimestamp hostSamples=new HostSamplesForTimestamp(hostId,evt.getEventType(),new DateTime(events.get(0).getTimestamp(),DateTimeZone.UTC),scalarSamples);
      final TimelineHostEventAccumulator accumulator=accumulators.get(hostId);
      accumulator.addHostSamples(hostSamples);
    }
  }
 catch (  RuntimeException ruEx) {
    log.warn(ruEx);
  }
catch (  ExecutionException e) {
    log.warn(e);
  }
}
Program: 2207
Project: 2207
Buggy source:
/** 
 * @param args
 */
public static void main(String[] args){
  Injector injector=Guice.createInjector(Stage.PRODUCTION,new AbstractModule(){
    @Override protected void configure(){
      bind(MBeanServer.class).toInstance(ManagementFactory.getPlatformMBeanServer());
      bind(StatusPageHandler.class).asEagerSingleton();
    }
  }
,new LifecycleModule(),new EventPublisherModule(EventSenderType.CLIENT),new EmbeddedJettyJerseyModule(),new RESTEventReceiverModule(EventProcessorImpl.class,"String_Node_Str"),new UDPEventReceiverModule(5),new GalaxyModule(),new AgentModule());
  CoreMonitoringAgent coreMonitor=injector.getInstance(CoreMonitoringAgent.class);
  try {
    coreMonitor.run();
  }
 catch (  Exception e) {
    log.error(e,"String_Node_Str");
    System.exit(-1);
  }
}

Fixed version (ground truth):
/** 
 * @param args
 */
public static void main(String[] args){
  Injector injector=Guice.createInjector(Stage.PRODUCTION,new MBeanModule(),new AbstractModule(){
    @Override protected void configure(){
      bind(MBeanServer.class).toInstance(ManagementFactory.getPlatformMBeanServer());
      bind(MBeanExporter.class).toInstance(MBeanExporter.withPlatformMBeanServer());
      bind(StatusPageHandler.class).asEagerSingleton();
    }
  }
,new LifecycleModule(),new EventPublisherModule(EventSenderType.CLIENT),new EmbeddedJettyJerseyModule(),new RESTEventReceiverModule(EventProcessorImpl.class,"String_Node_Str"),new UDPEventReceiverModule(5),new GalaxyModule(),new AgentModule());
  CoreMonitoringAgent coreMonitor=injector.getInstance(CoreMonitoringAgent.class);
  try {
    coreMonitor.run();
  }
 catch (  Exception e) {
    log.error(e,"String_Node_Str");
    System.exit(-1);
  }
}
Program: 2208
Project: 2208
Buggy source:
@Override protected void configure(){
  bind(MBeanServer.class).toInstance(ManagementFactory.getPlatformMBeanServer());
  bind(StatusPageHandler.class).asEagerSingleton();
}

Fixed version (ground truth):
@Override protected void configure(){
  bind(MBeanServer.class).toInstance(ManagementFactory.getPlatformMBeanServer());
  bind(MBeanExporter.class).toInstance(MBeanExporter.withPlatformMBeanServer());
  bind(StatusPageHandler.class).asEagerSingleton();
}
Program: 2210
Project: 2210
Buggy source:
@Inject public AreciboEventServiceChooser(ServiceLocator serviceLocator,@ConsistentHashingSelector Selector selector,ConsistentHashingServiceChooser magic,MBeanExporter exporter,@EventSenderType String senderType,AsyncHttpClient httpClient) throws IOException {
  this.serviceLocator=serviceLocator;
  this.selector=selector;
  this.serviceLocator.startReadOnly();
  this.restClient=new EventServiceRESTClient(httpClient,new JavaEventSerializer(),senderType);
  this.udpClient=new EventServiceUDPClient(new JavaEventSerializer(),senderType);
  this.magic=magic;
  JMXCronTaskMaster master=new JMXCronTaskMaster(Executors.newScheduledThreadPool(1),exporter);
  long jobInterval=Long.getLong("String_Node_Str",60L);
  CronJob job=master.exportNewFixedDelayCronJob(Math.abs(jobInterval),TimeUnit.MINUTES,"String_Node_Str",new Runnable(){
    public void run(){
      cache.clear();
    }
  }
);
  if (jobInterval > 0) {
    job.start();
  }
}

Fixed version (ground truth):
@Inject public AreciboEventServiceChooser(ServiceLocator serviceLocator,@ConsistentHashingSelector Selector selector,ConsistentHashingServiceChooser magic,JMXCronTaskMaster cronTaskMaster,@EventSenderType String senderType,AsyncHttpClient httpClient) throws IOException {
  this.serviceLocator=serviceLocator;
  this.selector=selector;
  this.serviceLocator.startReadOnly();
  this.restClient=new EventServiceRESTClient(httpClient,new JavaEventSerializer(),senderType);
  this.udpClient=new EventServiceUDPClient(new JavaEventSerializer(),senderType);
  this.magic=magic;
  long jobInterval=Long.getLong("String_Node_Str",60L);
  CronJob job=cronTaskMaster.exportNewFixedDelayCronJob(Math.abs(jobInterval),TimeUnit.MINUTES,"String_Node_Str",new Runnable(){
    public void run(){
      cache.clear();
    }
  }
);
  if (jobInterval > 0) {
    job.start();
  }
}
Program: 2212
Project: 2212
Buggy source:
@Inject public JMXCronTaskMaster(ScheduledExecutorService executorService,MBeanExporter exporter){
  this.executorService=executorService;
  this.exporter=exporter;
}

Fixed version (ground truth):
@Inject public JMXCronTaskMaster(@JMXCronScheduler ScheduledExecutorService executorService,MBeanExporter exporter){
  this.executorService=executorService;
  this.exporter=exporter;
}