private void removeValue(int inputId, Object fileSet, Value value) {
    ensureInputIdAssociatedWithValue(inputId, value);

    if (fileSet == null) {
      return;
    }

    if (fileSet instanceof ChangeBufferingList) {
      ChangeBufferingList changesList = (ChangeBufferingList)fileSet;
      changesList.remove(inputId);
      if (!changesList.isEmpty()) {
        return;
      }
    }
    else if (fileSet instanceof Integer) {
      if (((Integer)fileSet).intValue() != inputId) {
        return;
      }
    }

    value = wrapValue(value);
    Map<Value, Object> mapping = asMapping();
    if (mapping == null) {
      myInputIdMapping = null;
      myInputIdMappingValue = null;
    }
    else {
      mapping.remove(value);
      if (mapping.size() == 1) {
        Map.Entry<Value, Object> entry = mapping.entrySet().iterator().next();
        myInputIdMapping = entry.getKey();
        myInputIdMappingValue = entry.getValue();
      }
    }
  }
private void removeValue(int inputId, Object fileSet, Value value)