CPD Results

The following document contains the results of PMD's CPD 4.2.5.

Duplications

File Line
de\smartics\exceptions\i18n\message\MessageType.java 198
de\smartics\exceptions\i18n\message\MessageType.java 253
      final ParentMessageParam messageParam)
  {
    String specificIndexString;
    if (TITLE == this)
    {
      specificIndexString = messageParam.headerParamIndex();
    }
    else if (SUMMARY == this)
    {
      specificIndexString = messageParam.summaryParamIndex();
    }
    else if (DETAILS == this)
    {
      specificIndexString = messageParam.detailsParamIndex();
    }
    else if (IMPLICATIONS_ON_CURRENT_TASK == this)
    {
      specificIndexString = messageParam.implicationsParamIndex();
    }
    else if (WHAT_TO_DO_NOW == this)
    {
      specificIndexString = messageParam.todoParamIndex();
    }
    else if (URL == this)
    {
      specificIndexString = messageParam.urlParamIndex();
    }
    else
    {
      assert false : "Unexpected enumeration type: " + this;
      specificIndexString = null; // NOPMD
    }

    if ("".equals(specificIndexString))
    {
      specificIndexString = messageParam.value();
    }

    final Map<String, List<MessageParamInfo>> map =
File Line
de\smartics\exceptions\i18n\app\ConfigurationExceptionCode.java 135
de\smartics\exceptions\i18n\app\ParseExceptionCode.java 117
  private ParseExceptionCode(final String componentId,
      final Integer majorNumber, final Integer minorNumber)
  {
    this.info = new NumberCodeInfo(componentId, majorNumber, minorNumber);
  }

  // ********************************* Methods ********************************

  // --- init -----------------------------------------------------------------

  /**
   * Used to access the identify for the exceptions raised by this component.
   *
   * @return the component identifier of this exception library.
   */
  private static String readComponentId()
  {
    return Constant.COMPONENT_ID;
  }

  // --- get&set --------------------------------------------------------------

  // --- business -------------------------------------------------------------

  /**
   * {@inheritDoc}
   *
   * @see de.smartics.exceptions.core.Code#getCode()
   */
  public String getCode()
  {
    return info.getCode();
  }

  /**
   * {@inheritDoc}
   *
   * @see de.smartics.exceptions.core.Code#getComponentId()
   */
  public String getComponentId()
  {
    return info.getComponentId();
  }

  /**
   * {@inheritDoc}
   *
   * @see de.smartics.exceptions.code.NumberCode#getMajorNumber()
   */
  public Integer getMajorNumber()
  {
    return info.getMajorNumber();
  }

  /**
   * {@inheritDoc}
   *
   * @see de.smartics.exceptions.code.NumberCode#getMinorNumber()
   */
  public Integer getMinorNumber()
  {
    return info.getMinorNumber();
  }

  /**
   * {@inheritDoc}
   *
   * @see de.smartics.exceptions.core.Code#getDisplayId()
   */
  public String getDisplayId()
  {
    return info.getDisplayId();
  }

  // --- object basics --------------------------------------------------------

  /**
   * Returns the string representation of the object.
   *
   * @return the string representation of the object.
   */
  @Override
  public String toString()
  {
    return info.toString();
  }
}