CloneSet349


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
19230.973method_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
11885
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/data/xml/DatasetReader.java
219130
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/data/xml/DatasetReader.java
Next
Last
Clone Instance
1
Line Count
18
Source Line
85
Source File
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/data/xml/DatasetReader.java

/**
 * Reads a {@link PieDataset} from a stream.
 *
 * @param in  the input stream.
 *
 * @return A dataset.
 *
 * @throws IOException if there is an I/O error.
 */
public static PieDataset readPieDatasetFromXML(InputStream in) throws IOException {
  PieDataset result = null;
  SAXParserFactory factory = SAXParserFactory.newInstance();
  try {
    SAXParser parser = factory.newSAXParser();
    PieDatasetHandler handler = new PieDatasetHandler();
    parser.parse(in, handler);
    result = handler.getDataset();
  }
  catch (SAXException
         e) {
    System.out.println(e.getMessage());
  }
  catch (ParserConfigurationException
         e2) {
    System.out.println(e2.getMessage());
  }
  return result;
}


First
Previous
Clone Instance
2
Line Count
19
Source Line
130
Source File
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/src/org/jfree/data/xml/DatasetReader.java

/**
 * Reads a {@link CategoryDataset} from a stream.
 *
 * @param in  the stream.
 *
 * @return A dataset.
 *
 * @throws IOException if there is a problem reading the file.
 */
public static CategoryDataset readCategoryDatasetFromXML(InputStream in) throws IOException {
  CategoryDataset result = null;
  SAXParserFactory factory = SAXParserFactory.newInstance();
  try {
    SAXParser parser = factory.newSAXParser();
    CategoryDatasetHandler handler = new CategoryDatasetHandler();
    parser.parse(in, handler);
    result = handler.getDataset();
  }
  catch (SAXException
         e) {
    System.out.println(e.getMessage());
  }
  catch (ParserConfigurationException
         e2) {
    System.out.println(e2.getMessage());
  }
  return result;
}


Clone AbstractionParameter Count: 3Parameter Bindings

/**
     * Reads a {@link CategoryDataset} from a stream.
     *
     * @param in  the stream.
     *
     * @return A dataset.
     *
     * @throws IOException if there is a problem reading the file.
     */
/**
     * Reads a {@link PieDataset} from a stream.
     *
     * @param in  the input stream.
     *
     * @return A dataset.
     *
     * @throws IOException if there is an I/O error.
     */
public static [[#variable1a929500]]  [[#variable1a9294c0]](InputStream in) throws IOException {
   [[#variable1a929500]] result = null;
  SAXParserFactory factory = SAXParserFactory.newInstance();
  try {
    SAXParser parser = factory.newSAXParser();
     [[#variable1a929440]] handler = new [[#variable1a929440]]();
    parser.parse(in, handler);
    result = handler.getDataset();
  }
  catch (SAXException
         e) {
    System.out.println(e.getMessage());
  }
  catch (ParserConfigurationException
         e2) {
    System.out.println(e2.getMessage());
  }
  return result;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#1a929500]]
PieDataset 
12[[#1a929500]]
CategoryDataset 
21[[#1a9294c0]]
readPieDatasetFromXML 
22[[#1a9294c0]]
readCategoryDatasetFromXML 
31[[#1a929440]]
PieDatasetHandler 
32[[#1a929440]]
CategoryDatasetHandler