nus-yam/ex-repair huggingface dataset:
Program: 67890
Project: 67890
Buggy source:
/** 
 * Inherited suite mthod for generating all test cases.
 * @return
 */
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTest(new TestSuite(SDOTypeHelperBuiltinCommonjMapTestCases.class));
  suite.addTest(new SDOTypeHelperDefineTestSuite().suite());
  suite.addTest(new TestSuite(OpenContentPropertiesByNameTestCases.class));
  return suite;
}

Fixed version (ground truth):
/** 
 * Inherited suite method for generating all test cases.
 * @return
 */
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTest(new TestSuite(SDOTypeHelperBuiltinCommonjMapTestCases.class));
  suite.addTest(new SDOTypeHelperDefineTestSuite().suite());
  suite.addTest(new TestSuite(OpenContentPropertiesByNameTestCases.class));
  suite.addTestSuite(SDOTypeHelperExceptionTestCases.class);
  return suite;
}
Program: 67891
Project: 67891
Buggy source:
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTest(new SDOXMLHelperLoadTestSuite().suite());
  suite.addTest(new SDOXMLHelperSaveTestSuite().suite());
  suite.addTest(new SDOXMLHelperThreadSafetyTestSuite().suite());
  return suite;
}

Fixed version (ground truth):
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTest(new SDOXMLHelperLoadTestSuite().suite());
  suite.addTest(new SDOXMLHelperSaveTestSuite().suite());
  suite.addTest(new SDOXMLHelperThreadSafetyTestSuite().suite());
  suite.addTestSuite(SDOXMLHelperExceptionTestCases.class);
  return suite;
}
Program: 67892
Project: 67892
Buggy source:
public void testDefine(){
  try {
    Source xsdSource=new StreamSource(getSchemaToDefine());
    ((SDOXSDHelper)HelperProvider.getDefaultContext().getXSDHelper()).define(xsdSource,null);
  }
 catch (  Exception x) {
    fail(x.getMessage());
    throw new RuntimeException(x);
  }
}

Fixed version (ground truth):
public void testDefine(){
  try {
    DefaultSchemaResolver schemaResolver=new DefaultSchemaResolver();
    schemaResolver.setBaseSchemaLocation(getSchemaLocation());
    Source xsdSource=new StreamSource(getSchemaToDefine());
    ((SDOXSDHelper)HelperProvider.getDefaultContext().getXSDHelper()).define(xsdSource,schemaResolver);
  }
 catch (  Exception x) {
    fail(x.getMessage());
    throw new RuntimeException(x);
  }
}
Program: 67893
Project: 67893
Buggy source:
/** 
 * INTERNAL: Exception trying to lookup a type with the given interface
 */
public static SDOException typeNotFoundForInterface(String className){
  Object[] args={className};
  SDOException exception=new SDOException(ExceptionMessageGenerator.buildMessage(SDOException.class,TYPE_NOT_FOUND_FOR_INTERFACE,args));
  exception.setErrorCode(TYPE_NOT_FOUND_FOR_INTERFACE);
  return exception;
}

Fixed version (ground truth):
/** 
 * INTERNAL: Exception trying to lookup a type with the given interface
 */
public static SDOException typeNotFoundForInterface(String className,boolean loadersAreRelated){
  Object[] args={className,loadersAreRelated};
  SDOException exception=new SDOException(ExceptionMessageGenerator.buildMessage(SDOException.class,TYPE_NOT_FOUND_FOR_INTERFACE,args));
  exception.setErrorCode(TYPE_NOT_FOUND_FOR_INTERFACE);
  return exception;
}
Program: 67894
Project: 67894
Buggy source:
public MWModelGroupDefinition modelGroupDefinition(String namespaceUrl,String modelGroupDefName){
  return this.namespaceForUrl(namespaceUrl).modelGroupDefinition(modelGroupDefName);
}

Fixed version (ground truth):
public MWModelGroupDefinition modelGroupDefinition(String namespaceUrl,String modelGroupDefName){
  if (namespaceUrl == null || "String_Node_Str".equals(namespaceUrl)) {
    namespaceUrl=targetNamespaceUrl();
  }
  return this.namespaceForUrl(namespaceUrl).modelGroupDefinition(modelGroupDefName);
}
Program: 67895
Project: 67895
Buggy source:
public MWElementDeclaration element(String namespaceUrl,String elementName){
  if (namespaceUrl == null) {
    namespaceUrl="String_Node_Str";
  }
  return this.namespaceForUrl(namespaceUrl).element(elementName);
}

Fixed version (ground truth):
public MWElementDeclaration element(String namespaceUrl,String elementName){
  if (namespaceUrl == null || "String_Node_Str".equals(namespaceUrl)) {
    namespaceUrl=targetNamespaceUrl();
  }
  return this.namespaceForUrl(namespaceUrl).element(elementName);
}
Program: 67896
Project: 67896
Buggy source:
public MWSimpleTypeDefinition simpleType(String namespaceUrl,String simpleTypeName){
  if (namespaceUrl == null) {
    namespaceUrl="String_Node_Str";
  }
  return this.namespaceForUrl(namespaceUrl).simpleType(simpleTypeName);
}

Fixed version (ground truth):
public MWSimpleTypeDefinition simpleType(String namespaceUrl,String simpleTypeName){
  if (namespaceUrl == null || "String_Node_Str".equals(namespaceUrl)) {
    namespaceUrl=targetNamespaceUrl();
  }
  return this.namespaceForUrl(namespaceUrl).simpleType(simpleTypeName);
}
Program: 67897
Project: 67897
Buggy source:
public MWComplexTypeDefinition complexType(String namespaceUrl,String complexTypeName){
  if (namespaceUrl == null) {
    namespaceUrl="String_Node_Str";
  }
  return this.namespaceForUrl(namespaceUrl).complexType(complexTypeName);
}

Fixed version (ground truth):
public MWComplexTypeDefinition complexType(String namespaceUrl,String complexTypeName){
  if (namespaceUrl == null || "String_Node_Str".equals(namespaceUrl)) {
    namespaceUrl=targetNamespaceUrl();
  }
  return this.namespaceForUrl(namespaceUrl).complexType(complexTypeName);
}
Program: 67898
Project: 67898
Buggy source:
public MWAttributeDeclaration attribute(String namespaceUrl,String attributeName){
  if (namespaceUrl == null) {
    namespaceUrl="String_Node_Str";
  }
  return this.namespaceForUrl(namespaceUrl).attribute(attributeName);
}

Fixed version (ground truth):
public MWAttributeDeclaration attribute(String namespaceUrl,String attributeName){
  if (namespaceUrl == null || "String_Node_Str".equals(namespaceUrl)) {
    namespaceUrl=targetNamespaceUrl();
  }
  return this.namespaceForUrl(namespaceUrl).attribute(attributeName);
}
Program: 67899
Project: 67899
Buggy source:
public MWModelGroup modelGroup(String namespaceUrl,String modelGroupDefName){
  if (namespaceUrl == null) {
    namespaceUrl="String_Node_Str";
  }
  return this.modelGroupDefinition(namespaceUrl,modelGroupDefName).getModelGroup();
}

Fixed version (ground truth):
public MWModelGroup modelGroup(String namespaceUrl,String modelGroupDefName){
  if (namespaceUrl == null || "String_Node_Str".equals(namespaceUrl)) {
    namespaceUrl=targetNamespaceUrl();
  }
  return this.modelGroupDefinition(namespaceUrl,modelGroupDefName).getModelGroup();
}
Program: 67900
Project: 67900
Buggy source:
private void qNameChanged(){
  String oldQName=this.qName;
  this.qName=((MWNamedSchemaComponent)this.getComponent()).qName();
  this.firePropertyChanged(DISPLAY_STRING_PROPERTY,oldQName,this.qName);
}

Fixed version (ground truth):
private void qNameChanged(){
  String oldQName=this.qName;
  if (this.getComponent() != null) {
    this.qName=((MWNamedSchemaComponent)this.getComponent()).qName();
    this.firePropertyChanged(DISPLAY_STRING_PROPERTY,oldQName,this.qName);
  }
}
Program: 67901
Project: 67901
Buggy source:
private boolean promptToChangeQueryType(){
  if (this.preferences().getBoolean(MappingsPlugin.CHANGE_QUERY_TYPE_DO_NOT_THIS_SHOW_AGAIN_PREFERENCE,false)) {
    return true;
  }
  String title=this.resourceRepository().getString("String_Node_Str");
  String message=this.resourceRepository().getString("String_Node_Str");
  PropertyValueModel dontAskAgainHolder=new SimplePropertyValueModel(new Boolean(false));
  JComponent dontAskAgainPanel=SwingComponentFactory.buildDoNotAskAgainPanel(message,dontAskAgainHolder,this.resourceRepository());
  int response=JOptionPane.showConfirmDialog(this.getWorkbenchContext().getCurrentWindow(),dontAskAgainPanel,title,JOptionPane.YES_NO_OPTION,JOptionPane.WARNING_MESSAGE);
  if (dontAskAgainHolder.getValue().equals(Boolean.TRUE)) {
    if (response == JOptionPane.YES_OPTION) {
      this.preferences().putBoolean(MappingsPlugin.CHANGE_QUERY_TYPE_DO_NOT_THIS_SHOW_AGAIN_PREFERENCE,true);
    }
 else     if (response == JOptionPane.NO_OPTION) {
      this.preferences().putBoolean(MappingsPlugin.CHANGE_QUERY_TYPE_DO_NOT_THIS_SHOW_AGAIN_PREFERENCE,false);
    }
  }
  return (response == JOptionPane.OK_OPTION);
}

Fixed version (ground truth):
private boolean promptToChangeQueryType(){
  if (this.preferences().getBoolean(MappingsPlugin.CHANGE_QUERY_TYPE_DO_NOT_THIS_SHOW_AGAIN_PREFERENCE,false)) {
    return true;
  }
  String title=this.resourceRepository().getString("String_Node_Str");
  String message=this.resourceRepository().getString("String_Node_Str");
  PropertyValueModel dontAskAgainHolder=new SimplePropertyValueModel(new Boolean(false));
  JComponent dontAskAgainPanel=SwingComponentFactory.buildDoNotAskAgainPanel(message,dontAskAgainHolder,this.resourceRepository());
  JOptionPane queryChangePane=new JOptionPane(dontAskAgainPanel,JOptionPane.WARNING_MESSAGE,JOptionPane.YES_NO_OPTION);
  JDialog queryChangeDialog=queryChangePane.createDialog(this.getWorkbenchContext().getCurrentWindow(),title);
  queryChangeDialog.setSize(400,150);
  queryChangeDialog.setResizable(false);
  queryChangeDialog.show();
  queryChangeDialog.dispose();
  int response=-1;
  Object value=queryChangePane.getValue();
  if (value != null && value instanceof Integer) {
    response=((Integer)value).intValue();
  }
  if (dontAskAgainHolder.getValue().equals(Boolean.TRUE)) {
    if (response == JOptionPane.YES_OPTION) {
      this.preferences().putBoolean(MappingsPlugin.CHANGE_QUERY_TYPE_DO_NOT_THIS_SHOW_AGAIN_PREFERENCE,true);
    }
 else     if (response == JOptionPane.NO_OPTION) {
      this.preferences().putBoolean(MappingsPlugin.CHANGE_QUERY_TYPE_DO_NOT_THIS_SHOW_AGAIN_PREFERENCE,false);
    }
  }
  return (response == JOptionPane.OK_OPTION);
}
Program: 67903
Project: 67903
Buggy source:
/** 
 * INTERNAL:
 * @param index
 * @param item
 * @param updateSequence
 */
public void add(int index,Object item,boolean updateSequence){
  if (item == null && (property != null && !property.isNullable())) {
    throw new UnsupportedOperationException("String_Node_Str" + property.getName() + "String_Node_Str");
  }
  if ((index < 0) || (index > size())) {
    return;
  }
  copyElements();
  currentElements.add(index,item);
  updateContainment(item,updateSequence);
}

Fixed version (ground truth):
/** 
 * INTERNAL:
 * @param index
 * @param item
 * @param updateSequence
 */
public void add(int index,Object item,boolean updateSequence){
  if (item == null && (property != null && !property.isNullable())) {
    throw new UnsupportedOperationException("String_Node_Str" + property.getName() + "String_Node_Str");
  }
  if ((index < 0) || (index > size())) {
    return;
  }
  copyElements();
  currentElements.add(index,item);
  updateContainment(item,updateSequence);
  if (property != null && item != null) {
    Property oppositeProp=property.getOpposite();
    if (oppositeProp != null) {
      ((DataObject)item).set(oppositeProp,dataObject);
      dataObject.set(oppositeProp,null);
    }
  }
}
Program: 67904
Project: 67904
Buggy source:
public boolean addAll(int position,Collection items,boolean updateSequence){
  if ((position < 0) || (position > size())) {
    return false;
  }
  if ((items == null) || (items.size() == 0)) {
    return false;
  }
  if (items.contains(null) && (property != null && !property.isNullable())) {
    throw new UnsupportedOperationException("String_Node_Str" + property.getName() + "String_Node_Str");
  }
  copyElements();
  boolean modified=currentElements.addAll(position,items);
  updateContainment(items,updateSequence);
  updateSequence(property,items,updateSequence);
  return modified;
}

Fixed version (ground truth):
public boolean addAll(int position,Collection items,boolean updateSequence){
  if ((position < 0) || (position > size())) {
    return false;
  }
  if ((items == null) || (items.size() == 0)) {
    return false;
  }
  if (items.contains(null) && (property != null && !property.isNullable())) {
    throw new UnsupportedOperationException("String_Node_Str" + property.getName() + "String_Node_Str");
  }
  copyElements();
  boolean modified=currentElements.addAll(position,items);
  updateContainment(items,updateSequence);
  if (property != null) {
    Property oppositeProp=property.getOpposite();
    if (oppositeProp != null) {
      Iterator itemsIterator=items.iterator();
      while (itemsIterator.hasNext()) {
        Object item=itemsIterator.next();
        if (item != null) {
          ((DataObject)item).set(oppositeProp,dataObject);
          dataObject.set(oppositeProp,null);
        }
      }
    }
  }
  updateSequence(property,items,updateSequence);
  return modified;
}
Program: 67905
Project: 67905
Buggy source:
public void add(int index,Object item,boolean updateSequence){
  if (item == null && (property != null && !property.isNullable())) {
    throw new UnsupportedOperationException("String_Node_Str" + property.getName() + "String_Node_Str");
  }
  if ((index < 0) || (index > size())) {
    return;
  }
  copyElements();
  Object itemToAdd=item;
  if (!property.getType().isDataType()) {
    itemToAdd=jaxbValueStore.getJAXBHelperContext().unwrap((DataObject)item);
  }
  Vector v=containerPolicy.vectorFor(elements,session);
  v.add(index,itemToAdd);
  containerPolicy.clear(elements);
  for (  Object next : v) {
    containerPolicy.addInto(next,elements,session);
  }
  updateContainment(item,updateSequence);
}

Fixed version (ground truth):
public void add(int index,Object item,boolean updateSequence){
  if (item == null && (property != null && !property.isNullable())) {
    throw new UnsupportedOperationException("String_Node_Str" + property.getName() + "String_Node_Str");
  }
  if ((index < 0) || (index > size())) {
    return;
  }
  copyElements();
  Object itemToAdd=item;
  if (!property.getType().isDataType()) {
    itemToAdd=jaxbValueStore.getJAXBHelperContext().unwrap((DataObject)item);
  }
  Vector v=containerPolicy.vectorFor(elements,session);
  v.add(index,itemToAdd);
  containerPolicy.clear(elements);
  for (  Object next : v) {
    containerPolicy.addInto(next,elements,session);
  }
  updateContainment(item,updateSequence);
  if (property != null && item != null) {
    Property oppositeProp=property.getOpposite();
    if (oppositeProp != null) {
      ((DataObject)item).set(oppositeProp,dataObject);
      dataObject.set(oppositeProp,null);
    }
  }
}
Program: 67906
Project: 67906
Buggy source:
public boolean addAll(int position,Collection items,boolean updateSequence){
  if ((position < 0) || (position > size())) {
    return false;
  }
  if ((items == null) || (items.size() == 0)) {
    return false;
  }
  if (items.contains(null) && (property != null && !property.isNullable())) {
    throw new UnsupportedOperationException("String_Node_Str" + property.getName() + "String_Node_Str");
  }
  boolean modified=true;
  copyElements();
  Vector v=containerPolicy.vectorFor(elements,session);
  Collection unwrappedItems=items;
  if (!property.getType().isDataType()) {
    unwrappedItems=jaxbValueStore.getJAXBHelperContext().unwrap((Collection<DataObject>)items);
  }
  v.addAll(position,unwrappedItems);
  containerPolicy.clear(elements);
  for (  Object next : v) {
    containerPolicy.addInto(next,elements,session);
  }
  dataObject.updateContainment(property,items);
  updateSequence(property,items,updateSequence);
  return modified;
}

Fixed version (ground truth):
public boolean addAll(int position,Collection items,boolean updateSequence){
  if ((position < 0) || (position > size())) {
    return false;
  }
  if ((items == null) || (items.size() == 0)) {
    return false;
  }
  if (items.contains(null) && (property != null && !property.isNullable())) {
    throw new UnsupportedOperationException("String_Node_Str" + property.getName() + "String_Node_Str");
  }
  boolean modified=true;
  copyElements();
  Vector v=containerPolicy.vectorFor(elements,session);
  Collection unwrappedItems=items;
  if (!property.getType().isDataType()) {
    unwrappedItems=jaxbValueStore.getJAXBHelperContext().unwrap((Collection<DataObject>)items);
  }
  v.addAll(position,unwrappedItems);
  containerPolicy.clear(elements);
  for (  Object next : v) {
    containerPolicy.addInto(next,elements,session);
  }
  dataObject.updateContainment(property,items);
  if (property != null) {
    Property oppositeProp=property.getOpposite();
    if (oppositeProp != null) {
      Iterator itemsIterator=items.iterator();
      while (itemsIterator.hasNext()) {
        Object item=itemsIterator.next();
        if (item != null) {
          ((DataObject)item).set(oppositeProp,dataObject);
          dataObject.set(oppositeProp,null);
        }
      }
    }
  }
  updateSequence(property,items,updateSequence);
  return modified;
}
Program: 67907
Project: 67907
Buggy source:
public void testUtilDateToString_dateTime_before_epoch(){
  java.util.Date utilDate=new java.util.Date(CONTROL_DATE_TIME_BEFORE_EPOCH_1MS);
  String control="String_Node_Str";
  String test=(String)xcm.convertObject(utilDate,String.class,XMLConstants.DATE_TIME_QNAME);
  this.assertEquals(control,test);
}

Fixed version (ground truth):
public void testUtilDateToString_dateTime_before_epoch(){
  String control="String_Node_Str";
  Calendar cal=Calendar.getInstance();
  cal.clear();
  cal.set(Calendar.YEAR,1965);
  cal.set(Calendar.MONTH,Calendar.JANUARY);
  cal.set(Calendar.DAY_OF_MONTH,1);
  cal.set(Calendar.MILLISECOND,1);
  java.util.Date utilDate=cal.getTime();
  String test=(String)xcm.convertObject(utilDate,String.class,XMLConstants.DATE_TIME_QNAME);
  this.assertEquals(control,test);
}
Program: 67908
Project: 67908
Buggy source:
public void testTimestampToString_dateTime_negative_year_123456789ns(){
  java.sql.Timestamp timestamp=new java.sql.Timestamp(CONTROL_DATE_TIME_NEGATIVE_YEAR);
  timestamp.setNanos(123456789);
  String control="String_Node_Str";
  String test=(String)xcm.convertObject(timestamp,String.class,XMLConstants.DATE_TIME_QNAME);
  this.assertEquals(control,test);
}

Fixed version (ground truth):
public void testTimestampToString_dateTime_negative_year_123456789ns(){
  String control="String_Node_Str";
  GregorianCalendar cal=new GregorianCalendar();
  cal.setGregorianChange(new java.util.Date(Long.MIN_VALUE));
  cal.clear();
  cal.set(Calendar.ERA,java.util.GregorianCalendar.BC);
  cal.set(Calendar.YEAR,2006);
  cal.set(Calendar.MONTH,Calendar.JANUARY);
  cal.set(Calendar.DAY_OF_MONTH,1);
  cal.set(Calendar.MILLISECOND,1);
  java.util.Date utilDate=cal.getTime();
  java.sql.Timestamp timestamp=new java.sql.Timestamp(utilDate.getTime());
  timestamp.setNanos(123456789);
  String test=(String)xcm.convertObject(timestamp,String.class,XMLConstants.DATE_TIME_QNAME);
  this.assertEquals(control,test);
}
Program: 67909
Project: 67909
Buggy source:
public void testUtilDateToString_dateTime_negative_year(){
  java.util.Date utilDate=new java.util.Date(CONTROL_DATE_TIME_NEGATIVE_YEAR_1MS);
  String control="String_Node_Str";
  String test=(String)xcm.convertObject(utilDate,String.class,XMLConstants.DATE_TIME_QNAME);
  this.assertEquals(control,test);
}

Fixed version (ground truth):
public void testUtilDateToString_dateTime_negative_year() throws Exception {
  String control="String_Node_Str";
  GregorianCalendar cal=new GregorianCalendar();
  cal.setGregorianChange(new java.util.Date(Long.MIN_VALUE));
  cal.clear();
  cal.set(Calendar.ERA,java.util.GregorianCalendar.BC);
  cal.set(Calendar.YEAR,2006);
  cal.set(Calendar.MONTH,Calendar.JANUARY);
  cal.set(Calendar.DAY_OF_MONTH,1);
  cal.set(Calendar.MILLISECOND,1);
  java.util.Date utilDate=cal.getTime();
  String test=(String)xcm.convertObject(utilDate,String.class,XMLConstants.DATE_TIME_QNAME);
  this.assertEquals(control,test);
}
Program: 67910
Project: 67910
Buggy source:
public void testTimestampToString_dateTime_before_epoch_123456789ns(){
  java.sql.Timestamp timestamp=new java.sql.Timestamp(CONTROL_DATE_TIME_BEFORE_EPOCH);
  timestamp.setNanos(123456789);
  String control="String_Node_Str";
  String test=(String)xcm.convertObject(timestamp,String.class,XMLConstants.DATE_TIME_QNAME);
  this.assertEquals(control,test);
}

Fixed version (ground truth):
public void testTimestampToString_dateTime_before_epoch_123456789ns(){
  String control="String_Node_Str";
  Calendar cal=Calendar.getInstance();
  cal.clear();
  cal.set(Calendar.YEAR,1965);
  cal.set(Calendar.MONTH,Calendar.JANUARY);
  cal.set(Calendar.DAY_OF_MONTH,1);
  java.util.Date utilDate=cal.getTime();
  java.sql.Timestamp timestamp=new java.sql.Timestamp(utilDate.getTime());
  timestamp.setNanos(123456789);
  String test=(String)xcm.convertObject(timestamp,String.class,XMLConstants.DATE_TIME_QNAME);
  this.assertEquals(control,test);
}
Program: 67911
Project: 67911
Buggy source:
protected Object getControlObject(){
  JAXBElement value=new ObjectFactory().createDateRoot();
  Date date=new Date(270878400000l);
  value.setValue(date);
  return value;
}

Fixed version (ground truth):
protected Object getControlObject(){
  JAXBElement value=new ObjectFactory().createDateRoot();
  Calendar cal=Calendar.getInstance();
  cal.clear();
  cal.set(Calendar.YEAR,1978);
  cal.set(Calendar.MONTH,Calendar.AUGUST);
  cal.set(Calendar.DAY_OF_MONTH,2);
  Date date=cal.getTime();
  value.setValue(date);
  return value;
}
Program: 67913
Project: 67913
Buggy source:
/** 
 * Concatenate the Specification Title, and the Library Designation, as derived from the JAR file manifest.
 */
public String getFullProductName(){
  return this.getSpecificationVendor() + "String_Node_Str" + this.getProductName()+ "String_Node_Str"+ this.getShortProductName();
}

Fixed version (ground truth):
/** 
 * Concatenate the Specification Title, and the Library Designation, as derived from the JAR file manifest.
 */
public String getFullProductName(){
  return this.getSpecificationVendor() + "String_Node_Str" + this.getProductName();
}
Program: 67914
Project: 67914
Buggy source:
protected Object getValueFromSubject(){
  return Boolean.valueOf(false);
}

Fixed version (ground truth):
protected Object getValueFromSubject(){
  return Boolean.valueOf(true);
}
Program: 67915
Project: 67915
Buggy source:
protected PropertyValueModel buildComponentEnablerBooleanHolder(){
  return new PropertyAspectAdapter(this.queryHolder){
    protected Object getValueFromSubject(){
      return Boolean.valueOf(false);
    }
  }
;
}

Fixed version (ground truth):
protected PropertyValueModel buildComponentEnablerBooleanHolder(){
  return new PropertyAspectAdapter(this.queryHolder){
    protected Object getValueFromSubject(){
      return Boolean.valueOf(true);
    }
  }
;
}
Program: 67916
Project: 67916
Buggy source:
/** 
 * INTERNAL:  Return the helper context for a given key.  The key will either be a ClassLoader or a String (representing an application name). A new context will be created and put in the map if none exists  for the given key. The key is assumed to be non-null -  getDelegateKey should always return either a string representing the application name (for WLS) or a class loader.  This is relevant since 'putIfAbsent' will  throw a null pointer exception if the key is null.   
 */
public static HelperContext getHelperContext(){
  ClassLoader contextClassLoader=Thread.currentThread().getContextClassLoader();
  HelperContext hCtx=userSetHelperContexts.get(contextClassLoader);
  if (hCtx != null) {
    return hCtx;
  }
  Object key=getDelegateMapKey(contextClassLoader);
  hCtx=helperContexts.get(key);
  if (hCtx == null) {
    hCtx=new SDOHelperContext();
    HelperContext existingCtx=helperContexts.putIfAbsent(key,hCtx);
    if (existingCtx != null) {
      hCtx=existingCtx;
    }
    addNotificationListener(key);
  }
  return hCtx;
}

Fixed version (ground truth):
/** 
 * INTERNAL:  Return the helper context for a given key.  The key will either be a ClassLoader or a String (representing an application name). A new context will be created and put in the map if none exists  for the given key. The key is assumed to be non-null -  getDelegateKey should always return either a string representing the application name (for WLS) or a class loader.  This is relevant since 'putIfAbsent' will  throw a null pointer exception if the key is null.   
 */
public static HelperContext getHelperContext(){
  ClassLoader contextClassLoader=Thread.currentThread().getContextClassLoader();
  HelperContext hCtx=userSetHelperContexts.get(contextClassLoader);
  if (hCtx != null) {
    return hCtx;
  }
  Object key=getDelegateMapKey(contextClassLoader);
  hCtx=helperContexts.get(key);
  if (hCtx == null) {
    hCtx=new SDOHelperContext();
    HelperContext existingCtx=helperContexts.putIfAbsent(key,hCtx);
    if (existingCtx != null) {
      hCtx=existingCtx;
    }
    addNotificationListener(key);
  }
  if (key.getClass() == ClassConstants.STRING) {
    helperContexts.put(contextClassLoader,hCtx);
  }
  return hCtx;
}
Program: 67917
Project: 67917
Buggy source:
private Iterator supportedJ2CAdapters(){
  return EisPlatformManager.instance().platformShortNames();
}

Fixed version (ground truth):
private Iterator supportedJ2CAdapters(){
  Collection platforms=CollectionTools.sortedSet(EisPlatformManager.instance().platformDisplayNames());
  return platforms.iterator();
}
Program: 67918
Project: 67918
Buggy source:
/** 
 * PUBLIC: Define the target foreign key relationship in the 1-M aggregate collection mapping. Both the target foreign key field name and the source primary key field name must be specified.
 */
public void addTargetForeignKeyFieldName(String targetForeignKey,String sourceKey){
  getTargetForeignKeyFields().addElement(new DatabaseField(targetForeignKey));
  getSourceKeyFields().addElement(new DatabaseField(sourceKey));
}

Fixed version (ground truth):
/** 
 * PUBLIC: Define the target foreign key relationship in the 1-M aggregate collection mapping. Both the target foreign key field name and the source primary key field name must be specified.
 */
public void addTargetForeignKeyFieldName(String targetForeignKey,String sourceKey){
  addTargetForeignKeyField(new DatabaseField(targetForeignKey),new DatabaseField(sourceKey));
}
Program: 67919
Project: 67919
Buggy source:
/** 
 * Generate a default TableCreator object from the EclipseLink project object.
 */
public TableCreator generateDefaultTableCreator(){
  TableCreator tblCreator=new TableCreator();
  Iterator descIter=project.getDescriptors().values().iterator();
  while (descIter.hasNext()) {
    ClassDescriptor desc=(ClassDescriptor)descIter.next();
    if ((desc instanceof XMLDescriptor) || (desc instanceof EISDescriptor) || (desc instanceof ObjectRelationalDataTypeDescriptor)) {
      AbstractSessionLog.getLog().log(SessionLog.WARNING,"String_Node_Str",(Object[])null,true);
      return tblCreator;
    }
    if (!desc.isAggregateDescriptor()) {
      initTableSchema(desc);
    }
  }
  descIter=project.getOrderedDescriptors().iterator();
  while (descIter.hasNext()) {
    ClassDescriptor desc=(ClassDescriptor)descIter.next();
    if (!desc.isAggregateDescriptor()) {
      postInitTableSchema(desc);
    }
  }
  tblCreator.addTableDefinitions(tableMap.values());
  return tblCreator;
}

Fixed version (ground truth):
/** 
 * Generate a default TableCreator object from the EclipseLink project object.
 */
public TableCreator generateDefaultTableCreator(){
  TableCreator tblCreator=new TableCreator();
  Iterator descIter=project.getDescriptors().values().iterator();
  while (descIter.hasNext()) {
    ClassDescriptor desc=(ClassDescriptor)descIter.next();
    if ((desc instanceof XMLDescriptor) || (desc instanceof EISDescriptor) || (desc instanceof ObjectRelationalDataTypeDescriptor)) {
      AbstractSessionLog.getLog().log(SessionLog.WARNING,"String_Node_Str",(Object[])null,true);
      return tblCreator;
    }
    if (!desc.isAggregateDescriptor() && !desc.isAggregateCollectionDescriptor()) {
      initTableSchema(desc);
    }
  }
  descIter=project.getOrderedDescriptors().iterator();
  while (descIter.hasNext()) {
    ClassDescriptor desc=(ClassDescriptor)descIter.next();
    if (!desc.isAggregateDescriptor() && !desc.isAggregateCollectionDescriptor()) {
      postInitTableSchema(desc);
    }
  }
  tblCreator.addTableDefinitions(tableMap.values());
  return tblCreator;
}
Program: 67920
Project: 67920
Buggy source:
/** 
 * PUBLIC: Create a new AbstractSessionLog
 */
public AbstractSessionLog(){
  this.writer=new PrintWriter(System.out);
  this.level=getDefaultLoggingLevel();
  this.dateFormat=new DateFormatThreadLocal(DATE_FORMAT_STR,null);
}

Fixed version (ground truth):
/** 
 * PUBLIC: Create a new AbstractSessionLog
 */
public AbstractSessionLog(){
  this.writer=new PrintWriter(System.out);
  this.level=getDefaultLoggingLevel();
}
Program: 67921
Project: 67921
Buggy source:
/** 
 * PUBLIC: Set the date format to be used when printing a log entry date.
 * @param dateFormat java.text.DateFormat
 */
public void setDateFormat(DateFormat dateFormat){
  this.dateFormat.set(dateFormat);
}

Fixed version (ground truth):
/** 
 * PUBLIC: Set the date format to be used when printing a log entry date. <p>Note: the JDK's <tt>java.text.SimpleDateFormat<tt> is <b>NOT</b> thread-safe.<br> The user is <b>strongly</b> advised to consider using Apache Commons<br> <tt>org.apache.commons.lang.time.FastDateFormat</tt> instead.</p>
 * @param dateFormat java.text.DateFormat
 */
public void setDateFormat(DateFormat dateFormat){
  this.dateFormat=dateFormat;
}
Program: 67922
Project: 67922
Buggy source:
/** 
 * Return the specified date and/or time information in string. The format will be determined by the date format settings.
 */
protected String getDateString(Date date){
  return this.getDateFormat().format(date);
}

Fixed version (ground truth):
/** 
 * Return the specified date and/or time information in string. The format will be determined by the date format settings.
 */
protected String getDateString(Date date){
  if (getDateFormat() != null) {
    return getDateFormat().format(date);
  }
  if (date == null) {
    return null;
  }
  return ConversionManager.getDefaultManager().convertObject(date,String.class).toString();
}
Program: 67923
Project: 67923
Buggy source:
/** 
 * PUBLIC: Return the date format to be used when printing a log entry date.
 * @return the date format
 */
public DateFormat getDateFormat(){
  return dateFormat.get();
}

Fixed version (ground truth):
/** 
 * PUBLIC: Return the date format to be used when printing a log entry date.
 * @return the date format
 */
public DateFormat getDateFormat(){
  return dateFormat;
}
Program: 67924
Project: 67924
Buggy source:
/** 
 * INTERNAL:  Return the helper context for a given key.  The key will either be a ClassLoader or a String (representing an application name). A new context will be created and put in the map if none exists  for the given key. The key is assumed to be non-null -  getDelegateKey should always return either a string representing the application name (for WLS) or a class loader.  This is relevant since 'putIfAbsent' will  throw a null pointer exception if the key is null.   
 */
public static HelperContext getHelperContext(){
  Object key=getDelegateMapKey();
  HelperContext hCtx=helperContexts.get(key);
  if (hCtx == null) {
    hCtx=new SDOHelperContext();
    HelperContext existingCtx=helperContexts.putIfAbsent(key,hCtx);
    if (existingCtx != null) {
      hCtx=existingCtx;
    }
    addNotificationListener(key);
  }
  return hCtx;
}

Fixed version (ground truth):
/** 
 * INTERNAL:  Return the helper context for a given key.  The key will either be a ClassLoader or a String (representing an application name). A new context will be created and put in the map if none exists  for the given key. The key is assumed to be non-null -  getDelegateKey should always return either a string representing the application name (for WLS) or a class loader.  This is relevant since 'putIfAbsent' will  throw a null pointer exception if the key is null.   
 */
public static HelperContext getHelperContext(){
  ClassLoader contextClassLoader=Thread.currentThread().getContextClassLoader();
  HelperContext hCtx=userSetHelperContexts.get(contextClassLoader);
  if (hCtx != null) {
    return hCtx;
  }
  Object key=getDelegateMapKey(contextClassLoader);
  hCtx=helperContexts.get(key);
  if (hCtx == null) {
    hCtx=new SDOHelperContext();
    HelperContext existingCtx=helperContexts.putIfAbsent(key,hCtx);
    if (existingCtx != null) {
      hCtx=existingCtx;
    }
    addNotificationListener(key);
  }
  return hCtx;
}
Program: 67926
Project: 67926
Buggy source:
/** 
 * INTERNAL:  Return the helper context for a given key.  The key will either be a ClassLoader or a String (representing an application name). A new context will be created and put in the map if none exists  for the given key. The key is assumed to be non-null -  getDelegateKey should always return either a string representing the application name (for WLS) or a class loader.  This is relevant since 'putIfAbsent' will  throw a null pointer exception if the key is null.   
 */
public static HelperContext getHelperContext(){
  ClassLoader contextClassLoader=Thread.currentThread().getContextClassLoader();
  HelperContext hCtx=userSetHelperContexts.get(contextClassLoader);
  if (hCtx != null) {
    return hCtx;
  }
  Object key=getDelegateMapKey(contextClassLoader);
  hCtx=helperContexts.get(key);
  if (hCtx == null) {
    hCtx=new SDOHelperContext();
    HelperContext existingCtx=helperContexts.putIfAbsent(key,hCtx);
    if (existingCtx != null) {
      hCtx=existingCtx;
    }
    addNotificationListener(key);
  }
  if (key.getClass() == ClassConstants.STRING) {
    helperContexts.put(contextClassLoader,hCtx);
  }
  return hCtx;
}

Fixed version (ground truth):
/** 
 * INTERNAL:  Return the helper context for a given key.  The key will either be a ClassLoader or a String (representing an application name). A new context will be created and put in the map if none exists  for the given key. The key is assumed to be non-null -  getDelegateKey should always return either a string representing the application name (for WLS) or a class loader.  This is relevant since 'putIfAbsent' will  throw a null pointer exception if the key is null.   
 */
public static HelperContext getHelperContext(){
  ClassLoader contextClassLoader=Thread.currentThread().getContextClassLoader();
  HelperContext hCtx=userSetHelperContexts.get(contextClassLoader);
  if (hCtx != null) {
    return hCtx;
  }
  Object key=getDelegateMapKey(contextClassLoader);
  hCtx=helperContexts.get(key);
  if (hCtx == null) {
    hCtx=new SDOHelperContext();
    HelperContext existingCtx=helperContexts.putIfAbsent(key,hCtx);
    if (existingCtx != null) {
      hCtx=existingCtx;
    }
    if (key.getClass() == ClassConstants.STRING) {
      helperContexts.put(contextClassLoader,hCtx);
    }
    addNotificationListener(key);
  }
  return hCtx;
}
Program: 67927
Project: 67927
Buggy source:
/** 
 * INTERNAL: thrown from InstanceClassConverter 
 */
public static SDOException noConstructorWithString(Exception nestedException,String className){
  Object[] args={className};
  SDOException exception=new SDOException(ExceptionMessageGenerator.buildMessage(SDOException.class,JAVA_CLASS_INVOKING_ERROR,args),nestedException);
  exception.setErrorCode(JAVA_CLASS_INVOKING_ERROR);
  return exception;
}

Fixed version (ground truth):
/** 
 * INTERNAL: thrown from InstanceClassConverter
 */
public static SDOException noConstructorWithString(Exception nestedException,String className){
  Object[] args={className};
  SDOException exception=new SDOException(ExceptionMessageGenerator.buildMessage(SDOException.class,JAVA_CLASS_INVOKING_ERROR,args),nestedException);
  exception.setErrorCode(JAVA_CLASS_INVOKING_ERROR);
  return exception;
}
Program: 67928
Project: 67928
Buggy source:
/** 
 * INTERNAL: Exception when acquiring the SDOHelperContext cache key for WLS.  This method should be used when an attempt to create an InitialContext fails. 
 */
public static SDOException errorCreatingWLSInitialContext(Exception nestedException){
  Object[] args={};
  SDOException exception=new SDOException(ExceptionMessageGenerator.buildMessage(SDOException.class,ERROR_CREATING_INITIAL_CONTEXT,args),nestedException);
  exception.setErrorCode(ERROR_CREATING_INITIAL_CONTEXT);
  return exception;
}

Fixed version (ground truth):
/** 
 * INTERNAL: Exception when acquiring the SDOHelperContext cache key for WLS.  This method should be used when an attempt to create an InitialContext fails.
 */
public static SDOException errorCreatingWLSInitialContext(Exception nestedException){
  Object[] args={};
  SDOException exception=new SDOException(ExceptionMessageGenerator.buildMessage(SDOException.class,ERROR_CREATING_INITIAL_CONTEXT,args),nestedException);
  exception.setErrorCode(ERROR_CREATING_INITIAL_CONTEXT);
  return exception;
}
Program: 67929
Project: 67929
Buggy source:
/** 
 * INTERNAL: thrown from SDOXMLHelperDelegate 
 */
public static SDOException typePropertyMustBeAType(Exception nestedException){
  Object[] args={};
  SDOException exception=new SDOException(ExceptionMessageGenerator.buildMessage(SDOException.class,TYPE_PROPERTY_MUST_BE_A_TYPE,args),nestedException);
  exception.setErrorCode(TYPE_PROPERTY_MUST_BE_A_TYPE);
  return exception;
}

Fixed version (ground truth):
/** 
 * INTERNAL: thrown from SDOXMLHelperDelegate
 */
public static SDOException typePropertyMustBeAType(Exception nestedException){
  Object[] args={};
  SDOException exception=new SDOException(ExceptionMessageGenerator.buildMessage(SDOException.class,TYPE_PROPERTY_MUST_BE_A_TYPE,args),nestedException);
  exception.setErrorCode(TYPE_PROPERTY_MUST_BE_A_TYPE);
  return exception;
}
Program: 67930
Project: 67930
Buggy source:
/** 
 * INTERNAL: thrown from SDOTypesGenerator 
 */
public static SDOException prefixUsedButNotDefined(String prefix){
  Object[] args={prefix};
  SDOException exception=new SDOException(ExceptionMessageGenerator.buildMessage(SDOException.class,PREFIX_USED_BUT_NOT_DEFINED,args));
  exception.setErrorCode(PREFIX_USED_BUT_NOT_DEFINED);
  return exception;
}

Fixed version (ground truth):
/** 
 * INTERNAL: thrown from SDOTypesGenerator
 */
public static SDOException prefixUsedButNotDefined(String prefix){
  Object[] args={prefix};
  SDOException exception=new SDOException(ExceptionMessageGenerator.buildMessage(SDOException.class,PREFIX_USED_BUT_NOT_DEFINED,args));
  exception.setErrorCode(PREFIX_USED_BUT_NOT_DEFINED);
  return exception;
}
Program: 67931
Project: 67931
Buggy source:
/** 
 * INTERNAL: thrown from SDOXMLHelperDelegate 
 */
public static SDOException optionsMustBeADataObject(Exception nestedException,String uri,String name){
  Object[] args={uri,name};
  SDOException exception=new SDOException(ExceptionMessageGenerator.buildMessage(SDOException.class,OPTIONS_MUST_BE_A_DATAOBJECT,args),nestedException);
  exception.setErrorCode(OPTIONS_MUST_BE_A_DATAOBJECT);
  return exception;
}

Fixed version (ground truth):
/** 
 * INTERNAL: thrown from SDOXMLHelperDelegate
 */
public static SDOException optionsMustBeADataObject(Exception nestedException,String uri,String name){
  Object[] args={uri,name};
  SDOException exception=new SDOException(ExceptionMessageGenerator.buildMessage(SDOException.class,OPTIONS_MUST_BE_A_DATAOBJECT,args),nestedException);
  exception.setErrorCode(OPTIONS_MUST_BE_A_DATAOBJECT);
  return exception;
}
Program: 67932
Project: 67932
Buggy source:
protected void postPersist(){
  POST_PERSIST_COUNT++;
}

Fixed version (ground truth):
protected void postPersist(){
  post_persist_count++;
}
Program: 67933
Project: 67933
Buggy source:
public void postUpdate(){
  POST_UPDATE_COUNT++;
}

Fixed version (ground truth):
public void postUpdate(){
  post_update_count++;
}
Program: 67934
Project: 67934
Buggy source:
public void prePersist(){
  PRE_PERSIST_COUNT++;
}

Fixed version (ground truth):
public void prePersist(){
  pre_persist_count++;
}
Program: 67935
Project: 67935
Buggy source:
void postRemove(){
  POST_REMOVE_COUNT++;
}

Fixed version (ground truth):
void postRemove(){
  post_remove_count++;
}
Program: 67936
Project: 67936
Buggy source:
private void preRemove(){
  PRE_REMOVE_COUNT++;
}

Fixed version (ground truth):
private void preRemove(){
  pre_remove_count++;
}
Program: 67937
Project: 67937
Buggy source:
public void preUpdate(){
  PRE_UPDATE_COUNT++;
}

Fixed version (ground truth):
public void preUpdate(){
  pre_update_count++;
}
Program: 67938
Project: 67938
Buggy source:
public void postLoad(){
  POST_LOAD_COUNT++;
}

Fixed version (ground truth):
public void postLoad(){
  post_load_count++;
}
Program: 67940
Project: 67940
Buggy source:
public void testUpdateBusFueledVehicle(){
  int preUpdateBusCountBefore=Bus.PRE_UPDATE_COUNT;
  int postUpdateBusCountBefore=Bus.POST_UPDATE_COUNT;
  EntityManager em=createEntityManager();
  beginTransaction(em);
  Bus bus;
  try {
    bus=em.find(Bus.class,busId);
    bus.setDescription("String_Node_Str");
    em.merge(bus);
    commitTransaction(em);
  }
 catch (  RuntimeException e) {
    if (isTransactionActive(em)) {
      rollbackTransaction(em);
    }
    closeEntityManager(em);
    throw e;
  }
  assertFalse("String_Node_Str",preUpdateBusCountBefore == Bus.PRE_UPDATE_COUNT);
  assertFalse("String_Node_Str",postUpdateBusCountBefore == Bus.POST_UPDATE_COUNT);
  int postLoadBusCountBefore=Bus.POST_LOAD_COUNT;
  int postLoadBusCountAfter1;
  beginTransaction(em);
  try {
    bus=em.find(Bus.class,busId);
    clearCache();
    em.refresh(bus);
    postLoadBusCountAfter1=Bus.POST_LOAD_COUNT;
    em.refresh(bus);
    commitTransaction(em);
  }
 catch (  RuntimeException e) {
    if (isTransactionActive(em)) {
      rollbackTransaction(em);
    }
    closeEntityManager(em);
    throw e;
  }
  assertTrue("String_Node_Str",bus.getDescription().equals("String_Node_Str"));
  assertFalse("String_Node_Str",postLoadBusCountBefore == postLoadBusCountAfter1);
  assertFalse("String_Node_Str",postLoadBusCountAfter1 == Bus.POST_LOAD_COUNT);
}

Fixed version (ground truth):
public void testUpdateBusFueledVehicle(){
  int preUpdateBusCountBefore=0;
  int postUpdateBusCountBefore=0;
  EntityManager em=createEntityManager();
  beginTransaction(em);
  Bus bus;
  try {
    bus=em.find(Bus.class,busId);
    bus.setDescription("String_Node_Str");
    em.merge(bus);
    commitTransaction(em);
  }
 catch (  RuntimeException e) {
    if (isTransactionActive(em)) {
      rollbackTransaction(em);
    }
    closeEntityManager(em);
    throw e;
  }
  assertFalse("String_Node_Str",preUpdateBusCountBefore == bus.pre_update_count);
  assertFalse("String_Node_Str",postUpdateBusCountBefore == bus.post_update_count);
  int postLoadBusCountBefore=bus.post_load_count;
  int postLoadBusCountAfter1;
  beginTransaction(em);
  try {
    bus=em.find(Bus.class,busId);
    clearCache();
    em.refresh(bus);
    postLoadBusCountAfter1=bus.post_load_count;
    em.refresh(bus);
    commitTransaction(em);
  }
 catch (  RuntimeException e) {
    if (isTransactionActive(em)) {
      rollbackTransaction(em);
    }
    closeEntityManager(em);
    throw e;
  }
  assertTrue("String_Node_Str",bus.getDescription().equals("String_Node_Str"));
}
Program: 67941
Project: 67941
Buggy source:
public void testDeleteBusFueledVehicle(){
  int postLoadBusCountBefore=Bus.POST_LOAD_COUNT;
  int preRemoveBusCountBefore=Bus.PRE_REMOVE_COUNT;
  int postRemoveBusCountBefore=Bus.POST_REMOVE_COUNT;
  EntityManager em=createEntityManager();
  beginTransaction(em);
  try {
    em.remove(em.find(Bus.class,busId));
    commitTransaction(em);
  }
 catch (  RuntimeException e) {
    if (isTransactionActive(em)) {
      rollbackTransaction(em);
    }
    closeEntityManager(em);
    throw e;
  }
  assertTrue("String_Node_Str",em.find(Bus.class,busId) == null);
  assertFalse("String_Node_Str",postLoadBusCountBefore == Bus.POST_LOAD_COUNT);
  assertFalse("String_Node_Str",preRemoveBusCountBefore == Bus.PRE_REMOVE_COUNT);
  assertFalse("String_Node_Str",postRemoveBusCountBefore == Bus.POST_REMOVE_COUNT);
}

Fixed version (ground truth):
public void testDeleteBusFueledVehicle(){
  int postLoadBusCountBefore=0;
  int preRemoveBusCountBefore=0;
  int postRemoveBusCountBefore=0;
  EntityManager em=createEntityManager();
  beginTransaction(em);
  Bus bus=em.find(Bus.class,busId);
  try {
    em.remove(bus);
    commitTransaction(em);
  }
 catch (  RuntimeException e) {
    if (isTransactionActive(em)) {
      rollbackTransaction(em);
    }
    closeEntityManager(em);
    throw e;
  }
  assertTrue("String_Node_Str",em.find(Bus.class,busId) == null);
  assertFalse("String_Node_Str",postLoadBusCountBefore == bus.post_load_count);
  assertFalse("String_Node_Str",preRemoveBusCountBefore == bus.pre_remove_count);
  assertFalse("String_Node_Str",postRemoveBusCountBefore == bus.post_remove_count);
}
Program: 67942
Project: 67942
Buggy source:
private void setUsesContainerAccessorForTopLink(Boolean value){
  this.usesContainerAccessor=value;
}

Fixed version (ground truth):
private void setUsesContainerAccessorForTopLink(Boolean value){
  if (value == null) {
    this.usesContainerAccessor=Boolean.FALSE;
  }
 else {
    this.usesContainerAccessor=value;
  }
}
Program: 67944
Project: 67944
Buggy source:
public SDOOpenSequencedType(SDOTypeHelper sdoTypeHelper){
  super(SDOConstants.ORACLE_SDO_URL,"String_Node_Str",sdoTypeHelper);
  this.xmlDescriptor.setNamespaceResolver(new NamespaceResolver());
  setInstanceClassName(SDOConstants.ORACLE_SDO_URL + "String_Node_Str");
  getInstanceClass();
  Class implClass=getImplClass();
  xmlDescriptor.setJavaClass(implClass);
  setMixed(true);
  setSequenced(true);
  setOpen(true);
  setFinalized(true);
}

Fixed version (ground truth):
public SDOOpenSequencedType(SDOTypeHelper sdoTypeHelper){
  super(SDOConstants.ORACLE_SDO_URL,"String_Node_Str",sdoTypeHelper);
  this.xmlDescriptor.setNamespaceResolver(new NamespaceResolver());
  setInstanceClassName(ORACLE_SDO_DO_URL + "String_Node_Str");
  setImplClassName(ORACLE_SDO_DO_URL + "String_Node_Str");
  getInstanceClass();
  Class implClass=getImplClass();
  xmlDescriptor.setJavaClass(implClass);
  setMixed(true);
  setSequenced(true);
  setOpen(true);
  setFinalized(true);
}
Program: 67946
Project: 67946
Buggy source:
public void setDescriptor(XMLDescriptor desc){
  if (isIDSet()) {
    String pkFieldName;
    if (helper.isAnnotationPresent(getIDProperty().getElement(),XmlAttribute.class)) {
      pkFieldName=ATT + getIDProperty().getSchemaName();
    }
 else {
      pkFieldName=getIDProperty().getSchemaName() + TXT;
    }
    desc.addPrimaryKeyFieldName(pkFieldName);
  }
  descriptor=desc;
  XMLSchemaClassPathReference schemaRef=new XMLSchemaClassPathReference();
  schemaRef.setSchemaContext("String_Node_Str" + schemaTypeName);
  if (isEnumerationType() || (propertyNames.size() == 1 && helper.isAnnotationPresent(getProperties().get(propertyNames.get(0)).getElement(),XmlValue.class))) {
    schemaRef.setType(XMLSchemaReference.SIMPLE_TYPE);
  }
  descriptor.setSchemaReference(schemaRef);
}

Fixed version (ground truth):
public void setDescriptor(XMLDescriptor desc){
  if (isIDSet()) {
    String pkFieldName;
    if (helper.isAnnotationPresent(getIDProperty().getElement(),XmlAttribute.class)) {
      pkFieldName=ATT + getIDProperty().getSchemaName();
    }
 else {
      pkFieldName=getIDProperty().getSchemaName() + TXT;
    }
    desc.addPrimaryKeyFieldName(pkFieldName);
  }
  descriptor=desc;
  XMLSchemaClassPathReference schemaRef=new XMLSchemaClassPathReference();
  schemaRef.setSchemaContext("String_Node_Str" + schemaTypeName);
  schemaRef.setSchemaContextAsQName(new QName(classNamespace,schemaTypeName));
  if (isEnumerationType() || (propertyNames.size() == 1 && helper.isAnnotationPresent(getProperties().get(propertyNames.get(0)).getElement(),XmlValue.class))) {
    schemaRef.setType(XMLSchemaReference.SIMPLE_TYPE);
  }
  descriptor.setSchemaReference(schemaRef);
}
Program: 67947
Project: 67947
Buggy source:
public DataObject create(Type type){
  return getSDODataFactoryDelegate().create(type);
}

Fixed version (ground truth):
public DataObject create(Type type){
  return getDataFactoryDelegate().create(type);
}
Program: 67948
Project: 67948
Buggy source:
public Class getJavaWrapperTypeForSDOType(Type sdoType){
  return getSDOTypeHelperDelegate().getJavaWrapperTypeForSDOType(sdoType);
}

Fixed version (ground truth):
public Class getJavaWrapperTypeForSDOType(Type sdoType){
  return getTypeHelperDelegate().getJavaWrapperTypeForSDOType(sdoType);
}