nus-yam/ex-repair huggingface dataset:
Program: 68021
Project: 68021
Buggy source:
/** 
 * INTERNAL: Merge the attributes of the clone into the unit of work copy.
 */
public Object mergeCloneWithReferences(Object rmiClone,MergeManager manager){
  Object mergedObject=super.mergeCloneWithReferences(rmiClone,manager);
  Map newObjects=manager.getMergedNewObjects();
  if (!newObjects.isEmpty()) {
    Iterator iterator=newObjects.values().iterator();
    while (iterator.hasNext()) {
      Object newObjectClone=iterator.next();
      ClassDescriptor descriptor=getDescriptor(newObjectClone);
      assignSequenceNumber(newObjectClone,descriptor);
      registerNewObjectInIdentityMap(newObjectClone,null,descriptor);
    }
  }
  return mergedObject;
}

Fixed version (ground truth):
/** 
 * INTERNAL: Merge the attributes of the clone into the unit of work copy.
 */
public Object mergeCloneWithReferences(Object rmiClone,MergeManager manager){
  Object mergedObject=super.mergeCloneWithReferences(rmiClone,manager);
  Map newObjects=manager.getMergedNewObjects();
  if (!newObjects.isEmpty()) {
    Iterator iterator=newObjects.values().iterator();
    while (iterator.hasNext()) {
      Object newObjectClone=iterator.next();
      ClassDescriptor descriptor=getDescriptor(newObjectClone);
      if (assignSequenceNumber(newObjectClone,descriptor) != null) {
        registerNewObjectInIdentityMap(newObjectClone,null,descriptor);
      }
    }
  }
  return mergedObject;
}
Program: 68022
Project: 68022
Buggy source:
/** 
 * INTERNAL: Assign sequence number to the object.
 */
public void assignSequenceNumber(Object object,ClassDescriptor descriptor) throws DatabaseException {
  if (descriptor.usesSequenceNumbers() && !descriptor.getSequence().shouldAcquireValueAfterInsert()) {
    startOperationProfile(SessionProfiler.AssignSequence);
    ObjectBuilder builder=descriptor.getObjectBuilder();
    try {
      builder.assignSequenceNumber(object,this);
    }
 catch (    RuntimeException exception) {
      handleException(exception);
    }
 finally {
      endOperationProfile(SessionProfiler.AssignSequence);
    }
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL: Assign sequence number to the object.
 */
public Object assignSequenceNumber(Object object,ClassDescriptor descriptor) throws DatabaseException {
  Object value=null;
  if (descriptor.usesSequenceNumbers() && !descriptor.getSequence().shouldAcquireValueAfterInsert()) {
    startOperationProfile(SessionProfiler.AssignSequence);
    ObjectBuilder builder=descriptor.getObjectBuilder();
    try {
      value=builder.assignSequenceNumber(object,this);
    }
 catch (    RuntimeException exception) {
      handleException(exception);
    }
 finally {
      endOperationProfile(SessionProfiler.AssignSequence);
    }
  }
  return value;
}
Program: 68023
Project: 68023
Buggy source:
public static TableDefinition build_SERIALNUMBER_Table(){
  TableDefinition table=new TableDefinition();
  table.setName("String_Node_Str");
  FieldDefinition NUMBER_field=new FieldDefinition();
  NUMBER_field.setName("String_Node_Str");
  NUMBER_field.setTypeName("String_Node_Str");
  NUMBER_field.setSize(15);
  NUMBER_field.setIsPrimaryKey(true);
  NUMBER_field.setUnique(false);
  NUMBER_field.setIsIdentity(false);
  NUMBER_field.setShouldAllowNull(false);
  table.addField(NUMBER_field);
  return table;
}

Fixed version (ground truth):
public static TableDefinition build_SERIALNUMBER_Table(){
  TableDefinition table=new TableDefinition();
  table.setName("String_Node_Str");
  FieldDefinition NUMBER_field=new FieldDefinition();
  NUMBER_field.setName("String_Node_Str");
  NUMBER_field.setTypeName("String_Node_Str");
  NUMBER_field.setSize(15);
  NUMBER_field.setIsPrimaryKey(true);
  NUMBER_field.setUnique(false);
  NUMBER_field.setIsIdentity(false);
  NUMBER_field.setShouldAllowNull(false);
  table.addField(NUMBER_field);
  FieldDefinition ISSUE_DATE_field=new FieldDefinition();
  ISSUE_DATE_field.setName("String_Node_Str");
  ISSUE_DATE_field.setTypeName("String_Node_Str");
  ISSUE_DATE_field.setSize(23);
  ISSUE_DATE_field.setIsPrimaryKey(false);
  ISSUE_DATE_field.setUnique(false);
  ISSUE_DATE_field.setIsIdentity(false);
  ISSUE_DATE_field.setShouldAllowNull(true);
  table.addField(ISSUE_DATE_field);
  return table;
}
Program: 68024
Project: 68024
Buggy source:
public static Test suite(){
  TestSuite suite=new TestSuite();
  suite.setName("String_Node_Str");
  suite.addTest(new InheritedCallbacksJunitTest("String_Node_Str"));
  suite.addTest(new InheritedCallbacksJunitTest("String_Node_Str"));
  suite.addTest(new InheritedCallbacksJunitTest("String_Node_Str"));
  suite.addTest(new InheritedCallbacksJunitTest("String_Node_Str"));
  suite.addTest(new InheritedCallbacksJunitTest("String_Node_Str"));
  suite.addTest(new InheritedCallbacksJunitTest("String_Node_Str"));
  suite.addTest(new InheritedCallbacksJunitTest("String_Node_Str"));
  suite.addTest(new InheritedCallbacksJunitTest("String_Node_Str"));
  return suite;
}

Fixed version (ground truth):
public static Test suite(){
  TestSuite suite=new TestSuite();
  suite.setName("String_Node_Str");
  suite.addTest(new InheritedCallbacksJunitTest("String_Node_Str"));
  suite.addTest(new InheritedCallbacksJunitTest("String_Node_Str"));
  suite.addTest(new InheritedCallbacksJunitTest("String_Node_Str"));
  suite.addTest(new InheritedCallbacksJunitTest("String_Node_Str"));
  suite.addTest(new InheritedCallbacksJunitTest("String_Node_Str"));
  suite.addTest(new InheritedCallbacksJunitTest("String_Node_Str"));
  suite.addTest(new InheritedCallbacksJunitTest("String_Node_Str"));
  suite.addTest(new InheritedCallbacksJunitTest("String_Node_Str"));
  suite.addTest(new InheritedCallbacksJunitTest("String_Node_Str"));
  return suite;
}
Program: 68025
Project: 68025
Buggy source:
private SpinnerNumberModel buildSequencingPrealocationSizeSpinnerModel(){
  return new NumberSpinnerModelAdapter(buildSequencingPrealocationSizeHolder(getSelectionHolder()),new Integer(0),null,new Integer(1),new Integer(0));
}

Fixed version (ground truth):
private SpinnerNumberModel buildSequencingPrealocationSizeSpinnerModel(){
  return new NumberSpinnerModelAdapter(buildSequencingPrealocationSizeHolder(),new Integer(0),null,new Integer(1),new Integer(0));
}
Program: 68026
Project: 68026
Buggy source:
private PropertyValueModel buildSequencingPrealocationSizeHolder(ValueModel sequencingPolicyHolder){
  return new PropertyAspectAdapter(sequencingPolicyHolder,MWSequencingPolicy.PREALLOCATION_SIZE_PROPERTY){
    protected Object getValueFromSubject(){
      return new Integer(((MWRelationalProject)subject).getSequencingPolicy().getPreallocationSize());
    }
    protected void setValueOnSubject(    Object value){
      ((MWRelationalProject)subject).getSequencingPolicy().setPreallocationSize(((Number)value).intValue());
    }
  }
;
}

Fixed version (ground truth):
private PropertyValueModel buildSequencingPrealocationSizeHolder(){
  return new PropertyAspectAdapter(this.sequencingPolicyHolder,MWSequencingPolicy.PREALLOCATION_SIZE_PROPERTY){
    protected Object getValueFromSubject(){
      return new Integer(((MWSequencingPolicy)subject).getPreallocationSize());
    }
    protected void setValueOnSubject(    Object value){
      ((MWSequencingPolicy)subject).setPreallocationSize(((Number)value).intValue());
    }
  }
;
}
Program: 68027
Project: 68027
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(SDODataObjectSetGetWithPropertyTest.class));
  suite.addTest(new TestSuite(SDODataObjectSetGetWithIndexTest.class));
  suite.addTest(new TestSuite(DataHelperToYearMonthDayTest.class));
  suite.addTest(new TestSuite(DataHelperToYearMonthDayWithCalnTest.class));
  suite.addTest(new TestSuite(DataHelperToYearMonthTest.class));
  suite.addTest(new TestSuite(DataHelperToYearMonthWithCalnTest.class));
  suite.addTest(new TestSuite(DataHelperToYearTest.class));
  suite.addTest(new TestSuite(DataHelperToYearWithCalnTest.class));
  suite.addTest(new TestSuite(SDODataObjectUnsetIsSetTest.class));
  suite.addTest(new TestSuite(SDODataObjectContainerContainmentPropertyTest.class));
  suite.addTest(new TestSuite(SDODataObjectListWrapperTest.class));
  suite.addTest(new TestSuite(SDODataObjectJIRA81TestCases.class));
  suite.addTest(new TestSuite(SDODataObjectJIRA90ConversionTestCases.class));
  suite.addTest(new TestSuite(SDODataObjectJIRA102NillableDirectTestCases.class));
  suite.addTest(new TestSuite(SDODataObjectJIRA102NillableCompositeObjectTestCases.class));
  suite.addTest(new TestSuite(SDODataObjectOpenContentBug6011530TestCases.class));
  return suite;
}

Fixed version (ground truth):
/** 
 * Inherited suite mthod for generating all test cases.
 * @return
 */
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTest(new TestSuite(SDODataObjectSetGetWithPropertyTest.class));
  suite.addTest(new TestSuite(SDODataObjectSetGetWithIndexTest.class));
  suite.addTest(new TestSuite(DataHelperToYearMonthDayTest.class));
  suite.addTest(new TestSuite(DataHelperToYearMonthDayWithCalnTest.class));
  suite.addTest(new TestSuite(DataHelperToYearMonthTest.class));
  suite.addTest(new TestSuite(DataHelperToYearMonthWithCalnTest.class));
  suite.addTest(new TestSuite(DataHelperToYearTest.class));
  suite.addTest(new TestSuite(DataHelperToYearWithCalnTest.class));
  suite.addTest(new TestSuite(SDODataObjectUnsetIsSetTest.class));
  suite.addTest(new TestSuite(SDODataObjectContainerContainmentPropertyTest.class));
  suite.addTest(new TestSuite(SDODataObjectListWrapperTest.class));
  suite.addTest(new TestSuite(SDODataObjectJIRA81TestCases.class));
  suite.addTest(new TestSuite(SDODataObjectJIRA90ConversionTestCases.class));
  suite.addTest(new TestSuite(SDODataObjectJIRA102NillableDirectTestCases.class));
  suite.addTest(new TestSuite(SDODataObjectJIRA102NillableCompositeObjectTestCases.class));
  suite.addTest(new TestSuite(SDODataObjectOpenContentBug6011530TestCases.class));
  suite.addTest(new TestSuite(SetAndGetWithManyPropertyTestCases.class));
  suite.addTest(new TestSuite(SetAndGetWithManyPropertyViaPathTestCases.class));
  return suite;
}
Program: 68028
Project: 68028
Buggy source:
/** 
 * INTERNAL: Select all objects for an interface descriptor. This is accomplished by selecting for all of the concrete classes and then merging the objects.
 * @return Vector containing all objects.
 * @exception DatabaseException - an error has occurred on the database.
 */
public Object selectAllObjectsUsingMultipleTableSubclassRead(ReadAllQuery query) throws DatabaseException {
  org.eclipse.persistence.internal.queries.ContainerPolicy containerPolicy=query.getContainerPolicy();
  Object objects=containerPolicy.containerInstance(1);
  for (Enumeration childDescriptors=getChildDescriptors().elements(); childDescriptors.hasMoreElements(); ) {
    ReadAllQuery concreteQuery=(ReadAllQuery)query.deepClone();
    ClassDescriptor descriptor=(ClassDescriptor)childDescriptors.nextElement();
    Class javaClass=descriptor.getJavaClass();
    concreteQuery.setReferenceClass(javaClass);
    concreteQuery.setDescriptor(descriptor);
    objects=containerPolicy.concatenateContainers(objects,query.getSession().executeQuery(concreteQuery));
  }
  return objects;
}

Fixed version (ground truth):
/** 
 * INTERNAL: Select all objects for an interface descriptor. This is accomplished by selecting for all of the concrete classes and then merging the objects.
 * @return Vector containing all objects.
 * @exception DatabaseException - an error has occurred on the database.
 */
public Object selectAllObjectsUsingMultipleTableSubclassRead(ReadAllQuery query) throws DatabaseException {
  org.eclipse.persistence.internal.queries.ContainerPolicy containerPolicy=query.getContainerPolicy();
  Object objects=containerPolicy.containerInstance(1);
  for (Enumeration childDescriptors=getChildDescriptors().elements(); childDescriptors.hasMoreElements(); ) {
    ClassDescriptor descriptor=(ClassDescriptor)childDescriptors.nextElement();
    objects=containerPolicy.concatenateContainers(objects,descriptor.getInterfacePolicy().selectAllObjects(query));
  }
  return objects;
}
Program: 68029
Project: 68029
Buggy source:
/** 
 * INTERNAL: Select one object of any concrete subclass.
 */
public Object selectOneObjectUsingMultipleTableSubclassRead(ReadObjectQuery query) throws DatabaseException, QueryException {
  Object object=null;
  for (Enumeration childDescriptors=getChildDescriptors().elements(); childDescriptors.hasMoreElements() && (object == null); ) {
    ReadObjectQuery concreteQuery=(ReadObjectQuery)query.clone();
    ClassDescriptor descriptor=(ClassDescriptor)childDescriptors.nextElement();
    Class javaClass=descriptor.getJavaClass();
    concreteQuery.setReferenceClass(javaClass);
    concreteQuery.setDescriptor(descriptor);
    object=query.getSession().executeQuery(concreteQuery,concreteQuery.getTranslationRow());
  }
  return object;
}

Fixed version (ground truth):
/** 
 * INTERNAL: Select one object of any concrete subclass.
 */
public Object selectOneObjectUsingMultipleTableSubclassRead(ReadObjectQuery query) throws DatabaseException, QueryException {
  Object object=null;
  for (Enumeration childDescriptors=getChildDescriptors().elements(); childDescriptors.hasMoreElements() && (object == null); ) {
    ClassDescriptor descriptor=(ClassDescriptor)childDescriptors.nextElement();
    object=descriptor.getInterfacePolicy().selectOneObject(query);
  }
  return object;
}
Program: 68030
Project: 68030
Buggy source:
/** 
 * INTERNAL: Logging utility method.
 */
public void logConfigMessage(String ctx,Object param1,Object param2){
  log(SessionLog.FINEST,ctx,new Object[]{param1,param2});
}

Fixed version (ground truth):
/** 
 * INTERNAL: Logging utility method. We currently can not log any lower than CONFIG since all our metadata logging messages are located in LoggingLocalizationResource. Any lower than CONFIG and those message strings would have to move to  TraceLocalizationResource.
 */
public void logConfigMessage(String ctx,Object param1,Object param2){
  log(SessionLog.CONFIG,ctx,new Object[]{param1,param2});
}
Program: 68032
Project: 68032
Buggy source:
/** 
 * INTERNAL: Return the logging context string for the given context.
 */
protected String getLoggingContextString(String context){
  return (String)m_ctxStrings.get(context);
}

Fixed version (ground truth):
/** 
 * INTERNAL: Return the logging context string for the given context.
 */
protected String getLoggingContextString(String context){
  String ctxString=(String)m_ctxStrings.get(context);
  if (ctxString == null) {
    throw ValidationException.missingContextStringForContext(context);
  }
  return ctxString;
}
Program: 68034
Project: 68034
Buggy source:
private JPanel buildPrimaryTablePanel(){
  JPanel primaryTablePanel=new JPanel(new GridBagLayout());
  GridBagConstraints constraints=new GridBagConstraints();
  JLabel tableLabel=buildLabel("String_Node_Str");
  constraints.gridx=0;
  constraints.gridy=0;
  constraints.gridwidth=1;
  constraints.gridheight=0;
  constraints.weightx=0;
  constraints.weighty=0;
  constraints.fill=GridBagConstraints.NONE;
  constraints.anchor=GridBagConstraints.LINE_START;
  constraints.insets=new Insets(0,0,0,0);
  primaryTablePanel.add(tableLabel,constraints);
  LabelPanel primaryTableLabelPanel=new LabelPanel(this.buildLabelPanelTextAdapter());
  Insets insets=UIManager.getInsets("String_Node_Str");
  primaryTableLabelPanel.setBorder(BorderFactory.createCompoundBorder(UIManager.getBorder("String_Node_Str"),BorderFactory.createEmptyBorder(insets.top,insets.left,insets.bottom,insets.right)));
  Dimension size=tableLabel.getPreferredSize();
  insets=primaryTableLabelPanel.getBorder().getBorderInsets(primaryTableLabelPanel);
  primaryTableLabelPanel.setPreferredSize(new Dimension(1,size.height + insets.top + insets.bottom));
  constraints.gridx=1;
  constraints.gridy=0;
  constraints.gridwidth=1;
  constraints.gridheight=1;
  constraints.weightx=1;
  constraints.weighty=0;
  constraints.fill=GridBagConstraints.HORIZONTAL;
  constraints.anchor=GridBagConstraints.CENTER;
  constraints.insets=new Insets(0,5,0,0);
  primaryTablePanel.add(primaryTableLabelPanel,constraints);
  return primaryTablePanel;
}

Fixed version (ground truth):
private JPanel buildPrimaryTablePanel(){
  JPanel primaryTablePanel=new JPanel(new GridBagLayout());
  GridBagConstraints constraints=new GridBagConstraints();
  JLabel tableLabel=buildLabel("String_Node_Str");
  constraints.gridx=0;
  constraints.gridy=0;
  constraints.gridwidth=1;
  constraints.gridheight=0;
  constraints.weightx=0;
  constraints.weighty=0;
  constraints.fill=GridBagConstraints.NONE;
  constraints.anchor=GridBagConstraints.LINE_START;
  constraints.insets=new Insets(0,0,0,0);
  primaryTablePanel.add(tableLabel,constraints);
  LabelPanel primaryTableLabelPanel=new LabelPanel(this.buildLabelPanelTextAdapter());
  Insets insets=UIManager.getInsets("String_Node_Str");
  if (insets == null) {
    insets=UIManager.getInsets("String_Node_Str");
  }
  primaryTableLabelPanel.setBorder(BorderFactory.createCompoundBorder(UIManager.getBorder("String_Node_Str"),BorderFactory.createEmptyBorder(insets.top,insets.left,insets.bottom,insets.right)));
  Dimension size=tableLabel.getPreferredSize();
  insets=primaryTableLabelPanel.getBorder().getBorderInsets(primaryTableLabelPanel);
  primaryTableLabelPanel.setPreferredSize(new Dimension(1,size.height + insets.top + insets.bottom));
  constraints.gridx=1;
  constraints.gridy=0;
  constraints.gridwidth=1;
  constraints.gridheight=1;
  constraints.weightx=1;
  constraints.weighty=0;
  constraints.fill=GridBagConstraints.HORIZONTAL;
  constraints.anchor=GridBagConstraints.CENTER;
  constraints.insets=new Insets(0,5,0,0);
  primaryTablePanel.add(primaryTableLabelPanel,constraints);
  return primaryTablePanel;
}
Program: 68035
Project: 68035
Buggy source:
private CollectionValueModel buildJ2CAdaptersCollectionAdapter(){
  return new ReadOnlyCollectionValueModel(MWEisLoginSpec.getJ2CAdapterNames());
}

Fixed version (ground truth):
private CollectionValueModel buildJ2CAdaptersCollectionAdapter(){
  return new ReadOnlyCollectionValueModel(CollectionTools.sort(MWEisLoginSpec.j2CAdapterNames()));
}
Program: 68036
Project: 68036
Buggy source:
protected void buidPlatforms(){
  this.addPlatform(AQ_ID,"String_Node_Str");
  this.addPlatform(MQ_ID,"String_Node_Str");
}

Fixed version (ground truth):
protected void buidPlatforms(){
  this.addPlatform(AQ_ID,"String_Node_Str");
  this.addPlatform(JMS_ID,"String_Node_Str");
  this.addPlatform(MQ_ID,"String_Node_Str");
  this.addPlatform(XML_ID,"String_Node_Str");
}
Program: 68037
Project: 68037
Buggy source:
private void buidConnectionSpecs(){
  this.connectionSpecs.put(AQ_ID,"String_Node_Str");
  this.connectionSpecs.put(MQ_ID,"String_Node_Str");
}

Fixed version (ground truth):
private void buidConnectionSpecs(){
  this.connectionSpecs.put(AQ_ID,"String_Node_Str");
  this.connectionSpecs.put(JMS_ID,"String_Node_Str");
  this.connectionSpecs.put(MQ_ID,"String_Node_Str");
  this.connectionSpecs.put(XML_ID,"String_Node_Str");
}
Program: 68038
Project: 68038
Buggy source:
private ListCellRenderer buildEisNameRenderer(){
  return new SimpleListCellRenderer(){
    protected String buildText(    Object cellValue){
      if (((String)cellValue).equals("String_Node_Str")) {
        return "String_Node_Str";
      }
 else       if (((String)cellValue).equals("String_Node_Str")) {
        return "String_Node_Str";
      }
 else {
        return "String_Node_Str";
      }
    }
  }
;
}

Fixed version (ground truth):
private ListCellRenderer buildEisNameRenderer(){
  return new SimpleListCellRenderer(){
    protected String buildText(    Object cellValue){
      if (((String)cellValue).equals("String_Node_Str")) {
        return EisPlatformManager.AQ_ID;
      }
 else       if (((String)cellValue).equals("String_Node_Str")) {
        return EisPlatformManager.JMS_ID;
      }
 else       if (((String)cellValue).equals("String_Node_Str")) {
        return EisPlatformManager.MQ_ID;
      }
 else {
        return EisPlatformManager.XML_ID;
      }
    }
  }
;
}
Program: 68039
Project: 68039
Buggy source:
protected String buildText(Object cellValue){
  String string=(String)cellValue;
  if (string.equals("String_Node_Str")) {
    return "String_Node_Str";
  }
  if (string.equals("String_Node_Str")) {
    return "String_Node_Str";
  }
  return "String_Node_Str";
}

Fixed version (ground truth):
protected String buildText(Object cellValue){
  String string=(String)cellValue;
  if (string.equals("String_Node_Str")) {
    return EisPlatformManager.AQ_ID;
  }
  if (string.equals("String_Node_Str")) {
    return EisPlatformManager.MQ_ID;
  }
  if (string.equals("String_Node_Str")) {
    return EisPlatformManager.JMS_ID;
  }
  return EisPlatformManager.XML_ID;
}
Program: 68040
Project: 68040
Buggy source:
private ListCellRenderer buildEisNameRenderer(){
  return new SimpleListCellRenderer(){
    protected String buildText(    Object cellValue){
      String string=(String)cellValue;
      if (string.equals("String_Node_Str")) {
        return "String_Node_Str";
      }
      if (string.equals("String_Node_Str")) {
        return "String_Node_Str";
      }
      return "String_Node_Str";
    }
  }
;
}

Fixed version (ground truth):
private ListCellRenderer buildEisNameRenderer(){
  return new SimpleListCellRenderer(){
    protected String buildText(    Object cellValue){
      String string=(String)cellValue;
      if (string.equals("String_Node_Str")) {
        return EisPlatformManager.AQ_ID;
      }
      if (string.equals("String_Node_Str")) {
        return EisPlatformManager.MQ_ID;
      }
      if (string.equals("String_Node_Str")) {
        return EisPlatformManager.JMS_ID;
      }
      return EisPlatformManager.XML_ID;
    }
  }
;
}
Program: 68041
Project: 68041
Buggy source:
protected String buildText(Object cellValue){
  if (((String)cellValue).equals("String_Node_Str")) {
    return "String_Node_Str";
  }
 else   if (((String)cellValue).equals("String_Node_Str")) {
    return "String_Node_Str";
  }
 else {
    return "String_Node_Str";
  }
}

Fixed version (ground truth):
protected String buildText(Object cellValue){
  if (((String)cellValue).equals("String_Node_Str")) {
    return EisPlatformManager.AQ_ID;
  }
 else   if (((String)cellValue).equals("String_Node_Str")) {
    return EisPlatformManager.JMS_ID;
  }
 else   if (((String)cellValue).equals("String_Node_Str")) {
    return EisPlatformManager.MQ_ID;
  }
 else {
    return EisPlatformManager.XML_ID;
  }
}
Program: 68042
Project: 68042
Buggy source:
/** 
 * Creates the decorator responsible to format the class name (String) values in the Platform combo box.
 * @return A new <code>ListCellRenderer</code>
 */
private ListCellRenderer buildPlatformLabelDecorator(){
  return new SimpleListCellRenderer(){
    protected String buildText(    Object cellValue){
      if (((String)cellValue).equals("String_Node_Str")) {
        return "String_Node_Str";
      }
 else       if (((String)cellValue).equals("String_Node_Str")) {
        return "String_Node_Str";
      }
 else {
        return "String_Node_Str";
      }
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Creates the decorator responsible to format the class name (String) values in the Platform combo box.
 * @return A new <code>ListCellRenderer</code>
 */
private ListCellRenderer buildPlatformLabelDecorator(){
  return new SimpleListCellRenderer(){
    protected String buildText(    Object cellValue){
      if (((String)cellValue).equals("String_Node_Str")) {
        return EisPlatformManager.AQ_ID;
      }
 else       if (((String)cellValue).equals("String_Node_Str")) {
        return EisPlatformManager.JMS_ID;
      }
 else       if (((String)cellValue).equals("String_Node_Str")) {
        return EisPlatformManager.MQ_ID;
      }
 else {
        return EisPlatformManager.XML_ID;
      }
    }
  }
;
}
Program: 68043
Project: 68043
Buggy source:
/** 
 * INTERNAL: Sets a javax.persistence.LockModeType to used with this queries execution.  The valid types are: - WRITE - READ - OPTIMISTIC - OPTIMISTIC_FORCE_INCREMENT - PESSIMISTIC - PESSIMISTIC_FORCE_INCREMENT - NONE Setting a null type will do nothing.
 */
public void setLockModeType(LockModeType lockModeType,AbstractSession session){
  if (lockModeType != null) {
    OptimisticLockingPolicy lockingPolicy=session.getDescriptor(getReferenceClass()).getOptimisticLockingPolicy();
    if (lockingPolicy == null || !(lockingPolicy instanceof VersionLockingPolicy)) {
      if (!lockModeType.name().equals(PESSIMISTIC) && !lockModeType.name().equals(NONE)) {
        throw new RuntimeException(ExceptionLocalization.buildMessage("String_Node_Str",null));
      }
    }
    this.lockModeType=lockModeType.name();
    setIsPrePrepared(false);
    setIsPrepared(false);
    setWasDefaultLockMode(false);
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL: Sets a javax.persistence.LockModeType to used with this queries execution.  The valid types are: - WRITE - READ - OPTIMISTIC - OPTIMISTIC_FORCE_INCREMENT - PESSIMISTIC - PESSIMISTIC_FORCE_INCREMENT - NONE Setting a null type will do nothing.
 * @return returns a failure flag indicating that we were UNABLE to set the lock mode because of validation. Callers to this method should check the  return value and throw the necessary exception.
 */
public boolean setLockModeType(LockModeType lockModeType,AbstractSession session){
  if (lockModeType != null) {
    OptimisticLockingPolicy lockingPolicy=session.getDescriptor(getReferenceClass()).getOptimisticLockingPolicy();
    if (lockingPolicy == null || !(lockingPolicy instanceof VersionLockingPolicy)) {
      if (!lockModeType.name().equals(PESSIMISTIC) && !lockModeType.name().equals(NONE)) {
        return true;
      }
    }
    this.lockModeType=lockModeType.name();
    setIsPrePrepared(false);
    setIsPrepared(false);
    setWasDefaultLockMode(false);
  }
  return false;
}
Program: 68045
Project: 68045
Buggy source:
/** 
 * INTERNAL: Sets a javax.persistence.LockModeType to used with this queries execution.  The valid types are: - WRITE - READ - OPTIMISTIC - OPTIMISTIC_FORCE_INCREMENT - PESSIMISTIC - PESSIMISTIC_FORCE_INCREMENT - NONE Setting a null type will do nothing.
 */
@Override public void setLockModeType(LockModeType lockModeType,AbstractSession session){
  if (lockModeType != null) {
    super.setLockModeType(lockModeType,session);
    if (!lockModeType.equals(PESSIMISTIC) && !lockModeType.equals(NONE)) {
      for (      ReportItem reportItem : (Vector<ReportItem>)getItems()) {
        if (reportItem.getAttributeExpression() != null && reportItem.getAttributeExpression().isExpressionBuilder()) {
          OptimisticLockingPolicy lockingPolicy=reportItem.getDescriptor().getOptimisticLockingPolicy();
          if (lockingPolicy == null || !(lockingPolicy instanceof VersionLockingPolicy)) {
            throw new RuntimeException(ExceptionLocalization.buildMessage("String_Node_Str",null));
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * INTERNAL: Sets a javax.persistence.LockModeType to used with this queries execution.  The valid types are: - WRITE - READ - OPTIMISTIC - OPTIMISTIC_FORCE_INCREMENT - PESSIMISTIC - PESSIMISTIC_FORCE_INCREMENT - NONE Setting a null type will do nothing.
 * @return returns a failure flag indicating that we were UNABLE to set the lock mode because of validation. Callers to this method should check the  return value and throw the necessary exception.
 */
@Override public boolean setLockModeType(LockModeType lockModeType,AbstractSession session){
  if (lockModeType != null) {
    if (super.setLockModeType(lockModeType,session)) {
      return true;
    }
 else {
      if (!lockModeType.equals(PESSIMISTIC) && !lockModeType.equals(NONE)) {
        for (        ReportItem reportItem : (Vector<ReportItem>)getItems()) {
          if (reportItem.getAttributeExpression() != null && reportItem.getAttributeExpression().isExpressionBuilder()) {
            OptimisticLockingPolicy lockingPolicy=reportItem.getDescriptor().getOptimisticLockingPolicy();
            if (lockingPolicy == null || !(lockingPolicy instanceof VersionLockingPolicy)) {
              return true;
            }
          }
        }
      }
    }
  }
  return false;
}
Program: 68049
Project: 68049
Buggy source:
private AddRemoveListPanel buildSequenceListPane(){
  AddRemoveListPanel panel=new AddRemoveListPanel(getApplicationContext(),buildSequenceListAdapter(),buildSortedSequenceListHolder());
  panel.setCellRenderer(buildSequenceListRenderer());
  return panel;
}

Fixed version (ground truth):
private AddRemoveListPanel buildSequenceListPane(){
  AddRemoveListPanel panel=new AddRemoveListPanel(getApplicationContext(),buildSequenceListAdapter(),buildSortedSequenceListHolder()){
    @Override protected void updateRemoveButton(    JButton removeButton){
      SequenceAdapter sequence=(SequenceAdapter)this.getSelectionModel().getSelectedValue();
      removeButton.setEnabled((sequence != null) && (getSelectedValues().length == 1) && (!sequence.isTheDefaultSequence()));
    }
  }
;
  panel.setCellRenderer(buildSequenceListRenderer());
  return panel;
}
Program: 68051
Project: 68051
Buggy source:
public void setPropOrder(String[] order){
  if (order.length == 0 || order[0].equals("String_Node_Str")) {
    propOrder=null;
  }
 else {
    propOrder=new ArrayList(order.length);
    for (    String next : order) {
      propOrder.add(next);
    }
  }
}

Fixed version (ground truth):
public void setPropOrder(String[] order){
  if (order.length == 0) {
    propOrder=null;
  }
 else {
    propOrder=new ArrayList(order.length);
    for (    String next : order) {
      propOrder.add(next);
    }
  }
}
Program: 68052
Project: 68052
Buggy source:
private void writeTypeAttribute(MarshalRecord marshalRecord,XMLDescriptor descriptor,String xsiPrefix){
  String typeValue=descriptor.getSchemaReference().getSchemaContext();
  typeValue=typeValue.substring(1);
  marshalRecord.attribute(XMLConstants.SCHEMA_INSTANCE_URL,XMLConstants.SCHEMA_TYPE_ATTRIBUTE,xsiPrefix + "String_Node_Str" + XMLConstants.SCHEMA_TYPE_ATTRIBUTE,typeValue);
}

Fixed version (ground truth):
private void writeTypeAttribute(MarshalRecord marshalRecord,XMLDescriptor descriptor,String xsiPrefix){
  String typeValue=descriptor.getSchemaReference().getSchemaContext();
  if (typeValue == null) {
    QName contextAsQName=descriptor.getSchemaReference().getSchemaContextAsQName();
    if (contextAsQName == null) {
      return;
    }
    String uri=contextAsQName.getNamespaceURI();
    String localPart=contextAsQName.getLocalPart();
    String prefix=marshalRecord.getNamespaceResolver().resolveNamespaceURI(uri);
    if (prefix == null) {
      String defaultUri=marshalRecord.getNamespaceResolver().getDefaultNamespaceURI();
      if (defaultUri != null && defaultUri.equals(uri)) {
        typeValue=localPart;
      }
 else {
        prefix=marshalRecord.getNamespaceResolver().generatePrefix();
        marshalRecord.attribute(XMLConstants.XMLNS_URL,XMLConstants.XMLNS,XMLConstants.XMLNS + "String_Node_Str" + prefix,uri);
        typeValue=prefix + "String_Node_Str" + localPart;
      }
    }
 else {
      typeValue=prefix + "String_Node_Str" + localPart;
    }
  }
 else {
    typeValue=typeValue.substring(1);
  }
  marshalRecord.attribute(XMLConstants.SCHEMA_INSTANCE_URL,XMLConstants.SCHEMA_TYPE_ATTRIBUTE,xsiPrefix + "String_Node_Str" + XMLConstants.SCHEMA_TYPE_ATTRIBUTE,typeValue);
}
Program: 68057
Project: 68057
Buggy source:
private SDOType processSimpleType(String targetNamespace,String defaultNamespace,String sdoTypeName,SimpleType simpleType){
  if (simpleType == null) {
    return null;
  }
  boolean addedNR=addNextNamespaceResolver(simpleType.getAttributesMap());
  String name=sdoTypeName;
  String originalName=name;
  String nameValue=(String)simpleType.getAttributesMap().get(SDOConstants.SDOXML_NAME_QNAME);
  if (nameValue != null) {
    itemNameToSDOName.put(sdoTypeName,nameValue);
    name=nameValue;
  }
  SDOType newType=startSimpleType(targetNamespace,defaultNamespace,name,originalName,simpleType);
  if (newType != null) {
    Restriction restriction=simpleType.getRestriction();
    if (restriction != null) {
      processRestriction(targetNamespace,defaultNamespace,newType,restriction);
    }
    List list=simpleType.getList();
    if (list != null) {
      processList(targetNamespace,defaultNamespace,sdoTypeName,list);
    }
    Union union=simpleType.getUnion();
    if (union != null) {
      processUnion(targetNamespace,defaultNamespace,sdoTypeName,union);
    }
    finishSimpleType(targetNamespace,defaultNamespace,sdoTypeName,simpleType);
  }
  if (addedNR) {
    namespaceResolvers.remove(namespaceResolvers.size() - 1);
  }
  return newType;
}

Fixed version (ground truth):
private SDOType processSimpleType(String targetNamespace,String defaultNamespace,String sdoTypeName,SimpleType simpleType){
  if (simpleType == null) {
    return null;
  }
  boolean addedNR=addNextNamespaceResolver(simpleType.getAttributesMap());
  String name=sdoTypeName;
  String originalName=name;
  String nameValue=(String)simpleType.getAttributesMap().get(SDOConstants.SDOXML_NAME_QNAME);
  if (nameValue != null) {
    itemNameToSDOName.put(sdoTypeName,nameValue);
    name=nameValue;
  }
  SDOType newType=startSimpleType(targetNamespace,defaultNamespace,name,originalName,simpleType);
  if (newType != null) {
    Restriction restriction=simpleType.getRestriction();
    if (restriction != null) {
      processRestriction(targetNamespace,defaultNamespace,newType,restriction);
    }
    List list=simpleType.getList();
    if (list != null) {
      processList(targetNamespace,defaultNamespace,sdoTypeName,list,newType);
    }
    Union union=simpleType.getUnion();
    if (union != null) {
      processUnion(targetNamespace,defaultNamespace,sdoTypeName,union,newType);
    }
    finishSimpleType(targetNamespace,defaultNamespace,sdoTypeName,simpleType,newType);
  }
  if (addedNR) {
    namespaceResolvers.remove(namespaceResolvers.size() - 1);
  }
  return newType;
}
Program: 68058
Project: 68058
Buggy source:
private void processAttribute(String targetNamespace,String defaultNamespace,SDOType owningType,Attribute attribute,boolean isGlobal){
  SimpleType simpleType=attribute.getSimpleType();
  if (simpleType != null) {
    processSimpleType(targetNamespace,defaultNamespace,attribute.getName(),simpleType);
    processSimpleAttribute(targetNamespace,defaultNamespace,owningType,attribute,isGlobal,rootSchema.isAttributeFormDefault());
  }
 else {
    processSimpleAttribute(targetNamespace,defaultNamespace,owningType,attribute,isGlobal,rootSchema.isAttributeFormDefault());
  }
}

Fixed version (ground truth):
private void processAttribute(String targetNamespace,String defaultNamespace,SDOType owningType,Attribute attribute,boolean isGlobal){
  SimpleType simpleType=attribute.getSimpleType();
  if (simpleType != null) {
    SDOType propertyType=processSimpleType(targetNamespace,defaultNamespace,attribute.getName(),simpleType);
    processSimpleAttribute(targetNamespace,defaultNamespace,owningType,attribute,isGlobal,rootSchema.isAttributeFormDefault(),propertyType);
  }
 else {
    processSimpleAttribute(targetNamespace,defaultNamespace,owningType,attribute,isGlobal,rootSchema.isAttributeFormDefault(),null);
  }
}
Program: 68059
Project: 68059
Buggy source:
private void processList(String targetNamespace,String defaultNamespace,String sdoTypeName,List list){
  if (list != null) {
    SDOType type=getSDOTypeForName(targetNamespace,defaultNamespace,sdoTypeName);
    type.setXsdList(true);
    type.setInstanceClass(ClassConstants.List_Class);
  }
}

Fixed version (ground truth):
private void processList(String targetNamespace,String defaultNamespace,String sdoTypeName,List list,SDOType type){
  if (list != null) {
    type.setXsdList(true);
    type.setInstanceClass(ClassConstants.List_Class);
  }
}
Program: 68060
Project: 68060
Buggy source:
private void finishSimpleType(String targetNamespace,String defaultNamespace,String sdoTypeName,SimpleType simpleType){
  SDOType currentType=getSDOTypeForName(targetNamespace,defaultNamespace,false,sdoTypeName);
  String value=(String)simpleType.getAttributesMap().get(SDOConstants.SDOXML_ALIASNAME_QNAME);
  if (value != null) {
    XMLConversionManager xmlConversionManager=((SDOXMLHelper)aHelperContext.getXMLHelper()).getXmlConversionManager();
    java.util.List names=(java.util.List)xmlConversionManager.convertObject(value,java.util.List.class);
    currentType.setAliasNames(names);
  }
  String instanceClassValue=(String)simpleType.getAttributesMap().get(SDOConstants.SDOJAVA_INSTANCECLASS_QNAME);
  if (instanceClassValue != null) {
    currentType.setInstanceProperty(SDOConstants.JAVA_CLASS_PROPERTY,instanceClassValue);
    currentType.setBaseTypes(null);
  }
  String extendedInstanceClassValue=(String)simpleType.getAttributesMap().get(SDOConstants.SDOJAVA_EXTENDEDINSTANCECLASS_QNAME);
  if (extendedInstanceClassValue != null) {
    currentType.setInstanceClassName(extendedInstanceClassValue);
  }
  currentType.postInitialize();
}

Fixed version (ground truth):
private void finishSimpleType(String targetNamespace,String defaultNamespace,String sdoTypeName,SimpleType simpleType,SDOType currentType){
  String value=(String)simpleType.getAttributesMap().get(SDOConstants.SDOXML_ALIASNAME_QNAME);
  if (value != null) {
    XMLConversionManager xmlConversionManager=((SDOXMLHelper)aHelperContext.getXMLHelper()).getXmlConversionManager();
    java.util.List names=(java.util.List)xmlConversionManager.convertObject(value,java.util.List.class);
    currentType.setAliasNames(names);
  }
  String instanceClassValue=(String)simpleType.getAttributesMap().get(SDOConstants.SDOJAVA_INSTANCECLASS_QNAME);
  if (instanceClassValue != null) {
    currentType.setInstanceProperty(SDOConstants.JAVA_CLASS_PROPERTY,instanceClassValue);
    currentType.setBaseTypes(null);
  }
  String extendedInstanceClassValue=(String)simpleType.getAttributesMap().get(SDOConstants.SDOJAVA_EXTENDEDINSTANCECLASS_QNAME);
  if (extendedInstanceClassValue != null) {
    currentType.setInstanceClassName(extendedInstanceClassValue);
  }
  currentType.postInitialize();
}
Program: 68062
Project: 68062
Buggy source:
private void processUnion(String targetNamespace,String defaultNamespace,String sdoTypeName,Union union){
  if (union != null) {
    java.util.List allMemberTypes=union.getAllMemberTypes();
    SDOType type=getSDOTypeForName(targetNamespace,defaultNamespace,sdoTypeName);
    String firstInstanceClassName=null;
    for (int i=0; i < allMemberTypes.size(); i++) {
      String nextMemberType=(String)allMemberTypes.get(i);
      SDOType typeForMemberType=getTypeForName(targetNamespace,defaultNamespace,nextMemberType);
      if (i == 0) {
        firstInstanceClassName=typeForMemberType.getInstanceClassName();
        if (firstInstanceClassName == null) {
          break;
        }
      }
 else {
        String nextClassName=typeForMemberType.getInstanceClassName();
        if (!firstInstanceClassName.equals(nextClassName)) {
          type.setInstanceClass(java.lang.Object.class);
          return;
        }
      }
    }
    if (firstInstanceClassName != null) {
      type.setInstanceClassName(firstInstanceClassName);
    }
 else {
      type.setInstanceClass(java.lang.Object.class);
    }
  }
}

Fixed version (ground truth):
private void processUnion(String targetNamespace,String defaultNamespace,String sdoTypeName,Union union,SDOType type){
  if (union != null) {
    java.util.List allMemberTypes=union.getAllMemberTypes();
    String firstInstanceClassName=null;
    for (int i=0; i < allMemberTypes.size(); i++) {
      String nextMemberType=(String)allMemberTypes.get(i);
      SDOType typeForMemberType=getTypeForName(targetNamespace,defaultNamespace,nextMemberType);
      if (i == 0) {
        firstInstanceClassName=typeForMemberType.getInstanceClassName();
        if (firstInstanceClassName == null) {
          break;
        }
      }
 else {
        String nextClassName=typeForMemberType.getInstanceClassName();
        if (!firstInstanceClassName.equals(nextClassName)) {
          type.setInstanceClass(java.lang.Object.class);
          return;
        }
      }
    }
    if (firstInstanceClassName != null) {
      type.setInstanceClassName(firstInstanceClassName);
    }
 else {
      type.setInstanceClass(java.lang.Object.class);
    }
  }
}
Program: 68064
Project: 68064
Buggy source:
public void registerTypes(){
  SDOType stringType=(SDOType)typeHelper.getType("String_Node_Str","String_Node_Str");
  SDOType bytesType=(SDOType)typeHelper.getType("String_Node_Str","String_Node_Str");
  SDOType propertyType=(SDOType)typeHelper.getType(SDOConstants.SDO_URL,SDOConstants.PROPERTY);
  DataObject customerType=dataFactory.create("String_Node_Str","String_Node_Str");
  customerType.set("String_Node_Str",getControlRootURI());
  customerType.set("String_Node_Str","String_Node_Str");
  addProperty(customerType,"String_Node_Str",stringType,true,false,true);
  addProperty(customerType,"String_Node_Str",stringType,true,false,true);
  DataObject photoProp=addProperty(customerType,"String_Node_Str",bytesType,true,true,true);
  Type customerSDOType=typeHelper.define(customerType);
  DataObject propDO=dataFactory.create(propertyType);
  propDO.set("String_Node_Str",getControlRootName());
  propDO.set("String_Node_Str",customerSDOType);
  typeHelper.defineOpenContentProperty(getControlRootURI(),propDO);
}

Fixed version (ground truth):
public void registerTypes(){
  SDOType stringType=(SDOType)typeHelper.getType("String_Node_Str","String_Node_Str");
  SDOType bytesType=(SDOType)typeHelper.getType("String_Node_Str","String_Node_Str");
  SDOType propertyType=(SDOType)typeHelper.getType(SDOConstants.SDO_URL,SDOConstants.PROPERTY);
  DataObject customerType=dataFactory.create("String_Node_Str","String_Node_Str");
  customerType.set("String_Node_Str",getControlRootURI());
  customerType.set("String_Node_Str","String_Node_Str");
  addProperty(customerType,"String_Node_Str",stringType,false,false,true);
  addProperty(customerType,"String_Node_Str",stringType,false,false,true);
  DataObject photoProp=addProperty(customerType,"String_Node_Str",bytesType,true,true,true);
  Type customerSDOType=typeHelper.define(customerType);
  DataObject propDO=dataFactory.create(propertyType);
  propDO.set("String_Node_Str",getControlRootName());
  propDO.set("String_Node_Str",customerSDOType);
  typeHelper.defineOpenContentProperty(getControlRootURI(),propDO);
}
Program: 68065
Project: 68065
Buggy source:
public void registerTypes(){
  SDOType stringType=(SDOType)typeHelper.getType("String_Node_Str","String_Node_Str");
  SDOType bytesType=(SDOType)typeHelper.getType("String_Node_Str","String_Node_Str");
  SDOType propertyType=(SDOType)typeHelper.getType(SDOConstants.SDO_URL,SDOConstants.PROPERTY);
  DataObject customerType=dataFactory.create("String_Node_Str","String_Node_Str");
  customerType.set("String_Node_Str",getControlRootURI());
  customerType.set("String_Node_Str","String_Node_Str");
  addProperty(customerType,"String_Node_Str",stringType,true,false,true);
  addProperty(customerType,"String_Node_Str",stringType,true,false,true);
  DataObject photoProp=addProperty(customerType,"String_Node_Str",bytesType,true,true,true);
  photoProp.set(SDOConstants.MIME_TYPE_PROPERTY_PROPERTY,"String_Node_Str");
  addProperty(customerType,"String_Node_Str",stringType,true,false,true);
  Type customerSDOType=typeHelper.define(customerType);
  DataObject propDO=dataFactory.create(propertyType);
  propDO.set("String_Node_Str",getControlRootName());
  propDO.set("String_Node_Str",customerSDOType);
  typeHelper.defineOpenContentProperty(getControlRootURI(),propDO);
}

Fixed version (ground truth):
public void registerTypes(){
  SDOType stringType=(SDOType)typeHelper.getType("String_Node_Str","String_Node_Str");
  SDOType bytesType=(SDOType)typeHelper.getType("String_Node_Str","String_Node_Str");
  SDOType propertyType=(SDOType)typeHelper.getType(SDOConstants.SDO_URL,SDOConstants.PROPERTY);
  DataObject customerType=dataFactory.create("String_Node_Str","String_Node_Str");
  customerType.set("String_Node_Str",getControlRootURI());
  customerType.set("String_Node_Str","String_Node_Str");
  addProperty(customerType,"String_Node_Str",stringType,false,false,true);
  addProperty(customerType,"String_Node_Str",stringType,false,false,true);
  DataObject photoProp=addProperty(customerType,"String_Node_Str",bytesType,false,true,true);
  photoProp.set(SDOConstants.MIME_TYPE_PROPERTY_PROPERTY,"String_Node_Str");
  addProperty(customerType,"String_Node_Str",stringType,false,false,true);
  Type customerSDOType=typeHelper.define(customerType);
  DataObject propDO=dataFactory.create(propertyType);
  propDO.set("String_Node_Str",getControlRootName());
  propDO.set("String_Node_Str",customerSDOType);
  typeHelper.defineOpenContentProperty(getControlRootURI(),propDO);
}
Program: 68066
Project: 68066
Buggy source:
public void registerTypes(){
  SDOType stringType=(SDOType)typeHelper.getType(SDOConstants.SDO_URL,SDOConstants.STRING);
  SDOType bytesType=(SDOType)typeHelper.getType(SDOConstants.SDO_URL,SDOConstants.BYTES);
  SDOType propertyType=(SDOType)typeHelper.getType(SDOConstants.SDO_URL,SDOConstants.PROPERTY);
  DataObject customerType=dataFactory.create(SDOConstants.SDO_URL,SDOConstants.TYPE);
  customerType.set("String_Node_Str",getControlRootURI());
  customerType.set("String_Node_Str","String_Node_Str");
  addProperty(customerType,"String_Node_Str",stringType,true,false,true);
  addProperty(customerType,"String_Node_Str",stringType,true,false,true);
  DataObject photoProp=addProperty(customerType,"String_Node_Str",bytesType,true,false,true);
  photoProp.set(SDOConstants.MIME_TYPE_PROPERTY_PROPERTY,"String_Node_Str");
  addProperty(customerType,"String_Node_Str",stringType,true,false,true);
  Type customerSDOType=typeHelper.define(customerType);
  DataObject propDO=dataFactory.create(propertyType);
  propDO.set("String_Node_Str",getControlRootName());
  propDO.set("String_Node_Str",customerSDOType);
  typeHelper.defineOpenContentProperty(getControlRootURI(),propDO);
}

Fixed version (ground truth):
public void registerTypes(){
  SDOType stringType=(SDOType)typeHelper.getType(SDOConstants.SDO_URL,SDOConstants.STRING);
  SDOType bytesType=(SDOType)typeHelper.getType(SDOConstants.SDO_URL,SDOConstants.BYTES);
  SDOType propertyType=(SDOType)typeHelper.getType(SDOConstants.SDO_URL,SDOConstants.PROPERTY);
  DataObject customerType=dataFactory.create(SDOConstants.SDO_URL,SDOConstants.TYPE);
  customerType.set("String_Node_Str",getControlRootURI());
  customerType.set("String_Node_Str","String_Node_Str");
  addProperty(customerType,"String_Node_Str",stringType,false,false,true);
  addProperty(customerType,"String_Node_Str",stringType,false,false,true);
  DataObject photoProp=addProperty(customerType,"String_Node_Str",bytesType,false,false,true);
  photoProp.set(SDOConstants.MIME_TYPE_PROPERTY_PROPERTY,"String_Node_Str");
  addProperty(customerType,"String_Node_Str",stringType,false,false,true);
  Type customerSDOType=typeHelper.define(customerType);
  DataObject propDO=dataFactory.create(propertyType);
  propDO.set("String_Node_Str",getControlRootName());
  propDO.set("String_Node_Str",customerSDOType);
  typeHelper.defineOpenContentProperty(getControlRootURI(),propDO);
}