CloneSet101


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
53201.000switch_group
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1533320
E:/TSE/Projects-CloneDR/emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/XMLSaveImpl.java
2533483
E:/TSE/Projects-CloneDR/emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/XMLSaveImpl.java
Next
Last
Clone Instance
1
Line Count
53
Source Line
3320
Source File
E:/TSE/Projects-CloneDR/emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/XMLSaveImpl.java

default:
  {
    if ( !XMLChar.isValid(ch)) {
      if (XMLChar.isHighSurrogate(ch)) {
        char high = ch;
        if (inputLength-- > 0) {
          ch = input.charAt(inputPos++);
          if (XMLChar.isLowSurrogate(ch)) {
            if (mappableLimit == MAX_UTF_MAPPABLE_CODEPOINT) {
              // Every codepoint is supported! 
              value[outputPos++ ] = high;
              value[outputPos++ ] = ch;
            }
            else {
              // Produce the supplemental character as an entity
              outputPos = replaceChars(outputPos, ("&#x" + Integer.toHexString(XMLChar.supplemental(high, ch)) + ";").toCharArray(), inputLength);
              changed = true;
            }
            break;
          }
          throw new RuntimeException("An invalid low surrogate character (Unicode: 0x" + Integer.toHexString(ch) + ") was found in the element content:" + input);
        }
        else {
          throw new RuntimeException("An unpaired high surrogate character (Unicode: 0x" + Integer.toHexString(ch) + ") was found in the element content:" + input);
        }
      }
      else {
        throw new RuntimeException("An invalid XML character (Unicode: 0x" + Integer.toHexString(ch) + ") was found in the element content:" + input);
      }
    }
    else {
      // Normal (BMP) unicode code point. See if we know for a fact that the encoding supports it:
      if (ch <= mappableLimit) {
        value[outputPos++ ] = ch;
      }
      else {
        // We not sure the encoding supports this code point, so we write it as a character entity reference.
        outputPos = replaceChars(outputPos, ("&#x" + Integer.toHexString(ch) + ";").toCharArray(), inputLength);
        changed = true;
      }
    }
    break;
  }


First
Previous
Clone Instance
2
Line Count
53
Source Line
3483
Source File
E:/TSE/Projects-CloneDR/emf-2.4.1/src/org/eclipse/emf/ecore/xmi/impl/XMLSaveImpl.java

default:
  {
    if ( !XMLChar.isValid(ch)) {
      if (XMLChar.isHighSurrogate(ch)) {
        char high = ch;
        if (inputLength-- > 0) {
          ch = input.charAt(inputPos++);
          if (XMLChar.isLowSurrogate(ch)) {
            if (mappableLimit == MAX_UTF_MAPPABLE_CODEPOINT) {
              // Every codepoint is supported! 
              value[outputPos++ ] = high;
              value[outputPos++ ] = ch;
            }
            else {
              // Produce the supplemental character as an entity
              outputPos = replaceChars(outputPos, ("&#x" + Integer.toHexString(XMLChar.supplemental(high, ch)) + ";").toCharArray(), inputLength);
              changed = true;
            }
            break;
          }
          throw new RuntimeException("An invalid low surrogate character (Unicode: 0x" + Integer.toHexString(ch) + ") was found in the element content:" + input);
        }
        else {
          throw new RuntimeException("An unpaired high surrogate character (Unicode: 0x" + Integer.toHexString(ch) + ") was found in the element content:" + input);
        }
      }
      else {
        throw new RuntimeException("An invalid XML character (Unicode: 0x" + Integer.toHexString(ch) + ") was found in the element content:" + input);
      }
    }
    else {
      // Normal (BMP) unicode code point. See if we know for a fact that the encoding supports it:
      if (ch <= mappableLimit) {
        value[outputPos++ ] = ch;
      }
      else {
        // We not sure the encoding supports this code point, so we write it as a character entity reference.
        outputPos = replaceChars(outputPos, ("&#x" + Integer.toHexString(ch) + ";").toCharArray(), inputLength);
        changed = true;
      }
    }
    break;
  }


Clone AbstractionParameter Count: 0Parameter Bindings

default:
  {
    if ( !XMLChar.isValid(ch)) {
      if (XMLChar.isHighSurrogate(ch)) {
        char high = ch;
        if (inputLength-- > 0) {
          ch = input.charAt(inputPos++);
          if (XMLChar.isLowSurrogate(ch)) {
            if (mappableLimit == MAX_UTF_MAPPABLE_CODEPOINT) {
              // Every codepoint is supported! 
              value[outputPos++ ] = high;
              value[outputPos++ ] = ch;
            }
            else {
              // Produce the supplemental character as an entity
              outputPos = replaceChars(outputPos, ("&#x" + Integer.toHexString(XMLChar.supplemental(high, ch)) + ";").toCharArray(), inputLength);
              changed = true;
            }
            break;
          }
          throw new RuntimeException("An invalid low surrogate character (Unicode: 0x" + Integer.toHexString(ch) + ") was found in the element content:" + input);
        }
        else {
          throw new RuntimeException("An unpaired high surrogate character (Unicode: 0x" + Integer.toHexString(ch) + ") was found in the element content:" + input);
        }
      }
      else {
        throw new RuntimeException("An invalid XML character (Unicode: 0x" + Integer.toHexString(ch) + ") was found in the element content:" + input);
      }
    }
    else {
      // Normal (BMP) unicode code point. See if we know for a fact that the encoding supports it:
      if (ch <= mappableLimit) {
        value[outputPos++ ] = ch;
      }
      else {
        // We not sure the encoding supports this code point, so we write it as a character entity reference.
        outputPos = replaceChars(outputPos, ("&#x" + Integer.toHexString(ch) + ";").toCharArray(), inputLength);
        changed = true;
      }
    }
    break;
  }
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None