179-4-5

int getFractionDigitsFacet(EDataType eDataType) { return getExtendedMetaData(eDataType).getFractionDigitsFacet(); } protected int basicGetFractionDigitsFacet(EDataType eDataType) { EAnnotation eAnnotation = getAnnotation(eDataType, false); if (eAnnotation != null) { String fractionDigitsLiteral = eAnnotation.getDetails().get("fractionDigits"); if (fractionDigitsLiteral != null) { return Integer.parseInt(fractionDigitsLiteral); } } return -1; }
int getLengthFacet(EDataType eDataType) { return getExtendedMetaData(eDataType).getLengthFacet(); } protected int basicGetLengthFacet(EDataType eDataType) { EAnnotation eAnnotation = getAnnotation(eDataType, false); if (eAnnotation != null) { String lengthLiteral = eAnnotation.getDetails().get("length"); if (lengthLiteral != null) { return Integer.parseInt(lengthLiteral); } } return -1; }

Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicExtendedMetaData.java |  | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/util/BasicExtendedMetaData.java
Method name: `` |  | Method name: ``
Number of AST nodes: 0 |  | Number of AST nodes: 0

1

    int getFractionDigitsFacet(EDataType eDataType)↵

1

    int getLengthFacet(EDataType eDataType)↵

2

      {↵

2

      {↵

3

        return getExtendedMetaData(eDataType).getFractionDigitsFacet();↵

3

        return getExtendedMetaData(eDataType).getLengthFacet();↵

4

      }↵

4

      }↵

5

      protected int basicGetFractionDigitsFacet(EDataType eDataType)↵

5

      protected int basicGetLengthFacet(EDataType eDataType)↵

6

      {↵

6

      {↵

7

        EAnnotation eAnnotation = getAnnotation(eDataType, false);↵

7

        EAnnotation eAnnotation = getAnnotation(eDataType, false);↵

8

        if (eAnnotation != null)↵

8

        if (eAnnotation != null)↵

9

        {↵

9

        {↵

10

          String fractionDigitsLiteral = eAnnotation.getDetails().get("fractionDigits");↵

10

          String lengthLiteral = eAnnotation.getDetails().get("↵

11

          if (fractionDigits↵

11

    length");↵

12

    Literal != null)↵

12

          if (lengthLiteral != null)↵

13

          {↵

13

          {↵

14

            return Integer.parseInt(fractionDigitsLiteral);↵

14

            return Integer.parseInt(lengthLiteral);↵

15

          }↵

15

          }↵

16

        }↵

16

        }↵

17

        return -1;↵

17

        return -1;↵

18

      }

18

      }

See real code fragment |  | See real code fragment

Summary
Number of common nesting structure subtrees | 0
Number of refactorable cases | 0
Number of non-refactorable cases | 0
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0
Clones location |
Number of node comparisons | 0