nus-yam/ex-repair huggingface dataset:
Program: 39188
Project: 39188
Buggy source:
@Test public final void shouldReturnNonEmptyConversionsSetUsingSimpleOneDirectionalTraverseWithCycle(){
  final Entity m_dm=mockUnitConversionItem(BigDecimal.ONE,"String_Node_Str",BigDecimal.valueOf(10L),"String_Node_Str");
  final Entity dm_cm=mockUnitConversionItem(BigDecimal.ONE,"String_Node_Str",BigDecimal.valueOf(10L),"String_Node_Str");
  final Entity cm_mm=mockUnitConversionItem(BigDecimal.ONE,"String_Node_Str",BigDecimal.valueOf(10L),"String_Node_Str");
  final Entity mm_m=mockUnitConversionItem(BigDecimal.ONE,"String_Node_Str",new BigDecimal("String_Node_Str"),"String_Node_Str");
  stubGetAll(Lists.newArrayList(m_dm,dm_cm,cm_mm,mm_m));
  final PossibleUnitConversions result=unitConversionService.getPossibleConversions("String_Node_Str");
  assertEquals(3,result.asUnitToConversionMap().size());
  assertBigDecimalEquals(BigDecimal.valueOf(10L),result.convertTo(BigDecimal.ONE,"String_Node_Str"));
  assertBigDecimalEquals(BigDecimal.valueOf(100L),result.convertTo(BigDecimal.ONE,"String_Node_Str"));
  assertBigDecimalEquals(BigDecimal.valueOf(1000L),result.convertTo(BigDecimal.ONE,"String_Node_Str"));
}

Fixed version (ground truth):
@Test public final void shouldReturnNonEmptyConversionsSetUsingSimpleOneDirectionalTraverseWithCycle(){
  final Entity mToDm=mockUnitConversionItem(BigDecimal.ONE,"String_Node_Str",BigDecimal.valueOf(10L),"String_Node_Str");
  final Entity dmToCm=mockUnitConversionItem(BigDecimal.ONE,"String_Node_Str",BigDecimal.valueOf(10L),"String_Node_Str");
  final Entity cmToMm=mockUnitConversionItem(BigDecimal.ONE,"String_Node_Str",BigDecimal.valueOf(10L),"String_Node_Str");
  final Entity mmToM=mockUnitConversionItem(BigDecimal.ONE,"String_Node_Str",new BigDecimal("String_Node_Str"),"String_Node_Str");
  stubGetAll(Lists.newArrayList(mToDm,dmToCm,cmToMm,mmToM));
  final PossibleUnitConversions result=unitConversionService.getPossibleConversions("String_Node_Str");
  assertEquals(3,result.asUnitToConversionMap().size());
  assertBigDecimalEquals(BigDecimal.valueOf(10L),result.convertTo(BigDecimal.ONE,"String_Node_Str"));
  assertBigDecimalEquals(BigDecimal.valueOf(100L),result.convertTo(BigDecimal.ONE,"String_Node_Str"));
  assertBigDecimalEquals(BigDecimal.valueOf(1000L),result.convertTo(BigDecimal.ONE,"String_Node_Str"));
}
Program: 39189
Project: 39189
Buggy source:
@Test public final void shouldReturnNonEmptyConversionsSetUsingSimpleOneDirectionalTraverse(){
  final Entity m_dm=mockUnitConversionItem(BigDecimal.ONE,"String_Node_Str",BigDecimal.valueOf(10L),"String_Node_Str");
  final Entity dm_cm=mockUnitConversionItem(BigDecimal.ONE,"String_Node_Str",BigDecimal.valueOf(10L),"String_Node_Str");
  final Entity cm_mm=mockUnitConversionItem(BigDecimal.ONE,"String_Node_Str",BigDecimal.valueOf(10L),"String_Node_Str");
  stubGetAll(Lists.newArrayList(m_dm,dm_cm,cm_mm));
  final PossibleUnitConversions result=unitConversionService.getPossibleConversions("String_Node_Str");
  assertEquals(3,result.asUnitToConversionMap().size());
  assertBigDecimalEquals(BigDecimal.valueOf(10L),result.convertTo(BigDecimal.ONE,"String_Node_Str"));
  assertBigDecimalEquals(BigDecimal.valueOf(100L),result.convertTo(BigDecimal.ONE,"String_Node_Str"));
  assertBigDecimalEquals(BigDecimal.valueOf(1000L),result.convertTo(BigDecimal.ONE,"String_Node_Str"));
}

Fixed version (ground truth):
@Test public final void shouldReturnNonEmptyConversionsSetUsingSimpleOneDirectionalTraverse(){
  final Entity mToDm=mockUnitConversionItem(BigDecimal.ONE,"String_Node_Str",BigDecimal.valueOf(10L),"String_Node_Str");
  final Entity dmToCm=mockUnitConversionItem(BigDecimal.ONE,"String_Node_Str",BigDecimal.valueOf(10L),"String_Node_Str");
  final Entity cmToMm=mockUnitConversionItem(BigDecimal.ONE,"String_Node_Str",BigDecimal.valueOf(10L),"String_Node_Str");
  stubGetAll(Lists.newArrayList(mToDm,dmToCm,cmToMm));
  final PossibleUnitConversions result=unitConversionService.getPossibleConversions("String_Node_Str");
  assertEquals(3,result.asUnitToConversionMap().size());
  assertBigDecimalEquals(BigDecimal.valueOf(10L),result.convertTo(BigDecimal.ONE,"String_Node_Str"));
  assertBigDecimalEquals(BigDecimal.valueOf(100L),result.convertTo(BigDecimal.ONE,"String_Node_Str"));
  assertBigDecimalEquals(BigDecimal.valueOf(1000L),result.convertTo(BigDecimal.ONE,"String_Node_Str"));
}
Program: 39190
Project: 39190
Buggy source:
@Test public final void shouldReturnNonEmptyConversionsSetUsingSimpleBiDirectionalTraverseWithCycle(){
  final Entity km_m=mockUnitConversionItem(BigDecimal.ONE,"String_Node_Str",BigDecimal.valueOf(1000L),"String_Node_Str");
  final Entity m_dm=mockUnitConversionItem(BigDecimal.ONE,"String_Node_Str",BigDecimal.valueOf(10L),"String_Node_Str");
  final Entity km_mm=mockUnitConversionItem(BigDecimal.ONE,"String_Node_Str",BigDecimal.valueOf(1000000L),"String_Node_Str");
  final Entity mm_dm=mockUnitConversionItem(BigDecimal.valueOf(100L),"String_Node_Str",BigDecimal.ONE,"String_Node_Str");
  final Entity dm_m=mockUnitConversionItem(BigDecimal.valueOf(10L),"String_Node_Str",BigDecimal.ONE,"String_Node_Str");
  stubGetAll(Lists.newArrayList(m_dm,km_m,km_mm,mm_dm,dm_m));
  final PossibleUnitConversions result=unitConversionService.getPossibleConversions("String_Node_Str");
  assertEquals(3,result.asUnitToConversionMap().size());
  assertBigDecimalEquals(new BigDecimal("String_Node_Str"),result.convertTo(BigDecimal.ONE,"String_Node_Str"));
  assertBigDecimalEquals(BigDecimal.valueOf(10L),result.convertTo(BigDecimal.ONE,"String_Node_Str"));
  assertBigDecimalEquals(BigDecimal.valueOf(1000L),result.convertTo(BigDecimal.ONE,"String_Node_Str"));
}

Fixed version (ground truth):
@Test public final void shouldReturnNonEmptyConversionsSetUsingSimpleBiDirectionalTraverseWithCycle(){
  final Entity kmToM=mockUnitConversionItem(BigDecimal.ONE,"String_Node_Str",BigDecimal.valueOf(1000L),"String_Node_Str");
  final Entity mToDm=mockUnitConversionItem(BigDecimal.ONE,"String_Node_Str",BigDecimal.valueOf(10L),"String_Node_Str");
  final Entity kmToMm=mockUnitConversionItem(BigDecimal.ONE,"String_Node_Str",BigDecimal.valueOf(1000000L),"String_Node_Str");
  final Entity mmToDm=mockUnitConversionItem(BigDecimal.valueOf(100L),"String_Node_Str",BigDecimal.ONE,"String_Node_Str");
  final Entity dmToM=mockUnitConversionItem(BigDecimal.valueOf(10L),"String_Node_Str",BigDecimal.ONE,"String_Node_Str");
  stubGetAll(Lists.newArrayList(mToDm,kmToM,kmToMm,mmToDm,dmToM));
  final PossibleUnitConversions result=unitConversionService.getPossibleConversions("String_Node_Str");
  assertEquals(3,result.asUnitToConversionMap().size());
  assertBigDecimalEquals(new BigDecimal("String_Node_Str"),result.convertTo(BigDecimal.ONE,"String_Node_Str"));
  assertBigDecimalEquals(BigDecimal.valueOf(10L),result.convertTo(BigDecimal.ONE,"String_Node_Str"));
  assertBigDecimalEquals(BigDecimal.valueOf(1000L),result.convertTo(BigDecimal.ONE,"String_Node_Str"));
}
Program: 39191
Project: 39191
Buggy source:
public LocaleModule(final InternalTranslationService translationService,final String locale,final String label){
  this.translationService=translationService;
  this.locale=locale;
  this.label=label;
}

Fixed version (ground truth):
public LocaleModule(final InternalTranslationService translationService,final String locale,final String label){
  super();
  this.translationService=translationService;
  this.locale=locale;
  this.label=label;
}
Program: 39192
Project: 39192
Buggy source:
public TranslationGroupModule(final InternalTranslationService translationService,final String prefix,final String name){
  this.translationService=translationService;
  this.prefix=prefix;
  this.name=name;
}

Fixed version (ground truth):
public TranslationGroupModule(final InternalTranslationService translationService,final String prefix,final String name){
  super();
  this.translationService=translationService;
  this.prefix=prefix;
  this.name=name;
}
Program: 39193
Project: 39193
Buggy source:
public TranslationModule(final ApplicationContext applicationContext,final TranslationModuleService translationModuleService,final String pluginIdentifier,final String basename,final String path){
  this.applicationContext=applicationContext;
  this.translationModuleService=translationModuleService;
  this.pluginIdentifier=pluginIdentifier;
  this.basename=basename;
  this.path=path;
}

Fixed version (ground truth):
public TranslationModule(final ApplicationContext applicationContext,final TranslationModuleService translationModuleService,final String pluginIdentifier,final String basename,final String path){
  super();
  this.applicationContext=applicationContext;
  this.translationModuleService=translationModuleService;
  this.pluginIdentifier=pluginIdentifier;
  this.basename=basename;
  this.path=path;
}
Program: 39194
Project: 39194
Buggy source:
public DetachedEntityListImpl(final DataDefinition dataDefinition,final List<Entity> entities){
  this.dataDefinition=dataDefinition;
  if (entities == null) {
    this.entities=Lists.newArrayList();
  }
 else {
    this.entities=Lists.newArrayList(entities);
  }
}

Fixed version (ground truth):
public DetachedEntityListImpl(final DataDefinition dataDefinition,final List<Entity> entities){
  super();
  this.dataDefinition=dataDefinition;
  if (entities == null) {
    this.entities=Lists.newArrayList();
  }
 else {
    this.entities=Lists.newArrayList(entities);
  }
}
Program: 39195
Project: 39195
Buggy source:
public DetachedEntityTreeImpl(final List<Entity> entities){
  Preconditions.checkArgument(entities != null,"String_Node_Str");
  this.entities=entities;
  checkEntities();
}

Fixed version (ground truth):
public DetachedEntityTreeImpl(final List<Entity> entities){
  super();
  Preconditions.checkArgument(entities != null,"String_Node_Str");
  this.entities=entities;
  checkEntities();
}
Program: 39196
Project: 39196
Buggy source:
public EntityListImpl(final DataDefinition dataDefinition,final String joinFieldName,final Long parentId){
  this.dataDefinition=dataDefinition;
  this.joinFieldDefinition=dataDefinition.getField(joinFieldName);
  this.parentId=parentId;
  if (this.parentId == null) {
    entities=Collections.<Entity>emptyList();
  }
}

Fixed version (ground truth):
public EntityListImpl(final DataDefinition dataDefinition,final String joinFieldName,final Long parentId){
  super();
  this.dataDefinition=dataDefinition;
  this.joinFieldDefinition=dataDefinition.getField(joinFieldName);
  this.parentId=parentId;
  if (this.parentId == null) {
    entities=Collections.<Entity>emptyList();
  }
}
Program: 39197
Project: 39197
Buggy source:
public EntityTreeImpl(final DataDefinition dataDefinition,final String joinFieldName,final Long belongsToId){
  this.dataDefinition=dataDefinition;
  this.joinFieldDefinition=dataDefinition.getField(joinFieldName);
  this.belongsToId=belongsToId;
  if (this.belongsToId == null) {
    entities=Collections.emptyList();
  }
}

Fixed version (ground truth):
public EntityTreeImpl(final DataDefinition dataDefinition,final String joinFieldName,final Long belongsToId){
  super();
  this.dataDefinition=dataDefinition;
  this.joinFieldDefinition=dataDefinition.getField(joinFieldName);
  this.belongsToId=belongsToId;
  if (this.belongsToId == null) {
    entities=Collections.emptyList();
  }
}
Program: 39198
Project: 39198
Buggy source:
@Override public BigDecimal setScale(BigDecimal decimal){
  return decimal.setScale(5,HALF_EVEN);
}

Fixed version (ground truth):
@Override public BigDecimal setScale(final BigDecimal decimal){
  return decimal.setScale(5,HALF_EVEN);
}
Program: 39199
Project: 39199
Buggy source:
@Override public String format(Object obj){
  return (obj == null) ? null : decimalFormat.format(obj);
}

Fixed version (ground truth):
@Override public String format(final Object obj){
  return (obj == null) ? null : decimalFormat.format(obj);
}
Program: 39200
Project: 39200
Buggy source:
private FieldType getEnumType(final XMLStreamReader reader,final String translationPath) throws XMLStreamException {
  String values=getStringAttribute(reader,"String_Node_Str");
  if (values.trim().length() == 0) {
    return new EnumType(translationService,translationPath);
  }
  return new EnumType(translationService,translationPath,values.split("String_Node_Str"));
}

Fixed version (ground truth):
private FieldType getEnumType(final XMLStreamReader reader,final String translationPath) throws XMLStreamException {
  String values=getStringAttribute(reader,"String_Node_Str");
  if (hasText(values)) {
    return new EnumType(translationService,translationPath,values.split("String_Node_Str"));
  }
 else {
    return new EnumType(translationService,translationPath);
  }
}
Program: 39201
Project: 39201
Buggy source:
public DictionaryModule(final String pluginIdentifier,final String name,final InternalDictionaryService dictionaryService){
  this.pluginIdentifier=pluginIdentifier;
  this.name=name;
  this.dictionaryService=dictionaryService;
}

Fixed version (ground truth):
public DictionaryModule(final String pluginIdentifier,final String name,final InternalDictionaryService dictionaryService){
  super();
  this.pluginIdentifier=pluginIdentifier;
  this.name=name;
  this.dictionaryService=dictionaryService;
}
Program: 39202
Project: 39202
Buggy source:
public EnumValueModule(final String originPluginIdentifier,final DataDefinitionService dataDefinitionService,final String pluginIdentifier,final String modelName,final String fieldName,final String value){
  this.dataDefinitionService=dataDefinitionService;
  this.pluginIdentifier=pluginIdentifier;
  this.modelName=modelName;
  this.fieldName=fieldName;
  enumValue=new EnumTypeKey(value,originPluginIdentifier);
}

Fixed version (ground truth):
public EnumValueModule(final String originPluginIdentifier,final DataDefinitionService dataDefinitionService,final String pluginIdentifier,final String modelName,final String fieldName,final String value){
  super();
  this.dataDefinitionService=dataDefinitionService;
  this.pluginIdentifier=pluginIdentifier;
  this.modelName=modelName;
  this.fieldName=fieldName;
  enumValue=new EnumTypeKey(value,originPluginIdentifier);
}
Program: 39203
Project: 39203
Buggy source:
public FieldModule(final String pluginIdentifier,final String modelName,final Element field,final ModelXmlHolder modelXmlHolder,final DataDefinitionService dataDefinitionService){
  this.pluginIdentifier=pluginIdentifier;
  this.modelName=modelName;
  this.field=field;
  this.modelXmlHolder=modelXmlHolder;
  this.fieldName=field.getAttributeValue("String_Node_Str");
  this.dataDefinitionService=dataDefinitionService;
}

Fixed version (ground truth):
public FieldModule(final String pluginIdentifier,final String modelName,final Element field,final ModelXmlHolder modelXmlHolder,final DataDefinitionService dataDefinitionService){
  super();
  this.pluginIdentifier=pluginIdentifier;
  this.modelName=modelName;
  this.field=field;
  this.modelXmlHolder=modelXmlHolder;
  this.fieldName=field.getAttributeValue("String_Node_Str");
  this.dataDefinitionService=dataDefinitionService;
}
Program: 39204
Project: 39204
Buggy source:
public HookModule(final String pluginIdentifier,final String modelName,final Element hook,final ModelXmlHolder modelXmlHolder,final InternalDataDefinitionService dataDefinitionService){
  this.pluginIdentifier=pluginIdentifier;
  this.modelName=modelName;
  this.hook=hook;
  this.modelXmlHolder=modelXmlHolder;
  this.hookType=hook.getName();
  this.hookClassName=hook.getAttributeValue("String_Node_Str");
  this.hookMethodName=hook.getAttributeValue("String_Node_Str");
  this.dataDefinitionService=dataDefinitionService;
}

Fixed version (ground truth):
public HookModule(final String pluginIdentifier,final String modelName,final Element hook,final ModelXmlHolder modelXmlHolder,final InternalDataDefinitionService dataDefinitionService){
  super();
  this.pluginIdentifier=pluginIdentifier;
  this.modelName=modelName;
  this.hook=hook;
  this.modelXmlHolder=modelXmlHolder;
  this.hookType=hook.getName();
  this.hookClassName=hook.getAttributeValue("String_Node_Str");
  this.hookMethodName=hook.getAttributeValue("String_Node_Str");
  this.dataDefinitionService=dataDefinitionService;
}
Program: 39205
Project: 39205
Buggy source:
public ModelModule(final String pluginIdentifier,final String modelName,final String resource,final ModelXmlHolder modelXmlHolder,final InternalDataDefinitionService dataDefinitionService){
  this.pluginIdentifier=pluginIdentifier;
  this.modelName=modelName;
  this.resource=resource;
  this.modelXmlHolder=modelXmlHolder;
  this.dataDefinitionService=dataDefinitionService;
}

Fixed version (ground truth):
public ModelModule(final String pluginIdentifier,final String modelName,final String resource,final ModelXmlHolder modelXmlHolder,final InternalDataDefinitionService dataDefinitionService){
  super();
  this.pluginIdentifier=pluginIdentifier;
  this.modelName=modelName;
  this.resource=resource;
  this.modelXmlHolder=modelXmlHolder;
  this.dataDefinitionService=dataDefinitionService;
}
Program: 39206
Project: 39206
Buggy source:
@Override public void printGeneratedReport(ViewDefinitionState viewDefinitionState,ComponentState state,String[] args){
  if (state.getFieldValue() instanceof Long) {
    Entity entity=dataDefinitionService.get(args[1],args[2]).get((Long)state.getFieldValue());
    if (entity == null) {
      state.addMessage("String_Node_Str",MessageType.FAILURE);
    }
 else     if (StringUtils.hasText(entity.getStringField("String_Node_Str"))) {
      final StringBuilder urlBuilder=new StringBuilder();
      urlBuilder.append("String_Node_Str").append(args[1]);
      urlBuilder.append("String_Node_Str").append(args[2]).append("String_Node_Str");
      urlBuilder.append(args[0]).append("String_Node_Str").append(state.getFieldValue());
      if (args.length >= 4) {
        urlBuilder.append("String_Node_Str").append(args[3]);
      }
      viewDefinitionState.redirectTo(urlBuilder.toString(),true,false);
    }
 else {
      state.addMessage("String_Node_Str",MessageType.FAILURE);
    }
  }
 else {
    if (state instanceof FormComponent) {
      state.addMessage("String_Node_Str",MessageType.FAILURE);
    }
 else {
      state.addMessage("String_Node_Str",MessageType.FAILURE);
    }
  }
}

Fixed version (ground truth):
@Override public void printGeneratedReport(final ViewDefinitionState viewDefinitionState,final ComponentState state,final String[] args){
  if (state.getFieldValue() instanceof Long) {
    Entity entity=dataDefinitionService.get(args[1],args[2]).get((Long)state.getFieldValue());
    if (entity == null) {
      state.addMessage("String_Node_Str",MessageType.FAILURE);
    }
 else     if (StringUtils.hasText(entity.getStringField("String_Node_Str"))) {
      final StringBuilder urlBuilder=new StringBuilder();
      urlBuilder.append("String_Node_Str").append(args[1]);
      urlBuilder.append("String_Node_Str").append(args[2]).append("String_Node_Str");
      urlBuilder.append(args[0]).append("String_Node_Str").append(state.getFieldValue());
      if (args.length >= 4) {
        urlBuilder.append("String_Node_Str").append(args[3]);
      }
      viewDefinitionState.redirectTo(urlBuilder.toString(),true,false);
    }
 else {
      state.addMessage("String_Node_Str",MessageType.FAILURE);
    }
  }
 else {
    if (state instanceof FormComponent) {
      state.addMessage("String_Node_Str",MessageType.FAILURE);
    }
 else {
      state.addMessage("String_Node_Str",MessageType.FAILURE);
    }
  }
}
Program: 39207
Project: 39207
Buggy source:
@Override public void setCellStyle(final HSSFSheet sheet,HSSFCell cell){
  cell.setCellStyle(getHeaderStyle(sheet.getWorkbook()));
}

Fixed version (ground truth):
@Override public void setCellStyle(final HSSFSheet sheet,final HSSFCell cell){
  cell.setCellStyle(getHeaderStyle(sheet.getWorkbook()));
}
Program: 39208
Project: 39208
Buggy source:
private ReportService.ReportType getReportType(final HttpServletRequest request) throws ReportException {
  String uri=request.getRequestURI();
  String type=uri.substring(uri.lastIndexOf("String_Node_Str") + 1).toUpperCase();
  try {
    return ReportService.ReportType.valueOf(type);
  }
 catch (  IllegalArgumentException e) {
    throw new ReportException(ReportException.Type.WRONG_REPORT_TYPE,e,type);
  }
}

Fixed version (ground truth):
private ReportService.ReportType getReportType(final HttpServletRequest request) throws ReportException {
  String uri=request.getRequestURI();
  String type=uri.substring(uri.lastIndexOf('.') + 1).toUpperCase(Locale.getDefault());
  try {
    return ReportService.ReportType.valueOf(type);
  }
 catch (  IllegalArgumentException e) {
    throw new ReportException(ReportException.Type.WRONG_REPORT_TYPE,e,type);
  }
}
Program: 39209
Project: 39209
Buggy source:
public ReportTemplateModule(final String pluginIdentifier,final String templateName,final Resource templateFile,final ReportTemplateService reportTemplateService){
  this.pluginIdentifier=pluginIdentifier;
  this.templateName=templateName;
  this.templateFile=templateFile;
  this.reportTemplateService=reportTemplateService;
}

Fixed version (ground truth):
public ReportTemplateModule(final String pluginIdentifier,final String templateName,final Resource templateFile,final ReportTemplateService reportTemplateService){
  super();
  this.pluginIdentifier=pluginIdentifier;
  this.templateName=templateName;
  this.templateFile=templateFile;
  this.reportTemplateService=reportTemplateService;
}
Program: 39210
Project: 39210
Buggy source:
private ReportNumberFormat(final Locale locale){
  decimalNumberFormat=NumberFormat.getNumberInstance(locale);
  decimalNumberFormat.setMinimumFractionDigits(5);
  decimalNumberFormat.setMaximumFractionDigits(5);
  integerNumberFormat=NumberFormat.getNumberInstance(locale);
}

Fixed version (ground truth):
private ReportNumberFormat(final Locale locale){
  super();
  decimalNumberFormat=NumberFormat.getNumberInstance(locale);
  decimalNumberFormat.setMinimumFractionDigits(5);
  decimalNumberFormat.setMaximumFractionDigits(5);
  integerNumberFormat=NumberFormat.getNumberInstance(locale);
}
Program: 39211
Project: 39211
Buggy source:
public UserGroupModule(final String name,final String role,final DataDefinitionService dataDefinitionService,final InternalSecurityRolesService securityRolesService){
  this.name=name;
  this.role=role;
  this.dataDefinitionService=dataDefinitionService;
  this.securityRolesService=securityRolesService;
}

Fixed version (ground truth):
public UserGroupModule(final String name,final String role,final DataDefinitionService dataDefinitionService,final InternalSecurityRolesService securityRolesService){
  super();
  this.name=name;
  this.role=role;
  this.dataDefinitionService=dataDefinitionService;
  this.securityRolesService=securityRolesService;
}
Program: 39212
Project: 39212
Buggy source:
public UserModule(final String login,final String email,final String firstName,final String lastName,final String password,final String groupName,final DataDefinitionService dataDefinitionService){
  this.login=login;
  this.email=email;
  this.firstName=firstName;
  this.lastName=lastName;
  this.password=password;
  this.groupName=groupName;
  this.dataDefinitionService=dataDefinitionService;
}

Fixed version (ground truth):
public UserModule(final String login,final String email,final String firstName,final String lastName,final String password,final String groupName,final DataDefinitionService dataDefinitionService){
  super();
  this.login=login;
  this.email=email;
  this.firstName=firstName;
  this.lastName=lastName;
  this.password=password;
  this.groupName=groupName;
  this.dataDefinitionService=dataDefinitionService;
}
Program: 39214
Project: 39214
Buggy source:
public GanttChartScaleImpl(final GanttChartComponentState ganttChartComponentState,final ZoomLevel zoomLevel,final Date dateFrom,final Date dateTo){
  this.ganttChartComponentState=ganttChartComponentState;
  this.zoomLevel=zoomLevel;
  this.dateFrom=dateFrom;
  this.dateTo=new DateTime(dateTo).withHourOfDay(23).withMinuteOfHour(59).withSecondOfMinute(59).toDate();
  this.ganttChartItemFactory=new GanttChartItemFactory(zoomLevel.getHoursInterval());
}

Fixed version (ground truth):
public GanttChartScaleImpl(final GanttChartComponentState ganttChartComponentState,final ZoomLevel zoomLevel,final Date dateFrom,final Date dateTo){
  this.ganttChartComponentState=ganttChartComponentState;
  this.zoomLevel=zoomLevel;
  this.dateFrom=(Date)dateFrom.clone();
  this.dateTo=new DateTime(dateTo).withHourOfDay(23).withMinuteOfHour(59).withSecondOfMinute(59).toDate();
  this.ganttChartItemFactory=new GanttChartItemFactory(zoomLevel.getHoursInterval());
}
Program: 39215
Project: 39215
Buggy source:
public WindowComponentState(final WindowComponentPattern pattern){
  this.pattern=pattern;
  ribbon=pattern.getRibbon().getCopy();
}

Fixed version (ground truth):
public WindowComponentState(final WindowComponentPattern pattern){
  super();
  this.pattern=pattern;
  ribbon=pattern.getRibbon().getCopy();
}
Program: 39216
Project: 39216
Buggy source:
public ViewDefinitionStateImpl(){
  requestRender();
}

Fixed version (ground truth):
public ViewDefinitionStateImpl(){
  super();
  requestRender();
}
Program: 39217
Project: 39217
Buggy source:
@Override @Transactional public void addView(final String pluginIdentifier,final String viewName,final String view,final String url){
  Entity menuView=getView(pluginIdentifier,viewName);
  if (menuView != null) {
    return;
  }
  if (url == null) {
    if (!viewDefinitionService.viewExists(pluginIdentifier,viewName)) {
      throw new IllegalStateException("String_Node_Str" + pluginIdentifier + "String_Node_Str"+ view+ "String_Node_Str");
    }
  }
  menuView=getDataDefinition(VIEW).create();
  menuView.setField(PLUGIN_IDENTIFIER,pluginIdentifier);
  menuView.setField(NAME,viewName);
  menuView.setField(URL,url);
  menuView.setField(VIEW,view);
  getDataDefinition(VIEW).save(menuView);
}

Fixed version (ground truth):
@Override @Transactional public void addView(final String pluginIdentifier,final String viewName,final String view,final String url){
  Entity menuView=getView(pluginIdentifier,viewName);
  if (menuView != null) {
    return;
  }
  if ((url == null) && !viewDefinitionService.viewExists(pluginIdentifier,viewName)) {
    throw new IllegalStateException("String_Node_Str" + pluginIdentifier + "String_Node_Str"+ view+ "String_Node_Str");
  }
  menuView=getDataDefinition(VIEW).create();
  menuView.setField(PLUGIN_IDENTIFIER,pluginIdentifier);
  menuView.setField(NAME,viewName);
  menuView.setField(URL,url);
  menuView.setField(VIEW,view);
  getDataDefinition(VIEW).save(menuView);
}
Program: 39218
Project: 39218
Buggy source:
public MenuCategoryModule(final InternalMenuService menuService,final String pluginIdentifier,final String menuCategoryName){
  this.menuService=menuService;
  this.pluginIdentifier=pluginIdentifier;
  this.menuCategoryName=menuCategoryName;
}

Fixed version (ground truth):
public MenuCategoryModule(final InternalMenuService menuService,final String pluginIdentifier,final String menuCategoryName){
  super();
  this.menuService=menuService;
  this.pluginIdentifier=pluginIdentifier;
  this.menuCategoryName=menuCategoryName;
}
Program: 39219
Project: 39219
Buggy source:
public MenuModule(final String factoryIdentifier,final InternalMenuService menuService,final String pluginIdentifier,final String menuName,final String menuCategory,final String menuViewPluginIdentifier,final String menuViewName,final String menuUrl){
  this.factoryIdentifier=factoryIdentifier;
  this.menuService=menuService;
  this.pluginIdentifier=pluginIdentifier;
  this.menuName=menuName;
  this.menuCategory=menuCategory;
  this.menuViewPluginIdentifier=menuViewPluginIdentifier;
  this.menuViewName=menuViewName;
  this.menuUrl=menuUrl;
}

Fixed version (ground truth):
public MenuModule(final String factoryIdentifier,final InternalMenuService menuService,final String pluginIdentifier,final String menuName,final String menuCategory,final String menuViewPluginIdentifier,final String menuViewName,final String menuUrl){
  super();
  this.factoryIdentifier=factoryIdentifier;
  this.menuService=menuService;
  this.pluginIdentifier=pluginIdentifier;
  this.menuName=menuName;
  this.menuCategory=menuCategory;
  this.menuViewPluginIdentifier=menuViewPluginIdentifier;
  this.menuViewName=menuViewName;
  this.menuUrl=menuUrl;
}
Program: 39220
Project: 39220
Buggy source:
public ViewHookModule(final String pluginIdentifier,final InternalViewDefinitionService viewDefinitionService,final String extendsViewPlugin,final String extendsViewName,final InternalViewDefinition.HookType hookType,final HookDefinition hook){
  this.pluginIdentifier=pluginIdentifier;
  this.viewDefinitionService=viewDefinitionService;
  this.extendsViewPlugin=extendsViewPlugin;
  this.extendsViewName=extendsViewName;
  this.hookType=hookType;
  this.hook=hook;
}

Fixed version (ground truth):
public ViewHookModule(final String pluginIdentifier,final InternalViewDefinitionService viewDefinitionService,final String extendsViewPlugin,final String extendsViewName,final InternalViewDefinition.HookType hookType,final HookDefinition hook){
  super();
  this.pluginIdentifier=pluginIdentifier;
  this.viewDefinitionService=viewDefinitionService;
  this.extendsViewPlugin=extendsViewPlugin;
  this.extendsViewName=extendsViewName;
  this.hookType=hookType;
  this.hook=hook;
}
Program: 39221
Project: 39221
Buggy source:
public ViewListenerModule(final String pluginIdentifier,final InternalViewDefinitionService viewDefinitionService,final String extendsViewPlugin,final String extendsViewName,final String extendsComponentName,final ComponentCustomEvent event){
  this.pluginIdentifier=pluginIdentifier;
  this.viewDefinitionService=viewDefinitionService;
  this.extendsViewPlugin=extendsViewPlugin;
  this.extendsViewName=extendsViewName;
  this.extendsComponentName=extendsComponentName;
  this.event=event;
}

Fixed version (ground truth):
public ViewListenerModule(final String pluginIdentifier,final InternalViewDefinitionService viewDefinitionService,final String extendsViewPlugin,final String extendsViewName,final String extendsComponentName,final ComponentCustomEvent event){
  super();
  this.pluginIdentifier=pluginIdentifier;
  this.viewDefinitionService=viewDefinitionService;
  this.extendsViewPlugin=extendsViewPlugin;
  this.extendsViewName=extendsViewName;
  this.extendsComponentName=extendsComponentName;
  this.event=event;
}
Program: 39222
Project: 39222
Buggy source:
public ViewModule(final String pluginIdentifier,final Resource xmlFile,final ViewDefinitionParser viewDefinitionParser,final InternalViewDefinitionService viewDefinitionService){
  this.pluginIdentifier=pluginIdentifier;
  this.xmlFile=xmlFile;
  this.viewDefinitionParser=viewDefinitionParser;
  this.viewDefinitionService=viewDefinitionService;
}

Fixed version (ground truth):
public ViewModule(final String pluginIdentifier,final Resource xmlFile,final ViewDefinitionParser viewDefinitionParser,final InternalViewDefinitionService viewDefinitionService){
  super();
  this.pluginIdentifier=pluginIdentifier;
  this.xmlFile=xmlFile;
  this.viewDefinitionParser=viewDefinitionParser;
  this.viewDefinitionService=viewDefinitionService;
}
Program: 39223
Project: 39223
Buggy source:
public ViewRibbonModule(final String pluginIdentifier,final Resource xmlFile,final InternalViewDefinitionService viewDefinitionService,final ViewDefinitionParser viewDefinitionParser){
  this.pluginIdentifier=pluginIdentifier;
  this.viewDefinitionService=viewDefinitionService;
  this.viewDefinitionParser=viewDefinitionParser;
  fileName=xmlFile.getFilename();
  try {
    viewExtension=viewDefinitionParser.getViewExtensionNode(xmlFile.getInputStream(),"String_Node_Str");
  }
 catch (  IOException e) {
    throw ViewDefinitionParserException.forFile(fileName,e);
  }
catch (  ViewDefinitionParserNodeException e) {
    throw ViewDefinitionParserException.forFileAndNode(fileName,e);
  }
}

Fixed version (ground truth):
public ViewRibbonModule(final String pluginIdentifier,final Resource xmlFile,final InternalViewDefinitionService viewDefinitionService,final ViewDefinitionParser viewDefinitionParser){
  super();
  this.pluginIdentifier=pluginIdentifier;
  this.viewDefinitionService=viewDefinitionService;
  this.viewDefinitionParser=viewDefinitionParser;
  fileName=xmlFile.getFilename();
  try {
    viewExtension=viewDefinitionParser.getViewExtensionNode(xmlFile.getInputStream(),"String_Node_Str");
  }
 catch (  IOException e) {
    throw ViewDefinitionParserException.forFile(fileName,e);
  }
catch (  ViewDefinitionParserNodeException e) {
    throw ViewDefinitionParserException.forFileAndNode(fileName,e);
  }
}
Program: 39224
Project: 39224
Buggy source:
public ViewTabModule(final String pluginIdentifier,final Resource xmlFile,final InternalViewDefinitionService viewDefinitionService,final ViewDefinitionParser viewDefinitionParser){
  this.pluginIdentifier=pluginIdentifier;
  this.viewDefinitionService=viewDefinitionService;
  this.viewDefinitionParser=viewDefinitionParser;
  fileName=xmlFile.getFilename();
  try {
    viewExtension=viewDefinitionParser.getViewExtensionNode(xmlFile.getInputStream(),"String_Node_Str");
  }
 catch (  IOException e) {
    throw ViewDefinitionParserException.forFile(fileName,e);
  }
catch (  ViewDefinitionParserNodeException e) {
    throw ViewDefinitionParserException.forFileAndNode(fileName,e);
  }
}

Fixed version (ground truth):
public ViewTabModule(final String pluginIdentifier,final Resource xmlFile,final InternalViewDefinitionService viewDefinitionService,final ViewDefinitionParser viewDefinitionParser){
  super();
  this.pluginIdentifier=pluginIdentifier;
  this.viewDefinitionService=viewDefinitionService;
  this.viewDefinitionParser=viewDefinitionParser;
  fileName=xmlFile.getFilename();
  try {
    viewExtension=viewDefinitionParser.getViewExtensionNode(xmlFile.getInputStream(),"String_Node_Str");
  }
 catch (  IOException e) {
    throw ViewDefinitionParserException.forFile(fileName,e);
  }
catch (  ViewDefinitionParserNodeException e) {
    throw ViewDefinitionParserException.forFileAndNode(fileName,e);
  }
}
Program: 39225
Project: 39225
Buggy source:
public ViewGridColumnModule(final String pluginIdentifier,final String extendsViewPlugin,final String extendsViewName,final String extendsComponentName,final List<ViewGridColumnModuleColumnModel> columns,final InternalViewDefinitionService viewDefinitionService){
  this.pluginIdentifier=pluginIdentifier;
  this.extendsViewPlugin=extendsViewPlugin;
  this.extendsViewName=extendsViewName;
  this.extendsComponentName=extendsComponentName;
  this.columns=columns;
  this.viewDefinitionService=viewDefinitionService;
}

Fixed version (ground truth):
public ViewGridColumnModule(final String pluginIdentifier,final String extendsViewPlugin,final String extendsViewName,final String extendsComponentName,final List<ViewGridColumnModuleColumnModel> columns,final InternalViewDefinitionService viewDefinitionService){
  super();
  this.pluginIdentifier=pluginIdentifier;
  this.extendsViewPlugin=extendsViewPlugin;
  this.extendsViewName=extendsViewName;
  this.extendsComponentName=extendsComponentName;
  this.columns=columns;
  this.viewDefinitionService=viewDefinitionService;
}
Program: 39226
Project: 39226
Buggy source:
public ResourceModule(final ResourceService resourceService){
  this.resourceService=resourceService;
}

Fixed version (ground truth):
public ResourceModule(final ResourceService resourceService){
  super();
  this.resourceService=resourceService;
}
Program: 39227
Project: 39227
Buggy source:
public RibbonTemplateExtensionModule(final String pluginIdentifier,final Resource xmlFile,final ViewDefinitionParser parser,final RibbonTemplatesService ribbonTemplatesService){
  fileName=xmlFile.getFilename();
  this.ribbonTemplatesService=ribbonTemplatesService;
  try {
    Node root=parser.getRootOfXmlDocument(xmlFile);
    parser.checkState("String_Node_Str".equals(root.getNodeName()),root,"String_Node_Str" + root.getNodeName() + "String_Node_Str");
    templatePlugin=parser.getStringAttribute(root,"String_Node_Str");
    templateName=parser.getStringAttribute(root,"String_Node_Str");
    parser.checkState(templateName != null,root,"String_Node_Str");
    for (    Node groupNode : parser.geElementChildren(root)) {
      String groupName=parser.getStringAttribute(groupNode,"String_Node_Str");
      String groupCondition=parser.getStringAttribute(groupNode,"String_Node_Str");
      parser.checkState(groupName != null,groupNode,"String_Node_Str");
      TemplateRibbonGroup templateGroup=new TemplateRibbonGroup(groupName,pluginIdentifier,groupCondition);
      for (      Node itemNode : parser.geElementChildren(groupNode)) {
        templateGroup.addActionItem(parser.parseRibbonItem(itemNode,null));
      }
      extensionGroups.add(templateGroup);
    }
  }
 catch (  ViewDefinitionParserNodeException e) {
    throw ViewDefinitionParserException.forFileAndNode(fileName,e);
  }
catch (  Exception e) {
    throw ViewDefinitionParserException.forFile(fileName,e);
  }
}

Fixed version (ground truth):
public RibbonTemplateExtensionModule(final String pluginIdentifier,final Resource xmlFile,final ViewDefinitionParser parser,final RibbonTemplatesService ribbonTemplatesService){
  super();
  fileName=xmlFile.getFilename();
  this.ribbonTemplatesService=ribbonTemplatesService;
  try {
    Node root=parser.getRootOfXmlDocument(xmlFile);
    parser.checkState("String_Node_Str".equals(root.getNodeName()),root,"String_Node_Str" + root.getNodeName() + "String_Node_Str");
    templatePlugin=parser.getStringAttribute(root,"String_Node_Str");
    templateName=parser.getStringAttribute(root,"String_Node_Str");
    parser.checkState(templateName != null,root,"String_Node_Str");
    for (    Node groupNode : parser.geElementChildren(root)) {
      String groupName=parser.getStringAttribute(groupNode,"String_Node_Str");
      String groupCondition=parser.getStringAttribute(groupNode,"String_Node_Str");
      parser.checkState(groupName != null,groupNode,"String_Node_Str");
      TemplateRibbonGroup templateGroup=new TemplateRibbonGroup(groupName,pluginIdentifier,groupCondition);
      for (      Node itemNode : parser.geElementChildren(groupNode)) {
        templateGroup.addActionItem(parser.parseRibbonItem(itemNode,null));
      }
      extensionGroups.add(templateGroup);
    }
  }
 catch (  ViewDefinitionParserNodeException e) {
    throw ViewDefinitionParserException.forFileAndNode(fileName,e);
  }
catch (  Exception e) {
    throw ViewDefinitionParserException.forFile(fileName,e);
  }
}
Program: 39228
Project: 39228
Buggy source:
public RibbonTemplateModule(final String pluginIdentifier,final Resource xmlFile,final ViewDefinitionParser parser,final RibbonTemplatesService ribbonTemplatesService){
  this.ribbonTemplatesService=ribbonTemplatesService;
  String fileName=xmlFile.getFilename();
  try {
    Node root=parser.getRootOfXmlDocument(xmlFile);
    parser.checkState("String_Node_Str".equals(root.getNodeName()),root,"String_Node_Str" + root.getNodeName() + "String_Node_Str");
    String templateName=parser.getStringAttribute(root,"String_Node_Str");
    parser.checkState(templateName != null,root,"String_Node_Str");
    template=new RibbonTemplate(pluginIdentifier,templateName);
    for (    Node groupNode : parser.geElementChildren(root)) {
      String groupName=parser.getStringAttribute(groupNode,"String_Node_Str");
      String groupCondition=parser.getStringAttribute(groupNode,"String_Node_Str");
      parser.checkState(groupName != null,groupNode,"String_Node_Str");
      TemplateRibbonGroup templateGroup=new TemplateRibbonGroup(groupName,pluginIdentifier,groupCondition);
      for (      Node itemNode : parser.geElementChildren(groupNode)) {
        templateGroup.addActionItem(parser.parseRibbonItem(itemNode,null));
      }
      template.addTemplateGroup(templateGroup);
    }
  }
 catch (  ViewDefinitionParserNodeException e) {
    throw ViewDefinitionParserException.forFileAndNode(fileName,e);
  }
catch (  Exception e) {
    throw ViewDefinitionParserException.forFile(fileName,e);
  }
}

Fixed version (ground truth):
public RibbonTemplateModule(final String pluginIdentifier,final Resource xmlFile,final ViewDefinitionParser parser,final RibbonTemplatesService ribbonTemplatesService){
  super();
  fileName=xmlFile.getFilename();
  this.ribbonTemplatesService=ribbonTemplatesService;
  try {
    Node root=parser.getRootOfXmlDocument(xmlFile);
    parser.checkState("String_Node_Str".equals(root.getNodeName()),root,"String_Node_Str" + root.getNodeName() + "String_Node_Str");
    String templateName=parser.getStringAttribute(root,"String_Node_Str");
    parser.checkState(templateName != null,root,"String_Node_Str");
    template=new RibbonTemplate(pluginIdentifier,templateName);
    for (    Node groupNode : parser.geElementChildren(root)) {
      String groupName=parser.getStringAttribute(groupNode,"String_Node_Str");
      String groupCondition=parser.getStringAttribute(groupNode,"String_Node_Str");
      parser.checkState(groupName != null,groupNode,"String_Node_Str");
      TemplateRibbonGroup templateGroup=new TemplateRibbonGroup(groupName,pluginIdentifier,groupCondition);
      for (      Node itemNode : parser.geElementChildren(groupNode)) {
        templateGroup.addActionItem(parser.parseRibbonItem(itemNode,null));
      }
      template.addTemplateGroup(templateGroup);
    }
  }
 catch (  ViewDefinitionParserNodeException e) {
    throw ViewDefinitionParserException.forFileAndNode(fileName,e);
  }
catch (  Exception e) {
    throw ViewDefinitionParserException.forFile(fileName,e);
  }
}
Program: 39229
Project: 39229
Buggy source:
/** 
 * Returns entity with is selected in lookup
 * @return entity with is selected in lookup
 */
public Entity getEntity();

Fixed version (ground truth):
/** 
 * Returns entity with is selected in lookup
 * @return entity with is selected in lookup
 */
Entity getEntity();
Program: 39230
Project: 39230
Buggy source:
public final String getUrl(){
  return url;
}

Fixed version (ground truth):
public String getUrl(){
  return url;
}
Program: 39231
Project: 39231
Buggy source:
public final String getCorrespondingComponent(){
  return correspondingComponent;
}

Fixed version (ground truth):
public String getCorrespondingComponent(){
  return correspondingComponent;
}
Program: 39232
Project: 39232
Buggy source:
public final String getCorrespondingView(){
  return correspondingView;
}

Fixed version (ground truth):
public String getCorrespondingView(){
  return correspondingView;
}
Program: 39233
Project: 39233
Buggy source:
public final boolean isCorrespondingViewInModal(){
  return correspondingViewInModal;
}

Fixed version (ground truth):
public boolean isCorrespondingViewInModal(){
  return correspondingViewInModal;
}
Program: 39237
Project: 39237
Buggy source:
@Override public BigDecimal getDecimalField(final String fieldName){
  Object fieldValue=getField(fieldName);
  if (fieldValue == null) {
    return null;
  }
  if (fieldValue instanceof BigDecimal) {
    return (BigDecimal)fieldValue;
  }
  throw new IllegalArgumentException("String_Node_Str" + fieldName + "String_Node_Str"+ dataDefinition.getPluginIdentifier()+ '.'+ dataDefinition.getName()+ "String_Node_Str");
}

Fixed version (ground truth):
@Override public BigDecimal getDecimalField(final String fieldName){
  final Object fieldValue=getField(fieldName);
  if (fieldValue == null) {
    return null;
  }
  if (fieldValue instanceof BigDecimal) {
    return (BigDecimal)fieldValue;
  }
  final FieldDefinition fieldDefinition=dataDefinition.getField(fieldName);
  if (fieldValue instanceof String && BigDecimal.class.equals(fieldDefinition.getType().getType())) {
    if (StringUtils.isBlank((String)fieldValue)) {
      return null;
    }
    final ValueAndError valueAndError=fieldDefinition.getType().toObject(fieldDefinition,fieldValue);
    if (valueAndError.isValid()) {
      return (BigDecimal)valueAndError.getValue();
    }
  }
  throw new IllegalArgumentException("String_Node_Str" + fieldName + "String_Node_Str"+ dataDefinition.getPluginIdentifier()+ '.'+ dataDefinition.getName()+ "String_Node_Str");
}
Program: 39238
Project: 39238
Buggy source:
@Before public final void init(){
  belongsToFieldDefinition=mock(FieldDefinition.class);
  BelongsToType belongsToType=mock(BelongsToType.class);
  when(belongsToFieldDefinition.getType()).thenReturn(belongsToType);
  belongsToFieldDataDefinition=mock(DataDefinition.class);
  when(belongsToFieldDefinition.getDataDefinition()).thenReturn(belongsToFieldDataDefinition);
  FieldDefinition stringFieldDefinition=mock(FieldDefinition.class);
  when(stringFieldDefinition.isPersistent()).thenReturn(false);
  dataDefinition=mock(DataDefinition.class);
  FieldDefinition booleanFieldDefinition=mock(FieldDefinition.class);
  defaultEntity=new DefaultEntity(dataDefinition);
  Map<String,FieldDefinition> fieldsMap=Maps.newHashMap();
  fieldsMap.put(BELONGS_TO_FIELD_NAME,belongsToFieldDefinition);
  fieldsMap.put(STRING_FIELD_NAME,stringFieldDefinition);
  fieldsMap.put(BOOLEAN_FIELD_NAME,booleanFieldDefinition);
  for (  Map.Entry<String,FieldDefinition> fieldEntry : fieldsMap.entrySet()) {
    when(dataDefinition.getField(fieldEntry.getKey())).thenReturn(fieldEntry.getValue());
  }
  when(dataDefinition.getFields()).thenReturn(fieldsMap);
}

Fixed version (ground truth):
@Before public final void init(){
  belongsToFieldDefinition=mock(FieldDefinition.class);
  BelongsToType belongsToType=mock(BelongsToType.class);
  when(belongsToFieldDefinition.getType()).thenReturn(belongsToType);
  belongsToFieldDataDefinition=mock(DataDefinition.class);
  when(belongsToFieldDefinition.getDataDefinition()).thenReturn(belongsToFieldDataDefinition);
  decimalFieldDefinition=mock(FieldDefinition.class);
  final DecimalType decimalType=new DecimalType();
  when(decimalFieldDefinition.getType()).thenReturn(decimalType);
  FieldDefinition stringFieldDefinition=mock(FieldDefinition.class);
  when(stringFieldDefinition.isPersistent()).thenReturn(false);
  dataDefinition=mock(DataDefinition.class);
  FieldDefinition booleanFieldDefinition=mock(FieldDefinition.class);
  defaultEntity=new DefaultEntity(dataDefinition);
  Map<String,FieldDefinition> fieldsMap=Maps.newHashMap();
  fieldsMap.put(BELONGS_TO_FIELD_NAME,belongsToFieldDefinition);
  fieldsMap.put(STRING_FIELD_NAME,stringFieldDefinition);
  fieldsMap.put(BOOLEAN_FIELD_NAME,booleanFieldDefinition);
  fieldsMap.put(DECIMAL_FIELD_NAME,decimalFieldDefinition);
  for (  Map.Entry<String,FieldDefinition> fieldEntry : fieldsMap.entrySet()) {
    when(dataDefinition.getField(fieldEntry.getKey())).thenReturn(fieldEntry.getValue());
  }
  when(dataDefinition.getFields()).thenReturn(fieldsMap);
}
Program: 39239
Project: 39239
Buggy source:
@Test public final void shouldReturnBigDecimalValue() throws Exception {
  BigDecimal decimal=BigDecimal.ZERO;
  final String decimalFieldName="String_Node_Str";
  defaultEntity.setField(decimalFieldName,decimal);
  BigDecimal result=defaultEntity.getDecimalField(decimalFieldName);
  Assert.assertNotNull(result);
  Assert.assertEquals(decimal,result);
}

Fixed version (ground truth):
@Test public final void shouldReturnBigDecimalValue() throws Exception {
  BigDecimal decimal=BigDecimal.ZERO;
  defaultEntity.setField(DECIMAL_FIELD_NAME,decimal);
  BigDecimal result=defaultEntity.getDecimalField(DECIMAL_FIELD_NAME);
  Assert.assertNotNull(result);
  Assert.assertEquals(decimal,result);
}
Program: 39240
Project: 39240
Buggy source:
@Override public DefaultEntity copy(final Entity performerEntity){
  DefaultEntity entity=new DefaultEntity(dataDefinition,id);
  for (  Map.Entry<String,Object> field : fields.entrySet()) {
    Object fieldValueCopy=null;
    if (field.getValue() instanceof Entity) {
      fieldValueCopy=copyFieldEntityValue(performerEntity,(Entity)field.getValue());
    }
 else {
      fieldValueCopy=field.getValue();
    }
    entity.setField(field.getKey(),fieldValueCopy);
  }
  return entity;
}

Fixed version (ground truth):
@Override public DefaultEntity copy(final PerformerEntitiesChain performersChain){
  DefaultEntity entity=new DefaultEntity(dataDefinition,id);
  for (  Map.Entry<String,Object> field : fields.entrySet()) {
    Object fieldValueCopy=null;
    if (field.getValue() instanceof Entity) {
      fieldValueCopy=copyFieldEntityValue(performersChain,(Entity)field.getValue());
    }
 else {
      fieldValueCopy=field.getValue();
    }
    entity.setField(field.getKey(),fieldValueCopy);
  }
  return entity;
}