Program: 77973
Project: 77973
Buggy source:
/** 
 * desides whether an new fiter imge is chousen or green screen
 * @param index current mode
 * @param idFilter current filter id
 * @param greenscreen boolean green screen or not
 */
public void currentlychousen(int index,int idFilter,boolean greenscreen){
  this.index=index;
  fId=idFilter;
  titel.setText("String_Node_Str");
  LOGGER.debug("String_Node_Str" + index + "String_Node_Str"+ currentMode.length);
  try {
    if (index > -1) {
      if (profile == null) {
        profile=profileservice.get(shootingService.searchIsActive().getProfileid());
      }
      if (!first) {
        firstVisit();
        currentMode[this.index]=1;
        singel.setStyle("String_Node_Str");
      }
      if (profile != profileservice.get(shootingService.searchIsActive().getProfileid())) {
        profile=profileservice.get(shootingService.searchIsActive().getProfileid());
        currentMode=new Integer[profile.getPairCameraPositions().size()];
        currentMode[this.index]=1;
      }
switch (currentMode[this.index]) {
case 0:
        singel.setStyle("String_Node_Str");
      break;
case 1:
    serien.setStyle("String_Node_Str");
  break;
case 2:
ontime.setStyle("String_Node_Str");
singel.setStyle("String_Node_Str");
break;
}
if (greenscreen) {
titel=new Label("String_Node_Str" + profileservice.getAllPairCameraPositionOfProfile().get(index).getCamera().getId() + "String_Node_Str");
creatGreenscreenButton();
}
 else {
if (buttonList.isEmpty()) {
titel=new Label("String_Node_Str" + profileservice.getAllPairCameraPositionOfProfile().get(index).getCamera().getId() + "String_Node_Str");
creatButtons();
}
 else {
titel=new Label("String_Node_Str" + profileservice.getAllPairCameraPositionOfProfile().get(index).getCamera().getId() + "String_Node_Str");
loadButton();
}
}
}
}
 catch (ServiceException e) {
LOGGER.debug("String_Node_Str",e);
}
}

Fixed version (ground truth):
/** 
 * desides whether an new fiter imge is chousen or green screen
 * @param index current mode
 * @param idFilter current filter id
 * @param greenscreen boolean green screen or not
 */
public void currentlychousen(int index,int idFilter,boolean greenscreen){
  this.index=index;
  currentMode=kameraFilterService.getcurrent(index);
  fId=idFilter;
  titel.setText("String_Node_Str");
  try {
    if (index > -1) {
      if (profile != profileservice.get(shootingService.searchIsActive().getProfileid())) {
        profile=profileservice.get(shootingService.searchIsActive().getProfileid());
      }
switch (currentMode) {
case 0:
        singel.setStyle("String_Node_Str");
      ontime.setStyle("String_Node_Str");
    serien.setStyle("String_Node_Str");
  break;
case 1:
serien.setStyle("String_Node_Str");
ontime.setStyle("String_Node_Str");
singel.setStyle("String_Node_Str");
break;
case 2:
ontime.setStyle("String_Node_Str");
singel.setStyle("String_Node_Str");
serien.setStyle("String_Node_Str");
break;
}
if (greenscreen) {
titel.setText("String_Node_Str" + profileservice.getAllPairCameraPositionOfProfile().get(index).getCamera().getId() + "String_Node_Str");
titel.setVisible(true);
creatGreenscreenButton();
}
 else {
if (buttonList.isEmpty()) {
titel.setText("String_Node_Str" + profileservice.getAllPairCameraPositionOfProfile().get(index).getCamera().getId() + "String_Node_Str");
titel.setVisible(true);
creatButtons();
}
 else {
titel.setText("String_Node_Str" + profileservice.getAllPairCameraPositionOfProfile().get(index).getCamera().getId() + "String_Node_Str");
titel.setVisible(true);
loadButton();
}
}
}
}
 catch (ServiceException e) {
LOGGER.debug("String_Node_Str",e);
}
}