Program: 161959
Project: 161959
Buggy source:
public void controlEditClickedHelper(MMPControl control,boolean withShift,boolean wasAlreadySelected){
  if (!withShift && !wasAlreadySelected) {
    for (    MMPControl currControl : documentModel.controlArray) {
      if (!currControl.equals(control))       currControl.setIsSelected(false);
    }
  }
  windowDelegate.propColorWell.setColor(control.color);
  windowDelegate.propHighlightColorWell.setColor(control.highlightColor);
  if (withShift == true)   clearSelection();
 else {
    for (    Component varPanel : windowDelegate.propVarPanel.getComponents())     varPanel.setVisible(false);
    windowDelegate.propAddressTextField.setEnabled(true);
    windowDelegate.propAddressTextField.setText(control.getAddress());
    if (control instanceof MMPKnob) {
      windowDelegate.propVarKnobPanel.setVisible(true);
      MMPKnob currKnob=(MMPKnob)control;
      windowDelegate.propVarKnobRangeTextField.setText("String_Node_Str" + currKnob.range);
      windowDelegate.propVarKnobIndicatorColorWell.setColor(currKnob.indicatorColor);
    }
 else     if (control instanceof MMPSlider) {
      windowDelegate.propVarSliderPanel.setVisible(true);
      MMPSlider currSlider=(MMPSlider)control;
      windowDelegate.propVarSliderRangeTextField.setText("String_Node_Str" + currSlider.range);
      windowDelegate.propVarSliderOrientationBox.removeActionListener(windowDelegate);
      if (currSlider.isHorizontal == true)       windowDelegate.propVarSliderOrientationBox.setSelectedIndex(1);
 else       windowDelegate.propVarSliderOrientationBox.setSelectedIndex(0);
      windowDelegate.propVarSliderOrientationBox.addActionListener(windowDelegate);
    }
 else     if (control instanceof MMPLabel) {
      windowDelegate.propVarLabelPanel.setVisible(true);
      MMPLabel currLabel=(MMPLabel)control;
      windowDelegate.propLabelTextField.getDocument().removeDocumentListener(windowDelegate);
      windowDelegate.propLabelTextField.setText(currLabel.stringValue);
      windowDelegate.propLabelTextField.getDocument().addDocumentListener(windowDelegate);
      windowDelegate.propLabelSizeTextField.removeActionListener(windowDelegate);
      windowDelegate.propLabelSizeTextField.setText("String_Node_Str" + currLabel.textSize);
      windowDelegate.propLabelSizeTextField.addActionListener(windowDelegate);
      windowDelegate.propLabelFontBox.removeActionListener(windowDelegate);
      windowDelegate.propLabelFontBox.setSelectedItem(currLabel.fontFamily);
      windowDelegate.propLabelFontBox.addActionListener(windowDelegate);
      windowDelegate.propLabelFontTypeBox.removeActionListener(windowDelegate);
      windowDelegate.populateFont();
      windowDelegate.propLabelFontTypeBox.setSelectedItem(currLabel.fontName);
      windowDelegate.propLabelFontTypeBox.addActionListener(windowDelegate);
      windowDelegate.propLabelAndroidFontTypeBox.removeActionListener(windowDelegate);
      windowDelegate.propLabelAndroidFontTypeBox.setSelectedItem(currLabel.androidFontName);
      windowDelegate.propLabelAndroidFontTypeBox.addActionListener(windowDelegate);
    }
 else     if (control instanceof MMPGrid) {
      windowDelegate.propVarGridPanel.setVisible(true);
      MMPGrid currGrid=(MMPGrid)control;
      windowDelegate.propGridDimXTextField.removeActionListener(windowDelegate);
      windowDelegate.propGridDimXTextField.setText("String_Node_Str" + currGrid.dimX);
      windowDelegate.propGridDimXTextField.addActionListener(windowDelegate);
      windowDelegate.propGridDimYTextField.removeActionListener(windowDelegate);
      windowDelegate.propGridDimYTextField.setText("String_Node_Str" + currGrid.dimY);
      windowDelegate.propGridDimYTextField.addActionListener(windowDelegate);
      windowDelegate.propGridBorderThicknessTextField.removeActionListener(windowDelegate);
      windowDelegate.propGridBorderThicknessTextField.setText("String_Node_Str" + currGrid.borderThickness);
      windowDelegate.propGridBorderThicknessTextField.addActionListener(windowDelegate);
      windowDelegate.propGridCellPaddingTextField.removeActionListener(windowDelegate);
      windowDelegate.propGridCellPaddingTextField.setText("String_Node_Str" + currGrid.cellPadding);
      windowDelegate.propGridCellPaddingTextField.addActionListener(windowDelegate);
      windowDelegate.propGridModeBox.removeActionListener(windowDelegate.propGridModeBox.getActionListeners()[0]);
      windowDelegate.propGridModeBox.setSelectedIndex(currGrid.getMode());
      windowDelegate.propGridModeBox.addActionListener(windowDelegate);
    }
 else     if (control instanceof MMPPanel) {
      windowDelegate.propVarPanelPanel.setVisible(true);
      MMPPanel currPanel=(MMPPanel)control;
      if (currPanel.imagePath != null) {
        windowDelegate.propPanelFileTextField.removeActionListener(windowDelegate);
        windowDelegate.propPanelFileTextField.setText(currPanel.imagePath);
        windowDelegate.propPanelFileTextField.addActionListener(windowDelegate);
      }
      windowDelegate.propPanelShouldPassTouchesCheckBox.removeActionListener(windowDelegate);
      windowDelegate.propPanelShouldPassTouchesCheckBox.setSelected(currPanel.shouldPassTouches);
      windowDelegate.propPanelShouldPassTouchesCheckBox.addActionListener(windowDelegate);
    }
 else     if (control instanceof MMPMultiSlider) {
      windowDelegate.propVarMultiSliderPanel.setVisible(true);
      MMPMultiSlider currMS=(MMPMultiSlider)control;
      windowDelegate.propMultiCountTextField.removeActionListener(windowDelegate);
      windowDelegate.propMultiCountTextField.setText("String_Node_Str" + currMS.range);
      windowDelegate.propMultiCountTextField.addActionListener(windowDelegate);
    }
 else     if (control instanceof MMPToggle) {
      windowDelegate.propVarTogglePanel.setVisible(true);
      MMPToggle currToggle=(MMPToggle)control;
      windowDelegate.propToggleThicknessTextField.removeActionListener(windowDelegate);
      windowDelegate.propToggleThicknessTextField.setText("String_Node_Str" + currToggle.borderThickness);
      windowDelegate.propToggleThicknessTextField.addActionListener(windowDelegate);
    }
 else     if (control instanceof MMPMenu) {
      windowDelegate.propVarMenuPanel.setVisible(true);
      MMPMenu currMenu=(MMPMenu)control;
      windowDelegate.propMenuTitleTextField.getDocument().removeDocumentListener(windowDelegate);
      windowDelegate.propMenuTitleTextField.setText(currMenu.titleString);
      windowDelegate.propMenuTitleTextField.getDocument().addDocumentListener(windowDelegate);
    }
 else     if (control instanceof MMPTable) {
      windowDelegate.propVarTablePanel.setVisible(true);
      MMPTable currTable=(MMPTable)control;
      windowDelegate.propTableModeBox.removeActionListener(windowDelegate);
      windowDelegate.propTableModeBox.setSelectedIndex(currTable.getMode());
      windowDelegate.propTableModeBox.addActionListener(windowDelegate);
      windowDelegate.propTableSelectionColorWell.setColor(currTable.getSelectionColor());
    }
    currentSingleSelection=control;
  }
}

Fixed version (ground truth):
public void controlEditClickedHelper(MMPControl control,boolean withShift,boolean wasAlreadySelected){
  if (!withShift && !wasAlreadySelected) {
    for (    MMPControl currControl : documentModel.controlArray) {
      if (!currControl.equals(control))       currControl.setIsSelected(false);
    }
  }
  windowDelegate.propColorWell.setColor(control.color);
  windowDelegate.propHighlightColorWell.setColor(control.highlightColor);
  if (withShift == true)   clearSelection();
 else {
    for (    Component varPanel : windowDelegate.propVarPanel.getComponents())     varPanel.setVisible(false);
    windowDelegate.propAddressTextField.setEnabled(true);
    windowDelegate.propAddressTextField.setText(control.getAddress());
    if (control instanceof MMPKnob) {
      windowDelegate.propVarKnobPanel.setVisible(true);
      MMPKnob currKnob=(MMPKnob)control;
      windowDelegate.propVarKnobRangeTextField.setText("String_Node_Str" + currKnob.range);
      windowDelegate.propVarKnobIndicatorColorWell.setColor(currKnob.indicatorColor);
    }
 else     if (control instanceof MMPSlider) {
      windowDelegate.propVarSliderPanel.setVisible(true);
      MMPSlider currSlider=(MMPSlider)control;
      windowDelegate.propVarSliderRangeTextField.setText("String_Node_Str" + currSlider.range);
      windowDelegate.propVarSliderOrientationBox.removeActionListener(windowDelegate);
      if (currSlider.isHorizontal == true)       windowDelegate.propVarSliderOrientationBox.setSelectedIndex(1);
 else       windowDelegate.propVarSliderOrientationBox.setSelectedIndex(0);
      windowDelegate.propVarSliderOrientationBox.addActionListener(windowDelegate);
    }
 else     if (control instanceof MMPLabel) {
      windowDelegate.propVarLabelPanel.setVisible(true);
      MMPLabel currLabel=(MMPLabel)control;
      windowDelegate.propLabelTextField.getDocument().removeDocumentListener(windowDelegate);
      windowDelegate.propLabelTextField.setText(currLabel.stringValue);
      windowDelegate.propLabelTextField.getDocument().addDocumentListener(windowDelegate);
      windowDelegate.propLabelSizeTextField.removeActionListener(windowDelegate);
      windowDelegate.propLabelSizeTextField.setText("String_Node_Str" + currLabel.textSize);
      windowDelegate.propLabelSizeTextField.addActionListener(windowDelegate);
      windowDelegate.propLabelFontBox.removeActionListener(windowDelegate);
      windowDelegate.propLabelFontBox.setSelectedItem(currLabel.fontFamily);
      windowDelegate.propLabelFontBox.addActionListener(windowDelegate);
      windowDelegate.propLabelFontTypeBox.removeActionListener(windowDelegate);
      windowDelegate.populateFont();
      windowDelegate.propLabelFontTypeBox.setSelectedItem(currLabel.fontName);
      windowDelegate.propLabelFontTypeBox.addActionListener(windowDelegate);
      windowDelegate.propLabelAndroidFontTypeBox.removeActionListener(windowDelegate);
      windowDelegate.propLabelAndroidFontTypeBox.setSelectedItem(currLabel.androidFontFileName);
      windowDelegate.propLabelAndroidFontTypeBox.addActionListener(windowDelegate);
    }
 else     if (control instanceof MMPGrid) {
      windowDelegate.propVarGridPanel.setVisible(true);
      MMPGrid currGrid=(MMPGrid)control;
      windowDelegate.propGridDimXTextField.removeActionListener(windowDelegate);
      windowDelegate.propGridDimXTextField.setText("String_Node_Str" + currGrid.dimX);
      windowDelegate.propGridDimXTextField.addActionListener(windowDelegate);
      windowDelegate.propGridDimYTextField.removeActionListener(windowDelegate);
      windowDelegate.propGridDimYTextField.setText("String_Node_Str" + currGrid.dimY);
      windowDelegate.propGridDimYTextField.addActionListener(windowDelegate);
      windowDelegate.propGridBorderThicknessTextField.removeActionListener(windowDelegate);
      windowDelegate.propGridBorderThicknessTextField.setText("String_Node_Str" + currGrid.borderThickness);
      windowDelegate.propGridBorderThicknessTextField.addActionListener(windowDelegate);
      windowDelegate.propGridCellPaddingTextField.removeActionListener(windowDelegate);
      windowDelegate.propGridCellPaddingTextField.setText("String_Node_Str" + currGrid.cellPadding);
      windowDelegate.propGridCellPaddingTextField.addActionListener(windowDelegate);
      windowDelegate.propGridModeBox.removeActionListener(windowDelegate.propGridModeBox.getActionListeners()[0]);
      windowDelegate.propGridModeBox.setSelectedIndex(currGrid.getMode());
      windowDelegate.propGridModeBox.addActionListener(windowDelegate);
    }
 else     if (control instanceof MMPPanel) {
      windowDelegate.propVarPanelPanel.setVisible(true);
      MMPPanel currPanel=(MMPPanel)control;
      if (currPanel.imagePath != null) {
        windowDelegate.propPanelFileTextField.removeActionListener(windowDelegate);
        windowDelegate.propPanelFileTextField.setText(currPanel.imagePath);
        windowDelegate.propPanelFileTextField.addActionListener(windowDelegate);
      }
      windowDelegate.propPanelShouldPassTouchesCheckBox.removeActionListener(windowDelegate);
      windowDelegate.propPanelShouldPassTouchesCheckBox.setSelected(currPanel.shouldPassTouches);
      windowDelegate.propPanelShouldPassTouchesCheckBox.addActionListener(windowDelegate);
    }
 else     if (control instanceof MMPMultiSlider) {
      windowDelegate.propVarMultiSliderPanel.setVisible(true);
      MMPMultiSlider currMS=(MMPMultiSlider)control;
      windowDelegate.propMultiCountTextField.removeActionListener(windowDelegate);
      windowDelegate.propMultiCountTextField.setText("String_Node_Str" + currMS.range);
      windowDelegate.propMultiCountTextField.addActionListener(windowDelegate);
    }
 else     if (control instanceof MMPToggle) {
      windowDelegate.propVarTogglePanel.setVisible(true);
      MMPToggle currToggle=(MMPToggle)control;
      windowDelegate.propToggleThicknessTextField.removeActionListener(windowDelegate);
      windowDelegate.propToggleThicknessTextField.setText("String_Node_Str" + currToggle.borderThickness);
      windowDelegate.propToggleThicknessTextField.addActionListener(windowDelegate);
    }
 else     if (control instanceof MMPMenu) {
      windowDelegate.propVarMenuPanel.setVisible(true);
      MMPMenu currMenu=(MMPMenu)control;
      windowDelegate.propMenuTitleTextField.getDocument().removeDocumentListener(windowDelegate);
      windowDelegate.propMenuTitleTextField.setText(currMenu.titleString);
      windowDelegate.propMenuTitleTextField.getDocument().addDocumentListener(windowDelegate);
    }
 else     if (control instanceof MMPTable) {
      windowDelegate.propVarTablePanel.setVisible(true);
      MMPTable currTable=(MMPTable)control;
      windowDelegate.propTableModeBox.removeActionListener(windowDelegate);
      windowDelegate.propTableModeBox.setSelectedIndex(currTable.getMode());
      windowDelegate.propTableModeBox.addActionListener(windowDelegate);
      windowDelegate.propTableSelectionColorWell.setColor(currTable.getSelectionColor());
    }
    currentSingleSelection=control;
  }
}