nus-yam/ex-repair huggingface dataset:
Program: 39241
Project: 39241
Buggy source:
private boolean belongsToAreEquals(final Entity fieldValue,final Entity otherFieldValue,final Entity performer){
  boolean btResult;
  if (fieldValue instanceof EntityAwareEqualsPerformer) {
    final EntityAwareEqualsPerformer fieldEntityValue=(EntityAwareEqualsPerformer)fieldValue;
    if (performer != null && performer.hashCode() == fieldValue.hashCode()) {
      btResult=fieldEntityValue.flatEquals(otherFieldValue);
    }
 else {
      btResult=fieldEntityValue.equals(otherFieldValue,performer);
    }
  }
 else {
    btResult=fieldValue.equals(otherFieldValue);
  }
  return btResult;
}

Fixed version (ground truth):
private boolean belongsToAreEquals(final Entity fieldValue,final Entity otherFieldValue,final PerformerEntitiesChain performersChain){
  boolean btResult;
  if (fieldValue instanceof EntityAwareEqualsPerformers) {
    final EntityAwareEqualsPerformers fieldEntityValue=(EntityAwareEqualsPerformers)fieldValue;
    if (performersChain.find(fieldValue) == null) {
      performersChain.append(this);
      btResult=fieldEntityValue.equals(otherFieldValue,performersChain);
    }
 else {
      btResult=fieldEntityValue.flatEquals(otherFieldValue);
    }
  }
 else {
    btResult=fieldValue.equals(otherFieldValue);
  }
  return btResult;
}
Program: 39242
Project: 39242
Buggy source:
@Override public boolean flatEquals(final Entity otherEntity){
  return definitionsAreEquals(otherEntity) && fieldsAreEquals(otherEntity,null,true);
}

Fixed version (ground truth):
@Override public boolean flatEquals(final Entity otherEntity){
  return definitionsAndIdsAreEqual(otherEntity) && fieldsAreEquals(otherEntity,null,true);
}
Program: 39243
Project: 39243
Buggy source:
private Entity copyFieldEntityValue(final Entity performerEntity,final Entity fieldEntity){
  Entity fieldEntityCopy=null;
  if (performerEntity != null && fieldEntity.hashCode() == performerEntity.hashCode()) {
    fieldEntityCopy=fieldEntity;
  }
 else   if (fieldEntity instanceof EntityAwareCopyPerformer) {
    Entity currentPerformer=performerEntity;
    if (performerEntity == null || performerEntity.getId() == null && performerEntity.getDataDefinition().equals(fieldEntity.getDataDefinition())) {
      currentPerformer=fieldEntity;
    }
    fieldEntityCopy=((EntityAwareCopyPerformer)fieldEntity).copy(currentPerformer);
  }
 else {
    fieldEntityCopy=fieldEntity.copy();
  }
  return fieldEntityCopy;
}

Fixed version (ground truth):
private Entity copyFieldEntityValue(final PerformerEntitiesChain performersChain,final Entity fieldEntity){
  Entity fieldEntityCopy=null;
  final Entity existingPerformer=performersChain.find(fieldEntity);
  if (existingPerformer != null) {
    fieldEntityCopy=existingPerformer;
  }
 else   if (fieldEntity instanceof EntityAwareCopyPerformers) {
    performersChain.append(this);
    fieldEntityCopy=((EntityAwareCopyPerformers)fieldEntity).copy(performersChain);
  }
 else {
    fieldEntityCopy=fieldEntity.copy();
  }
  return fieldEntityCopy;
}
Program: 39244
Project: 39244
Buggy source:
@Override public boolean equals(final Entity otherEntity,final Entity performer){
  return otherEntity == performer || definitionsAreEquals(otherEntity) && fieldsAreEquals(otherEntity,performer,false);
}

Fixed version (ground truth):
@Override public boolean equals(final Entity otherEntity,final PerformerEntitiesChain performersChain){
  return otherEntity == performersChain.getLast() || definitionsAndIdsAreEqual(otherEntity) && fieldsAreEquals(otherEntity,performersChain,false);
}
Program: 39245
Project: 39245
Buggy source:
private boolean fieldsAreEquals(final Entity otherEntity,final Entity performer,final boolean flat){
  for (  String fieldName : dataDefinition.getFields().keySet()) {
    final Object fieldValue=fields.get(fieldName);
    final Object otherFieldValue=otherEntity.getField(fieldName);
    if (fieldValue == null) {
      if (otherFieldValue != null) {
        return false;
      }
    }
 else     if (fieldValue instanceof Collection) {
      continue;
    }
 else     if (fieldValue instanceof Entity) {
      if (!flat && !belongsToAreEquals((Entity)fieldValue,(Entity)otherFieldValue,performer)) {
        return false;
      }
    }
 else     if (!fieldValue.equals(otherFieldValue)) {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
private boolean fieldsAreEquals(final Entity otherEntity,final PerformerEntitiesChain performersChain,final boolean flat){
  for (  String fieldName : dataDefinition.getFields().keySet()) {
    final Object fieldValue=fields.get(fieldName);
    final Object otherFieldValue=otherEntity.getField(fieldName);
    if (fieldValue == null) {
      if (otherFieldValue != null) {
        return false;
      }
    }
 else     if (fieldValue instanceof Collection) {
      continue;
    }
 else     if (fieldValue instanceof Entity) {
      if (!flat && !belongsToAreEquals((Entity)fieldValue,(Entity)otherFieldValue,performersChain)) {
        return false;
      }
    }
 else     if (!fieldValue.equals(otherFieldValue)) {
      return false;
    }
  }
  return true;
}
Program: 39246
Project: 39246
Buggy source:
@Override public EntityTreeNodeImpl copy(final Entity performerEntity){
  Entity entityCopy=null;
  if (entity instanceof EntityAwareCopyPerformer) {
    entityCopy=((EntityAwareCopyPerformer)entity).copy(performerEntity);
  }
 else {
    entityCopy=entity.copy();
  }
  return new EntityTreeNodeImpl(entityCopy);
}

Fixed version (ground truth):
@Override public EntityTreeNodeImpl copy(final PerformerEntitiesChain performersChain){
  Entity entityCopy=null;
  if (entity instanceof EntityAwareCopyPerformers) {
    entityCopy=((EntityAwareCopyPerformers)entity).copy(performersChain);
  }
 else {
    entityCopy=entity.copy();
  }
  return new EntityTreeNodeImpl(entityCopy);
}
Program: 39247
Project: 39247
Buggy source:
@Override public boolean flatEquals(final Entity obj){
  boolean isEquals;
  if (entity instanceof EntityAwareEqualsPerformer) {
    isEquals=((EntityAwareEqualsPerformer)entity).flatEquals(obj);
  }
 else {
    isEquals=entity.equals(obj);
  }
  return isEquals;
}

Fixed version (ground truth):
@Override public boolean flatEquals(final Entity obj){
  boolean isEquals;
  if (entity instanceof EntityAwareEqualsPerformers) {
    isEquals=((EntityAwareEqualsPerformers)entity).flatEquals(obj);
  }
 else {
    isEquals=entity.equals(obj);
  }
  return isEquals;
}
Program: 39248
Project: 39248
Buggy source:
@Override public boolean equals(final Entity obj,final Entity performerEntity){
  boolean isEquals;
  if (entity instanceof EntityAwareEqualsPerformer) {
    isEquals=((EntityAwareEqualsPerformer)entity).equals(obj,performerEntity);
  }
 else {
    isEquals=entity.equals(obj);
  }
  return isEquals;
}

Fixed version (ground truth):
@Override public boolean equals(final Entity obj,final PerformerEntitiesChain performersChain){
  boolean isEquals;
  if (entity instanceof EntityAwareEqualsPerformers) {
    isEquals=((EntityAwareEqualsPerformers)entity).equals(obj,performersChain);
  }
 else {
    isEquals=entity.equals(obj);
  }
  return isEquals;
}
Program: 39249
Project: 39249
Buggy source:
@Override public Entity copy(final Entity performerEntity){
  Entity entityCopy=null;
  if (getEntity() instanceof EntityAwareCopyPerformer) {
    entityCopy=((EntityAwareCopyPerformer)getEntity()).copy(performerEntity);
  }
 else {
    entityCopy=getEntity().copy();
  }
  return entityCopy;
}

Fixed version (ground truth):
@Override public Entity copy(final PerformerEntitiesChain performersChain){
  Entity entityCopy=null;
  if (getEntity() instanceof EntityAwareCopyPerformers) {
    entityCopy=((EntityAwareCopyPerformers)getEntity()).copy(performersChain);
  }
 else {
    entityCopy=getEntity().copy();
  }
  return entityCopy;
}
Program: 39250
Project: 39250
Buggy source:
@Override public boolean flatEquals(final Entity obj){
  boolean isEquals;
  final Entity entity=getEntity();
  if (entity instanceof EntityAwareEqualsPerformer) {
    isEquals=((EntityAwareEqualsPerformer)entity).flatEquals(obj);
  }
 else {
    isEquals=entity.equals(obj);
  }
  return isEquals;
}

Fixed version (ground truth):
@Override public boolean flatEquals(final Entity obj){
  boolean isEquals;
  final Entity entity=getEntity();
  if (entity instanceof EntityAwareEqualsPerformers) {
    isEquals=((EntityAwareEqualsPerformers)entity).flatEquals(obj);
  }
 else {
    isEquals=entity.equals(obj);
  }
  return isEquals;
}
Program: 39251
Project: 39251
Buggy source:
@Override public boolean equals(final Entity obj,final Entity performerEntity){
  boolean isEquals;
  final Entity entity=getEntity();
  if (entity instanceof EntityAwareEqualsPerformer) {
    isEquals=((EntityAwareEqualsPerformer)entity).equals(obj,performerEntity);
  }
 else {
    isEquals=entity.equals(obj);
  }
  return isEquals;
}

Fixed version (ground truth):
@Override public boolean equals(final Entity obj,final PerformerEntitiesChain performersChain){
  boolean isEquals;
  final Entity entity=getEntity();
  if (entity instanceof EntityAwareEqualsPerformers) {
    isEquals=((EntityAwareEqualsPerformers)entity).equals(obj,performersChain);
  }
 else {
    isEquals=entity.equals(obj);
  }
  return isEquals;
}
Program: 39253
Project: 39253
Buggy source:
public void translateItemForm(final ViewDefinitionState viewDefinitionState){
  FormComponent itemForm=(FormComponent)viewDefinitionState.getComponentByReference("String_Node_Str");
  Entity itemEntity=null;
  if (itemForm.getEntity() != null) {
    itemEntity=dataDefinitionService.get(QcadooViewConstants.PLUGIN_IDENTIFIER,QcadooViewConstants.MODEL_ITEM).get(itemForm.getEntity().getId());
  }
  if (itemEntity != null && itemEntity.getStringField(L_PLUGIN_IDENTIFIER) != null) {
    ComponentState itemNameField=viewDefinitionState.getComponentByReference("String_Node_Str");
    itemNameField.setEnabled(false);
    itemNameField.setFieldValue(translationUtilsService.getItemTranslation(itemEntity,viewDefinitionState.getLocale()));
    viewDefinitionState.getComponentByReference("String_Node_Str").setEnabled(false);
    viewDefinitionState.getComponentByReference("String_Node_Str").setEnabled(false);
  }
}

Fixed version (ground truth):
public void translateItemForm(final ViewDefinitionState viewDefinitionState){
  FormComponent itemForm=(FormComponent)viewDefinitionState.getComponentByReference("String_Node_Str");
  Entity itemEntity=null;
  if (itemForm.getEntity() != null) {
    itemEntity=dataDefinitionService.get(QcadooViewConstants.PLUGIN_IDENTIFIER,QcadooViewConstants.MODEL_ITEM).get(itemForm.getEntity().getId());
  }
  if (itemEntity != null && itemEntity.getStringField(L_PLUGIN_IDENTIFIER) != null) {
    ComponentState itemNameField=viewDefinitionState.getComponentByReference("String_Node_Str");
    itemNameField.setEnabled(false);
    viewDefinitionState.getComponentByReference("String_Node_Str").setEnabled(false);
  }
}
Program: 39255
Project: 39255
Buggy source:
@BeforeClass public static void init() throws Exception {
  modelXmlToClassConverter.setBeanClassLoader(ClassLoader.getSystemClassLoader());
  for (  Class<?> clazz : modelXmlToClassConverter.convert(Utils.FULL_FIRST_ENTITY_XML_RESOURCE,Utils.FULL_SECOND_ENTITY_XML_RESOURCE,Utils.FULL_THIRD_ENTITY_XML_RESOURCE,Utils.OTHER_FIRST_ENTITY_XML_RESOURCE,Utils.OTHER_SECOND_ENTITY_XML_RESOURCE)) {
    classes.put(clazz.getCanonicalName(),clazz);
  }
  for (  PropertyDescriptor propertyDescriptor : PropertyUtils.getPropertyDescriptors(classes.get(ClassNameUtils.getFullyQualifiedClassName("String_Node_Str","String_Node_Str")))) {
    propertyDescriptors.put(propertyDescriptor.getName(),propertyDescriptor);
  }
}

Fixed version (ground truth):
@BeforeClass public static void init() throws Exception {
  MODEL_XML_TO_CLASSCONVERTER.setBeanClassLoader(ClassLoader.getSystemClassLoader());
  for (  Class<?> clazz : MODEL_XML_TO_CLASSCONVERTER.convert(Utils.FULL_FIRST_ENTITY_XML_RESOURCE,Utils.FULL_SECOND_ENTITY_XML_RESOURCE,Utils.FULL_THIRD_ENTITY_XML_RESOURCE,Utils.OTHER_FIRST_ENTITY_XML_RESOURCE,Utils.OTHER_SECOND_ENTITY_XML_RESOURCE)) {
    classes.put(clazz.getCanonicalName(),clazz);
  }
  for (  PropertyDescriptor propertyDescriptor : PropertyUtils.getPropertyDescriptors(classes.get(ClassNameUtils.getFullyQualifiedClassName("String_Node_Str","String_Node_Str")))) {
    propertyDescriptors.put(propertyDescriptor.getName(),propertyDescriptor);
  }
}
Program: 39256
Project: 39256
Buggy source:
private void assertNodeNotExists(final String xpath,final Document document) throws Exception {
  assertTrue(xpathEngine.getMatchingNodes(xpath,document).getLength() == 0);
}

Fixed version (ground truth):
private void assertNodeNotExists(final String xpath,final Document document) throws Exception {
  assertTrue(XPATH_ENGINE.getMatchingNodes(xpath,document).getLength() == 0);
}
Program: 39257
Project: 39257
Buggy source:
@BeforeClass public static void init() throws Exception {
  hbmInputStream=modelXmlToHbmConverter.convert(Utils.FULL_FIRST_ENTITY_XML_RESOURCE)[0].getInputStream();
  hbmInputSource=new InputSource(modelXmlToHbmConverter.convert(Utils.FULL_FIRST_ENTITY_XML_RESOURCE)[0].getInputStream());
  hbmFirstEntity=buildControlDocument(new InputSource(modelXmlToHbmConverter.convert(Utils.FULL_FIRST_ENTITY_XML_RESOURCE)[0].getInputStream()));
  hbmSecondEntity=buildControlDocument(new InputSource(modelXmlToHbmConverter.convert(Utils.FULL_SECOND_ENTITY_XML_RESOURCE)[0].getInputStream()));
  hbmThirdEntity=buildControlDocument(new InputSource(modelXmlToHbmConverter.convert(Utils.FULL_THIRD_ENTITY_XML_RESOURCE)[0].getInputStream()));
}

Fixed version (ground truth):
@BeforeClass public static void init() throws Exception {
  hbmInputStream=MODEL_XML_TO_HBM_CONVERTER.convert(Utils.FULL_FIRST_ENTITY_XML_RESOURCE)[0].getInputStream();
  hbmInputSource=new InputSource(MODEL_XML_TO_HBM_CONVERTER.convert(Utils.FULL_FIRST_ENTITY_XML_RESOURCE)[0].getInputStream());
  hbmFirstEntity=buildControlDocument(new InputSource(MODEL_XML_TO_HBM_CONVERTER.convert(Utils.FULL_FIRST_ENTITY_XML_RESOURCE)[0].getInputStream()));
  hbmSecondEntity=buildControlDocument(new InputSource(MODEL_XML_TO_HBM_CONVERTER.convert(Utils.FULL_SECOND_ENTITY_XML_RESOURCE)[0].getInputStream()));
  hbmThirdEntity=buildControlDocument(new InputSource(MODEL_XML_TO_HBM_CONVERTER.convert(Utils.FULL_THIRD_ENTITY_XML_RESOURCE)[0].getInputStream()));
}
Program: 39258
Project: 39258
Buggy source:
private void assertNodeExists(final String xpath,final Document document) throws Exception {
  assertTrue(xpathEngine.getMatchingNodes(xpath,document).getLength() > 0);
}

Fixed version (ground truth):
private void assertNodeExists(final String xpath,final Document document) throws Exception {
  assertTrue(XPATH_ENGINE.getMatchingNodes(xpath,document).getLength() > 0);
}
Program: 39259
Project: 39259
Buggy source:
private void assertNodeEquals(final String expectedValue,final String xpath,final Document document) throws Exception {
  assertEquals(expectedValue,xpathEngine.evaluate(xpath,document));
}

Fixed version (ground truth):
private void assertNodeEquals(final String expectedValue,final String xpath,final Document document) throws Exception {
  assertEquals(expectedValue,XPATH_ENGINE.evaluate(xpath,document));
}
Program: 39260
Project: 39260
Buggy source:
private void assertNodeCount(final int expectedCount,final String xpath,final Document document) throws Exception {
  assertEquals(expectedCount,xpathEngine.getMatchingNodes(xpath,document).getLength());
}

Fixed version (ground truth):
private void assertNodeCount(final int expectedCount,final String xpath,final Document document) throws Exception {
  assertEquals(expectedCount,XPATH_ENGINE.getMatchingNodes(xpath,document).getLength());
}
Program: 39263
Project: 39263
Buggy source:
@RequestMapping(value="String_Node_Str",method=RequestMethod.POST) public @ResponseBody String processForgotPasswordFormView(@RequestParam final String login){
  if (setAsDemoEnviroment) {
    return null;
  }
  if (StringUtils.isBlank(login)) {
    return "String_Node_Str";
  }
  return performPasswordReseting(login);
}

Fixed version (ground truth):
@RequestMapping(value="String_Node_Str",method=RequestMethod.POST) @ResponseBody public String processForgotPasswordFormView(@RequestParam final String login){
  if (setAsDemoEnviroment) {
    return null;
  }
  if (StringUtils.isBlank(login)) {
    return "String_Node_Str";
  }
  return performPasswordReseting(login);
}
Program: 39264
Project: 39264
Buggy source:
@Monitorable(threshold=500) @RequestMapping(value={CONTROLLER_PATH},method=RequestMethod.POST) @ResponseBody public Object performEvent(@PathVariable(PLUGIN_IDENTIFIER_VARIABLE) final String pluginIdentifier,@PathVariable(VIEW_NAME_VARIABLE) final String viewName,@RequestBody final JSONObject body,final Locale locale){
  return crudService.invokeEventAndRenderView(pluginIdentifier,viewName,body,locale);
}

Fixed version (ground truth):
@Monitorable(threshold=500) @ResponseBody @RequestMapping(value={CONTROLLER_PATH},method=RequestMethod.POST) public Object performEvent(@PathVariable(PLUGIN_IDENTIFIER_VARIABLE) final String pluginIdentifier,@PathVariable(VIEW_NAME_VARIABLE) final String viewName,@RequestBody final JSONObject body,final Locale locale){
  return crudService.invokeEventAndRenderView(pluginIdentifier,viewName,body,locale);
}
Program: 39265
Project: 39265
Buggy source:
public ModelXmlToClassConverterImpl(){
  super();
  classPool.appendClassPath(new ClassClassPath(org.hibernate.collection.PersistentSet.class));
}

Fixed version (ground truth):
public ModelXmlToClassConverterImpl(){
  super();
  classPool.appendClassPath(new ClassClassPath(org.hibernate.collection.PersistentSet.class));
  classPool.appendClassPath(new ClassClassPath(com.qcadoo.model.internal.classconverter.QcadooModelBean.class));
}
Program: 39267
Project: 39267
Buggy source:
private void parse(final XMLStreamReader reader,final CtClass ctClass,final String pluginIdentifier) throws XMLStreamException, ModelXmlCompilingException {
  LOG.info("String_Node_Str" + ctClass.getName());
  createField(ctClass,"String_Node_Str",Long.class.getCanonicalName());
  List<String> fields=new ArrayList<String>();
  fields.add("String_Node_Str");
  if (getBooleanAttribute(reader,"String_Node_Str",false)) {
    createField(ctClass,"String_Node_Str",Boolean.class.getCanonicalName());
  }
  if (getBooleanAttribute(reader,"String_Node_Str",false)) {
    createField(ctClass,"String_Node_Str",Date.class.getCanonicalName());
    createField(ctClass,"String_Node_Str",Date.class.getCanonicalName());
    createField(ctClass,"String_Node_Str",String.class.getCanonicalName());
    createField(ctClass,"String_Node_Str",String.class.getCanonicalName());
  }
  while (reader.hasNext() && reader.next() > 0) {
    if (isTagEnded(reader,TAG_MODEL)) {
      break;
    }
    if (TAG_FIELDS.equals(getTagStarted(reader))) {
      while (reader.hasNext() && reader.next() > 0) {
        if (isTagEnded(reader,TAG_FIELDS)) {
          break;
        }
        String tag=getTagStarted(reader);
        if (tag == null) {
          continue;
        }
        parseField(reader,pluginIdentifier,ctClass,tag,fields);
      }
      break;
    }
  }
  buildToString(ctClass,fields);
  buildHashCode(ctClass,fields);
  buildEquals(ctClass,fields);
}

Fixed version (ground truth):
private void parse(final XMLStreamReader reader,final CtClass ctClass,final String pluginIdentifier) throws XMLStreamException, ModelXmlCompilingException, NotFoundException {
  LOG.info("String_Node_Str" + ctClass.getName());
  ctClass.addInterface(classPool.get(QcadooModelBean.class.getName()));
  createField(ctClass,"String_Node_Str",Long.class.getCanonicalName());
  List<String> fields=new ArrayList<String>();
  fields.add("String_Node_Str");
  if (getBooleanAttribute(reader,"String_Node_Str",false)) {
    createField(ctClass,"String_Node_Str",Boolean.class.getCanonicalName());
  }
  if (getBooleanAttribute(reader,"String_Node_Str",false)) {
    createField(ctClass,"String_Node_Str",Date.class.getCanonicalName());
    createField(ctClass,"String_Node_Str",Date.class.getCanonicalName());
    createField(ctClass,"String_Node_Str",String.class.getCanonicalName());
    createField(ctClass,"String_Node_Str",String.class.getCanonicalName());
  }
  while (reader.hasNext() && reader.next() > 0) {
    if (isTagEnded(reader,TAG_MODEL)) {
      break;
    }
    if (TAG_FIELDS.equals(getTagStarted(reader))) {
      while (reader.hasNext() && reader.next() > 0) {
        if (isTagEnded(reader,TAG_FIELDS)) {
          break;
        }
        String tag=getTagStarted(reader);
        if (tag == null) {
          continue;
        }
        parseField(reader,pluginIdentifier,ctClass,tag,fields);
      }
      break;
    }
  }
  buildToString(ctClass,fields);
  buildHashCode(ctClass,fields);
  buildEquals(ctClass,fields);
}
Program: 39268
Project: 39268
Buggy source:
private void buildHashCode(final CtClass ctClass,final List<String> fields) throws ModelXmlCompilingException {
  try {
    StringBuilder sb=new StringBuilder();
    sb.append("String_Node_Str");
    sb.append("String_Node_Str");
    for (    String field : fields) {
      String fieldGetter="String_Node_Str" + StringUtils.capitalize(field) + "String_Node_Str";
      sb.append("String_Node_Str" + fieldGetter + "String_Node_Str"+ fieldGetter+ "String_Node_Str"+ fieldGetter+ "String_Node_Str");
    }
    sb.append("String_Node_Str");
    ctClass.addMethod(CtNewMethod.make("String_Node_Str" + sb.toString() + "String_Node_Str",ctClass));
  }
 catch (  CannotCompileException e) {
    throw new ModelXmlCompilingException(L_FAILED_TO_COMPILE_CLASS + ctClass.getName(),e);
  }
}

Fixed version (ground truth):
private void buildHashCode(final CtClass ctClass,final List<String> fields,final boolean deep) throws ModelXmlCompilingException {
  try {
    String methodName=null;
    StringBuilder methodCode=new StringBuilder();
    methodCode.append("String_Node_Str");
    methodCode.append("String_Node_Str");
    if (deep) {
      methodName="String_Node_Str";
      getFieldsDeepHashCode(methodCode,fields);
    }
 else {
      methodName="String_Node_Str";
      getFieldsFlatHashCode(methodCode,fields);
    }
    methodCode.append("String_Node_Str");
    ctClass.addMethod(CtNewMethod.make("String_Node_Str" + methodName + "String_Node_Str"+ methodCode.toString()+ "String_Node_Str",ctClass));
  }
 catch (  CannotCompileException e) {
    throw new ModelXmlCompilingException(L_FAILED_TO_COMPILE_CLASS + ctClass.getName(),e);
  }
}
Program: 39269
Project: 39269
Buggy source:
private void defineClasses(final Map<String,CtClass> ctClasses,final InputStream stream) throws XMLStreamException, ModelXmlCompilingException {
  XMLStreamReader reader=XMLInputFactory.newInstance().createXMLStreamReader(stream);
  while (reader.hasNext() && reader.next() > 0) {
    if (isTagStarted(reader,TAG_MODEL)) {
      String pluginIdentifier=getPluginIdentifier(reader);
      String modelName=getStringAttribute(reader,L_NAME);
      String className=ClassNameUtils.getFullyQualifiedClassName(pluginIdentifier,modelName);
      if (ctClasses.containsKey(className)) {
        parse(reader,ctClasses.get(className),pluginIdentifier);
      }
    }
  }
  reader.close();
}

Fixed version (ground truth):
private void defineClasses(final Map<String,CtClass> ctClasses,final InputStream stream) throws XMLStreamException, ModelXmlCompilingException, NotFoundException {
  XMLStreamReader reader=XMLInputFactory.newInstance().createXMLStreamReader(stream);
  while (reader.hasNext() && reader.next() > 0) {
    if (isTagStarted(reader,TAG_MODEL)) {
      String pluginIdentifier=getPluginIdentifier(reader);
      String modelName=getStringAttribute(reader,L_NAME);
      String className=ClassNameUtils.getFullyQualifiedClassName(pluginIdentifier,modelName);
      if (ctClasses.containsKey(className)) {
        parse(reader,ctClasses.get(className),pluginIdentifier);
      }
    }
  }
  reader.close();
}
Program: 39270
Project: 39270
Buggy source:
@Test public void shouldDefineProperties() throws Exception {
  assertNodeCount(19,"String_Node_Str",hbmFirstEntity);
  assertNodeCount(0,"String_Node_Str",hbmSecondEntity);
  assertNodeCount(0,"String_Node_Str",hbmThirdEntity);
  assertNodeExists("String_Node_Str",hbmFirstEntity);
  assertNodeExists("String_Node_Str",hbmFirstEntity);
  assertNodeExists("String_Node_Str",hbmFirstEntity);
  assertNodeExists("String_Node_Str",hbmFirstEntity);
  assertNodeExists("String_Node_Str",hbmFirstEntity);
  assertNodeExists("String_Node_Str",hbmFirstEntity);
  assertNodeExists("String_Node_Str",hbmFirstEntity);
  assertNodeExists("String_Node_Str",hbmFirstEntity);
  assertNodeExists("String_Node_Str",hbmFirstEntity);
  assertNodeExists("String_Node_Str",hbmFirstEntity);
  assertNodeExists("String_Node_Str",hbmFirstEntity);
  assertNodeExists("String_Node_Str",hbmFirstEntity);
  assertNodeExists("String_Node_Str",hbmFirstEntity);
  assertNodeExists("String_Node_Str",hbmFirstEntity);
  assertNodeExists("String_Node_Str",hbmFirstEntity);
}

Fixed version (ground truth):
@Test public void shouldDefineProperties() throws Exception {
  assertNodeCount(19,"String_Node_Str",hbmFirstEntity);
  assertNodeCount(0,"String_Node_Str",hbmSecondEntity);
  assertNodeCount(2,"String_Node_Str",hbmThirdEntity);
  assertNodeExists("String_Node_Str",hbmFirstEntity);
  assertNodeExists("String_Node_Str",hbmFirstEntity);
  assertNodeExists("String_Node_Str",hbmFirstEntity);
  assertNodeExists("String_Node_Str",hbmFirstEntity);
  assertNodeExists("String_Node_Str",hbmFirstEntity);
  assertNodeExists("String_Node_Str",hbmFirstEntity);
  assertNodeExists("String_Node_Str",hbmFirstEntity);
  assertNodeExists("String_Node_Str",hbmFirstEntity);
  assertNodeExists("String_Node_Str",hbmFirstEntity);
  assertNodeExists("String_Node_Str",hbmFirstEntity);
  assertNodeExists("String_Node_Str",hbmFirstEntity);
  assertNodeExists("String_Node_Str",hbmFirstEntity);
  assertNodeExists("String_Node_Str",hbmFirstEntity);
  assertNodeExists("String_Node_Str",hbmFirstEntity);
  assertNodeExists("String_Node_Str",hbmFirstEntity);
}
Program: 39271
Project: 39271
Buggy source:
@Test public void shouldDefineBelongsToRelation() throws Exception {
  assertNodeCount(2,"String_Node_Str",hbmFirstEntity);
  assertNodeCount(2,"String_Node_Str",hbmSecondEntity);
  assertNodeCount(1,"String_Node_Str",hbmThirdEntity);
  assertNodeExists("String_Node_Str",hbmFirstEntity);
  assertNodeEquals("String_Node_Str","String_Node_Str",hbmFirstEntity);
  assertNodeExists("String_Node_Str",hbmFirstEntity);
  assertNodeEquals("String_Node_Str","String_Node_Str",hbmFirstEntity);
  assertNodeEquals("String_Node_Str","String_Node_Str",hbmFirstEntity);
  assertNodeEquals("String_Node_Str","String_Node_Str",hbmFirstEntity);
  assertNodeEquals("String_Node_Str","String_Node_Str",hbmFirstEntity);
  assertNodeEquals("String_Node_Str","String_Node_Str",hbmFirstEntity);
  assertNodeEquals("String_Node_Str","String_Node_Str",hbmFirstEntity);
  assertNodeEquals("String_Node_Str","String_Node_Str",hbmFirstEntity);
  assertNodeEquals("String_Node_Str","String_Node_Str",hbmFirstEntity);
  assertNodeEquals("String_Node_Str","String_Node_Str",hbmFirstEntity);
}

Fixed version (ground truth):
@Test public void shouldDefineBelongsToRelation() throws Exception {
  assertNodeCount(3,"String_Node_Str",hbmFirstEntity);
  assertNodeCount(2,"String_Node_Str",hbmSecondEntity);
  assertNodeCount(1,"String_Node_Str",hbmThirdEntity);
  assertNodeExists("String_Node_Str",hbmFirstEntity);
  assertNodeEquals("String_Node_Str","String_Node_Str",hbmFirstEntity);
  assertNodeExists("String_Node_Str",hbmFirstEntity);
  assertNodeEquals("String_Node_Str","String_Node_Str",hbmFirstEntity);
  assertNodeEquals("String_Node_Str","String_Node_Str",hbmFirstEntity);
  assertNodeEquals("String_Node_Str","String_Node_Str",hbmFirstEntity);
  assertNodeEquals("String_Node_Str","String_Node_Str",hbmFirstEntity);
  assertNodeEquals("String_Node_Str","String_Node_Str",hbmFirstEntity);
  assertNodeEquals("String_Node_Str","String_Node_Str",hbmFirstEntity);
  assertNodeEquals("String_Node_Str","String_Node_Str",hbmFirstEntity);
  assertNodeEquals("String_Node_Str","String_Node_Str",hbmFirstEntity);
  assertNodeEquals("String_Node_Str","String_Node_Str",hbmFirstEntity);
}
Program: 39272
Project: 39272
Buggy source:
@Before public void init(){
  MockitoAnnotations.initMocks(this);
  fileService=new FileServiceImpl();
  ReflectionTestUtils.setField(fileService,"String_Node_Str",translationService);
  ReflectionTestUtils.setField(fileService,"String_Node_Str",uploadDirectory);
  PowerMockito.mockStatic(MultiTenantUtil.class);
  given(MultiTenantUtil.getCurrentTenantId()).willReturn(0);
  given(uploadDirectory.getAbsolutePath()).willReturn("String_Node_Str");
  given(date.getTime()).willReturn(1234567l);
  given(entity.getField("String_Node_Str")).willReturn(date);
  given(entity.getDataDefinition()).willReturn(dataDefinition);
}

Fixed version (ground truth):
@Before public void init(){
  MockitoAnnotations.initMocks(this);
  fileService=new FileServiceImpl();
  ReflectionTestUtils.setField(fileService,"String_Node_Str",translationService);
  ReflectionTestUtils.setField(fileService,"String_Node_Str",uploadDirectory);
  PowerMockito.mockStatic(MultiTenantUtil.class);
  given(MultiTenantUtil.getCurrentTenantId()).willReturn(0);
  given(uploadDirectory.getAbsolutePath()).willReturn("String_Node_Str");
  given(date.getTime()).willReturn(1234567L);
  given(entity.getField("String_Node_Str")).willReturn(date);
  given(entity.getDataDefinition()).willReturn(dataDefinition);
}
Program: 39275
Project: 39275
Buggy source:
@Override @Transactional @Monitorable public void delete(final InternalDataDefinition dataDefinition,final Long... entityIds){
  checkNotNull(dataDefinition,"String_Node_Str");
  checkState(dataDefinition.isDeletable(),"String_Node_Str");
  checkState(dataDefinition.isEnabled(),"String_Node_Str");
  checkState(entityIds.length > 0,"String_Node_Str");
  for (  Long entityId : entityIds) {
    deleteEntity(dataDefinition,entityId);
  }
}

Fixed version (ground truth):
@Override @Transactional @Monitorable public void delete(final InternalDataDefinition dataDefinition,final Long... entityIds){
  checkNotNull(dataDefinition,DATA_DEFINITION_MUST_BE_GIVEN);
  checkState(dataDefinition.isDeletable(),"String_Node_Str");
  checkState(dataDefinition.isEnabled(),DATA_DEFINITION_BELONGS_TO_DISABLED_PLUGIN);
  checkState(entityIds.length > 0,"String_Node_Str");
  for (  Long entityId : entityIds) {
    deleteEntity(dataDefinition,entityId);
  }
}
Program: 39276
Project: 39276
Buggy source:
@Override @Transactional(readOnly=true) @Monitorable public Entity get(final InternalDataDefinition dataDefinition,final Long entityId){
  checkNotNull(dataDefinition,"String_Node_Str");
  checkState(dataDefinition.isEnabled(),"String_Node_Str");
  checkNotNull(entityId,"String_Node_Str");
  Object databaseEntity=getDatabaseEntity(dataDefinition,entityId);
  if (databaseEntity == null) {
    LOG.info("String_Node_Str" + dataDefinition.getPluginIdentifier() + "String_Node_Str"+ dataDefinition.getName()+ "String_Node_Str"+ entityId+ "String_Node_Str");
    return null;
  }
  Entity entity=entityService.convertToGenericEntity(dataDefinition,databaseEntity);
  LOG.info(entity + "String_Node_Str");
  return entity;
}

Fixed version (ground truth):
@Override @Transactional(readOnly=true) @Monitorable public Entity get(final InternalDataDefinition dataDefinition,final Long entityId){
  checkNotNull(dataDefinition,DATA_DEFINITION_MUST_BE_GIVEN);
  checkState(dataDefinition.isEnabled(),DATA_DEFINITION_BELONGS_TO_DISABLED_PLUGIN);
  checkNotNull(entityId,"String_Node_Str");
  Object databaseEntity=getDatabaseEntity(dataDefinition,entityId);
  if (databaseEntity == null) {
    LOG.info("String_Node_Str" + dataDefinition.getPluginIdentifier() + "String_Node_Str"+ dataDefinition.getName()+ "String_Node_Str"+ entityId+ "String_Node_Str");
    return null;
  }
  Entity entity=entityService.convertToGenericEntity(dataDefinition,databaseEntity);
  LOG.info(entity + "String_Node_Str");
  return entity;
}
Program: 39277
Project: 39277
Buggy source:
@Override @Transactional @Monitorable public void move(final InternalDataDefinition dataDefinition,final Long entityId,final int offset){
  checkNotNull(dataDefinition,"String_Node_Str");
  checkState(dataDefinition.isPrioritizable(),"String_Node_Str");
  checkState(dataDefinition.isEnabled(),"String_Node_Str");
  checkNotNull(entityId,"String_Node_Str");
  checkState(offset != 0,"String_Node_Str");
  Object databaseEntity=getDatabaseEntity(dataDefinition,entityId);
  if (databaseEntity == null) {
    LOG.info("String_Node_Str" + dataDefinition.getPluginIdentifier() + "String_Node_Str"+ dataDefinition.getName()+ "String_Node_Str"+ entityId+ "String_Node_Str");
    return;
  }
  priorityService.move(dataDefinition,databaseEntity,0,offset);
  LOG.info("String_Node_Str" + dataDefinition.getPluginIdentifier() + "String_Node_Str"+ dataDefinition.getName()+ "String_Node_Str"+ entityId+ "String_Node_Str");
}

Fixed version (ground truth):
@Override @Transactional @Monitorable public void move(final InternalDataDefinition dataDefinition,final Long entityId,final int offset){
  checkNotNull(dataDefinition,DATA_DEFINITION_MUST_BE_GIVEN);
  checkState(dataDefinition.isPrioritizable(),"String_Node_Str");
  checkState(dataDefinition.isEnabled(),DATA_DEFINITION_BELONGS_TO_DISABLED_PLUGIN);
  checkNotNull(entityId,"String_Node_Str");
  checkState(offset != 0,"String_Node_Str");
  Object databaseEntity=getDatabaseEntity(dataDefinition,entityId);
  if (databaseEntity == null) {
    LOG.info("String_Node_Str" + dataDefinition.getPluginIdentifier() + "String_Node_Str"+ dataDefinition.getName()+ "String_Node_Str"+ entityId+ "String_Node_Str");
    return;
  }
  priorityService.move(dataDefinition,databaseEntity,0,offset);
  LOG.info("String_Node_Str" + dataDefinition.getPluginIdentifier() + "String_Node_Str"+ dataDefinition.getName()+ "String_Node_Str"+ entityId+ "String_Node_Str");
}
Program: 39278
Project: 39278
Buggy source:
@Override @Transactional @Monitorable public void moveTo(final InternalDataDefinition dataDefinition,final Long entityId,final int position){
  checkNotNull(dataDefinition,"String_Node_Str");
  checkState(dataDefinition.isPrioritizable(),"String_Node_Str");
  checkState(dataDefinition.isEnabled(),"String_Node_Str");
  checkNotNull(entityId,"String_Node_Str");
  checkState(position > 0,"String_Node_Str");
  Object databaseEntity=getDatabaseEntity(dataDefinition,entityId);
  if (databaseEntity == null) {
    LOG.info("String_Node_Str" + dataDefinition.getPluginIdentifier() + "String_Node_Str"+ dataDefinition.getName()+ "String_Node_Str"+ entityId+ "String_Node_Str");
    return;
  }
  priorityService.move(dataDefinition,databaseEntity,position,0);
  LOG.info("String_Node_Str" + dataDefinition.getPluginIdentifier() + "String_Node_Str"+ dataDefinition.getName()+ "String_Node_Str"+ entityId+ "String_Node_Str");
}

Fixed version (ground truth):
@Override @Transactional @Monitorable public void moveTo(final InternalDataDefinition dataDefinition,final Long entityId,final int position){
  checkNotNull(dataDefinition,DATA_DEFINITION_MUST_BE_GIVEN);
  checkState(dataDefinition.isPrioritizable(),"String_Node_Str");
  checkState(dataDefinition.isEnabled(),DATA_DEFINITION_BELONGS_TO_DISABLED_PLUGIN);
  checkNotNull(entityId,"String_Node_Str");
  checkState(position > 0,"String_Node_Str");
  Object databaseEntity=getDatabaseEntity(dataDefinition,entityId);
  if (databaseEntity == null) {
    LOG.info("String_Node_Str" + dataDefinition.getPluginIdentifier() + "String_Node_Str"+ dataDefinition.getName()+ "String_Node_Str"+ entityId+ "String_Node_Str");
    return;
  }
  priorityService.move(dataDefinition,databaseEntity,position,0);
  LOG.info("String_Node_Str" + dataDefinition.getPluginIdentifier() + "String_Node_Str"+ dataDefinition.getName()+ "String_Node_Str"+ entityId+ "String_Node_Str");
}
Program: 39279
Project: 39279
Buggy source:
@Override public SearchCriteriaBuilder findWithAlias(final String alias){
  throw new UnsupportedOperationException("String_Node_Str");
}

Fixed version (ground truth):
@Override public SearchCriteriaBuilder findWithAlias(final String alias){
  throw new UnsupportedOperationException(CANNOT_FIND_ENTITY_FOR_DYNAMIC_DATA_DEFINITION);
}
Program: 39280
Project: 39280
Buggy source:
@Override public SearchResult find(final SearchCriteria searchCriteria){
  throw new UnsupportedOperationException("String_Node_Str");
}

Fixed version (ground truth):
@Override public SearchResult find(final SearchCriteria searchCriteria){
  throw new UnsupportedOperationException(CANNOT_FIND_ENTITY_FOR_DYNAMIC_DATA_DEFINITION);
}
Program: 39282
Project: 39282
Buggy source:
private Map<String,CtClass> createClasses(final Map<String,Class<?>> existingClasses,final InputStream stream) throws XMLStreamException {
  XMLStreamReader reader=XMLInputFactory.newInstance().createXMLStreamReader(stream);
  Map<String,CtClass> ctClasses=new HashMap<String,CtClass>();
  while (reader.hasNext() && reader.next() > 0) {
    if (isTagStarted(reader,TAG_MODEL)) {
      String pluginIdentifier=getPluginIdentifier(reader);
      String modelName=getStringAttribute(reader,"String_Node_Str");
      String className=ClassNameUtils.getFullyQualifiedClassName(pluginIdentifier,modelName);
      if (existingClasses.containsKey(className)) {
        LOG.info("String_Node_Str" + className + "String_Node_Str");
      }
 else {
        LOG.info("String_Node_Str" + className);
        ctClasses.put(className,classPool.makeClass(className));
      }
      break;
    }
  }
  reader.close();
  return ctClasses;
}

Fixed version (ground truth):
private Map<String,CtClass> createClasses(final Map<String,Class<?>> existingClasses,final InputStream stream) throws XMLStreamException {
  XMLStreamReader reader=XMLInputFactory.newInstance().createXMLStreamReader(stream);
  Map<String,CtClass> ctClasses=new HashMap<String,CtClass>();
  while (reader.hasNext() && reader.next() > 0) {
    if (isTagStarted(reader,TAG_MODEL)) {
      String pluginIdentifier=getPluginIdentifier(reader);
      String modelName=getStringAttribute(reader,NAME);
      String className=ClassNameUtils.getFullyQualifiedClassName(pluginIdentifier,modelName);
      if (existingClasses.containsKey(className)) {
        LOG.info("String_Node_Str" + className + "String_Node_Str");
      }
 else {
        LOG.info("String_Node_Str" + className);
        ctClasses.put(className,classPool.makeClass(className));
      }
      break;
    }
  }
  reader.close();
  return ctClasses;
}
Program: 39283
Project: 39283
Buggy source:
private void createSetField(final CtClass ctClass,final XMLStreamReader reader) throws ModelXmlCompilingException {
  createField(ctClass,getStringAttribute(reader,"String_Node_Str"),"String_Node_Str");
}

Fixed version (ground truth):
private void createSetField(final CtClass ctClass,final XMLStreamReader reader) throws ModelXmlCompilingException {
  createField(ctClass,getStringAttribute(reader,NAME),"String_Node_Str");
}
Program: 39284
Project: 39284
Buggy source:
private void buildEquals(final CtClass ctClass,final List<String> fields) throws ModelXmlCompilingException {
  try {
    StringBuilder sb=new StringBuilder();
    sb.append("String_Node_Str");
    sb.append("String_Node_Str");
    sb.append("String_Node_Str" + ctClass.getName() + "String_Node_Str");
    sb.append(ctClass.getName() + "String_Node_Str" + ctClass.getName()+ "String_Node_Str");
    for (    String field : fields) {
      sb.append("String_Node_Str" + StringUtils.capitalize(field) + "String_Node_Str");
      sb.append("String_Node_Str" + StringUtils.capitalize(field) + "String_Node_Str");
      sb.append("String_Node_Str" + StringUtils.capitalize(field) + "String_Node_Str"+ StringUtils.capitalize(field)+ "String_Node_Str");
    }
    sb.append("String_Node_Str");
    ctClass.addMethod(CtNewMethod.make("String_Node_Str" + sb.toString() + "String_Node_Str",ctClass));
  }
 catch (  CannotCompileException e) {
    throw new ModelXmlCompilingException("String_Node_Str" + ctClass.getName(),e);
  }
}

Fixed version (ground truth):
private void buildEquals(final CtClass ctClass,final List<String> fields) throws ModelXmlCompilingException {
  try {
    StringBuilder sb=new StringBuilder();
    sb.append("String_Node_Str");
    sb.append("String_Node_Str");
    sb.append("String_Node_Str" + ctClass.getName() + "String_Node_Str");
    sb.append(ctClass.getName() + "String_Node_Str" + ctClass.getName()+ "String_Node_Str");
    for (    String field : fields) {
      sb.append("String_Node_Str" + StringUtils.capitalize(field) + "String_Node_Str");
      sb.append("String_Node_Str" + StringUtils.capitalize(field) + "String_Node_Str");
      sb.append("String_Node_Str" + StringUtils.capitalize(field) + "String_Node_Str"+ StringUtils.capitalize(field)+ "String_Node_Str");
    }
    sb.append("String_Node_Str");
    ctClass.addMethod(CtNewMethod.make("String_Node_Str" + sb.toString() + "String_Node_Str",ctClass));
  }
 catch (  CannotCompileException e) {
    throw new ModelXmlCompilingException(FAILED_TO_COMPILE_CLASS + ctClass.getName(),e);
  }
}
Program: 39285
Project: 39285
Buggy source:
private void createBelongsField(final CtClass ctClass,final String pluginIdentifier,final XMLStreamReader reader) throws ModelXmlCompilingException {
  String plugin=getStringAttribute(reader,"String_Node_Str");
  if (plugin == null) {
    plugin=pluginIdentifier;
  }
  String model=getStringAttribute(reader,"String_Node_Str");
  createField(ctClass,getStringAttribute(reader,"String_Node_Str"),ClassNameUtils.getFullyQualifiedClassName(plugin,model));
}

Fixed version (ground truth):
private void createBelongsField(final CtClass ctClass,final String pluginIdentifier,final XMLStreamReader reader) throws ModelXmlCompilingException {
  String plugin=getStringAttribute(reader,"String_Node_Str");
  if (plugin == null) {
    plugin=pluginIdentifier;
  }
  String model=getStringAttribute(reader,"String_Node_Str");
  createField(ctClass,getStringAttribute(reader,NAME),ClassNameUtils.getFullyQualifiedClassName(plugin,model));
}
Program: 39287
Project: 39287
Buggy source:
private void buildHashCode(final CtClass ctClass,final List<String> fields) throws ModelXmlCompilingException {
  try {
    StringBuilder sb=new StringBuilder();
    sb.append("String_Node_Str");
    sb.append("String_Node_Str");
    for (    String field : fields) {
      String fieldGetter="String_Node_Str" + StringUtils.capitalize(field) + "String_Node_Str";
      sb.append("String_Node_Str" + fieldGetter + "String_Node_Str"+ fieldGetter+ "String_Node_Str"+ fieldGetter+ "String_Node_Str");
    }
    sb.append("String_Node_Str");
    ctClass.addMethod(CtNewMethod.make("String_Node_Str" + sb.toString() + "String_Node_Str",ctClass));
  }
 catch (  CannotCompileException e) {
    throw new ModelXmlCompilingException("String_Node_Str" + ctClass.getName(),e);
  }
}

Fixed version (ground truth):
private void buildHashCode(final CtClass ctClass,final List<String> fields) throws ModelXmlCompilingException {
  try {
    StringBuilder sb=new StringBuilder();
    sb.append("String_Node_Str");
    sb.append("String_Node_Str");
    for (    String field : fields) {
      String fieldGetter="String_Node_Str" + StringUtils.capitalize(field) + "String_Node_Str";
      sb.append("String_Node_Str" + fieldGetter + "String_Node_Str"+ fieldGetter+ "String_Node_Str"+ fieldGetter+ "String_Node_Str");
    }
    sb.append("String_Node_Str");
    ctClass.addMethod(CtNewMethod.make("String_Node_Str" + sb.toString() + "String_Node_Str",ctClass));
  }
 catch (  CannotCompileException e) {
    throw new ModelXmlCompilingException(FAILED_TO_COMPILE_CLASS + ctClass.getName(),e);
  }
}
Program: 39288
Project: 39288
Buggy source:
private void defineClasses(final Map<String,CtClass> ctClasses,final InputStream stream) throws XMLStreamException, ModelXmlCompilingException {
  XMLStreamReader reader=XMLInputFactory.newInstance().createXMLStreamReader(stream);
  while (reader.hasNext() && reader.next() > 0) {
    if (isTagStarted(reader,TAG_MODEL)) {
      String pluginIdentifier=getPluginIdentifier(reader);
      String modelName=getStringAttribute(reader,"String_Node_Str");
      String className=ClassNameUtils.getFullyQualifiedClassName(pluginIdentifier,modelName);
      if (ctClasses.containsKey(className)) {
        parse(reader,ctClasses.get(className),pluginIdentifier);
      }
    }
  }
  reader.close();
}

Fixed version (ground truth):
private void defineClasses(final Map<String,CtClass> ctClasses,final InputStream stream) throws XMLStreamException, ModelXmlCompilingException {
  XMLStreamReader reader=XMLInputFactory.newInstance().createXMLStreamReader(stream);
  while (reader.hasNext() && reader.next() > 0) {
    if (isTagStarted(reader,TAG_MODEL)) {
      String pluginIdentifier=getPluginIdentifier(reader);
      String modelName=getStringAttribute(reader,NAME);
      String className=ClassNameUtils.getFullyQualifiedClassName(pluginIdentifier,modelName);
      if (ctClasses.containsKey(className)) {
        parse(reader,ctClasses.get(className),pluginIdentifier);
      }
    }
  }
  reader.close();
}
Program: 39289
Project: 39289
Buggy source:
private void createField(final CtClass ctClass,final String name,final String clazz) throws ModelXmlCompilingException {
  try {
    ctClass.addField(CtField.make("String_Node_Str" + clazz + "String_Node_Str"+ name+ "String_Node_Str",ctClass));
    ctClass.addMethod(CtNewMethod.make("String_Node_Str" + clazz + "String_Node_Str"+ StringUtils.capitalize(name)+ "String_Node_Str"+ name+ "String_Node_Str",ctClass));
    ctClass.addMethod(CtNewMethod.make("String_Node_Str" + StringUtils.capitalize(name) + "String_Node_Str"+ clazz+ "String_Node_Str"+ name+ "String_Node_Str"+ name+ "String_Node_Str"+ name+ "String_Node_Str",ctClass));
  }
 catch (  CannotCompileException e) {
    throw new ModelXmlCompilingException("String_Node_Str" + ctClass.getName(),e);
  }
}

Fixed version (ground truth):
private void createField(final CtClass ctClass,final String name,final String clazz) throws ModelXmlCompilingException {
  try {
    ctClass.addField(CtField.make("String_Node_Str" + clazz + "String_Node_Str"+ name+ "String_Node_Str",ctClass));
    ctClass.addMethod(CtNewMethod.make("String_Node_Str" + clazz + "String_Node_Str"+ StringUtils.capitalize(name)+ "String_Node_Str"+ name+ "String_Node_Str",ctClass));
    ctClass.addMethod(CtNewMethod.make("String_Node_Str" + StringUtils.capitalize(name) + "String_Node_Str"+ clazz+ "String_Node_Str"+ name+ "String_Node_Str"+ name+ "String_Node_Str"+ name+ "String_Node_Str",ctClass));
  }
 catch (  CannotCompileException e) {
    throw new ModelXmlCompilingException(FAILED_TO_COMPILE_CLASS + ctClass.getName(),e);
  }
}