Program: 76016
Project: 76016
Buggy source:
/** 
 * Tests drop().
 * @throws Exception
 */
public void testDrop() throws Exception {
  createDesign();
  PropertyHandle propHandle=designHandle.getPropertyHandle(ReportDesign.LIBRARIES_PROP);
  IncludedLibrary structure1=StructureFactory.createIncludeLibrary();
  structure1.setFileName("String_Node_Str");
  StructureHandle sHandle1=propHandle.addItem(structure1);
  IncludedLibrary structure2=StructureFactory.createIncludeLibrary();
  structure2.setFileName("String_Node_Str");
  StructureHandle sHandle2=propHandle.addItem(structure2);
  IncludedLibrary structure3=StructureFactory.createIncludeLibrary();
  structure3.setFileName("String_Node_Str");
  StructureHandle sHandle3=propHandle.addItem(structure3);
  sHandle2.drop();
  List value=propHandle.getListValue();
  assertEquals(2,value.size());
  assertEquals(sHandle1.getStructure(),value.get(0));
  assertNull(sHandle2.getStructure());
  assertEquals(sHandle3.getStructure(),value.get(1));
  designHandle.close();
  openDesign("String_Node_Str");
  ImageHandle imageHandle=(ImageHandle)designHandle.findElement("String_Node_Str");
  ActionHandle actionHandle=imageHandle.getActionHandle();
  MemberHandle memberHandle=actionHandle.getParamBindings();
  assertEquals(2,memberHandle.getListValue().size());
  sHandle1=memberHandle.getAt(0);
  sHandle2=memberHandle.getAt(1);
  sHandle1.drop();
  value=memberHandle.getListValue();
  assertEquals(1,value.size());
  assertEquals(sHandle2.getStructure(),value.get(0));
}

Fixed version (ground truth):
/** 
 * Tests drop().
 * @throws Exception
 */
public void testDrop() throws Exception {
  createDesign();
  PropertyHandle propHandle=designHandle.getPropertyHandle(ReportDesign.LIBRARIES_PROP);
  IncludedLibrary structure1=StructureFactory.createIncludeLibrary();
  structure1.setFileName("String_Node_Str");
  StructureHandle sHandle1=propHandle.addItem(structure1);
  IncludedLibrary structure2=StructureFactory.createIncludeLibrary();
  structure2.setFileName("String_Node_Str");
  StructureHandle sHandle2=propHandle.addItem(structure2);
  IncludedLibrary structure3=StructureFactory.createIncludeLibrary();
  structure3.setFileName("String_Node_Str");
  StructureHandle sHandle3=propHandle.addItem(structure3);
  sHandle2.drop();
  List value=propHandle.getListValue();
  assertEquals(2,value.size());
  assertEquals(sHandle1.getStructure(),value.get(0));
  assertNull(sHandle2.getStructure());
  assertEquals(sHandle3.getStructure(),value.get(1));
  designHandle.close();
  openDesign("String_Node_Str");
  ImageHandle imageHandle=(ImageHandle)designHandle.findElement("String_Node_Str");
  ActionHandle actionHandle=imageHandle.getActionHandle();
  MemberHandle memberHandle=actionHandle.getParamBindings();
  assertEquals(2,memberHandle.getListValue().size());
  sHandle1=memberHandle.getAt(0);
  sHandle2=memberHandle.getAt(1);
  sHandle1.drop();
  value=memberHandle.getListValue();
  assertEquals(1,value.size());
  assertEquals(sHandle2.getStructure(),value.get(0));
  createDesign();
  TabularCubeHandle cube=designHandle.getElementFactory().newTabularCube("String_Node_Str");
  designHandle.getCubes().add(cube);
  DimensionConditionHandle condition=cube.addDimensionCondition(StructureFactory.createCubeJoinCondition());
  DimensionJoinCondition tmpJoin=StructureFactory.createDimensionJoinCondition();
  tmpJoin.setCubeKey("String_Node_Str");
  tmpJoin.setHierarchyKey("String_Node_Str");
  DimensionJoinConditionHandle joinCondition1=condition.addJoinCondition(tmpJoin);
  condition=cube.addDimensionCondition(StructureFactory.createCubeJoinCondition());
  tmpJoin=StructureFactory.createDimensionJoinCondition();
  tmpJoin.setCubeKey("String_Node_Str");
  tmpJoin.setHierarchyKey("String_Node_Str");
  DimensionJoinConditionHandle joinCondition2=condition.addJoinCondition(tmpJoin);
  joinCondition2.drop();
  condition.drop();
  condition=(DimensionConditionHandle)cube.joinConditionsIterator().next();
  joinCondition1.drop();
  condition.drop();
}