Program: 143669
Project: 143669
Buggy source:
private boolean addSelectedComponent(Component component,Rectangle bounds){
  Object clientdesign_handles=null;
  if (component instanceof IScriptableProvider && ((IScriptableProvider)component).getScriptObject() instanceof IRuntimeComponent) {
    IRuntimeComponent sbmc=(IRuntimeComponent)((IScriptableProvider)component).getScriptObject();
    if (sbmc.getName() == null)     return false;
    clientdesign_handles=sbmc.getClientProperty(CLIENTDESIGN.HANDLES);
    Object clientdesign_selectable=sbmc.getClientProperty(CLIENTDESIGN.SELECTABLE);
    if (clientdesign_selectable != null && !Utils.getAsBoolean(clientdesign_selectable))     return false;
  }
  Set<String> handles=null;
  if (clientdesign_handles instanceof Object[]) {
    handles=new HashSet<String>();
    for (int i=0; i < ((Object[])clientdesign_handles).length; i++) {
      String val=((Object[])clientdesign_handles)[i].toString();
      handles.add(Utils.stringReplace(val,"String_Node_Str","String_Node_Str"));
    }
  }
  component.setBounds(bounds);
  int[][] positions=new int[8][2];
  if (handles == null || handles.contains("String_Node_Str")) {
    positions[0][0]=bounds.x - 2;
    positions[0][1]=bounds.y - 2;
  }
 else {
    positions[0][0]=-1;
    positions[0][1]=-1;
  }
  if (handles == null || handles.contains("String_Node_Str")) {
    positions[1][0]=bounds.x - 2;
    positions[1][1]=bounds.y + bounds.height / 2 - 3;
  }
 else {
    positions[1][0]=-1;
    positions[1][1]=-1;
  }
  if (handles == null || handles.contains("String_Node_Str")) {
    positions[2][0]=bounds.x - 2;
    positions[2][1]=bounds.y + bounds.height - 3;
  }
 else {
    positions[2][0]=-1;
    positions[2][1]=-1;
  }
  if (handles == null || handles.contains("String_Node_Str")) {
    positions[3][0]=bounds.x + bounds.width / 2 - 3;
    positions[3][1]=bounds.y - 3;
  }
 else {
    positions[3][0]=-1;
    positions[3][1]=-1;
  }
  if (handles == null || handles.contains("String_Node_Str")) {
    positions[4][0]=bounds.x + bounds.width / 2 - 3;
    positions[4][1]=bounds.y + bounds.height - 3;
  }
 else {
    positions[4][0]=-1;
    positions[4][1]=-1;
  }
  if (handles == null || handles.contains("String_Node_Str")) {
    positions[5][0]=bounds.x + bounds.width - 3;
    positions[5][1]=bounds.y - 2;
  }
 else {
    positions[5][0]=-1;
    positions[5][1]=-1;
  }
  if (handles == null || handles.contains("String_Node_Str")) {
    positions[6][0]=bounds.x + bounds.width - 3;
    positions[6][1]=bounds.y + bounds.height / 2 - 3;
  }
 else {
    positions[6][0]=-1;
    positions[6][1]=-1;
  }
  if (handles == null || handles.contains("String_Node_Str")) {
    positions[7][0]=bounds.x + bounds.width - 3;
    positions[7][1]=bounds.y + bounds.height - 3;
  }
 else {
    positions[7][0]=-1;
    positions[7][1]=-1;
  }
  Map<JComponent,int[][]> selectedComponents=selectionHandler.getSelectionForChange(this);
  return selectedComponents.put((JComponent)component,positions) == null;
}

Fixed version (ground truth):
private boolean addSelectedComponent(Component component,Rectangle bounds){
  if (component != null && !component.isVisible())   return false;
  Object clientdesign_handles=null;
  if (component instanceof IScriptableProvider && ((IScriptableProvider)component).getScriptObject() instanceof IRuntimeComponent) {
    IRuntimeComponent sbmc=(IRuntimeComponent)((IScriptableProvider)component).getScriptObject();
    if (sbmc.getName() == null)     return false;
    clientdesign_handles=sbmc.getClientProperty(CLIENTDESIGN.HANDLES);
    Object clientdesign_selectable=sbmc.getClientProperty(CLIENTDESIGN.SELECTABLE);
    if (clientdesign_selectable != null && !Utils.getAsBoolean(clientdesign_selectable))     return false;
  }
  Set<String> handles=null;
  if (clientdesign_handles instanceof Object[]) {
    handles=new HashSet<String>();
    for (int i=0; i < ((Object[])clientdesign_handles).length; i++) {
      String val=((Object[])clientdesign_handles)[i].toString();
      handles.add(Utils.stringReplace(val,"String_Node_Str","String_Node_Str"));
    }
  }
  component.setBounds(bounds);
  int[][] positions=new int[8][2];
  if (handles == null || handles.contains("String_Node_Str")) {
    positions[0][0]=bounds.x - 2;
    positions[0][1]=bounds.y - 2;
  }
 else {
    positions[0][0]=-1;
    positions[0][1]=-1;
  }
  if (handles == null || handles.contains("String_Node_Str")) {
    positions[1][0]=bounds.x - 2;
    positions[1][1]=bounds.y + bounds.height / 2 - 3;
  }
 else {
    positions[1][0]=-1;
    positions[1][1]=-1;
  }
  if (handles == null || handles.contains("String_Node_Str")) {
    positions[2][0]=bounds.x - 2;
    positions[2][1]=bounds.y + bounds.height - 3;
  }
 else {
    positions[2][0]=-1;
    positions[2][1]=-1;
  }
  if (handles == null || handles.contains("String_Node_Str")) {
    positions[3][0]=bounds.x + bounds.width / 2 - 3;
    positions[3][1]=bounds.y - 3;
  }
 else {
    positions[3][0]=-1;
    positions[3][1]=-1;
  }
  if (handles == null || handles.contains("String_Node_Str")) {
    positions[4][0]=bounds.x + bounds.width / 2 - 3;
    positions[4][1]=bounds.y + bounds.height - 3;
  }
 else {
    positions[4][0]=-1;
    positions[4][1]=-1;
  }
  if (handles == null || handles.contains("String_Node_Str")) {
    positions[5][0]=bounds.x + bounds.width - 3;
    positions[5][1]=bounds.y - 2;
  }
 else {
    positions[5][0]=-1;
    positions[5][1]=-1;
  }
  if (handles == null || handles.contains("String_Node_Str")) {
    positions[6][0]=bounds.x + bounds.width - 3;
    positions[6][1]=bounds.y + bounds.height / 2 - 3;
  }
 else {
    positions[6][0]=-1;
    positions[6][1]=-1;
  }
  if (handles == null || handles.contains("String_Node_Str")) {
    positions[7][0]=bounds.x + bounds.width - 3;
    positions[7][1]=bounds.y + bounds.height - 3;
  }
 else {
    positions[7][0]=-1;
    positions[7][1]=-1;
  }
  Map<JComponent,int[][]> selectedComponents=selectionHandler.getSelectionForChange(this);
  return selectedComponents.put((JComponent)component,positions) == null;
}