CloneSet102


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
45320.971class_body_declarations[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
145169
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/tests/org/jfree/data/xy/junit/XIntervalSeriesCollectionTests.java
245178
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/tests/org/jfree/data/xy/junit/XYIntervalSeriesCollectionTests.java
345169
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/tests/org/jfree/data/xy/junit/YIntervalSeriesCollectionTests.java
Next
Last
Clone Instance
1
Line Count
45
Source Line
169
Source File
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/tests/org/jfree/data/xy/junit/XIntervalSeriesCollectionTests.java

/**
 * Some basic checks for the removeSeries() method.
 */
public void testRemoveSeries() {
  XIntervalSeriesCollection c = new XIntervalSeriesCollection();
  XIntervalSeries s1 = new XIntervalSeries("s1");
  c.addSeries(s1);
  c.removeSeries(0);
  assertEquals(0, c.getSeriesCount());
  c.addSeries(s1);
  boolean pass = false;
  try {
    c.removeSeries(-1);
  }
  catch (IllegalArgumentException
         e) {
    pass = true;
  }
  assertTrue(pass);
  pass = false;
  try {
    c.removeSeries(1);
  }
  catch (IllegalArgumentException
         e) {
    pass = true;
  }
  assertTrue(pass);
}

/**
 * A test for bug report 1170825 (originally affected XYSeriesCollection,
 * this test is just copied over).
 */
public void test1170825() {
  XIntervalSeries s1 = new XIntervalSeries("Series1");
  XIntervalSeriesCollection dataset = new XIntervalSeriesCollection();
  dataset.addSeries(s1);
  try {
    /* XYSeries s = */
    dataset.getSeries(1);
  }
  catch (IllegalArgumentException
         e) {
  // correct outcome
  }
  catch (IndexOutOfBoundsException
         e) {
    assertTrue(false); // wrong outcome
  }
}


Next
Previous
Clone Instance
2
Line Count
45
Source Line
178
Source File
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/tests/org/jfree/data/xy/junit/XYIntervalSeriesCollectionTests.java

/**
 * Some basic checks for the removeSeries() method.
 */
public void testRemoveSeries() {
  XYIntervalSeriesCollection c = new XYIntervalSeriesCollection();
  XYIntervalSeries s1 = new XYIntervalSeries("s1");
  c.addSeries(s1);
  c.removeSeries(0);
  assertEquals(0, c.getSeriesCount());
  c.addSeries(s1);
  boolean pass = false;
  try {
    c.removeSeries(-1);
  }
  catch (IllegalArgumentException
         e) {
    pass = true;
  }
  assertTrue(pass);
  pass = false;
  try {
    c.removeSeries(1);
  }
  catch (IllegalArgumentException
         e) {
    pass = true;
  }
  assertTrue(pass);
}

/**
 * A test for bug report 1170825 (originally affected XYSeriesCollection,
 * this test is just copied over).
 */
public void test1170825() {
  XYIntervalSeries s1 = new XYIntervalSeries("Series1");
  XYIntervalSeriesCollection dataset = new XYIntervalSeriesCollection();
  dataset.addSeries(s1);
  try {
    /* XYSeries s = */
    dataset.getSeries(1);
  }
  catch (IllegalArgumentException
         e) {
  // correct outcome
  }
  catch (IndexOutOfBoundsException
         e) {
    assertTrue(false); // wrong outcome
  }
}


First
Previous
Clone Instance
3
Line Count
45
Source Line
169
Source File
E:/TSE/Projects-CloneDR/jfreechart-1.0.10/tests/org/jfree/data/xy/junit/YIntervalSeriesCollectionTests.java

/**
 * Some basic checks for the removeSeries() method.
 */
public void testRemoveSeries() {
  YIntervalSeriesCollection c = new YIntervalSeriesCollection();
  YIntervalSeries s1 = new YIntervalSeries("s1");
  c.addSeries(s1);
  c.removeSeries(0);
  assertEquals(0, c.getSeriesCount());
  c.addSeries(s1);
  boolean pass = false;
  try {
    c.removeSeries(-1);
  }
  catch (IllegalArgumentException
         e) {
    pass = true;
  }
  assertTrue(pass);
  pass = false;
  try {
    c.removeSeries(1);
  }
  catch (IllegalArgumentException
         e) {
    pass = true;
  }
  assertTrue(pass);
}

/**
 * A test for bug report 1170825 (originally affected XYSeriesCollection,
 * this test is just copied over).
 */
public void test1170825() {
  YIntervalSeries s1 = new YIntervalSeries("Series1");
  YIntervalSeriesCollection dataset = new YIntervalSeriesCollection();
  dataset.addSeries(s1);
  try {
    /* XYSeries s = */
    dataset.getSeries(1);
  }
  catch (IllegalArgumentException
         e) {
  // correct outcome
  }
  catch (IndexOutOfBoundsException
         e) {
    assertTrue(false); // wrong outcome
  }
}


Clone AbstractionParameter Count: 2Parameter Bindings

/**
     * Some basic checks for the removeSeries() method.
     */
public void testRemoveSeries() {
   [[#variable150edc80]] c = new [[#variable150edc80]]();
   [[#variable150e3840]] s1 = new [[#variable150e3840]]("s1");
  c.addSeries(s1);
  c.removeSeries(0);
  assertEquals(0, c.getSeriesCount());
  c.addSeries(s1);
  boolean pass = false;
  try {
    c.removeSeries(-1);
  }
  catch (IllegalArgumentException
         e) {
    pass = true;
  }
  assertTrue(pass);
  pass = false;
  try {
    c.removeSeries(1);
  }
  catch (IllegalArgumentException
         e) {
    pass = true;
  }
  assertTrue(pass);
}

/**
     * A test for bug report 1170825 (originally affected XYSeriesCollection,
     * this test is just copied over).
     */
public void test1170825() {
   [[#variable150e3840]] s1 = new [[#variable150e3840]]("Series1");
   [[#variable150edc80]] dataset = new [[#variable150edc80]]();
  dataset.addSeries(s1);
  try {
    /* XYSeries s = */
    dataset.getSeries(1);
  }
  catch (IllegalArgumentException
         e) {
  // correct outcome
  }
  catch (IndexOutOfBoundsException
         e) {
    assertTrue(false); // wrong outcome
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#150edc80]]
XIntervalSeriesCollection 
12[[#150edc80]]
XYIntervalSeriesCollection 
13[[#150edc80]]
YIntervalSeriesCollection 
21[[#150e3840]]
XIntervalSeries 
22[[#150e3840]]
XYIntervalSeries 
23[[#150e3840]]
YIntervalSeries