Program: 119277
Project: 119277
Buggy source:
private void inputMetadataColumnAmountChanged(IODataComponent dataComponent,IExternalNode externalNode){
  List<ColumnNameChanged> removedMetadataColumns=dataComponent.getRemoveMetadataColumns();
  IExternalData iExternalData=externalNode.getExternalData();
  if (iExternalData == null || removedMetadataColumns == null || removedMetadataColumns.size() == 0) {
    return;
  }
  List<ExternalDbMapTable> metaTableList=(List<ExternalDbMapTable>)iExternalData.getInputTables();
  if (metaTableList == null || metaTableList.size() == 0) {
    return;
  }
  IMetadataTable connMetadataTable=dataComponent.getConnMetadataTable();
  if (connMetadataTable == null) {
    return;
  }
  String tableName=connMetadataTable.getLabel();
  for (  ExternalDbMapTable metaTable : metaTableList) {
    if (tableName.equals(metaTable.getTableName())) {
      List<IExternalMapEntry> externalMapEntryList=(List<IExternalMapEntry>)metaTable.returnTableEntries();
      if (externalMapEntryList == null || externalMapEntryList.size() == 0) {
        continue;
      }
      if (removedMetadataColumns != null && 0 < removedMetadataColumns.size()) {
        for (        ColumnNameChanged removedMetadataColumn : removedMetadataColumns) {
          if ("String_Node_Str".equals(removedMetadataColumn.getNewName())) {
            String columnName=removedMetadataColumn.getOldName();
            for (int i=externalMapEntryList.size() - 1; 0 <= i; i--) {
              IExternalMapEntry mapEntry=externalMapEntryList.get(i);
              if (columnName.equals(mapEntry.getName())) {
                externalMapEntryList.remove(i);
                break;
              }
            }
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
private void inputMetadataColumnAmountChanged(IODataComponent dataComponent,IExternalNode externalNode){
  List<ColumnNameChanged> removedMetadataColumns=dataComponent.getRemoveMetadataColumns();
  IExternalData iExternalData=externalNode.getExternalData();
  if (iExternalData == null || removedMetadataColumns == null || removedMetadataColumns.size() == 0) {
    return;
  }
  List<ExternalDbMapTable> metaTableList=(List<ExternalDbMapTable>)iExternalData.getInputTables();
  if (metaTableList == null || metaTableList.size() == 0) {
    return;
  }
  String tableName=dataComponent.getName();
  if (StringUtils.isEmpty(tableName)) {
    return;
  }
  for (  ExternalDbMapTable metaTable : metaTableList) {
    if (tableName.equals(metaTable.getTableName())) {
      List<IExternalMapEntry> externalMapEntryList=(List<IExternalMapEntry>)metaTable.returnTableEntries();
      if (externalMapEntryList == null || externalMapEntryList.size() == 0) {
        continue;
      }
      if (removedMetadataColumns != null && 0 < removedMetadataColumns.size()) {
        for (        ColumnNameChanged removedMetadataColumn : removedMetadataColumns) {
          if ("String_Node_Str".equals(removedMetadataColumn.getNewName())) {
            String columnName=removedMetadataColumn.getOldName();
            for (int i=externalMapEntryList.size() - 1; 0 <= i; i--) {
              IExternalMapEntry mapEntry=externalMapEntryList.get(i);
              if (columnName.equals(mapEntry.getName())) {
                externalMapEntryList.remove(i);
                break;
              }
            }
          }
        }
      }
    }
  }
}