nus-yam/ex-repair huggingface dataset:
Program: 59360
Project: 59360
Buggy source:
protected GMConnectionPool(Factory factory,GMConnectionPoolConfig config,CommandSelector commandSelector){
  super(factory,notNull(config));
  factory.pool=this;
  evictAfterNumberOfUse=config.getEvictAfterNumberOfUse();
  notNull(commandSelector).setGmPath(config.getGMPath());
  this.gmCommand=commandSelector.gmCommand();
}

Fixed version (ground truth):
private GMConnectionPool(Factory factory,GMConnectionPoolConfig config){
  super(factory,getParentConfig(config));
  factory.pool=this;
  evictAfterNumberOfUse=config.getEvictAfterNumberOfUse();
  this.builder=GMProcessFactoryImpl.BUILDER;
  gmFactory=builder.buildFactory(config.getGMPath());
}
Program: 59361
Project: 59361
Buggy source:
/** 
 * Gets the path to GraphicsMagick executable set by   {@link #setGMPath(String)} or{@link GMConnectionPoolConfig#DEFAULT_GM_PATH} if it was not explicitly set.
 * @return the path to GraphicsMagick executable
 */
public String getGMPath(){
  return gmCommand[0];
}

Fixed version (ground truth):
/** 
 * Gets the path to GraphicsMagick executable set by   {@link #setGMPath(String)} or{@link GMConnectionPoolConfig#DEFAULT_GM_PATH} if it was not explicitly set.
 * @return the path to GraphicsMagick executable
 */
public String getGMPath(){
  return gmFactory.getGMPath();
}
Program: 59362
Project: 59362
Buggy source:
/** 
 * Sets the path to GraphicsMagick executable.
 * @param gmPath the path to GraphicsMagick executable
 */
public void setGMPath(@Nonnull String gmPath){
  if (gmPath == null)   throw new NullPointerException("String_Node_Str");
  gmCommand[0]=gmPath;
}

Fixed version (ground truth):
/** 
 * Sets the path to GraphicsMagick executable.
 * @param gmPath the path to GraphicsMagick executable
 */
public void setGMPath(@Nonnull String gmPath){
  if (gmPath == null)   throw new NullPointerException("String_Node_Str");
  gmFactory=builder.buildFactory(gmPath);
}
Program: 59364
Project: 59364
Buggy source:
@Override public void initialize(Bootstrap<JaxWsExampleApplicationConfiguration> bootstrap){
  bootstrap.addBundle(hibernate);
  bootstrap.addBundle(jaxWsBundle);
}

Fixed version (ground truth):
@Override public void initialize(Bootstrap<JaxWsExampleApplicationConfiguration> bootstrap){
  bootstrap.addBundle(hibernate);
  bootstrap.addBundle(jaxWsBundle);
  bootstrap.addBundle(anotherJaxWsBundle);
}
Program: 59365
Project: 59365
Buggy source:
/** 
 * Implements com.yammer.dropwizard.Bundle#run()
 */
@Override public void run(Environment environment){
  checkArgument(environment != null,"String_Node_Str");
  environment.servlets().addServlet("String_Node_Str",jaxwsEnvironment.buildServlet()).addMapping(servletPath);
  environment.lifecycle().addServerLifecycleListener(new ServerLifecycleListener(){
    @Override public void serverStarted(    Server server){
      jaxwsEnvironment.logEndpoints();
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Implements com.yammer.dropwizard.Bundle#run()
 */
@Override public void run(Environment environment){
  checkArgument(environment != null,"String_Node_Str");
  environment.servlets().addServlet("String_Node_Str" + jaxwsEnvironment.getDefaultPath(),jaxwsEnvironment.buildServlet()).addMapping(servletPath);
  environment.lifecycle().addServerLifecycleListener(new ServerLifecycleListener(){
    @Override public void serverStarted(    Server server){
      jaxwsEnvironment.logEndpoints();
    }
  }
);
}
Program: 59367
Project: 59367
Buggy source:
public void logEndpoints(){
  ServerRegistry sr=bus.getExtension(org.apache.cxf.endpoint.ServerRegistry.class);
  if (sr.getServers().size() > 0) {
    String endpoints="String_Node_Str";
    for (    Server s : sr.getServers()) {
      endpoints+="String_Node_Str" + this.defaultPath + s.getEndpoint().getEndpointInfo().getAddress()+ "String_Node_Str"+ s.getEndpoint().getEndpointInfo().getInterface().getName()+ "String_Node_Str";
    }
    log.info("String_Node_Str" + endpoints);
  }
 else {
    log.info("String_Node_Str");
  }
}

Fixed version (ground truth):
public void logEndpoints(){
  ServerRegistry sr=bus.getExtension(org.apache.cxf.endpoint.ServerRegistry.class);
  if (sr.getServers().size() > 0) {
    String endpoints="String_Node_Str";
    for (    Server s : sr.getServers()) {
      endpoints+="String_Node_Str" + this.defaultPath + s.getEndpoint().getEndpointInfo().getAddress()+ "String_Node_Str"+ s.getEndpoint().getEndpointInfo().getInterface().getName()+ "String_Node_Str";
    }
    log.info("String_Node_Str" + this.defaultPath + "String_Node_Str"+ endpoints);
  }
 else {
    log.info("String_Node_Str");
  }
}
Program: 59368
Project: 59368
Buggy source:
@Test public void initializeAndRun(){
  JAXWSBundle jaxwsBundle=new JAXWSBundle("String_Node_Str",jaxwsEnvironment);
  try {
    jaxwsBundle.run(null);
  }
 catch (  Exception e) {
    assertThat(e,is(instanceOf(IllegalArgumentException.class)));
  }
  jaxwsBundle.initialize(bootstrap);
  verify(jaxwsEnvironment).setInstrumentedInvokerBuilder(any(InstrumentedInvokerFactory.class));
  jaxwsBundle.run(environment);
  verify(servletEnvironment).addServlet(eq("String_Node_Str"),any(Servlet.class));
  verify(lifecycleEnvironment).addServerLifecycleListener(any(ServerLifecycleListener.class));
  verify(servlet).addMapping("String_Node_Str");
}

Fixed version (ground truth):
@Test public void initializeAndRun(){
  JAXWSBundle jaxwsBundle=new JAXWSBundle("String_Node_Str",jaxwsEnvironment);
  try {
    jaxwsBundle.run(null);
  }
 catch (  Exception e) {
    assertThat(e,is(instanceOf(IllegalArgumentException.class)));
  }
  jaxwsBundle.initialize(bootstrap);
  verify(jaxwsEnvironment).setInstrumentedInvokerBuilder(any(InstrumentedInvokerFactory.class));
  jaxwsBundle.run(environment);
  verify(servletEnvironment).addServlet(startsWith("String_Node_Str"),any(Servlet.class));
  verify(lifecycleEnvironment).addServerLifecycleListener(any(ServerLifecycleListener.class));
  verify(servlet).addMapping("String_Node_Str");
}
Program: 59369
Project: 59369
Buggy source:
/** 
 * {@inheritDoc}<p/> Updates the view related to the Controller specified in the given meta-data identification string. <p/> Note the meta-data item neither contains nor composes details of the related Java type because it doesn't create any ITD.
 */
public MetadataItem get(final String jqueryJspMetadataId){
  final JavaType controller=JQueryJspMetadata.getJavaType(jqueryJspMetadataId);
  final String jqueryMetadataKey=JQueryMetadata.createIdentifier(controller,JQueryJspMetadata.getPath(jqueryJspMetadataId));
  final JQueryMetadata jqueryMetadata=(JQueryMetadata)getMetadataService().get(jqueryMetadataKey);
  if (jqueryMetadata != null && jqueryMetadata.isValid()) {
    getOperations().updateCrudJsp(controller,jqueryMetadata);
  }
 else {
    return null;
  }
  final String finderMetadataKey=WebFinderMetadata.createIdentifier(controller,JQueryJspMetadata.getPath(jqueryJspMetadataId));
  final WebFinderMetadata finderMetadata=(WebFinderMetadata)getMetadataService().get(finderMetadataKey);
  if (finderMetadata != null) {
    if (finderMetadata.isValid()) {
      getOperations().updateFindJsp(controller,finderMetadata);
    }
 else {
      return null;
    }
  }
  return new JQueryJspMetadata(jqueryJspMetadataId,jqueryMetadata);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}<p/> Updates the view related to the Controller specified in the given meta-data identification string. <p/> Note the meta-data item neither contains nor composes details of the related Java type because it doesn't create any ITD.
 */
public MetadataItem get(final String jqueryJspMetadataId){
  final JavaType controller=JQueryJspMetadata.getJavaType(jqueryJspMetadataId);
  final String jqueryMetadataKey=JQueryMetadata.createIdentifier(controller,JQueryJspMetadata.getPath(jqueryJspMetadataId));
  final JQueryMetadata jqueryMetadata=(JQueryMetadata)getMetadataService().get(jqueryMetadataKey);
  if (jqueryMetadata != null && jqueryMetadata.isValid()) {
    getOperations().updateCrudJsp(controller,jqueryMetadata);
  }
 else {
    return null;
  }
  final String finderMetadataKey=WebFinderMetadata.createIdentifier(controller,JQueryJspMetadata.getPath(jqueryJspMetadataId));
  final WebFinderMetadata finderMetadata=(WebFinderMetadata)getMetadataService().get(finderMetadataKey);
  if (finderMetadata != null) {
    if (finderMetadata.isValid()) {
      getFileManager().commit();
      getOperations().updateFindJsp(controller,finderMetadata);
    }
 else {
      return null;
    }
  }
  return new JQueryJspMetadata(jqueryJspMetadataId,jqueryMetadata);
}
Program: 59370
Project: 59370
Buggy source:
/** 
 * Registers the dependency between upstream   {@link JQueryMetadata}, upstream   {@link WebFinderMetadata} and this meta-data as downstream.<p/> Registers this listener to be invoked when implementation of {@link JQueryMetadata} or {@link WebFinderMetadata} (both acts as sourcemeta-data) identification has requested to notify a particular destination meta-data identification of an event. Note this class listens for  {@link JQueryJspMetadata} destination meta-data only.
 * @param context
 */
protected void activate(final ComponentContext cContext){
  context=cContext.getBundleContext();
  getMetadataDependencyRegistry().registerDependency(JQueryMetadata.getMetadataIdentiferType(),JQueryJspMetadata.getMetadataIdentiferType());
  getMetadataDependencyRegistry().registerDependency(WebFinderMetadata.getMetadataIdentiferType(),JQueryJspMetadata.getMetadataIdentiferType());
  getMetadataDependencyRegistry().addNotificationListener(this);
}

Fixed version (ground truth):
/** 
 * Registers the dependency between upstream   {@link JQueryMetadata}, upstream   {@link WebFinderMetadata} and this meta-data as downstream.<p/> Registers this listener to be invoked when implementation of {@link JQueryMetadata} or {@link WebFinderMetadata} (both acts as sourcemeta-data) identification has requested to notify a particular destination meta-data identification of an event. Note this class listens for  {@link JQueryJspMetadata} destination meta-data only.
 * @param context
 */
protected void activate(final ComponentContext cContext){
  context=cContext.getBundleContext();
  getMetadataDependencyRegistry().registerDependency(JQueryMetadata.getMetadataIdentiferType(),JQueryJspMetadata.getMetadataIdentiferType());
  getMetadataDependencyRegistry().registerDependency(WebFinderMetadata.getMetadataIdentiferType(),JQueryJspMetadata.getMetadataIdentiferType());
  getMetadataDependencyRegistry().registerDependency(WebScaffoldMetadata.getMetadataIdentiferType(),JQueryJspMetadata.getMetadataIdentiferType());
  getMetadataDependencyRegistry().addNotificationListener(this);
}
Program: 59371
Project: 59371
Buggy source:
public void notify(final String upstreamDependency,String downstreamDependency){
  if (MetadataIdentificationUtils.isIdentifyingClass(downstreamDependency)) {
    if (JQueryMetadata.isValid(upstreamDependency)) {
      final JavaType controller=JQueryMetadata.getJavaType(upstreamDependency);
      final LogicalPath path=JQueryMetadata.getPath(upstreamDependency);
      downstreamDependency=JQueryJspMetadata.createIdentifier(controller,path);
    }
 else     if (WebFinderMetadata.isValid(upstreamDependency)) {
      final JavaType controller=WebFinderMetadata.getJavaType(upstreamDependency);
      final LogicalPath path=WebFinderMetadata.getPath(upstreamDependency);
      downstreamDependency=JQueryJspMetadata.createIdentifier(controller,path);
    }
 else {
      return;
    }
    if (getMetadataDependencyRegistry().getDownstream(upstreamDependency).contains(downstreamDependency)) {
      return;
    }
    getMetadataService().evictAndGet(downstreamDependency);
  }
}

Fixed version (ground truth):
public void notify(final String upstreamDependency,String downstreamDependency){
  getJspMetadataListener().notify(upstreamDependency,downstreamDependency);
  if (MetadataIdentificationUtils.isIdentifyingClass(downstreamDependency)) {
    if (JQueryMetadata.isValid(upstreamDependency)) {
      final JavaType controller=JQueryMetadata.getJavaType(upstreamDependency);
      final LogicalPath path=JQueryMetadata.getPath(upstreamDependency);
      downstreamDependency=JQueryJspMetadata.createIdentifier(controller,path);
    }
 else     if (WebFinderMetadata.isValid(upstreamDependency)) {
      final JavaType controller=WebFinderMetadata.getJavaType(upstreamDependency);
      final LogicalPath path=WebFinderMetadata.getPath(upstreamDependency);
      downstreamDependency=JQueryJspMetadata.createIdentifier(controller,path);
    }
 else     if (WebScaffoldMetadata.isValid(upstreamDependency)) {
      final JavaType controller=WebScaffoldMetadata.getJavaType(upstreamDependency);
      final LogicalPath path=WebScaffoldMetadata.getPath(upstreamDependency);
      downstreamDependency=JQueryJspMetadata.createIdentifier(controller,path);
    }
 else {
      return;
    }
    if (getMetadataDependencyRegistry().getDownstream(upstreamDependency).contains(downstreamDependency)) {
      return;
    }
    getMetadataService().evictAndGet(downstreamDependency);
  }
}
Program: 59372
Project: 59372
Buggy source:
/** 
 * Removes the dependencies with   {@link JQueryMetadata} and{@link WebFinderMetadata}. <p/> De-register this instance to receive MetadataNotificationListener events.
 * @param context
 */
protected void deactivate(final ComponentContext context){
  getMetadataDependencyRegistry().deregisterDependency(JQueryMetadata.getMetadataIdentiferType(),JQueryJspMetadata.getMetadataIdentiferType());
  getMetadataDependencyRegistry().deregisterDependency(WebFinderMetadata.getMetadataIdentiferType(),JQueryJspMetadata.getMetadataIdentiferType());
  getMetadataDependencyRegistry().removeNotificationListener(this);
}

Fixed version (ground truth):
/** 
 * Removes the dependencies with   {@link JQueryMetadata} and{@link WebFinderMetadata}. <p/> De-register this instance to receive MetadataNotificationListener events.
 * @param context
 */
protected void deactivate(final ComponentContext context){
  getMetadataDependencyRegistry().deregisterDependency(JQueryMetadata.getMetadataIdentiferType(),JQueryJspMetadata.getMetadataIdentiferType());
  getMetadataDependencyRegistry().deregisterDependency(WebFinderMetadata.getMetadataIdentiferType(),JQueryJspMetadata.getMetadataIdentiferType());
  getMetadataDependencyRegistry().deregisterDependency(WebScaffoldMetadata.getMetadataIdentiferType(),JQueryJspMetadata.getMetadataIdentiferType());
  getMetadataDependencyRegistry().removeNotificationListener(this);
}
Program: 59373
Project: 59373
Buggy source:
/** 
 * Return an instance of the Metadata offered by this add-on
 */
protected ItdTypeDetailsProvidingMetadataItem getMetadata(String metadataIdentificationString,JavaType aspectName,PhysicalTypeMetadata governorPhysicalTypeMetadata,String itdFilename){
  final WebJpaBatchAnnotationValues annotationValues=new WebJpaBatchAnnotationValues(governorPhysicalTypeMetadata);
  final JavaType service=annotationValues.getService();
  if (!annotationValues.isAnnotationFound() || service == null) {
    return null;
  }
  final String serviceMid=getTypeLocationService().getPhysicalTypeIdentifier(service);
  if (serviceMid == null) {
    return null;
  }
  LogicalPath path=WebJpaBatchMetadata.getPath(metadataIdentificationString);
  WebScaffoldAnnotationValues webScaffoldMetadataValue=new WebScaffoldAnnotationValues(governorPhysicalTypeMetadata);
  String serviceMetadataKey=JpaBatchMetadata.createIdentifier(service,path);
  getMetadataDependencyRegistry().registerDependency(serviceMetadataKey,metadataIdentificationString);
  JpaBatchMetadata serviceMetadata=(JpaBatchMetadata)getMetadataService().get(serviceMetadataKey);
  return new WebJpaBatchMetadata(metadataIdentificationString,aspectName,governorPhysicalTypeMetadata,annotationValues,serviceMetadata,webScaffoldMetadataValue);
}

Fixed version (ground truth):
/** 
 * Return an instance of the Metadata offered by this add-on
 */
protected ItdTypeDetailsProvidingMetadataItem getMetadata(String metadataIdentificationString,JavaType aspectName,PhysicalTypeMetadata governorPhysicalTypeMetadata,String itdFilename){
  final WebJpaBatchAnnotationValues annotationValues=new WebJpaBatchAnnotationValues(governorPhysicalTypeMetadata);
  final JavaType service=annotationValues.getService();
  if (!annotationValues.isAnnotationFound() || service == null) {
    return null;
  }
  final String serviceMid=getTypeLocationService().getPhysicalTypeIdentifier(service);
  if (serviceMid == null) {
    return null;
  }
  LogicalPath path=WebJpaBatchMetadata.getPath(metadataIdentificationString);
  WebScaffoldAnnotationValues webScaffoldMetadataValue=new WebScaffoldAnnotationValues(governorPhysicalTypeMetadata);
  String serviceMetadataKey=JpaBatchMetadata.createIdentifier(service,path);
  getMetadataDependencyRegistry().registerDependency(serviceMetadataKey,metadataIdentificationString);
  JpaBatchMetadata serviceMetadata=(JpaBatchMetadata)getMetadataService().get(serviceMetadataKey);
  if (serviceMetadata == null) {
    return null;
  }
  return new WebJpaBatchMetadata(metadataIdentificationString,aspectName,governorPhysicalTypeMetadata,annotationValues,serviceMetadata,webScaffoldMetadataValue);
}
Program: 59376
Project: 59376
Buggy source:
/** 
 * This method imports all necessary element to build a gvNIX GEO application
 */
@Override public void setup(){
  updatePomDependencies();
  annotateApplicationConversionService();
  installComponents();
}

Fixed version (ground truth):
/** 
 * This method imports all necessary element to build a gvNIX GEO application
 */
@Override public void setup(){
  updatePomDependencies();
  updateWebMvcConfig();
  annotateApplicationConversionService();
  installComponents();
}
Program: 59377
Project: 59377
Buggy source:
/** 
 * Obtains the descriptor of the filtered field
 * @param fieldName
 * @param entity
 * @return
 */
public static <T>TypeDescriptor getTypeDescriptor(String fieldName,PathBuilder<T> entity){
  Class<?> entityType=entity.getType();
  if (entityType == Object.class) {
    entityType=entity.getRoot().getType();
  }
  String fieldNameToFindType=fieldName;
  BeanWrapper beanWrapper=getBeanWrapper(entityType);
  TypeDescriptor fieldDescriptor=null;
  if (fieldName.contains(SEPARATOR_FIELDS)) {
    String[] fieldNameSplitted=StringUtils.split(fieldName,SEPARATOR_FIELDS);
    for (int i=0; i < fieldNameSplitted.length - 1; i++) {
      beanWrapper=getBeanWrapper(beanWrapper.getPropertyType(fieldNameSplitted[i]));
    }
    fieldNameToFindType=fieldNameSplitted[fieldNameSplitted.length - 1];
  }
  fieldDescriptor=beanWrapper.getPropertyTypeDescriptor(fieldNameToFindType);
  return fieldDescriptor;
}

Fixed version (ground truth):
/** 
 * Obtains the descriptor of the filtered field
 * @param fieldName
 * @param entityType
 * @return
 */
public static <T>TypeDescriptor getTypeDescriptor(String fieldName,Class<T> entityType){
  String fieldNameToFindType=fieldName;
  BeanWrapper beanWrapper=getBeanWrapper(entityType);
  TypeDescriptor fieldDescriptor=null;
  if (fieldName.contains(SEPARATOR_FIELDS)) {
    String[] fieldNameSplitted=StringUtils.split(fieldName,SEPARATOR_FIELDS);
    for (int i=0; i < fieldNameSplitted.length - 1; i++) {
      beanWrapper=getBeanWrapper(beanWrapper.getPropertyType(fieldNameSplitted[i]));
    }
    fieldNameToFindType=fieldNameSplitted[fieldNameSplitted.length - 1];
  }
  fieldDescriptor=beanWrapper.getPropertyTypeDescriptor(fieldNameToFindType);
  return fieldDescriptor;
}
Program: 59380
Project: 59380
Buggy source:
/** 
 * Return where clause expression for number properties by casting it to string before check its value. <p/> Querydsl Expr:  {@code entityPath.fieldName.stringValue() eq searchStrDatabase operation:}{  {@code str(entity.fieldName) = searchStr <p/> Like operation is case sensitive.}
 * @param entityPath Full path to entity and associations. For example:{@code Pet} , {@code Pet.owner}
 * @param fieldName Property name in the given entity path. For example:{@code weight} in {@code Pet} entity, {@code age} in{@code Pet.owner} entity.
 * @param searchStr the value to find, may be null
 * @return PredicateOperation
 */
public static <T,N extends java.lang.Number & java.lang.Comparable<?>>BooleanExpression createNumberExpressionEqual(PathBuilder<T> entityPath,String fieldName,Class<N> fieldType,TypeDescriptor descriptor,String searchStr,ConversionService conversionService){
  if (StringUtils.isEmpty(searchStr)) {
    return null;
  }
  NumberPath<N> numberExpression=entityPath.getNumber(fieldName,fieldType);
  TypeDescriptor strDesc=STRING_TYPE_DESCRIPTOR;
  if (conversionService != null) {
    return numberExpression.eq((N)conversionService.convert(searchStr,strDesc,descriptor));
  }
 else {
    numberExpression.stringValue().like("String_Node_Str".concat(searchStr).concat("String_Node_Str"));
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Return where clause expression for number properties by casting it to string before check its value. <p/> Querydsl Expr:  {@code entityPath.fieldName.stringValue() eq searchStrDatabase operation:}{  {@code str(entity.fieldName) = searchStr<p/> Like operation is case sensitive.}
 * @param entityPath Full path to entity and associations. For example:{@code Pet} , {@code Pet.owner}
 * @param fieldName Property name in the given entity path. For example:{@code weight} in {@code Pet} entity, {@code age} in{@code Pet.owner} entity.
 * @param searchStr the value to find, may be null
 * @return PredicateOperation
 */
public static <T,N extends java.lang.Number & java.lang.Comparable<?>>BooleanExpression createNumberExpressionEqual(PathBuilder<T> entityPath,String fieldName,Class<N> fieldType,TypeDescriptor descriptor,String searchStr,ConversionService conversionService){
  if (StringUtils.isEmpty(searchStr)) {
    return null;
  }
  NumberPath<N> numberExpression=entityPath.getNumber(fieldName,fieldType);
  TypeDescriptor strDesc=STRING_TYPE_DESCRIPTOR;
  if (conversionService != null) {
    return numberExpression.eq((N)conversionService.convert(searchStr,strDesc,descriptor));
  }
 else {
    numberExpression.stringValue().like("String_Node_Str".concat(searchStr).concat("String_Node_Str"));
  }
  return null;
}
Program: 59381
Project: 59381
Buggy source:
/** 
 * Obtains the class type of the property named as   {@code fieldName} of theentity.
 * @param fieldName the field name.
 * @param entity the entity with a property named as {@code fieldName}
 * @return the class type
 */
public static <T>Class<?> getFieldType(String fieldName,PathBuilder<T> entity){
  Class<?> entityType=entity.getType();
  String fieldNameToFindType=fieldName;
  Class<?>[] classArray=ArrayUtils.<Class<?>>toArray(entityType);
  if (fieldName.contains(SEPARATOR_FIELDS)) {
    String[] fieldNameSplitted=StringUtils.split(fieldName,SEPARATOR_FIELDS);
    for (int i=0; i < fieldNameSplitted.length - 1; i++) {
      Class<?> fieldType=BeanUtils.findPropertyType(fieldNameSplitted[i],ArrayUtils.<Class<?>>toArray(entityType));
      classArray=ArrayUtils.add(classArray,fieldType);
      entityType=fieldType;
    }
    fieldNameToFindType=fieldNameSplitted[fieldNameSplitted.length - 1];
  }
  return BeanUtils.findPropertyType(fieldNameToFindType,classArray);
}

Fixed version (ground truth):
/** 
 * Obtains the class type of the property named as   {@code fieldName} of theentity.
 * @param fieldName the field name.
 * @param entity the entity with a property named as {@code fieldName}
 * @return the class type
 */
public static <T>Class<?> getFieldType(String fieldName,PathBuilder<T> entity){
  TypeDescriptor descriptor=getTypeDescriptor(fieldName,entity);
  return descriptor.getType();
}
Program: 59382
Project: 59382
Buggy source:
/** 
 * Obtains the descriptor of the filtered field
 * @param fieldName
 * @param entity
 * @return
 */
public static <T>TypeDescriptor getTypeDescriptor(String fieldName,PathBuilder<T> entity){
  Class<?> entityType=entity.getType();
  String fieldNameToFindType=fieldName;
  BeanWrapper beanWrapper=getBeanWrapper(entityType);
  TypeDescriptor fieldDescriptor=beanWrapper.getPropertyTypeDescriptor(fieldNameToFindType);
  return fieldDescriptor;
}

Fixed version (ground truth):
/** 
 * Obtains the descriptor of the filtered field
 * @param fieldName
 * @param entity
 * @return
 */
public static <T>TypeDescriptor getTypeDescriptor(String fieldName,PathBuilder<T> entity){
  Class<?> entityType=entity.getType();
  if (entityType == Object.class) {
    entityType=entity.getRoot().getType();
  }
  String fieldNameToFindType=fieldName;
  BeanWrapper beanWrapper=getBeanWrapper(entityType);
  TypeDescriptor fieldDescriptor=null;
  if (fieldName.contains(SEPARATOR_FIELDS)) {
    String[] fieldNameSplitted=StringUtils.split(fieldName,SEPARATOR_FIELDS);
    for (int i=0; i < fieldNameSplitted.length - 1; i++) {
      beanWrapper=getBeanWrapper(beanWrapper.getPropertyType(fieldNameSplitted[i]));
    }
    fieldNameToFindType=fieldNameSplitted[fieldNameSplitted.length - 1];
  }
  fieldDescriptor=beanWrapper.getPropertyTypeDescriptor(fieldNameToFindType);
  return fieldDescriptor;
}
Program: 59387
Project: 59387
Buggy source:
/** 
 * Replace some vars with values in a template file name. <p> Vars has next format: ${entity_package}. Template will be placed at same package in src/main/resources. </p>
 * @param templateName File name with a template.
 * @param checksumField Checksum field to get field name (one var value).
 * @param persistenceMemberLocator To get identifier field (one var value).
 * @return String replacing vars with values.
 */
private String generateITDContent(String templateName,FieldMetadata checksumField,PersistenceMemberLocator persistenceMemberLocator){
  String template;
  try {
    template=IOUtils.toString(new InputStreamReader(this.getClass().getResourceAsStream(templateName)));
  }
 catch (  IOException ioe) {
    throw new IllegalStateException("String_Node_Str" + templateName,ioe);
  }
  Map<String,String> params=new HashMap<String,String>(10);
  params.put("String_Node_Str",this.digestMethod);
  params.put("String_Node_Str",governorTypeDetails.getName().getPackage().getFullyQualifiedPackageName());
  params.put("String_Node_Str",governorTypeDetails.getName().getSimpleTypeName());
  params.put("String_Node_Str",entityMetadata.getFindMethod().getMethodName().getSymbolName());
  params.put("String_Node_Str",persistenceMemberLocator.getIdentifierFields(governorPhysicalTypeMetadata.getMemberHoldingTypeDetails().getName()).get(0).getFieldName().getSymbolName());
  params.put("String_Node_Str",checksumField.getFieldName().getSymbolName());
  params.put("String_Node_Str",getCodeToTranformFieldsToString());
  return replaceParams(template,params);
}

Fixed version (ground truth):
/** 
 * Replace some vars with values in a template file name. <p> Vars has next format: ${entity_package}. Template will be placed at same package in src/main/resources. </p>
 * @param templateName File name with a template.
 * @param checksumField Checksum field to get field name (one var value).
 * @param persistenceMemberLocator To get identifier field (one var value).
 * @return String replacing vars with values.
 */
private String generateITDContent(String templateName,FieldMetadata checksumField,PersistenceMemberLocator persistenceMemberLocator,Map<String,String> params){
  String template;
  try {
    template=IOUtils.toString(new InputStreamReader(this.getClass().getResourceAsStream(templateName)));
  }
 catch (  IOException ioe) {
    throw new IllegalStateException("String_Node_Str" + templateName,ioe);
  }
  return replaceParams(template,params);
}
Program: 59390
Project: 59390
Buggy source:
protected OCCChecksumMetadata getMetadata(String metadataIdentificationString,JavaType aspectName,PhysicalTypeMetadata governorPhysicalTypeMetadata,String itdFilename){
  Path path=Path.SRC_MAIN_JAVA;
  String entityMetadataKey=JpaActiveRecordMetadata.createIdentifier(governorPhysicalTypeMetadata.getMemberHoldingTypeDetails().getName(),LogicalPath.getInstance(path,"String_Node_Str"));
  JpaActiveRecordMetadata entityMetadata=(JpaActiveRecordMetadata)metadataService.get(entityMetadataKey);
  if (entityMetadata == null) {
    return null;
  }
  FieldMetadata versionField=persistenceMemberLocator.getVersionField(governorPhysicalTypeMetadata.getMemberHoldingTypeDetails().getName());
  if (versionField != null) {
    String declaredByType=entityMetadataKey.substring(entityMetadataKey.lastIndexOf('?') + 1);
    if (!versionField.getDeclaredByMetadataId().endsWith(declaredByType)) {
      throw new IllegalStateException("String_Node_Str".concat("String_Node_Str").concat("String_Node_Str").concat("String_Node_Str").concat("String_Node_Str").concat(declaredByType));
    }
  }
  OCCChecksumMetadata metadata=new OCCChecksumMetadata(metadataIdentificationString,aspectName,governorPhysicalTypeMetadata,entityMetadata,memberDetailsScanner,typeManagementService,persistenceMemberLocator);
  return metadata;
}

Fixed version (ground truth):
protected OCCChecksumMetadata getMetadata(String metadataIdentificationString,JavaType aspectName,PhysicalTypeMetadata governorPhysicalTypeMetadata,String itdFilename){
  Path path=Path.SRC_MAIN_JAVA;
  JavaType entityType=governorPhysicalTypeMetadata.getMemberHoldingTypeDetails().getName();
  String entityMetadataKey=JpaActiveRecordMetadata.createIdentifier(entityType,LogicalPath.getInstance(path,"String_Node_Str"));
  JpaActiveRecordMetadata entityMetadata=(JpaActiveRecordMetadata)metadataService.get(entityMetadataKey);
  if (entityMetadata == null) {
    return null;
  }
  FieldMetadata versionField=persistenceMemberLocator.getVersionField(entityType);
  if (versionField != null) {
    String declaredByType=entityMetadataKey.substring(entityMetadataKey.lastIndexOf('?') + 1);
    if (!versionField.getDeclaredByMetadataId().endsWith(declaredByType)) {
      throw new IllegalStateException("String_Node_Str".concat("String_Node_Str").concat("String_Node_Str").concat("String_Node_Str").concat("String_Node_Str").concat(declaredByType));
    }
  }
  List<FieldMetadata> idFields=persistenceMemberLocator.getIdentifierFields(entityType);
  if (idFields.isEmpty()) {
    return null;
  }
  FieldMetadata idField=idFields.get(0);
  OCCChecksumMetadata metadata=new OCCChecksumMetadata(metadataIdentificationString,aspectName,governorPhysicalTypeMetadata,entityMetadata,memberDetailsScanner,typeManagementService,persistenceMemberLocator,idField,versionField);
  return metadata;
}
Program: 59393
Project: 59393
Buggy source:
/** 
 * @return Creates constructor for XXRevsion class
 */
private ConstructorMetadata createRevisionItemConstructor(){
  List<AnnotatedJavaType> parameterTypes=new ArrayList<AnnotatedJavaType>(2);
  parameterTypes.add(new AnnotatedJavaType(context.getEntity()));
  parameterTypes.add(new AnnotatedJavaType(revisionEntityMetadata.getType()));
  parameterTypes.add(new AnnotatedJavaType(REVISON_TYPE));
  List<AnnotationMetadataBuilder> annotations=new ArrayList<AnnotationMetadataBuilder>();
  List<JavaType> throwsTypes=new ArrayList<JavaType>();
  List<JavaSymbolName> parameterNames=new ArrayList<JavaSymbolName>(3);
  parameterNames.add(new JavaSymbolName(context.getEntityName()));
  parameterNames.add(REV_ITEM_REVISON_ENTITY_FIELD);
  parameterNames.add(REV_ITEM_REVISON_TYPE_FIELD);
  InvocableMemberBodyBuilder body=new InvocableMemberBodyBuilder();
  helper.buildSetterMethodBody(body,parameterNames.get(0));
  helper.buildSetterMethodBody(body,parameterNames.get(1));
  helper.buildSetterMethodBody(body,parameterNames.get(2));
  ConstructorMetadataBuilder builder=new ConstructorMetadataBuilder(context.getMetadataId());
  builder.setParameterTypes(parameterTypes);
  builder.setParameterNames(parameterNames);
  builder.setModifier(Modifier.PUBLIC);
  builder.setAnnotations(annotations);
  builder.setThrowsTypes(throwsTypes);
  builder.setBodyBuilder(body);
  return builder.build();
}

Fixed version (ground truth):
/** 
 * @return Creates constructor for XXRevsion class
 */
private ConstructorMetadata createRevisionItemConstructor(){
  List<AnnotatedJavaType> parameterTypes=new ArrayList<AnnotatedJavaType>(2);
  parameterTypes.add(new AnnotatedJavaType(context.getEntity()));
  parameterTypes.add(new AnnotatedJavaType(revisionEntityMetadata.getType()));
  parameterTypes.add(new AnnotatedJavaType(REVISON_TYPE));
  List<AnnotationMetadataBuilder> annotations=new ArrayList<AnnotationMetadataBuilder>();
  List<JavaType> throwsTypes=new ArrayList<JavaType>();
  List<JavaSymbolName> parameterNames=new ArrayList<JavaSymbolName>(3);
  parameterNames.add(new JavaSymbolName(StringUtils.uncapitalize(context.getEntityName())));
  parameterNames.add(REV_ITEM_REVISON_ENTITY_FIELD);
  parameterNames.add(REV_ITEM_REVISON_TYPE_FIELD);
  InvocableMemberBodyBuilder body=new InvocableMemberBodyBuilder();
  helper.buildSetterMethodBody(body,parameterNames.get(0));
  helper.buildSetterMethodBody(body,parameterNames.get(1));
  helper.buildSetterMethodBody(body,parameterNames.get(2));
  ConstructorMetadataBuilder builder=new ConstructorMetadataBuilder(context.getMetadataId());
  builder.setParameterTypes(parameterTypes);
  builder.setParameterNames(parameterNames);
  builder.setModifier(Modifier.PUBLIC);
  builder.setAnnotations(annotations);
  builder.setThrowsTypes(throwsTypes);
  builder.setBodyBuilder(body);
  return builder.build();
}
Program: 59394
Project: 59394
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void addCustomArtifact(ItdTypeDetailsBuilder builder){
  if (governorTypeDetails.getAnnotation(AUDITED_ANNOTATION) == null) {
    builder.addAnnotation(new AnnotationMetadataBuilder(AUDITED_ANNOTATION));
  }
  if (!context.isAbstractEntity()) {
    builder.addMethod(getAuditReaderStaticMethod());
    builder.addMethod(getAuditReaderMethod());
    builder.addMethod(getPropertyMethod());
    builder.addMethod(getPropertyMethodWithWrapper());
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void addCustomArtifact(ItdTypeDetailsBuilder builder){
  if (governorTypeDetails.getAnnotation(AUDITED_ANNOTATION) == null) {
    builder.addAnnotation(new AnnotationMetadataBuilder(AUDITED_ANNOTATION));
  }
  if (!context.isAbstractEntity()) {
    builder.addMethod(getAuditReaderStaticMethod());
    builder.addMethod(getPropertyMethod());
    builder.addMethod(getPropertyMethodWithWrapper());
  }
}
Program: 59395
Project: 59395
Buggy source:
/** 
 * @return creates getAuditReader() method
 */
private MethodMetadata getAuditReaderStaticMethod(){
  return commonGetAuditReaderStaticMethod(context,AUDIT_READER_STATIC_METHOD,Modifier.PUBLIC + Modifier.STATIC,"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * @return creates getAuditReader() method
 */
private MethodMetadata getAuditReaderStaticMethod(){
  return commonGetAuditReaderStaticMethod(context,AUDIT_READER_STATIC_METHOD,Modifier.PUBLIC + Modifier.STATIC,"String_Node_Str",null);
}
Program: 59396
Project: 59396
Buggy source:
/** 
 * Generates a method on itd without parameters, annotation or throws declarations
 * @param context
 * @param methodName
 * @param modifiers
 * @param bodyStr
 * @return
 */
private MethodMetadata commonGetAuditReaderStaticMethod(Context context,JavaSymbolName methodName,int modifiers,String bodyStr){
  List<AnnotatedJavaType> parameterTypes=new ArrayList<AnnotatedJavaType>(0);
  final MethodMetadata method=helper.methodExists(methodName,parameterTypes);
  if (method != null) {
    return method;
  }
  List<AnnotationMetadataBuilder> annotations=new ArrayList<AnnotationMetadataBuilder>();
  List<JavaType> throwsTypes=new ArrayList<JavaType>();
  List<JavaSymbolName> parameterNames=new ArrayList<JavaSymbolName>();
  InvocableMemberBodyBuilder body=new InvocableMemberBodyBuilder();
  body.appendFormalLine(String.format(bodyStr,helper.getFinalTypeName(AUDIT_READER_FACTORY)));
  MethodMetadataBuilder methodBuilder=new MethodMetadataBuilder(context.getMetadataId(),modifiers,methodName,AUDIT_READER,parameterTypes,parameterNames,body);
  methodBuilder.setAnnotations(annotations);
  methodBuilder.setThrowsTypes(throwsTypes);
  return methodBuilder.build();
}

Fixed version (ground truth):
/** 
 * Generates a method on itd without parameters, annotation or throws declarations
 * @param context
 * @param methodName
 * @param modifiers
 * @param bodyStr
 * @param annotations (optional)
 * @return
 */
private MethodMetadata commonGetAuditReaderStaticMethod(Context context,JavaSymbolName methodName,int modifiers,String bodyStr,List<AnnotationMetadataBuilder> aAnnotations){
  List<AnnotatedJavaType> parameterTypes=new ArrayList<AnnotatedJavaType>(0);
  final MethodMetadata method=helper.methodExists(methodName,parameterTypes);
  if (method != null) {
    return method;
  }
  List<AnnotationMetadataBuilder> annotations=new ArrayList<AnnotationMetadataBuilder>();
  if (aAnnotations != null && !aAnnotations.isEmpty()) {
    annotations.addAll(aAnnotations);
  }
  List<JavaType> throwsTypes=new ArrayList<JavaType>();
  List<JavaSymbolName> parameterNames=new ArrayList<JavaSymbolName>();
  InvocableMemberBodyBuilder body=new InvocableMemberBodyBuilder();
  body.appendFormalLine(String.format(bodyStr,helper.getFinalTypeName(AUDIT_READER_FACTORY)));
  MethodMetadataBuilder methodBuilder=new MethodMetadataBuilder(context.getMetadataId(),modifiers,methodName,AUDIT_READER,parameterTypes,parameterNames,body);
  methodBuilder.setAnnotations(annotations);
  methodBuilder.setThrowsTypes(throwsTypes);
  return methodBuilder.build();
}
Program: 59400
Project: 59400
Buggy source:
/** 
 * Get Date pattern by field name <p/> If no pattern found, try standard Roo key  {@code lower_case( ENTITY ) + "_" + lower_case( FIELD ) + "_date_format"}
 * @param datePatterns Contains field name and related data pattern
 * @param entityClass Entity class to which the field belong to
 * @param fieldName Field to search pattern
 * @return
 */
private static String getPattern(Map<String,Object> datePatterns,Class<?> entityClass,String fieldName){
  String pattern=(String)datePatterns.get(fieldName.toLowerCase());
  if (!StringUtils.isEmpty(pattern)) {
    return pattern;
  }
  String rooKey=entityClass.getSimpleName().toLowerCase().concat("String_Node_Str").concat(fieldName.toLowerCase()).concat("String_Node_Str");
  pattern=(String)datePatterns.get(rooKey);
  return pattern;
}

Fixed version (ground truth):
/** 
 * Get Date pattern by field name <p/> If no pattern found, try standard Roo key  {@code ENTITY + "_" + lower_case( FIELD ) + "_date_format"}
 * @param datePatterns Contains field name and related data pattern
 * @param entityClass Entity class to which the field belong to
 * @param fieldName Field to search pattern
 * @return
 */
private static String getPattern(Map<String,Object> datePatterns,Class<?> entityClass,String fieldName){
  String pattern=(String)datePatterns.get(fieldName.toLowerCase());
  if (!StringUtils.isEmpty(pattern)) {
    return pattern;
  }
  String rooKey=entityClass.getSimpleName().concat("String_Node_Str").concat(fieldName.toLowerCase()).concat("String_Node_Str");
  pattern=(String)datePatterns.get(rooKey);
  return pattern;
}
Program: 59402
Project: 59402
Buggy source:
/** 
 * Get Date pattern by field name <p/> If no pattern found, try standard Roo key  {@code ENTITY + "_" + lower_case( FIELD ) + "_date_format"}
 * @param datePatterns Contains field name and related data pattern
 * @param entityClass Entity class to which the field belong to
 * @param fieldName Field to search pattern
 * @return
 */
private static String getPattern(Map<String,Object> datePatterns,Class<?> entityClass,String fieldName){
  String pattern=(String)datePatterns.get(fieldName.toLowerCase());
  if (!StringUtils.isEmpty(pattern)) {
    return pattern;
  }
  String rooKey=entityClass.getSimpleName().concat("String_Node_Str").concat(fieldName.toLowerCase()).concat("String_Node_Str");
  pattern=(String)datePatterns.get(rooKey);
  return pattern;
}

Fixed version (ground truth):
/** 
 * Get Date pattern by field name <p/> If no pattern found, try standard Roo key  {@code uncapitalize( ENTITY ) + "_" + lower_case( FIELD ) + "_date_format"}
 * @param datePatterns Contains field name and related data pattern
 * @param entityClass Entity class to which the field belong to
 * @param fieldName Field to search pattern
 * @return
 */
private static String getPattern(Map<String,Object> datePatterns,Class<?> entityClass,String fieldName){
  String pattern=(String)datePatterns.get(fieldName.toLowerCase());
  if (!StringUtils.isEmpty(pattern)) {
    return pattern;
  }
  String rooKey=StringUtils.uncapitalize(entityClass.getSimpleName()).concat("String_Node_Str").concat(fieldName.toLowerCase()).concat("String_Node_Str");
  pattern=(String)datePatterns.get(rooKey);
  return pattern;
}
Program: 59405
Project: 59405
Buggy source:
@Override public void updateTags(){
  PathResolver pathResolver=projectOperations.getPathResolver();
  LogicalPath webappPath=getWebappPath();
  OperationUtils.updateDirectoryContents("String_Node_Str",pathResolver.getIdentifier(webappPath,"String_Node_Str"),fileManager,context,getClass());
  copyDirectoryContents("String_Node_Str",pathResolver.getIdentifier(webappPath,"String_Node_Str"),true);
  copyDirectoryContents("String_Node_Str",pathResolver.getIdentifier(webappPath,"String_Node_Str"),true);
  copyDirectoryContents("String_Node_Str",pathResolver.getIdentifier(webappPath,"String_Node_Str"),true);
  copyDirectoryContents("String_Node_Str",pathResolver.getIdentifier(webappPath,"String_Node_Str"),true);
  copyDirectoryContents("String_Node_Str",pathResolver.getIdentifier(webappPath,"String_Node_Str"),true);
}

Fixed version (ground truth):
@Override public void updateTags(){
  PathResolver pathResolver=projectOperations.getPathResolver();
  LogicalPath webappPath=WebProjectUtils.getWebappPath(projectOperations);
  OperationUtils.updateDirectoryContents("String_Node_Str",pathResolver.getIdentifier(webappPath,"String_Node_Str"),fileManager,context,getClass());
  copyDirectoryContents("String_Node_Str",pathResolver.getIdentifier(webappPath,"String_Node_Str"),true);
  copyDirectoryContents("String_Node_Str",pathResolver.getIdentifier(webappPath,"String_Node_Str"),true);
  copyDirectoryContents("String_Node_Str",pathResolver.getIdentifier(webappPath,"String_Node_Str"),true);
  copyDirectoryContents("String_Node_Str",pathResolver.getIdentifier(webappPath,"String_Node_Str"),true);
  copyDirectoryContents("String_Node_Str",pathResolver.getIdentifier(webappPath,"String_Node_Str"),true);
}
Program: 59408
Project: 59408
Buggy source:
/** 
 * Creates if it doesn't exist the messages_xx.properties file for the given I18n locale. <p> Note that English locale is an especial case where the file is messages.properties
 * @param i18n
 */
public static void installI18nMessages(I18n i18n,ProjectOperations projectOperations,FileManager fileManager){
  Validate.notNull(i18n,"String_Node_Str");
  if (i18n.getLocale() == null) {
    logger.warning("String_Node_Str");
    return;
  }
  String targetDirectory=projectOperations.getPathResolver().getIdentifier(LogicalPath.getInstance(Path.SRC_MAIN_WEBAPP,"String_Node_Str"),"String_Node_Str");
  String messageBundle=targetDirectory + "String_Node_Str" + i18n.getLocale().getLanguage()+ "String_Node_Str";
  if (i18n.getLocale().equals(Locale.ENGLISH)) {
    messageBundle=targetDirectory + "String_Node_Str";
  }
  if (!fileManager.exists(messageBundle)) {
    OutputStream outputStream=null;
    try {
      outputStream=fileManager.createFile(messageBundle).getOutputStream();
      IOUtils.copy(i18n.getMessageBundle(),outputStream);
    }
 catch (    IOException e) {
      throw new IllegalStateException("String_Node_Str",e);
    }
 finally {
      IOUtils.closeQuietly(outputStream);
    }
  }
  return;
}

Fixed version (ground truth):
/** 
 * Creates if it doesn't exist the messages_xx.properties file for the given I18n locale. <p> Note that English locale is an especial case where the file is messages.properties
 * @param i18n
 */
public static void installI18nMessages(I18n i18n,ProjectOperations projectOperations,FileManager fileManager){
  Validate.notNull(i18n,"String_Node_Str");
  if (i18n.getLocale() == null) {
    logger.warning("String_Node_Str");
    return;
  }
  LogicalPath webappPath=WebProjectUtils.getWebappPath(projectOperations);
  String targetDirectory=projectOperations.getPathResolver().getIdentifier(webappPath,"String_Node_Str");
  String messageBundle=targetDirectory.concat("String_Node_Str").concat(i18n.getLocale().getLanguage()).concat("String_Node_Str");
  if (i18n.getLocale().equals(Locale.ENGLISH)) {
    messageBundle=targetDirectory.concat("String_Node_Str");
  }
  if (!fileManager.exists(messageBundle)) {
    OutputStream outputStream=null;
    try {
      outputStream=fileManager.createFile(messageBundle).getOutputStream();
      IOUtils.copy(i18n.getMessageBundle(),outputStream);
    }
 catch (    IOException e) {
      throw new IllegalStateException("String_Node_Str",e);
    }
 finally {
      IOUtils.closeQuietly(outputStream);
    }
  }
  return;
}
Program: 59410
Project: 59410
Buggy source:
/** 
 * Updates de list.jspx page of target controller to use datatables component.
 */
public void updateControllerJspPages(JavaType controller,DatatablesMetadata datatablesMetadata){
  Validate.notNull(datatablesMetadata,"String_Node_Str");
  String controllerPath=datatablesMetadata.getWebScaffoldAnnotationValues().getPath();
  updateListJspx(controller,controllerPath);
  Map<FinderMetadataDetails,QueryHolderTokens> finders=datatablesMetadata.getFindersRegistered();
  if (finders != null && !finders.isEmpty()) {
    updateFindersJspx(controller,controllerPath,finders);
  }
}

Fixed version (ground truth):
/** 
 * Updates de list.jspx page of target controller to use datatables component.
 */
public void updateControllerJspPages(JavaType controller,DatatablesMetadata datatablesMetadata){
  Validate.notNull(datatablesMetadata,"String_Node_Str");
  String controllerPath=datatablesMetadata.getWebScaffoldAnnotationValues().getPath();
  updateListJspx(controller,controllerPath);
}
Program: 59412
Project: 59412
Buggy source:
/** 
 * Creates a WHERE clause by the intersection of the given search-arguments
 * @param entityClass Entity
 * @param searchArgs Search arguments to be used to create the WHERE clause.It can contain  {@code _operator_} entries for each field that wantto use its own operator. By default  {@code EQUALS} operator isused. <p/> Operator entry example:  {@code _operator_weight = LT} theexpression for  {@code weight} field will do a less-than valuecomparison
 * @return the WHERE clause
 */
public static <T>BooleanBuilder createPredicateByAnd(Class<T> entityClass,Map<String,Object> searchArgs){
  BooleanBuilder predicate=new BooleanBuilder();
  if (searchArgs.isEmpty()) {
    return predicate;
  }
  PathBuilder<T> entityPath=new PathBuilder<T>(entityClass,"String_Node_Str");
  if (searchArgs != null && !searchArgs.isEmpty()) {
    for (    Entry<String,Object> entry : searchArgs.entrySet()) {
      predicate.and(createObjectExpression(entityPath,entry.getKey(),entry.getValue()));
    }
  }
  return predicate;
}

Fixed version (ground truth):
/** 
 * Creates a WHERE clause by the intersection of the given search-arguments
 * @param entity Entity {@link PathBuilder}. It represents the entity for class generation and alias-usage for path generation. <p/> Example: To retrieve a   {@code Customer} with the first name 'Bob'entity must be a  {@link PathBuilder} created for {@code Customer}class and searchArgs must contain the entry  {@code 'firstName':'Bob'}
 * @param searchArgs Search arguments to be used to create the WHERE clause.It can contain  {@code _operator_} entries for each field that wantto use its own operator. By default  {@code EQUALS} operator isused. <p/> Operator entry example:  {@code _operator_weight = LT} theexpression for  {@code weight} field will do a less-than valuecomparison
 * @return the WHERE clause
 */
public static <T>BooleanBuilder createPredicateByAnd(PathBuilder<T> entity,Map<String,Object> searchArgs){
  BooleanBuilder predicate=new BooleanBuilder();
  if (searchArgs.isEmpty()) {
    return predicate;
  }
  if (searchArgs != null && !searchArgs.isEmpty()) {
    for (    Entry<String,Object> entry : searchArgs.entrySet()) {
      predicate.and(createObjectExpression(entity,entry.getKey(),entry.getValue()));
    }
  }
  return predicate;
}