nus-yam/ex-repair huggingface dataset:
Program: 151418
Project: 151418
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public void handleInterrupt(Console console,Action action){
  if (action == Action.INTERRUPT) {
    console.getShell().out().println("String_Node_Str");
    console.clearBufferAndDisplayPrompt();
  }
 else   if (action == Action.IGNOREEOF) {
    console.getShell().out().println("String_Node_Str");
    console.clearBufferAndDisplayPrompt();
  }
 else {
    try {
      CommandContainer exitCommand=registry.getCommand("String_Node_Str","String_Node_Str");
      console.getShell().out().println();
      exitCommand.getCommand().execute(new AeshCommandInvocation(ShellImpl.this.console,ControlOperator.NONE,null));
    }
 catch (    InterruptedException|CommandNotFoundException|IOException e) {
      log.log(Level.WARNING,"String_Node_Str",e);
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public void handleInterrupt(Console console,Action action){
  if (action == Action.INTERRUPT) {
    console.getShell().out().println("String_Node_Str");
    console.clearBufferAndDisplayPrompt();
  }
 else   if (action == Action.IGNOREEOF) {
    console.getShell().out().println("String_Node_Str");
    console.clearBufferAndDisplayPrompt();
  }
 else {
    try {
      CommandContainer exitCommand=registry.getCommand("String_Node_Str","String_Node_Str");
      console.getShell().out().println();
      exitCommand.getCommand().execute(new AeshCommandInvocation((AeshConsoleImpl)ShellImpl.this.console,ControlOperator.NONE,1,null));
    }
 catch (    InterruptedException|CommandNotFoundException|IOException e) {
      log.log(Level.WARNING,"String_Node_Str",e);
    }
  }
}
Program: 151419
Project: 151419
Buggy source:
@Override public String toString(){
  try {
    return getJavaType().getQualifiedName();
  }
 catch (  FileNotFoundException e) {
    throw new ResourceException(e);
  }
catch (  Exception e) {
    return getName();
  }
}

Fixed version (ground truth):
@Override public String toString(){
  try {
    return getJavaType().getQualifiedName();
  }
 catch (  FileNotFoundException e) {
    throw new ResourceException("String_Node_Str",e);
  }
catch (  Exception e) {
    return getName();
  }
}
Program: 151420
Project: 151420
Buggy source:
@Override public JsonStructure getJsonStructure(){
  try {
    try (JsonReader reader=Json.createReader(getResourceInputStream())){
      return reader.read();
    }
   }
 catch (  Exception e) {
    throw new ResourceException(e);
  }
}

Fixed version (ground truth):
@Override public JsonStructure getJsonStructure(){
  try {
    try (JsonReader reader=Json.createReader(getResourceInputStream())){
      return reader.read();
    }
   }
 catch (  Exception e) {
    throw new ResourceException("String_Node_Str",e);
  }
}
Program: 151421
Project: 151421
Buggy source:
@Override public JsonObject getJsonObject(){
  try {
    try (JsonReader reader=Json.createReader(getResourceInputStream())){
      return reader.readObject();
    }
   }
 catch (  Exception e) {
    throw new ResourceException(e);
  }
}

Fixed version (ground truth):
@Override public JsonObject getJsonObject(){
  try {
    try (JsonReader reader=Json.createReader(getResourceInputStream())){
      return reader.readObject();
    }
   }
 catch (  Exception e) {
    throw new ResourceException("String_Node_Str",e);
  }
}
Program: 151422
Project: 151422
Buggy source:
@Override public JsonArray getJsonArray(){
  try {
    try (JsonReader reader=Json.createReader(getResourceInputStream())){
      return reader.readArray();
    }
   }
 catch (  Exception e) {
    throw new ResourceException(e);
  }
}

Fixed version (ground truth):
@Override public JsonArray getJsonArray(){
  try {
    try (JsonReader reader=Json.createReader(getResourceInputStream())){
      return reader.readArray();
    }
   }
 catch (  Exception e) {
    throw new ResourceException("String_Node_Str",e);
  }
}
Program: 151423
Project: 151423
Buggy source:
@Override public JsonResource setContents(JsonStructure structure){
  if (structure == null)   throw new IllegalArgumentException("String_Node_Str");
  try {
    if (!exists()) {
      getParent().mkdirs();
      if (!createNewFile()) {
        throw new IOException("String_Node_Str" + getUnderlyingResourceObject());
      }
    }
    try (OutputStream out=getFileOperations().createOutputStream(getUnderlyingResourceObject());JsonWriter writer=Json.createWriter(out)){
      writer.write(structure);
    }
   }
 catch (  IOException e) {
    throw new ResourceException(e);
  }
  return this;
}

Fixed version (ground truth):
@Override public JsonResource setContents(JsonStructure structure){
  if (structure == null)   throw new IllegalArgumentException("String_Node_Str");
  try {
    if (!exists()) {
      getParent().mkdirs();
      if (!createNewFile()) {
        throw new IOException("String_Node_Str" + getUnderlyingResourceObject());
      }
    }
    try (OutputStream out=getFileOperations().createOutputStream(getUnderlyingResourceObject());JsonWriter writer=Json.createWriter(out)){
      writer.write(structure);
    }
   }
 catch (  IOException e) {
    throw new ResourceException("String_Node_Str",e);
  }
  return this;
}
Program: 151424
Project: 151424
Buggy source:
/** 
 * Returns whether the given method is a 'getter' method.
 * @param method a parameterless method that returns a non-void
 * @return the property name
 */
protected String isGetter(final Method<?,?> method){
  String methodName=method.getName();
  String propertyName;
  if (methodName.startsWith(ClassUtils.JAVABEAN_GET_PREFIX)) {
    propertyName=methodName.substring(ClassUtils.JAVABEAN_GET_PREFIX.length());
  }
 else   if (methodName.startsWith(ClassUtils.JAVABEAN_IS_PREFIX) && boolean.class.equals(method.getReturnType().getQualifiedName())) {
    propertyName=methodName.substring(ClassUtils.JAVABEAN_IS_PREFIX.length());
  }
 else {
    return null;
  }
  return StringUtils.decapitalize(propertyName);
}

Fixed version (ground truth):
/** 
 * Returns whether the given method is a 'getter' method.
 * @param method a parameterless method that returns a non-void
 * @return the property name
 */
protected String isGetter(final Method<?,?> method){
  String methodName=method.getName();
  String propertyName;
  if (methodName.startsWith(ClassUtils.JAVABEAN_GET_PREFIX)) {
    propertyName=methodName.substring(ClassUtils.JAVABEAN_GET_PREFIX.length());
  }
 else   if (methodName.startsWith(ClassUtils.JAVABEAN_IS_PREFIX) && method.getReturnType() != null && boolean.class.equals(method.getReturnType().getQualifiedName())) {
    propertyName=methodName.substring(ClassUtils.JAVABEAN_IS_PREFIX.length());
  }
 else {
    return null;
  }
  return StringUtils.decapitalize(propertyName);
}
Program: 151425
Project: 151425
Buggy source:
/** 
 * Lookup getter-based properties. <p> This method will be called after <code>lookupFields</code> but before <code>lookupSetters</code>.
 */
protected void lookupGetters(final Map<String,Property> properties,final MethodHolder<?> clazz){
  for (  Method<?,?> method : clazz.getMethods()) {
    if (method.isStatic()) {
      continue;
    }
    if (!method.isPublic()) {
      continue;
    }
    if (!method.getParameters().isEmpty()) {
      continue;
    }
    String returnType=method.getReturnType().getQualifiedName();
    if (returnType == null) {
      continue;
    }
    String propertyName=isGetter(method);
    if (propertyName == null) {
      continue;
    }
    Field<?> privateField=getPrivateField((FieldHolder<?>)clazz,propertyName);
    if (privateField != null && this.privateFieldConvention == null) {
      propertyName=privateField.getName();
    }
    properties.put(propertyName,new ForgeProperty(propertyName,returnType,method,null,privateField,this.project));
  }
}

Fixed version (ground truth):
/** 
 * Lookup getter-based properties. <p> This method will be called after <code>lookupFields</code> but before <code>lookupSetters</code>.
 */
protected void lookupGetters(final Map<String,Property> properties,final MethodHolder<?> clazz){
  for (  Method<?,?> method : clazz.getMethods()) {
    if (method.isStatic()) {
      continue;
    }
    if (!method.isPublic()) {
      continue;
    }
    if (!method.getParameters().isEmpty()) {
      continue;
    }
    String returnType=method.getReturnType() != null ? method.getReturnType().getQualifiedName() : null;
    if (returnType == null) {
      continue;
    }
    String propertyName=isGetter(method);
    if (propertyName == null) {
      continue;
    }
    Field<?> privateField=getPrivateField((FieldHolder<?>)clazz,propertyName);
    if (privateField != null && this.privateFieldConvention == null) {
      propertyName=privateField.getName();
    }
    properties.put(propertyName,new ForgeProperty(propertyName,returnType,method,null,privateField,this.project));
  }
}
Program: 151426
Project: 151426
Buggy source:
@Override public void initializeUI(UIBuilder builder) throws Exception {
  JavaCompilerFacet javaCompilerFacet=getJavaCompilerFacet(builder.getUIContext());
  sourceVersion.setValue(javaCompilerFacet.getSourceCompilerVersion());
  targetVersion.setValue(javaCompilerFacet.getTargetCompilerVersion());
  builder.add(sourceVersion).add(targetVersion);
}

Fixed version (ground truth):
@Override public void initializeUI(UIBuilder builder) throws Exception {
  JavaCompilerFacet javaCompilerFacet=getJavaCompilerFacet(builder.getUIContext());
  sourceVersion.setDefaultValue(javaCompilerFacet.getSourceCompilerVersion());
  targetVersion.setDefaultValue(javaCompilerFacet.getTargetCompilerVersion());
  builder.add(sourceVersion).add(targetVersion);
}
Program: 151427
Project: 151427
Buggy source:
@Override public void validate(UIValidationContext validator){
  if (sourceVersion.getValue().ordinal() > targetVersion.getValue().ordinal()) {
    validator.addValidationError(sourceVersion,"String_Node_Str" + sourceVersion.toString() + "String_Node_Str"+ targetVersion.toString()+ "String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void validate(UIValidationContext validator){
  if (sourceVersion.hasValue() && targetVersion.hasValue()) {
    if (sourceVersion.getValue().ordinal() > targetVersion.getValue().ordinal()) {
      validator.addValidationError(sourceVersion,"String_Node_Str" + sourceVersion.getValue() + "String_Node_Str"+ targetVersion.getValue()+ "String_Node_Str");
    }
  }
}
Program: 151428
Project: 151428
Buggy source:
public static String getIdClause(JavaClass<?> entity,String entityTable){
  for (  Member<?> member : entity.getMembers()) {
    if (member.hasAnnotation(Id.class)) {
      String memberName=member.getName();
      String id=null;
      if (member instanceof Method) {
        id=Strings.uncapitalize(memberName.substring(2));
      }
      if (member instanceof Field) {
        id=memberName;
      }
      char entityVariable=getJpqlEntityVariable(entityTable);
      return "String_Node_Str" + entityVariable + "String_Node_Str"+ id+ "String_Node_Str"+ "String_Node_Str";
    }
  }
  return null;
}

Fixed version (ground truth):
public static String getIdClause(JavaClass<?> entity,String entityTable){
  for (  Member<?> member : entity.getMembers()) {
    if (member.hasAnnotation(Id.class)) {
      String memberName=member.getName();
      String id=null;
      if (member instanceof Method) {
        id=Strings.uncapitalize(memberName.substring(3));
      }
      if (member instanceof Field) {
        id=memberName;
      }
      char entityVariable=getJpqlEntityVariable(entityTable);
      return "String_Node_Str" + entityVariable + "String_Node_Str"+ id+ "String_Node_Str"+ "String_Node_Str";
    }
  }
  return null;
}
Program: 151429
Project: 151429
Buggy source:
public static String getSelectExpression(JavaClass<?> entity,String entityTable){
  char entityVariable=getJpqlEntityVariable(entityTable);
  StringBuilder expressionBuilder=new StringBuilder();
  expressionBuilder.append("String_Node_Str");
  expressionBuilder.append(entityVariable);
  expressionBuilder.append("String_Node_Str");
  expressionBuilder.append(entityTable);
  expressionBuilder.append("String_Node_Str");
  expressionBuilder.append(entityVariable);
  for (  Member<?> member : entity.getMembers()) {
    if (member.hasAnnotation(OneToOne.class) || member.hasAnnotation(OneToMany.class) || member.hasAnnotation(ManyToMany.class)|| member.hasAnnotation(ManyToOne.class)) {
      String name=member.getName();
      String associationField=null;
      if (member instanceof Method) {
        if (name.startsWith("String_Node_Str")) {
          associationField=Strings.uncapitalize(name.substring(2));
        }
      }
 else       if (member instanceof Field) {
        associationField=name;
      }
      if (associationField == null) {
        throw new RuntimeException("String_Node_Str" + member.getName() + "String_Node_Str"+ entity.getName());
      }
 else {
        expressionBuilder.append("String_Node_Str");
        expressionBuilder.append(entityVariable);
        expressionBuilder.append('.');
        expressionBuilder.append(associationField);
      }
    }
  }
  return expressionBuilder.toString();
}

Fixed version (ground truth):
public static String getSelectExpression(JavaClass<?> entity,String entityTable){
  char entityVariable=getJpqlEntityVariable(entityTable);
  StringBuilder expressionBuilder=new StringBuilder();
  expressionBuilder.append("String_Node_Str");
  expressionBuilder.append(entityVariable);
  expressionBuilder.append("String_Node_Str");
  expressionBuilder.append(entityTable);
  expressionBuilder.append("String_Node_Str");
  expressionBuilder.append(entityVariable);
  for (  Member<?> member : entity.getMembers()) {
    if (member.hasAnnotation(OneToOne.class) || member.hasAnnotation(OneToMany.class) || member.hasAnnotation(ManyToMany.class)|| member.hasAnnotation(ManyToOne.class)) {
      String name=member.getName();
      String associationField=null;
      if (member instanceof Method) {
        if (name.startsWith("String_Node_Str")) {
          associationField=Strings.uncapitalize(name.substring(3));
        }
      }
 else       if (member instanceof Field) {
        associationField=name;
      }
      if (associationField == null) {
        throw new RuntimeException("String_Node_Str" + member.getName() + "String_Node_Str"+ entity.getName());
      }
 else {
        expressionBuilder.append("String_Node_Str");
        expressionBuilder.append(entityVariable);
        expressionBuilder.append('.');
        expressionBuilder.append(associationField);
      }
    }
  }
  return expressionBuilder.toString();
}
Program: 151430
Project: 151430
Buggy source:
public static String resolveIdGetterName(JavaClass<?> entity){
  String result=null;
  for (  Member<?> member : entity.getMembers()) {
    if (member.hasAnnotation(Id.class)) {
      String name=member.getName();
      String type=null;
      if (member instanceof Method) {
        type=((Method<?,?>)member).getReturnType().getName();
        if (name.startsWith("String_Node_Str")) {
          name=name.substring(2);
        }
      }
 else       if (member instanceof Field) {
        type=((Field<?>)member).getType().getName();
      }
      if (type != null) {
        for (        Method<?,?> method : entity.getMethods()) {
          if (method.getParameters().size() == 0 && type.equals(method.getReturnType())) {
            if (method.getName().toLowerCase().contains(name.toLowerCase())) {
              result=method.getName() + "String_Node_Str";
              break;
            }
          }
        }
      }
      if (result != null) {
        break;
      }
 else       if (type != null && member.isPublic()) {
        String memberName=member.getName();
        if (member instanceof Method && memberName.startsWith("String_Node_Str")) {
          memberName=memberName.substring(3);
          memberName=Strings.uncapitalize(memberName);
        }
        result=memberName;
      }
    }
  }
  if (result == null) {
    throw new RuntimeException("String_Node_Str" + entity.getQualifiedName() + "String_Node_Str");
  }
  return result;
}

Fixed version (ground truth):
public static String resolveIdGetterName(JavaClass<?> entity){
  String result=null;
  for (  Member<?> member : entity.getMembers()) {
    if (member.hasAnnotation(Id.class)) {
      String name=member.getName();
      String type=null;
      if (member instanceof Method) {
        type=((Method<?,?>)member).getReturnType().getQualifiedName();
        if (name.startsWith("String_Node_Str")) {
          name=name.substring(2);
        }
      }
 else       if (member instanceof Field) {
        type=((Field<?>)member).getType().getQualifiedName();
      }
      if (type != null) {
        for (        Method<?,?> method : entity.getMethods()) {
          if (method.getParameters().size() == 0 && type.equals(method.getReturnType().getQualifiedName())) {
            if (method.getName().toLowerCase().contains(name.toLowerCase())) {
              result=method.getName() + "String_Node_Str";
              break;
            }
          }
        }
      }
      if (result != null) {
        break;
      }
 else       if (type != null && member.isPublic()) {
        String memberName=member.getName();
        if (member instanceof Method && memberName.startsWith("String_Node_Str")) {
          memberName=memberName.substring(3);
          memberName=Strings.uncapitalize(memberName);
        }
        result=memberName;
      }
    }
  }
  if (result == null) {
    throw new RuntimeException("String_Node_Str" + entity.getQualifiedName() + "String_Node_Str");
  }
  return result;
}
Program: 151431
Project: 151431
Buggy source:
@Test public void testRegularExpressionField() throws Exception {
  Project project=projectHelper.createWebProject();
  projectHelper.installJPA_2_0(project);
  projectHelper.installValidation(project);
  JavaResource jpaEntity=projectHelper.createJPAEntity(project,"String_Node_Str");
  WizardCommandController wizard=testHarness.createWizardController(AddConstraintWizard.class,project.getRoot());
  wizard.initialize();
{
    wizard.setValueFor("String_Node_Str",jpaEntity);
    Assert.assertTrue(wizard.canMoveToNextStep());
  }
  wizard.next().initialize();
{
    wizard.setValueFor("String_Node_Str","String_Node_Str");
    wizard.setValueFor("String_Node_Str",CoreConstraints.PATTERN);
    Assert.assertTrue(wizard.canMoveToNextStep());
  }
  wizard.next().initialize();
{
    Assert.assertFalse(wizard.isValid());
    wizard.setValueFor("String_Node_Str","String_Node_Str");
    Assert.assertTrue(wizard.isValid());
  }
  wizard.execute();
  JavaClass javaClass=(JavaClass)jpaEntity.getJavaSource();
  Field<JavaClass> field=javaClass.getField("String_Node_Str");
  Annotation<JavaClass> pattern=field.getAnnotation(Pattern.class);
  Assert.assertNotNull(pattern);
  Assert.assertEquals("String_Node_Str",pattern.getStringValue("String_Node_Str"));
}

Fixed version (ground truth):
@Ignore("String_Node_Str") @Test public void testRegularExpressionField() throws Exception {
  Project project=projectHelper.createWebProject();
  projectHelper.installJPA_2_0(project);
  projectHelper.installValidation(project);
  JavaResource jpaEntity=projectHelper.createJPAEntity(project,"String_Node_Str");
  WizardCommandController wizard=testHarness.createWizardController(AddConstraintWizard.class,project.getRoot());
  wizard.initialize();
{
    wizard.setValueFor("String_Node_Str",jpaEntity);
    Assert.assertTrue(wizard.canMoveToNextStep());
  }
  wizard.next().initialize();
{
    wizard.setValueFor("String_Node_Str","String_Node_Str");
    wizard.setValueFor("String_Node_Str",CoreConstraints.PATTERN);
    Assert.assertTrue(wizard.canMoveToNextStep());
  }
  wizard.next().initialize();
{
    Assert.assertFalse(wizard.isValid());
    wizard.setValueFor("String_Node_Str","String_Node_Str");
    Assert.assertTrue(wizard.isValid());
  }
  wizard.execute();
  JavaClass javaClass=(JavaClass)jpaEntity.getJavaSource();
  Field<JavaClass> field=javaClass.getField("String_Node_Str");
  Annotation<JavaClass> pattern=field.getAnnotation(Pattern.class);
  Assert.assertNotNull(pattern);
  Assert.assertEquals("String_Node_Str",pattern.getStringValue("String_Node_Str"));
}
Program: 151432
Project: 151432
Buggy source:
@Override public void close(final Git repo){
  repo.getRepository().close();
}

Fixed version (ground truth):
@Override public void close(final Git repo){
  if (repo != null) {
    repo.getRepository().close();
  }
}
Program: 151433
Project: 151433
Buggy source:
@Override public Result execute(UIExecutionContext context) throws Exception {
  DirectoryResource cloneFolder=targetDirectory.getValue();
  if (!cloneFolder.exists()) {
    cloneFolder.mkdirs();
  }
  Git clone=gitUtils.clone(cloneFolder,uri.getValue());
  gitUtils.close(clone);
  context.getUIContext().setSelection(cloneFolder);
  return Results.success();
}

Fixed version (ground truth):
@Override public Result execute(UIExecutionContext context) throws Exception {
  DirectoryResource cloneFolder=targetDirectory.getValue();
  if (!cloneFolder.exists()) {
    cloneFolder.mkdirs();
  }
  Git clone=null;
  try {
    clone=gitUtils.clone(cloneFolder,uri.getValue());
  }
  finally {
    gitUtils.close(clone);
  }
  context.getUIContext().setSelection(cloneFolder);
  return Results.success();
}
Program: 151434
Project: 151434
Buggy source:
@Override public void validate(UIValidationContext validator){
  DirectoryResource folder=targetDirectory.getValue();
  if (folder.exists() && (!folder.isDirectory() || !folder.listResources().isEmpty())) {
    validator.addValidationError(targetDirectory,"String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void validate(UIValidationContext validator){
  DirectoryResource folder=targetDirectory.getValue();
  if (folder == null || (folder.exists() && (!folder.isDirectory() || !folder.listResources().isEmpty()))) {
    validator.addValidationError(targetDirectory,"String_Node_Str");
  }
}
Program: 151435
Project: 151435
Buggy source:
@Ignore("String_Node_Str") @Test public void testRegularExpressionField() throws Exception {
  Project project=projectHelper.createWebProject();
  projectHelper.installJPA_2_0(project);
  projectHelper.installValidation(project);
  JavaResource jpaEntity=projectHelper.createJPAEntity(project,"String_Node_Str");
  WizardCommandController wizard=testHarness.createWizardController(AddConstraintWizard.class,project.getRoot());
  wizard.initialize();
{
    wizard.setValueFor("String_Node_Str",jpaEntity);
    Assert.assertTrue(wizard.canMoveToNextStep());
  }
  wizard.next().initialize();
{
    wizard.setValueFor("String_Node_Str","String_Node_Str");
    wizard.setValueFor("String_Node_Str",CoreConstraints.PATTERN);
    Assert.assertTrue(wizard.canMoveToNextStep());
  }
  wizard.next().initialize();
{
    Assert.assertFalse(wizard.isValid());
    wizard.setValueFor("String_Node_Str","String_Node_Str");
    Assert.assertTrue(wizard.isValid());
  }
  wizard.execute();
  JavaClass javaClass=(JavaClass)jpaEntity.getJavaSource();
  Field<JavaClass> field=javaClass.getField("String_Node_Str");
  Annotation<JavaClass> pattern=field.getAnnotation(Pattern.class);
  Assert.assertNotNull(pattern);
  Assert.assertEquals("String_Node_Str",pattern.getStringValue("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void testRegularExpressionField() throws Exception {
  Project project=projectHelper.createWebProject();
  projectHelper.installJPA_2_0(project);
  projectHelper.installValidation(project);
  JavaResource jpaEntity=projectHelper.createJPAEntity(project,"String_Node_Str");
  WizardCommandController wizard=testHarness.createWizardController(AddConstraintWizard.class,project.getRoot());
  wizard.initialize();
{
    wizard.setValueFor("String_Node_Str",jpaEntity);
    Assert.assertTrue(wizard.canMoveToNextStep());
  }
  wizard.next().initialize();
{
    wizard.setValueFor("String_Node_Str","String_Node_Str");
    wizard.setValueFor("String_Node_Str",CoreConstraints.PATTERN);
    Assert.assertTrue(wizard.canMoveToNextStep());
  }
  wizard.next().initialize();
{
    Assert.assertFalse(wizard.isValid());
    wizard.setValueFor("String_Node_Str","String_Node_Str");
    Assert.assertTrue(wizard.isValid());
  }
  wizard.execute();
  JavaClass javaClass=(JavaClass)jpaEntity.getJavaSource();
  Field<JavaClass> field=javaClass.getField("String_Node_Str");
  Annotation<JavaClass> pattern=field.getAnnotation(Pattern.class);
  Assert.assertNotNull(pattern);
  Assert.assertEquals("String_Node_Str",pattern.getStringValue("String_Node_Str"));
}
Program: 151436
Project: 151436
Buggy source:
ForgeInterruptHook(ForgeCommandRegistry registry,AeshConsole aeshConsole){
  this.registry=registry;
  this.aeshConsole=aeshConsole;
}

Fixed version (ground truth):
ForgeInterruptHook(ForgeCommandRegistry registry){
  this.registry=registry;
}
Program: 151437
Project: 151437
Buggy source:
public ShellImpl(FileResource<?> initialResource,Settings settings,CommandManager commandManager,AddonRegistry addonRegistry,CommandControllerFactory commandFactory){
  this.currentResource=initialResource;
  this.addonRegistry=addonRegistry;
  File forgeHome=OperatingSystemUtils.getUserForgeDir();
  File history=new File(forgeHome,"String_Node_Str");
  File alias=new File(forgeHome,"String_Node_Str");
  File export=new File(forgeHome,"String_Node_Str");
  final ForgeCommandRegistry registry=new ForgeCommandRegistry(this,commandManager,commandFactory,commandManager.getConverterFactory());
  Settings newSettings=new SettingsBuilder(settings).historyFile(history).aliasFile(alias).exportFile(export).interruptHook(new ForgeInterruptHook(registry,this.console)).create();
  this.console=new AeshConsoleBuilder().prompt(createPrompt()).settings(newSettings).commandRegistry(registry).commandNotFoundHandler(new ForgeCommandNotFoundHandler(registry)).create();
  this.output=new ShellUIOutputImpl(console);
  this.console.start();
}

Fixed version (ground truth):
public ShellImpl(FileResource<?> initialResource,Settings settings,CommandManager commandManager,AddonRegistry addonRegistry,CommandControllerFactory commandFactory){
  this.currentResource=initialResource;
  this.addonRegistry=addonRegistry;
  File forgeHome=OperatingSystemUtils.getUserForgeDir();
  File history=new File(forgeHome,"String_Node_Str");
  File alias=new File(forgeHome,"String_Node_Str");
  File export=new File(forgeHome,"String_Node_Str");
  final ForgeCommandRegistry registry=new ForgeCommandRegistry(this,commandManager,commandFactory,commandManager.getConverterFactory());
  Settings newSettings=new SettingsBuilder(settings).historyFile(history).aliasFile(alias).exportFile(export).interruptHook(new ForgeInterruptHook(registry)).create();
  this.console=new AeshConsoleBuilder().prompt(createPrompt()).settings(newSettings).commandRegistry(registry).commandNotFoundHandler(new ForgeCommandNotFoundHandler(registry)).create();
  this.output=new ShellUIOutputImpl(console);
  this.console.start();
}
Program: 151438
Project: 151438
Buggy source:
@Override public void handleInterrupt(Console console,Action action){
  if (action == Action.INTERRUPT) {
    console.getShell().out().println("String_Node_Str");
    console.clearBufferAndDisplayPrompt();
  }
 else   if (action == Action.IGNOREEOF) {
    console.getShell().out().println("String_Node_Str");
    console.clearBufferAndDisplayPrompt();
  }
 else {
    try {
      CommandContainer exitCommand=registry.getCommand("String_Node_Str","String_Node_Str");
      console.getShell().out().println();
      exitCommand.getCommand().execute(new AeshCommandInvocation(aeshConsole,ControlOperator.NONE,null));
    }
 catch (    CommandNotFoundException|IOException ignored) {
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public void handleInterrupt(Console console,Action action){
  if (action == Action.INTERRUPT) {
    console.getShell().out().println("String_Node_Str");
    console.clearBufferAndDisplayPrompt();
  }
 else   if (action == Action.IGNOREEOF) {
    console.getShell().out().println("String_Node_Str");
    console.clearBufferAndDisplayPrompt();
  }
 else {
    try {
      CommandContainer exitCommand=registry.getCommand("String_Node_Str","String_Node_Str");
      console.getShell().out().println();
      exitCommand.getCommand().execute(new AeshCommandInvocation(ShellImpl.this.console,ControlOperator.NONE,null));
    }
 catch (    CommandNotFoundException|IOException e) {
      log.log(Level.WARNING,"String_Node_Str",e);
    }
  }
}
Program: 151439
Project: 151439
Buggy source:
@Override @Produces @ApplicationScoped public Configuration getUserConfiguration() throws ConfigurationException {
  if (userConfiguration == null) {
    String property=System.getProperty(USER_CONFIG_PATH);
    File userConfigurationFile;
    if (property == null || property.isEmpty()) {
      userConfigurationFile=new File(OperatingSystemUtils.getUserForgeDir(),"String_Node_Str");
    }
 else {
      userConfigurationFile=new File(property);
    }
    if (!userConfigurationFile.exists() || userConfigurationFile.length() == 0L) {
      userConfigurationFile.mkdirs();
      try (FileWriter fw=new FileWriter(userConfigurationFile)){
        fw.write("String_Node_Str");
      }
 catch (      IOException e) {
        throw new ConfigurationException("String_Node_Str",e);
      }
    }
    userConfiguration=getConfiguration(userConfigurationFile);
  }
  return userConfiguration;
}

Fixed version (ground truth):
@Override @Produces @ApplicationScoped public Configuration getUserConfiguration() throws ConfigurationException {
  if (userConfiguration == null) {
    String property=System.getProperty(USER_CONFIG_PATH);
    File userConfigurationFile;
    if (property == null || property.isEmpty()) {
      userConfigurationFile=new File(OperatingSystemUtils.getUserForgeDir(),"String_Node_Str");
    }
 else {
      userConfigurationFile=new File(property);
    }
    if (!userConfigurationFile.exists() || userConfigurationFile.length() == 0L) {
      File parentFile=userConfigurationFile.getParentFile();
      if (parentFile != null) {
        parentFile.mkdirs();
      }
      try (FileWriter fw=new FileWriter(userConfigurationFile)){
        fw.write("String_Node_Str");
      }
 catch (      IOException e) {
        throw new ConfigurationException("String_Node_Str",e);
      }
    }
    userConfiguration=getConfiguration(userConfigurationFile);
  }
  return userConfiguration;
}
Program: 151440
Project: 151440
Buggy source:
@Override @Produces @ApplicationScoped public Configuration getUserConfiguration() throws ConfigurationException {
  if (userConfiguration == null) {
    String property=System.getProperty(USER_CONFIG_PATH);
    File userConfigurationFile;
    if (property == null || property.isEmpty()) {
      userConfigurationFile=new File(OperatingSystemUtils.getUserForgeDir(),"String_Node_Str");
    }
 else {
      userConfigurationFile=new File(property);
    }
    if (!userConfigurationFile.exists() || userConfigurationFile.length() == 0L) {
      try {
        FileUtils.writeStringToFile(userConfigurationFile,"String_Node_Str");
      }
 catch (      IOException e) {
        throw new ConfigurationException("String_Node_Str",e);
      }
    }
    userConfiguration=getConfiguration(userConfigurationFile);
  }
  return userConfiguration;
}

Fixed version (ground truth):
@Override @Produces @ApplicationScoped public Configuration getUserConfiguration() throws ConfigurationException {
  if (userConfiguration == null) {
    String property=System.getProperty(USER_CONFIG_PATH);
    File userConfigurationFile;
    if (property == null || property.isEmpty()) {
      userConfigurationFile=new File(OperatingSystemUtils.getUserForgeDir(),"String_Node_Str");
    }
 else {
      userConfigurationFile=new File(property);
    }
    if (!userConfigurationFile.exists() || userConfigurationFile.length() == 0L) {
      try (FileWriter fw=new FileWriter(userConfigurationFile)){
        fw.write("String_Node_Str");
      }
 catch (      IOException e) {
        throw new ConfigurationException("String_Node_Str",e);
      }
    }
    userConfiguration=getConfiguration(userConfigurationFile);
  }
  return userConfiguration;
}
Program: 151443
Project: 151443
Buggy source:
@Test(timeout=10000) public void testTransactionTrackChanges() throws Exception {
  test.clearScreen();
  DirectoryResource tempDir=factory.create(OperatingSystemUtils.createTempDir()).reify(DirectoryResource.class);
  tempDir.deleteOnExit();
  test.getShell().setCurrentResource(tempDir);
  Assert.assertFalse(test.execute("String_Node_Str",SHELL_TIMEOUT,TimeUnit.SECONDS) instanceof Failed);
  test.waitForStdOutValue("String_Node_Str",SHELL_TIMEOUT,TimeUnit.SECONDS);
  Assert.assertFalse(test.execute("String_Node_Str",SHELL_TIMEOUT,TimeUnit.SECONDS) instanceof Failed);
  test.waitForStdOutValue("String_Node_Str" + tempDir.getFullyQualifiedName() + "String_Node_Str",SHELL_TIMEOUT,TimeUnit.SECONDS);
  Assert.assertFalse(test.execute("String_Node_Str",SHELL_TIMEOUT,TimeUnit.SECONDS) instanceof Failed);
  test.waitForStdOutValue("String_Node_Str" + tempDir.getFullyQualifiedName() + "String_Node_Str",SHELL_TIMEOUT,TimeUnit.SECONDS);
  Assert.assertFalse(test.execute("String_Node_Str",SHELL_TIMEOUT,TimeUnit.SECONDS) instanceof Failed);
  test.waitForStdOutValue("String_Node_Str",SHELL_TIMEOUT,TimeUnit.SECONDS);
}

Fixed version (ground truth):
@Test(timeout=10000) public void testTransactionTrackChanges() throws Exception {
  test.clearScreen();
  DirectoryResource tempDir=factory.create(OperatingSystemUtils.createTempDir()).reify(DirectoryResource.class);
  tempDir.deleteOnExit();
  test.getShell().setCurrentResource(tempDir);
  Assert.assertFalse(test.execute("String_Node_Str",SHELL_TIMEOUT,TimeUnit.SECONDS) instanceof Failed);
  test.waitForStdOutValue("String_Node_Str",SHELL_TIMEOUT,TimeUnit.SECONDS);
  Assert.assertFalse(test.execute("String_Node_Str",SHELL_TIMEOUT,TimeUnit.SECONDS) instanceof Failed);
  test.waitForStdOutValue("String_Node_Str" + tempDir.getFullyQualifiedName() + File.separator+ "String_Node_Str",SHELL_TIMEOUT,TimeUnit.SECONDS);
  Assert.assertFalse(test.execute("String_Node_Str",SHELL_TIMEOUT,TimeUnit.SECONDS) instanceof Failed);
  test.waitForStdOutValue("String_Node_Str" + tempDir.getFullyQualifiedName() + File.separator+ "String_Node_Str",SHELL_TIMEOUT,TimeUnit.SECONDS);
  Assert.assertFalse(test.execute("String_Node_Str",SHELL_TIMEOUT,TimeUnit.SECONDS) instanceof Failed);
  test.waitForStdOutValue("String_Node_Str",SHELL_TIMEOUT,TimeUnit.SECONDS);
}
Program: 151444
Project: 151444
Buggy source:
@Test(timeout=10000) public void testTransactionTrackChangesExistingTransaction() throws Exception {
  test.clearScreen();
  DirectoryResource tempDir=factory.create(OperatingSystemUtils.createTempDir()).reify(DirectoryResource.class);
  tempDir.deleteOnExit();
  test.getShell().setCurrentResource(tempDir);
  Assert.assertFalse(test.execute("String_Node_Str",SHELL_TIMEOUT,TimeUnit.SECONDS) instanceof Failed);
  Assert.assertFalse(test.execute("String_Node_Str",SHELL_TIMEOUT,TimeUnit.SECONDS) instanceof Failed);
  Assert.assertFalse(test.execute("String_Node_Str",SHELL_TIMEOUT,TimeUnit.SECONDS) instanceof Failed);
  Assert.assertFalse(test.execute("String_Node_Str",SHELL_TIMEOUT,TimeUnit.SECONDS) instanceof Failed);
  test.clearScreen();
  Assert.assertFalse(test.execute("String_Node_Str",SHELL_TIMEOUT,TimeUnit.SECONDS) instanceof Failed);
  test.waitForStdOutValue("String_Node_Str" + tempDir.getFullyQualifiedName() + "String_Node_Str",SHELL_TIMEOUT,TimeUnit.SECONDS);
  test.waitForStdOutValue("String_Node_Str" + tempDir.getFullyQualifiedName() + "String_Node_Str",SHELL_TIMEOUT,TimeUnit.SECONDS);
  Assert.assertFalse(test.execute("String_Node_Str",SHELL_TIMEOUT,TimeUnit.SECONDS) instanceof Failed);
  test.waitForStdOutValue("String_Node_Str",SHELL_TIMEOUT,TimeUnit.SECONDS);
}

Fixed version (ground truth):
@Test(timeout=10000) public void testTransactionTrackChangesExistingTransaction() throws Exception {
  test.clearScreen();
  DirectoryResource tempDir=factory.create(OperatingSystemUtils.createTempDir()).reify(DirectoryResource.class);
  tempDir.deleteOnExit();
  test.getShell().setCurrentResource(tempDir);
  Assert.assertFalse(test.execute("String_Node_Str",SHELL_TIMEOUT,TimeUnit.SECONDS) instanceof Failed);
  Assert.assertFalse(test.execute("String_Node_Str",SHELL_TIMEOUT,TimeUnit.SECONDS) instanceof Failed);
  Assert.assertFalse(test.execute("String_Node_Str",SHELL_TIMEOUT,TimeUnit.SECONDS) instanceof Failed);
  Assert.assertFalse(test.execute("String_Node_Str",SHELL_TIMEOUT,TimeUnit.SECONDS) instanceof Failed);
  test.clearScreen();
  Assert.assertFalse(test.execute("String_Node_Str",SHELL_TIMEOUT,TimeUnit.SECONDS) instanceof Failed);
  test.waitForStdOutValue("String_Node_Str" + tempDir.getFullyQualifiedName() + File.separator+ "String_Node_Str",SHELL_TIMEOUT,TimeUnit.SECONDS);
  test.waitForStdOutValue("String_Node_Str" + tempDir.getFullyQualifiedName() + File.separator+ "String_Node_Str",SHELL_TIMEOUT,TimeUnit.SECONDS);
  Assert.assertFalse(test.execute("String_Node_Str",SHELL_TIMEOUT,TimeUnit.SECONDS) instanceof Failed);
  test.waitForStdOutValue("String_Node_Str",SHELL_TIMEOUT,TimeUnit.SECONDS);
}
Program: 151446
Project: 151446
Buggy source:
public Map<String,InputComponent<?,?>> populateUIInputs(CommandLine commandLine,Map<String,InputComponent<?,?>> inputs){
  Map<String,InputComponent<?,?>> populatedInputs=new HashMap<>();
  for (  Entry<String,InputComponent<?,?>> entry : inputs.entrySet()) {
    String name=entry.getKey();
    InputComponent<?,?> input=entry.getValue();
    if (ARGUMENTS_INPUT_NAME.equals(name)) {
      InputComponents.setValueFor(converterFactory,input,commandLine.getArgument().getValues());
      populatedInputs.put(name,input);
    }
    if (commandLine.hasOption(name)) {
      if (input instanceof ManyValued) {
        InputComponents.setValueFor(converterFactory,input,commandLine.getOptionValues(input.getName()));
        populatedInputs.put(name,input);
      }
 else       if (input instanceof SingleValued) {
        InputComponents.setValueFor(converterFactory,input,commandLine.getOptionValue(input.getName()));
        populatedInputs.put(name,input);
      }
    }
  }
  return populatedInputs;
}

Fixed version (ground truth):
public Map<String,InputComponent<?,?>> populateUIInputs(CommandLine commandLine,Map<String,InputComponent<?,?>> inputs){
  Map<String,InputComponent<?,?>> populatedInputs=new LinkedHashMap<>();
  for (  Entry<String,InputComponent<?,?>> entry : inputs.entrySet()) {
    String name=entry.getKey();
    InputComponent<?,?> input=entry.getValue();
    if (ARGUMENTS_INPUT_NAME.equals(name)) {
      InputComponents.setValueFor(converterFactory,input,commandLine.getArgument().getValues());
      populatedInputs.put(name,input);
    }
    if (commandLine.hasOption(name)) {
      if (input instanceof ManyValued) {
        InputComponents.setValueFor(converterFactory,input,commandLine.getOptionValues(input.getName()));
        populatedInputs.put(name,input);
      }
 else       if (input instanceof SingleValued) {
        InputComponents.setValueFor(converterFactory,input,commandLine.getOptionValue(input.getName()));
        populatedInputs.put(name,input);
      }
    }
  }
  return populatedInputs;
}
Program: 151447
Project: 151447
Buggy source:
private CommandLineParser populate(ShellContext shellContext,String line,final Map<String,InputComponent<?,?>> allInputs,Map<String,InputComponent<?,?>> lastPage) throws Exception {
  WizardCommandController controller=getController();
  Map<String,InputComponent<?,?>> pageInputs=new HashMap<>(controller.getInputs());
  allInputs.putAll(pageInputs);
  CommandLineParser parser=commandLineUtil.generateParser(controller,shellContext,allInputs);
  CommandLine cmdLine=parser.parse(line,true);
  Map<String,InputComponent<?,?>> populatedInputs=commandLineUtil.populateUIInputs(cmdLine,allInputs);
  boolean inputsChanged=false;
  for (  String input : pageInputs.keySet()) {
    if (populatedInputs.containsKey(input)) {
      lastPage.keySet().removeAll(populatedInputs.keySet());
      allInputs.keySet().removeAll(lastPage.keySet());
      inputsChanged=true;
      break;
    }
  }
  if (controller.canMoveToNextStep()) {
    controller.next().initialize();
    parser=populate(shellContext,line,allInputs,pageInputs);
  }
 else   if (inputsChanged) {
    parser=commandLineUtil.generateParser(controller,shellContext,allInputs);
  }
  return parser;
}

Fixed version (ground truth):
private CommandLineParser populate(ShellContext shellContext,String line,final Map<String,InputComponent<?,?>> allInputs,Map<String,InputComponent<?,?>> lastPage) throws Exception {
  WizardCommandController controller=getController();
  Map<String,InputComponent<?,?>> pageInputs=new LinkedHashMap<>(controller.getInputs());
  allInputs.putAll(pageInputs);
  CommandLineParser parser=commandLineUtil.generateParser(controller,shellContext,allInputs);
  CommandLine cmdLine=parser.parse(line,true);
  Map<String,InputComponent<?,?>> populatedInputs=commandLineUtil.populateUIInputs(cmdLine,allInputs);
  parser=commandLineUtil.generateParser(controller,shellContext,allInputs);
  cmdLine=parser.parse(line,true);
  populatedInputs=commandLineUtil.populateUIInputs(cmdLine,allInputs);
  boolean inputsChanged=false;
  for (  String input : pageInputs.keySet()) {
    if (populatedInputs.containsKey(input)) {
      lastPage.keySet().removeAll(populatedInputs.keySet());
      allInputs.keySet().removeAll(lastPage.keySet());
      inputsChanged=true;
      break;
    }
  }
  if (controller.canMoveToNextStep()) {
    controller.next().initialize();
    parser=populate(shellContext,line,allInputs,pageInputs);
  }
 else   if (inputsChanged) {
    parser=commandLineUtil.generateParser(controller,shellContext,allInputs);
  }
  return parser;
}
Program: 151448
Project: 151448
Buggy source:
@Override public CommandLineParser getParser(ShellContext shellContext,String completeLine) throws Exception {
  getController().initialize();
  return populate(shellContext,completeLine,new HashMap<String,InputComponent<?,?>>(),new HashMap<String,InputComponent<?,?>>());
}

Fixed version (ground truth):
@Override public CommandLineParser getParser(ShellContext shellContext,String completeLine) throws Exception {
  getController().initialize();
  return populate(shellContext,completeLine,new LinkedHashMap<String,InputComponent<?,?>>(),new LinkedHashMap<String,InputComponent<?,?>>());
}
Program: 151449
Project: 151449
Buggy source:
@Override public Result execute(UIExecutionContext context) throws Exception {
  final Result result;
  Shell shell=(Shell)context.getUIContext().getProvider();
  Resource<?> currentResource=shell.getCurrentResource();
  Iterator<String> it=arguments.hasValue() ? arguments.getValue().iterator() : Collections.<String>emptyIterator();
  final Resource<?> resource;
  if (it.hasNext()) {
    List<Resource<?>> resourceList=new PathspecParser(resourceFactory,currentResource,it.next()).resolve();
    if (resourceList.isEmpty()) {
      resource=null;
    }
 else {
      resource=resourceList.get(0);
    }
  }
 else {
    resource=currentResource;
  }
  if (resource == null || !resource.exists()) {
    result=Results.fail(resource.getName() + "String_Node_Str");
  }
 else {
    UIOutput output=shell.getOutput();
    output.out().println(listMany(resource.listResources(),shell));
    result=Results.success();
  }
  return result;
}

Fixed version (ground truth):
@Override public Result execute(UIExecutionContext context) throws Exception {
  Shell shell=(Shell)context.getUIContext().getProvider();
  Resource<?> currentResource=shell.getCurrentResource();
  Iterator<String> it=arguments.hasValue() ? arguments.getValue().iterator() : Collections.<String>emptyIterator();
  List<Resource<?>> resourceList;
  if (it.hasNext()) {
    String value=it.next();
    boolean searching=(value.matches("String_Node_Str"));
    resourceList=new PathspecParser(resourceFactory,currentResource,value).resolve();
    if (!searching && !resourceList.isEmpty() && resourceList.get(0).exists()) {
      resourceList=resourceList.get(0).listResources();
    }
  }
 else {
    resourceList=currentResource.listResources();
  }
  final Result result;
  if (!resourceList.isEmpty() && !resourceList.get(0).exists()) {
    result=Results.fail(resourceList.get(0).getName() + "String_Node_Str");
  }
 else {
    UIOutput output=shell.getOutput();
    output.out().println(listMany(resourceList,shell));
    result=Results.success();
  }
  return result;
}
Program: 151450
Project: 151450
Buggy source:
@Test @Ignore("String_Node_Str") public void testLsCommand() throws Exception {
  Project project=projectFactory.createTempProject();
  String projectPath=project.getProjectRoot().getFullyQualifiedName();
  shellTest.execute("String_Node_Str" + projectPath,5,TimeUnit.SECONDS);
  shellTest.execute("String_Node_Str",5,TimeUnit.SECONDS);
  shellTest.clearScreen();
  shellTest.execute("String_Node_Str",5,TimeUnit.SECONDS);
  Assert.assertThat(shellTest.getStdOut(),CoreMatchers.containsString("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void testLsCommand() throws Exception {
  Project project=projectFactory.createTempProject();
  String projectPath=project.getProjectRoot().getFullyQualifiedName();
  shellTest.execute("String_Node_Str" + projectPath,5,TimeUnit.SECONDS);
  shellTest.execute("String_Node_Str",5,TimeUnit.SECONDS);
  shellTest.clearScreen();
  shellTest.execute("String_Node_Str",5,TimeUnit.HOURS);
  Assert.assertThat(shellTest.getStdOut(),CoreMatchers.containsString("String_Node_Str"));
}
Program: 151451
Project: 151451
Buggy source:
public void initializeUI(UIBuilder builder) throws Exception {
  builder.add(jdbcUrl).add(userName).add(userPassword).add(hibernateDialect).add(driverLocation).add(driverClass);
  hibernateDialect.setItemLabelConverter(new Converter<HibernateDialect,String>(){
    @Override public String convert(    HibernateDialect dialect){
      return dialect == null ? null : dialect.getDatabaseName() + "String_Node_Str" + dialect.getClassName();
    }
  }
);
  driverLocation.setValidator(new UIValidator(){
    @Override public void validate(    UIValidationContext context){
      FileResource<?> resource=driverLocation.getValue();
      if (resource != null && !resource.exists()) {
        context.addValidationError(driverLocation,"String_Node_Str" + resource.getFullyQualifiedName() + "String_Node_Str");
      }
    }
  }
);
  driverClass.setValueChoices(new Callable<Iterable<String>>(){
    @Override public Iterable<String> call() throws Exception {
      return getDriverClassNames();
    }
  }
);
  driverClass.setDefaultValue(new Callable<String>(){
    @Override public String call() throws Exception {
      String result=null;
      Iterator<String> iterator=driverClass.getValueChoices().iterator();
      if (iterator.hasNext()) {
        result=iterator.next();
      }
      return result;
    }
  }
);
}

Fixed version (ground truth):
public void initializeUI(UIBuilder builder) throws Exception {
  builder.add(jdbcUrl).add(userName).add(userPassword).add(hibernateDialect).add(driverLocation).add(driverClass);
  hibernateDialect.setItemLabelConverter(new Converter<HibernateDialect,String>(){
    @Override public String convert(    HibernateDialect dialect){
      return dialect == null ? null : dialect.getDatabaseName() + "String_Node_Str" + dialect.getClassName();
    }
  }
);
  driverLocation.addValidator(new UIValidator(){
    @Override public void validate(    UIValidationContext context){
      FileResource<?> resource=driverLocation.getValue();
      if (resource != null && !resource.exists()) {
        context.addValidationError(driverLocation,"String_Node_Str" + resource.getFullyQualifiedName() + "String_Node_Str");
      }
    }
  }
);
  driverClass.setValueChoices(new Callable<Iterable<String>>(){
    @Override public Iterable<String> call() throws Exception {
      return getDriverClassNames();
    }
  }
);
  driverClass.setDefaultValue(new Callable<String>(){
    @Override public String call() throws Exception {
      String result=null;
      Iterator<String> iterator=driverClass.getValueChoices().iterator();
      if (iterator.hasNext()) {
        result=iterator.next();
      }
      return result;
    }
  }
);
}