nus-yam/ex-repair huggingface dataset:
Program: 15364
Project: 15364
Buggy source:
public StaticPropertyEntry(Class definingClass,String entrySetName,Field field,String description,String defaultValue,PropertyTypeParser typeParser,Boolean readOnly,String displayName,ConfigurableFieldType widgetType,String alias,PropertyChangeListener changeListener){
  super(definingClass,entrySetName,field.getName(),defaultValue,description,typeParser,readOnly,displayName,widgetType,alias,changeListener);
  this.field=field;
}

Fixed version (ground truth):
public StaticPropertyEntry(Class definingClass,String entrySetName,Field field,String description,String defaultValue,PropertyTypeParser typeParser,Boolean readOnly,String displayName,ConfigurableFieldType widgetType,String alias,PropertyChangeListener changeListener){
  super(definingClass,entrySetName,field,field.getName(),defaultValue,description,typeParser,readOnly,displayName,widgetType,alias,changeListener);
  this.field=field;
}
Program: 15367
Project: 15367
Buggy source:
static final CheckedListenableFuture<ServiceConfiguration> disableTransitionChain(final ServiceConfiguration config){
  if (!State.DISABLED.equals(config.lookupState()) && State.ENABLED.equals(config.lookupState())) {
    Callable<CheckedListenableFuture<ServiceConfiguration>> transition=Automata.sequenceTransitions(config,Component.State.ENABLED,Component.State.DISABLED);
    try {
      return transition.call();
    }
 catch (    Exception ex) {
      LOG.error(ex,ex);
      throw new RuntimeException(ex);
    }
  }
 else   if (!State.DISABLED.equals(config.lookupState())) {
    Callable<CheckedListenableFuture<ServiceConfiguration>> transition=Automata.sequenceTransitions(config,Component.State.INITIALIZED,Component.State.LOADED,Component.State.NOTREADY,Component.State.DISABLED,Component.State.DISABLED);
    try {
      return transition.call();
    }
 catch (    Exception ex) {
      LOG.error(ex,ex);
      throw new RuntimeException(ex);
    }
  }
 else {
    return Futures.predestinedFuture(config);
  }
}

Fixed version (ground truth):
static final CheckedListenableFuture<ServiceConfiguration> disableTransitionChain(final ServiceConfiguration config){
  if (State.ENABLED.isIn(config)) {
    Callable<CheckedListenableFuture<ServiceConfiguration>> transition=Automata.sequenceTransitions(config,Component.State.ENABLED,Component.State.DISABLED);
    try {
      return transition.call();
    }
 catch (    Exception ex) {
      LOG.error(ex,ex);
      throw new RuntimeException(ex);
    }
  }
 else   if (!State.DISABLED.isIn(config) && !State.NOTREADY.isIn(config)) {
    Callable<CheckedListenableFuture<ServiceConfiguration>> transition=Automata.sequenceTransitions(config,Component.State.INITIALIZED,Component.State.LOADED,Component.State.NOTREADY,Component.State.DISABLED,Component.State.DISABLED);
    try {
      return transition.call();
    }
 catch (    Exception ex) {
      LOG.error(ex,ex);
      throw new RuntimeException(ex);
    }
  }
 else {
    return Futures.predestinedFuture(config);
  }
}
Program: 15368
Project: 15368
Buggy source:
static final CheckedListenableFuture<ServiceConfiguration> stopTransitionChain(final ServiceConfiguration config){
  if (!State.STOPPED.equals(config.lookupState())) {
    CheckedListenableFuture<ServiceConfiguration> transitionResult=null;
    Callable<CheckedListenableFuture<ServiceConfiguration>> transition=Automata.sequenceTransitions(config,Component.State.ENABLED,Component.State.DISABLED,Component.State.STOPPED);
    try {
      return transition.call();
    }
 catch (    Exception ex) {
      LOG.error(ex,ex);
      throw new RuntimeException(ex);
    }
  }
 else {
    return Futures.predestinedFuture(config);
  }
}

Fixed version (ground truth):
static final CheckedListenableFuture<ServiceConfiguration> stopTransitionChain(final ServiceConfiguration config){
  Component.State currState=config.lookupState();
  if (State.ENABLED.equals(currState)) {
    Callable<CheckedListenableFuture<ServiceConfiguration>> transition=Automata.sequenceTransitions(config,Component.State.ENABLED,Component.State.DISABLED,Component.State.STOPPED);
    try {
      return transition.call();
    }
 catch (    Exception ex) {
      LOG.error(ex,ex);
      throw new RuntimeException(ex);
    }
  }
 else   if (State.DISABLED.equals(currState) || State.NOTREADY.equals(currState)) {
    Callable<CheckedListenableFuture<ServiceConfiguration>> transition=Automata.sequenceTransitions(config,currState,Component.State.STOPPED);
    try {
      return transition.call();
    }
 catch (    Exception ex) {
      LOG.error(ex,ex);
      throw new RuntimeException(ex);
    }
  }
 else {
    return Futures.predestinedFuture(config);
  }
}
Program: 15369
Project: 15369
Buggy source:
static final CheckedListenableFuture<ServiceConfiguration> destroyTransitionChain(final ServiceConfiguration config){
  if (!State.PRIMORDIAL.equals(config.lookupState())) {
    Callable<CheckedListenableFuture<ServiceConfiguration>> transition=Automata.sequenceTransitions(config,Component.State.ENABLED,Component.State.DISABLED,Component.State.STOPPED);
    try {
      return transition.call();
    }
 catch (    Exception ex) {
      LOG.error(ex,ex);
      throw new RuntimeException(ex);
    }
  }
 else {
    return Futures.predestinedFuture(config);
  }
}

Fixed version (ground truth):
static final CheckedListenableFuture<ServiceConfiguration> destroyTransitionChain(final ServiceConfiguration config){
  if (!State.PRIMORDIAL.isIn(config)) {
    Callable<CheckedListenableFuture<ServiceConfiguration>> transition=Automata.sequenceTransitions(config,Component.State.ENABLED,Component.State.DISABLED,Component.State.STOPPED);
    try {
      return transition.call();
    }
 catch (    Exception ex) {
      LOG.error(ex,ex);
      throw new RuntimeException(ex);
    }
  }
 else {
    return Futures.predestinedFuture(config);
  }
}
Program: 15370
Project: 15370
Buggy source:
private Object getQueryObject() throws Exception {
  Object queryObject=super.getDefiningClass().newInstance();
  setIdentifier.invoke(queryObject,identifierValue);
  return queryObject;
}

Fixed version (ground truth):
protected Object getQueryObject() throws Exception {
  Object queryObject=super.getDefiningClass().newInstance();
  setIdentifier.invoke(queryObject,identifierValue);
  return queryObject;
}
Program: 15371
Project: 15371
Buggy source:
public abstract String getValue();

Fixed version (ground truth):
public String getValue(){
  EntityWrapper db=EntityWrapper.get(this.getDefiningClass());
  try {
    Object o=db.getUnique(this.getQueryObject());
    Method getter=this.getGetter();
    Object prop=null;
    if (getter != null) {
      prop=getter.invoke(o);
    }
    String result=prop != null ? prop.toString() : "String_Node_Str";
    db.commit();
    return result;
  }
 catch (  Exception e) {
    db.rollback();
    return "String_Node_Str" + e.getMessage();
  }
}
Program: 15372
Project: 15372
Buggy source:
public abstract String setValue(String s);

Fixed version (ground truth):
public String setValue(String s){
  EntityWrapper db=EntityWrapper.get(this.getDefiningClass());
  try {
    Object o=db.getUnique(this.getQueryObject());
    Object prop=this.getTypeParser().parse(s);
    this.fireChange(prop);
    Method setter=this.getSetter();
    if (setter != null) {
      setter.invoke(o,prop);
    }
    db.commit();
    return s;
  }
 catch (  Exception e) {
    db.rollback();
    return "String_Node_Str" + e.getMessage();
  }
}
Program: 15374
Project: 15374
Buggy source:
public AbstractConfigurableProperty(Class definingClass,String entrySetName,Field field,String propertyName,String defaultValue,String description,PropertyTypeParser typeParser,Boolean readOnly,String displayName,ConfigurableFieldType widgetType,String alias,PropertyChangeListener changeListener){
  this.definingClass=definingClass;
  this.field=field;
  this.entrySetName=entrySetName.toLowerCase();
  this.fieldName=propertyName.toLowerCase();
  this.baseMethodName=this.field.getName().substring(0,1).toUpperCase() + this.field.getName().substring(1);
  this.qualifiedName=this.entrySetName + "String_Node_Str" + this.fieldName;
  this.description=description;
  this.typeParser=typeParser;
  this.defaultValue=defaultValue;
  this.readOnly=readOnly;
  this.displayName=displayName;
  this.widgetType=widgetType;
  this.alias=alias;
  this.changeListener=changeListener;
  try {
    this.noArgConstructor=this.definingClass.getConstructor(new Class[]{});
    this.noArgConstructor.setAccessible(true);
  }
 catch (  Exception ex) {
    LOG.debug("String_Node_Str" + this.getDefiningClass().getDeclaredConstructors());
    LOG.debug("String_Node_Str" + this.getDefiningClass().getConstructors());
    LOG.debug(ex,ex);
    throw new RuntimeException(ex);
  }
  this.setArgs=new Class[]{this.field.getType()};
  this.get=this.getReflectedMethod("String_Node_Str" + this.baseMethodName);
  this.set=this.getReflectedMethod("String_Node_Str" + this.baseMethodName,this.setArgs);
}

Fixed version (ground truth):
public AbstractConfigurableProperty(Class definingClass,String entrySetName,Field field,String defaultValue,String description,PropertyTypeParser typeParser,Boolean readOnly,String displayName,ConfigurableFieldType widgetType,String alias,PropertyChangeListener changeListener){
  this.definingClass=definingClass;
  this.field=field;
  this.fieldName=this.field.getName().toLowerCase();
  this.entrySetName=entrySetName.toLowerCase();
  this.baseMethodName=this.field.getName().substring(0,1).toUpperCase() + this.field.getName().substring(1);
  this.qualifiedName=this.entrySetName + "String_Node_Str" + this.fieldName;
  this.description=description;
  this.typeParser=typeParser;
  this.defaultValue=defaultValue;
  this.readOnly=readOnly;
  this.displayName=displayName;
  this.widgetType=widgetType;
  this.alias=alias;
  this.changeListener=changeListener;
  try {
    this.noArgConstructor=this.definingClass.getConstructor(new Class[]{});
    this.noArgConstructor.setAccessible(true);
  }
 catch (  Exception ex) {
    LOG.debug("String_Node_Str" + this.getDefiningClass().getDeclaredConstructors());
    LOG.debug("String_Node_Str" + this.getDefiningClass().getConstructors());
    LOG.debug(ex,ex);
    throw new RuntimeException(ex);
  }
  this.setArgs=new Class[]{this.field.getType()};
  this.get=this.getReflectedMethod("String_Node_Str" + this.baseMethodName);
  this.set=this.getReflectedMethod("String_Node_Str" + this.baseMethodName,this.setArgs);
}
Program: 15375
Project: 15375
Buggy source:
@Override public String getEntrySetName(){
  if (identifierValue != null)   return identifierValue + "String_Node_Str" + this.getEntrySetName();
 else   return this.getEntrySetName();
}

Fixed version (ground truth):
@Override public String getEntrySetName(){
  if (identifierValue != null)   return identifierValue + "String_Node_Str" + super.getEntrySetName();
 else   return super.getEntrySetName();
}
Program: 15376
Project: 15376
Buggy source:
public MultiDatabasePropertyEntry getClone(String identifierValue){
  return new MultiDatabasePropertyEntry(this.getDefiningClass(),this.getEntrySetName(),field,identifierField,this.getDescription(),this.getDefaultValue(),this.getTypeParser(),this.getReadOnly(),this.getDisplayName(),this.getWidgetType(),this.getAlias(),identifierValue);
}

Fixed version (ground truth):
public MultiDatabasePropertyEntry getClone(String identifierValue){
  return new MultiDatabasePropertyEntry(this.getDefiningClass(),this.getEntrySetName(),this.getField(),identifierField,this.getDescription(),this.getDefaultValue(),this.getTypeParser(),this.getReadOnly(),this.getDisplayName(),this.getWidgetType(),this.getAlias(),identifierValue);
}
Program: 15377
Project: 15377
Buggy source:
public MultiDatabasePropertyEntry(Class definingClass,String entrySetName,Field field,Field identifierField,String description,String defaultValue,PropertyTypeParser typeParser,Boolean readOnly,String displayName,ConfigurableFieldType widgetType,String alias,String identifierValue){
  super(definingClass,entrySetName,field,field.getName(),defaultValue,description,typeParser,readOnly,displayName,widgetType,alias);
  this.identifierField=identifierField;
  String identifiedMethodName=identifierField.getName().substring(0,1).toUpperCase() + identifierField.getName().substring(1);
  this.identifierValue=identifierValue;
}

Fixed version (ground truth):
public MultiDatabasePropertyEntry(Class definingClass,String entrySetName,Field field,Field identifierField,String description,String defaultValue,PropertyTypeParser typeParser,Boolean readOnly,String displayName,ConfigurableFieldType widgetType,String alias,String identifierValue){
  super(definingClass,entrySetName,field,defaultValue,description,typeParser,readOnly,displayName,widgetType,alias);
  this.identifierField=identifierField;
  String identifiedMethodName=identifierField.getName().substring(0,1).toUpperCase() + identifierField.getName().substring(1);
  this.identifierValue=identifierValue;
}
Program: 15378
Project: 15378
Buggy source:
public SingletonDatabasePropertyEntry(Class definingClass,String entrySetName,Field field,String description,String defaultValue,PropertyTypeParser typeParser,Boolean readOnly,String displayName,ConfigurableFieldType widgetType,String alias){
  super(definingClass,entrySetName,field,field.getName(),defaultValue,description,typeParser,readOnly,displayName,widgetType,alias);
}

Fixed version (ground truth):
public SingletonDatabasePropertyEntry(Class definingClass,String entrySetName,Field field,String description,String defaultValue,PropertyTypeParser typeParser,Boolean readOnly,String displayName,ConfigurableFieldType widgetType,String alias){
  super(definingClass,entrySetName,field,defaultValue,description,typeParser,readOnly,displayName,widgetType,alias);
}
Program: 15379
Project: 15379
Buggy source:
public StaticPropertyEntry(Class definingClass,String entrySetName,Field field,String description,String defaultValue,PropertyTypeParser typeParser,Boolean readOnly,String displayName,ConfigurableFieldType widgetType,String alias,PropertyChangeListener changeListener){
  super(definingClass,entrySetName,field,field.getName(),defaultValue,description,typeParser,readOnly,displayName,widgetType,alias,changeListener);
  this.field=field;
}

Fixed version (ground truth):
public StaticPropertyEntry(Class definingClass,String entrySetName,Field field,String description,String defaultValue,PropertyTypeParser typeParser,Boolean readOnly,String displayName,ConfigurableFieldType widgetType,String alias,PropertyChangeListener changeListener){
  super(definingClass,entrySetName,field,defaultValue,description,typeParser,readOnly,displayName,widgetType,alias,changeListener);
  this.field=field;
}
Program: 15380
Project: 15380
Buggy source:
public String getValue(){
  EntityWrapper db=EntityWrapper.get(this.getDefiningClass());
  try {
    Object o=db.getUnique(this.getQueryObject());
    Method getter=this.getGetter();
    Object prop=null;
    if (getter != null) {
      prop=getter.invoke(o);
    }
    String result=prop != null ? prop.toString() : "String_Node_Str";
    db.commit();
    return result;
  }
 catch (  Exception e) {
    db.rollback();
    return "String_Node_Str" + e.getMessage();
  }
}

Fixed version (ground truth):
public String getValue(){
  EntityWrapper db=EntityWrapper.get(this.getDefiningClass());
  try {
    Object o=db.getUnique(this.getQueryObject());
    Object prop=this.getter.invoke(o);
    String result=prop != null ? prop.toString() : "String_Node_Str";
    db.commit();
    return result;
  }
 catch (  Exception e) {
    db.rollback();
    return "String_Node_Str" + e.getMessage();
  }
}
Program: 15381
Project: 15381
Buggy source:
private Method getReflectedMethod(String name,Class... setArgs2){
  try {
    Method m=definingClass.getDeclaredMethod(name,setArgs2);
    m.setAccessible(true);
    return m;
  }
 catch (  Exception e) {
    LOG.debug("String_Node_Str" + this.getDefiningClass().getDeclaredMethods());
    LOG.debug("String_Node_Str" + this.getDefiningClass().getMethods());
    LOG.debug(e,e);
    return null;
  }
}

Fixed version (ground truth):
private Method getReflectedMethod(String namePrefix,Field field,Class... setArgs2){
  try {
    String name=namePrefix + this.field.getName().substring(0,1).toUpperCase() + this.field.getName().substring(1);
    Method m=definingClass.getDeclaredMethod(name,setArgs2);
    m.setAccessible(true);
    return m;
  }
 catch (  Exception e) {
    if (!Modifier.isStatic(field.getModifiers())) {
      LOG.debug("String_Node_Str" + this.getDefiningClass().getDeclaredMethods());
      LOG.debug("String_Node_Str" + this.getDefiningClass().getMethods());
      LOG.debug(e,e);
    }
    return null;
  }
}
Program: 15382
Project: 15382
Buggy source:
public String setValue(String s){
  EntityWrapper db=EntityWrapper.get(this.getDefiningClass());
  try {
    Object o=db.getUnique(this.getQueryObject());
    Object prop=this.getTypeParser().parse(s);
    this.fireChange(prop);
    Method setter=this.getSetter();
    if (setter != null) {
      setter.invoke(o,prop);
    }
    db.commit();
    return s;
  }
 catch (  Exception e) {
    db.rollback();
    return "String_Node_Str" + e.getMessage();
  }
}

Fixed version (ground truth):
public String setValue(String s){
  EntityWrapper db=EntityWrapper.get(this.getDefiningClass());
  try {
    Object o=db.getUnique(this.getQueryObject());
    Object prop=this.getTypeParser().parse(s);
    this.fireChange(prop);
    this.setter.invoke(o,prop);
    db.commit();
    return s;
  }
 catch (  Exception e) {
    db.rollback();
    return "String_Node_Str" + e.getMessage();
  }
}
Program: 15383
Project: 15383
Buggy source:
public AbstractConfigurableProperty(Class definingClass,String entrySetName,Field field,String defaultValue,String description,PropertyTypeParser typeParser,Boolean readOnly,String displayName,ConfigurableFieldType widgetType,String alias,PropertyChangeListener changeListener){
  this.definingClass=definingClass;
  this.field=field;
  this.fieldName=this.field.getName().toLowerCase();
  this.entrySetName=entrySetName.toLowerCase();
  this.baseMethodName=this.field.getName().substring(0,1).toUpperCase() + this.field.getName().substring(1);
  this.qualifiedName=this.entrySetName + "String_Node_Str" + this.fieldName;
  this.description=description;
  this.typeParser=typeParser;
  this.defaultValue=defaultValue;
  this.readOnly=readOnly;
  this.displayName=displayName;
  this.widgetType=widgetType;
  this.alias=alias;
  this.changeListener=changeListener;
  try {
    this.noArgConstructor=this.definingClass.getConstructor(new Class[]{});
    this.noArgConstructor.setAccessible(true);
  }
 catch (  Exception ex) {
    LOG.debug("String_Node_Str" + this.getDefiningClass().getDeclaredConstructors());
    LOG.debug("String_Node_Str" + this.getDefiningClass().getConstructors());
    LOG.debug(ex,ex);
    throw new RuntimeException(ex);
  }
  this.setArgs=new Class[]{this.field.getType()};
  this.get=this.getReflectedMethod("String_Node_Str" + this.baseMethodName);
  this.set=this.getReflectedMethod("String_Node_Str" + this.baseMethodName,this.setArgs);
}

Fixed version (ground truth):
public AbstractConfigurableProperty(Class definingClass,String entrySetName,Field field,String defaultValue,String description,PropertyTypeParser typeParser,Boolean readOnly,String displayName,ConfigurableFieldType widgetType,String alias,PropertyChangeListener changeListener){
  this.definingClass=definingClass;
  this.field=field;
  this.fieldName=this.field.getName().toLowerCase();
  this.entrySetName=entrySetName.toLowerCase();
  this.qualifiedName=this.entrySetName + "String_Node_Str" + this.fieldName;
  this.description=description;
  this.typeParser=typeParser;
  this.defaultValue=defaultValue;
  this.readOnly=readOnly;
  this.displayName=displayName;
  this.widgetType=widgetType;
  this.alias=alias;
  this.changeListener=changeListener;
  try {
    this.noArgConstructor=this.definingClass.getConstructor(new Class[]{});
    this.noArgConstructor.setAccessible(true);
  }
 catch (  Exception ex) {
    LOG.debug("String_Node_Str" + this.getDefiningClass().getDeclaredConstructors());
    LOG.debug("String_Node_Str" + this.getDefiningClass().getConstructors());
    LOG.debug(ex,ex);
    throw new RuntimeException(ex);
  }
  this.setArgs=new Class[]{this.field.getType()};
  this.getter=this.getReflectedMethod("String_Node_Str",this.field);
  this.setter=this.getReflectedMethod("String_Node_Str",this.field,this.setArgs);
}
Program: 15385
Project: 15385
Buggy source:
@Override public String getQualifiedName(){
  if (identifierValue != null)   return identifierValue + "String_Node_Str" + this.getQualifiedName();
 else   return this.getQualifiedName();
}

Fixed version (ground truth):
@Override public String getQualifiedName(){
  if (identifierValue != null)   return identifierValue + "String_Node_Str" + super.getQualifiedName();
 else   return super.getQualifiedName();
}
Program: 15386
Project: 15386
Buggy source:
/** 
 * operation self-cancelled 
 */
public void check() throws CheckException {
  List<Throwable> currentErrors=Lists.newArrayList();
  this.errors.drainTo(currentErrors);
  if (!currentErrors.isEmpty()) {
    CheckException ex=ServiceChecks.Severity.ERROR.transform(this.configuration,currentErrors);
    throw ex;
  }
}

Fixed version (ground truth):
public void check() throws CheckException {
  List<Throwable> currentErrors=Lists.newArrayList();
  this.errors.drainTo(currentErrors);
  if (!currentErrors.isEmpty()) {
    CheckException ex=ServiceChecks.Severity.ERROR.transform(this.configuration,currentErrors);
    throw ex;
  }
}
Program: 15388
Project: 15388
Buggy source:
/** 
 * @see com.eucalyptus.util.async.Request#dispatch(java.lang.String)
 * @param cluster
 * @return
 */
@Override public CheckedListenableFuture<R> dispatch(ServiceConfiguration serviceConfig){
  CheckedListenableFuture<R> ret=this.execute(serviceConfig).getResponse();
  try {
    ret.get();
  }
 catch (  ExecutionException ex) {
    LOG.error(ex,ex);
  }
catch (  InterruptedException ex) {
    LOG.error(ex,ex);
  }
  return ret;
}

Fixed version (ground truth):
/** 
 * @see com.eucalyptus.util.async.Request#dispatch(java.lang.String)
 * @param cluster
 * @return
 */
@Override public CheckedListenableFuture<R> dispatch(final ServiceConfiguration serviceConfig){
  Future<CheckedListenableFuture<R>> res=Threads.lookup(Empyrean.class,AsyncRequest.class,serviceConfig.getFullName().toString()).limitTo(NUM_WORKERS).submit(new Callable<CheckedListenableFuture<R>>(){
    @Override public CheckedListenableFuture<R> call() throws Exception {
      return AsyncRequest.this.execute(serviceConfig).getResponse();
    }
  }
);
  try {
    res.get().get();
    return res.get();
  }
 catch (  ExecutionException ex) {
    LOG.error(ex,ex);
    return Futures.predestinedFailedFuture(ex);
  }
catch (  InterruptedException ex) {
    Thread.currentThread().interrupt();
    LOG.error(ex,ex);
    return Futures.predestinedFailedFuture(ex);
  }
}
Program: 15389
Project: 15389
Buggy source:
@Override public void fireException(Throwable t){
  try {
    cb.fireException(t);
    AsyncRequest.this.result.setException(t);
  }
 catch (  Throwable ex) {
    AsyncRequest.this.result.setException(ex);
    LOG.error(ex,ex);
  }
  try {
    AsyncRequest.this.callbackSequence.fireException(t);
  }
 catch (  Exception ex) {
    LOG.error(ex,ex);
  }
}

Fixed version (ground truth):
@Override public void fireException(Throwable t){
  try {
    cb.fireException(t);
    AsyncRequest.this.result.setException(t);
  }
 catch (  Throwable ex) {
    AsyncRequest.this.result.setException(t);
    LOG.error(ex,ex);
  }
  try {
    AsyncRequest.this.callbackSequence.fireException(t);
  }
 catch (  Exception ex) {
    LOG.error(ex,ex);
  }
}
Program: 15391
Project: 15391
Buggy source:
public AbstractConfigurableProperty(Class definingClass,String entrySetName,String propertyName,String defaultValue,String description,PropertyTypeParser typeParser,Boolean readOnly,String displayName,ConfigurableFieldType widgetType,String alias){
  this.definingClass=definingClass;
  this.entrySetName=entrySetName.toLowerCase();
  this.fieldName=propertyName.toLowerCase();
  this.qualifiedName=this.entrySetName + "String_Node_Str" + this.fieldName;
  this.description=description;
  this.typeParser=typeParser;
  this.defaultValue=defaultValue;
  this.readOnly=readOnly;
  this.displayName=displayName;
  this.widgetType=widgetType;
  this.alias=alias;
  this.changeListener=NoopEventListener.NOOP;
}

Fixed version (ground truth):
public AbstractConfigurableProperty(Class definingClass,String entrySetName,String propertyName,String defaultValue,String description,PropertyTypeParser typeParser,Boolean readOnly,String displayName,ConfigurableFieldType widgetType,String alias,PropertyChangeListener changeListener){
  this.definingClass=definingClass;
  try {
    this.noArgConstructor=this.definingClass.getConstructor(new Class[]{});
  }
 catch (  Exception ex) {
    LOG.debug("String_Node_Str" + this.getDefiningClass().getDeclaredConstructors());
    LOG.debug("String_Node_Str" + this.getDefiningClass().getConstructors());
    LOG.debug(ex,ex);
    throw new RuntimeException(ex);
  }
  this.entrySetName=entrySetName.toLowerCase();
  this.fieldName=propertyName.toLowerCase();
  this.qualifiedName=this.entrySetName + "String_Node_Str" + this.fieldName;
  this.description=description;
  this.typeParser=typeParser;
  this.defaultValue=defaultValue;
  this.readOnly=readOnly;
  this.displayName=displayName;
  this.widgetType=widgetType;
  this.alias=alias;
  this.changeListener=changeListener;
}
Program: 15392
Project: 15392
Buggy source:
private Method getGetter(){
  if (this.get != null) {
    return this.get;
  }
 else {
synchronized (this) {
      if (this.get == null) {
        try {
          this.get=this.getDefiningClass().getDeclaredMethod("String_Node_Str" + this.baseMethodName);
        }
 catch (        Exception e) {
          LOG.debug("String_Node_Str" + this.getDefiningClass().getDeclaredMethods());
          LOG.debug("String_Node_Str" + this.getDefiningClass().getMethods());
          LOG.debug(e,e);
        }
      }
    }
    return this.get;
  }
}

Fixed version (ground truth):
private Method getGetter(){
  return this.get;
}
Program: 15393
Project: 15393
Buggy source:
public SingletonDatabasePropertyEntry(Class definingClass,String entrySetName,Field field,String description,String defaultValue,PropertyTypeParser typeParser,Boolean readOnly,String displayName,ConfigurableFieldType widgetType,String alias){
  super(definingClass,entrySetName,field.getName(),defaultValue,description,typeParser,readOnly,displayName,widgetType,alias);
  this.baseMethodName=field.getName().substring(0,1).toUpperCase() + field.getName().substring(1);
  this.persistenceContext=((PersistenceContext)definingClass.getAnnotation(PersistenceContext.class)).name();
  this.setArgs=new Class[]{field.getType()};
  try {
    get=definingClass.getDeclaredMethod("String_Node_Str" + this.baseMethodName);
    set=definingClass.getDeclaredMethod("String_Node_Str" + this.baseMethodName,this.setArgs);
  }
 catch (  Exception e) {
    LOG.debug(e,e);
  }
}

Fixed version (ground truth):
public SingletonDatabasePropertyEntry(Class definingClass,String entrySetName,Field field,String description,String defaultValue,PropertyTypeParser typeParser,Boolean readOnly,String displayName,ConfigurableFieldType widgetType,String alias){
  super(definingClass,entrySetName,field.getName(),defaultValue,description,typeParser,readOnly,displayName,widgetType,alias);
  this.baseMethodName=field.getName().substring(0,1).toUpperCase() + field.getName().substring(1);
  this.persistenceContext=((PersistenceContext)definingClass.getAnnotation(PersistenceContext.class)).name();
  this.setArgs=new Class[]{field.getType()};
  try {
    this.get=definingClass.getDeclaredMethod("String_Node_Str" + this.baseMethodName);
    this.get.setAccessible(true);
  }
 catch (  Exception e) {
    LOG.debug("String_Node_Str" + this.getDefiningClass().getDeclaredMethods());
    LOG.debug("String_Node_Str" + this.getDefiningClass().getMethods());
    LOG.debug(e,e);
    throw new RuntimeException(e);
  }
  try {
    this.set=definingClass.getDeclaredMethod("String_Node_Str" + this.baseMethodName,this.setArgs);
    this.set.setAccessible(true);
  }
 catch (  Exception e) {
    LOG.debug("String_Node_Str" + this.getDefiningClass().getDeclaredMethods());
    LOG.debug("String_Node_Str" + this.getDefiningClass().getMethods());
    LOG.debug(e,e);
    throw new RuntimeException(e);
  }
}
Program: 15394
Project: 15394
Buggy source:
private Method getSetter(){
  if (this.set != null) {
    return this.set;
  }
 else {
synchronized (this) {
      if (this.set == null) {
        try {
          this.set=this.getDefiningClass().getDeclaredMethod("String_Node_Str" + this.baseMethodName,this.setArgs);
        }
 catch (        Exception e) {
          LOG.debug("String_Node_Str" + this.getDefiningClass().getDeclaredMethods());
          LOG.debug("String_Node_Str" + this.getDefiningClass().getMethods());
          LOG.debug(e,e);
        }
      }
    }
    return this.set;
  }
}

Fixed version (ground truth):
private Method getSetter(){
  return this.set;
}
Program: 15396
Project: 15396
Buggy source:
public String getUserKeySearch(){
  return null;
}

Fixed version (ground truth):
public String getUserKeySearch(){
  return this.userKeySearch;
}
Program: 15397
Project: 15397
Buggy source:
public String getUserKeySearch(){
  return null;
}

Fixed version (ground truth):
public String getUserKeySearch(){
  return this.userKeySearch;
}
Program: 15400
Project: 15400
Buggy source:
@Override public void saveValue(ArrayList<String> keys,ArrayList<HasValueWidget> values){
  if (values == null || values.size() < 1 || this.currentSelected == null) {
    LOG.log(Level.WARNING,"String_Node_Str");
  }
  LOG.log(Level.INFO,"String_Node_Str" + values);
  SearchResultRow result=new SearchResultRow();
  result.setExtraFieldDescs(this.currentSelected.getExtraFieldDescs());
  for (int i=0; i < values.size(); i++) {
    result.addField(values.get(i).getValue());
  }
  this.clientFactory.getBackendService().setConfiguration(this.clientFactory.getLocalSession().getSession(),result,new AsyncCallback<Void>(){
    @Override public void onFailure(    Throwable cause){
      LOG.log(Level.WARNING,"String_Node_Str",cause);
    }
    @Override public void onSuccess(    Void arg0){
      clientFactory.getShellView().getDetailView().disableSave();
      reloadCurrentRange();
    }
  }
);
}

Fixed version (ground truth):
@Override public void saveValue(ArrayList<String> keys,ArrayList<HasValueWidget> values){
  if (values == null || values.size() < 1 || this.currentSelected == null) {
    clientFactory.getShellView().getFooterView().showStatus(StatusType.ERROR,"String_Node_Str",FooterView.DEFAULT_STATUS_CLEAR_DELAY);
  }
  final SearchResultRow result=new SearchResultRow();
  result.setExtraFieldDescs(this.currentSelected.getExtraFieldDescs());
  for (int i=0; i < values.size(); i++) {
    result.addField(values.get(i).getValue());
  }
  this.clientFactory.getShellView().getFooterView().showStatus(StatusType.LOADING,"String_Node_Str",0);
  this.clientFactory.getBackendService().setConfiguration(this.clientFactory.getLocalSession().getSession(),result,new AsyncCallback<Void>(){
    @Override public void onFailure(    Throwable cause){
      clientFactory.getShellView().getFooterView().showStatus(StatusType.ERROR,"String_Node_Str",FooterView.DEFAULT_STATUS_CLEAR_DELAY);
      clientFactory.getShellView().getLogView().log(LogType.ERROR,"String_Node_Str" + result);
    }
    @Override public void onSuccess(    Void arg0){
      clientFactory.getShellView().getFooterView().showStatus(StatusType.NONE,"String_Node_Str",FooterView.DEFAULT_STATUS_CLEAR_DELAY);
      clientFactory.getShellView().getLogView().log(LogType.INFO,"String_Node_Str" + result);
      clientFactory.getShellView().getDetailView().disableSave();
      reloadCurrentRange();
    }
  }
);
}
Program: 15401
Project: 15401
Buggy source:
@Override public void onFailure(Throwable cause){
  LOG.log(Level.WARNING,"String_Node_Str",cause);
}

Fixed version (ground truth):
@Override public void onFailure(Throwable cause){
  clientFactory.getShellView().getFooterView().showStatus(StatusType.ERROR,"String_Node_Str",FooterView.DEFAULT_STATUS_CLEAR_DELAY);
  clientFactory.getShellView().getLogView().log(LogType.ERROR,"String_Node_Str" + result);
}
Program: 15402
Project: 15402
Buggy source:
@Override public void onSuccess(Void arg0){
  clientFactory.getShellView().getDetailView().disableSave();
  reloadCurrentRange();
}

Fixed version (ground truth):
@Override public void onSuccess(Void arg0){
  clientFactory.getShellView().getFooterView().showStatus(StatusType.NONE,"String_Node_Str",FooterView.DEFAULT_STATUS_CLEAR_DELAY);
  clientFactory.getShellView().getLogView().log(LogType.INFO,"String_Node_Str" + result);
  clientFactory.getShellView().getDetailView().disableSave();
  reloadCurrentRange();
}
Program: 15403
Project: 15403
Buggy source:
@Override public void generateReport(Date fromDate,Date toDate,String criteria,String groupBy,String type){
  String sessionId=clientFactory.getLocalSession().getSession().getId();
  final String reportUrl="String_Node_Str" + "String_Node_Str" + sessionId + "String_Node_Str"+ type+ "String_Node_Str"+ "String_Node_Str"+ fromDate.getTime()+ "String_Node_Str"+ toDate.getTime()+ "String_Node_Str"+ criteria+ "String_Node_Str"+ groupBy;
  Timer t=new Timer(){
    @Override public void run(){
      clientFactory.getReportView().loadReport(reportUrl);
    }
  }
;
  t.schedule(2000);
  this.sessionId=sessionId;
  this.fromDate=fromDate;
  this.toDate=toDate;
  this.criteria=criteria;
  this.groupBy=groupBy;
  this.type=type;
}

Fixed version (ground truth):
@Override public void generateReport(Date fromDate,Date toDate,String criteria,String groupBy,String type){
  String sessionId=clientFactory.getLocalSession().getSession().getId();
  final String reportUrl="String_Node_Str" + "String_Node_Str" + sessionId + "String_Node_Str"+ type+ "String_Node_Str"+ "String_Node_Str"+ fromDate.getTime()+ "String_Node_Str"+ toDate.getTime()+ "String_Node_Str"+ criteria+ "String_Node_Str"+ groupBy;
  clientFactory.getReportView().loadReport(reportUrl);
  this.sessionId=sessionId;
  this.fromDate=fromDate;
  this.toDate=toDate;
  this.criteria=criteria;
  this.groupBy=groupBy;
  this.type=type;
}
Program: 15404
Project: 15404
Buggy source:
private void downloadReport(String format){
  if (this.sessionId == null)   return;
  final String reportUrl="String_Node_Str" + "String_Node_Str" + sessionId + "String_Node_Str"+ type+ "String_Node_Str"+ format+ "String_Node_Str"+ fromDate.getTime()+ "String_Node_Str"+ toDate.getTime()+ "String_Node_Str"+ criteria+ "String_Node_Str"+ groupBy;
  Timer t=new Timer(){
    @Override public void run(){
      clientFactory.getReportView().loadReport(reportUrl);
    }
  }
;
  t.schedule(2000);
}

Fixed version (ground truth):
private void downloadReport(String format){
  if (this.sessionId == null) {
    return;
  }
  final String reportUrl="String_Node_Str" + "String_Node_Str" + sessionId + "String_Node_Str"+ type+ "String_Node_Str"+ format+ "String_Node_Str"+ fromDate.getTime()+ "String_Node_Str"+ toDate.getTime()+ "String_Node_Str"+ criteria+ "String_Node_Str"+ groupBy;
  clientFactory.getReportView().loadReport(reportUrl);
}
Program: 15405
Project: 15405
Buggy source:
@Override public void saveValue(ArrayList<String> keys,ArrayList<HasValueWidget> values){
  if (values == null || values.size() < 1 || this.currentSelected == null) {
    LOG.log(Level.WARNING,"String_Node_Str");
  }
  LOG.log(Level.INFO,"String_Node_Str" + values);
  SearchResultRow result=new SearchResultRow();
  result.setExtraFieldDescs(this.currentSelected.getExtraFieldDescs());
  for (int i=0; i < values.size(); i++) {
    result.addField(values.get(i).getValue());
  }
  this.clientFactory.getBackendService().setVmType(this.clientFactory.getLocalSession().getSession(),result,new AsyncCallback<Void>(){
    @Override public void onFailure(    Throwable cause){
      LOG.log(Level.WARNING,"String_Node_Str",cause);
    }
    @Override public void onSuccess(    Void arg0){
      clientFactory.getShellView().getDetailView().disableSave();
      reloadCurrentRange();
    }
  }
);
}

Fixed version (ground truth):
@Override public void saveValue(ArrayList<String> keys,ArrayList<HasValueWidget> values){
  if (values == null || values.size() < 1 || this.currentSelected == null) {
    LOG.log(Level.WARNING,"String_Node_Str");
  }
  LOG.log(Level.INFO,"String_Node_Str" + values);
  final SearchResultRow result=new SearchResultRow();
  result.setExtraFieldDescs(this.currentSelected.getExtraFieldDescs());
  for (int i=0; i < values.size(); i++) {
    result.addField(values.get(i).getValue());
  }
  this.clientFactory.getShellView().getFooterView().showStatus(StatusType.LOADING,"String_Node_Str",0);
  this.clientFactory.getBackendService().setVmType(this.clientFactory.getLocalSession().getSession(),result,new AsyncCallback<Void>(){
    @Override public void onFailure(    Throwable cause){
      clientFactory.getShellView().getFooterView().showStatus(StatusType.ERROR,"String_Node_Str",FooterView.DEFAULT_STATUS_CLEAR_DELAY);
      clientFactory.getShellView().getLogView().log(LogType.ERROR,"String_Node_Str" + result);
    }
    @Override public void onSuccess(    Void arg0){
      clientFactory.getShellView().getFooterView().showStatus(StatusType.NONE,"String_Node_Str",FooterView.DEFAULT_STATUS_CLEAR_DELAY);
      clientFactory.getShellView().getLogView().log(LogType.INFO,"String_Node_Str" + result);
      clientFactory.getShellView().getDetailView().disableSave();
      reloadCurrentRange();
    }
  }
);
}
Program: 15406
Project: 15406
Buggy source:
public static void requestPasswordRecovery(String userName,String accountName,String email,String backendUrl){
  try {
    Account account=Accounts.lookupAccountByName(accountName);
    User user=account.lookupUserByName(userName);
    if (!user.isEnabled() || !RegistrationStatus.CONFIRMED.equals(user.getRegistrationStatus())) {
      throw new IllegalArgumentException("String_Node_Str");
    }
    if (email != null && email.equals(user.getInfo(User.EMAIL))) {
      long expires=System.currentTimeMillis() + User.RECOVERY_EXPIRATION;
      user.setConfirmationCode(String.format("String_Node_Str",expires) + Crypto.generateSessionToken(user.getName()));
      notifyUserPasswordReset(user,backendUrl);
    }
 else {
      throw new IllegalArgumentException("String_Node_Str");
    }
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str" + userName + "String_Node_Str"+ accountName,e);
    LOG.debug(e,e);
  }
}

Fixed version (ground truth):
public static void requestPasswordRecovery(String userName,String accountName,String email,String backendUrl){
  try {
    Account account=Accounts.lookupAccountByName(accountName);
    User user=account.lookupUserByName(userName);
    if (!user.isEnabled() || !RegistrationStatus.CONFIRMED.equals(user.getRegistrationStatus())) {
      throw new IllegalArgumentException("String_Node_Str");
    }
    if (email != null && email.equals(user.getInfo(User.EMAIL))) {
      long expires=System.currentTimeMillis() + User.RECOVERY_EXPIRATION;
      user.setConfirmationCode(String.format("String_Node_Str",expires) + Crypto.generateSessionToken(user.getName()));
      notifyUserPasswordReset(account.lookupUserByName(userName),backendUrl);
    }
 else {
      throw new IllegalArgumentException("String_Node_Str");
    }
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str" + userName + "String_Node_Str"+ accountName,e);
    LOG.debug(e,e);
  }
}
Program: 15407
Project: 15407
Buggy source:
public static void changeUserPassword(String userId,String oldPass,String newPass,String email) throws EucalyptusServiceException {
  try {
    User user=Accounts.lookupUserById(userId);
    if (!user.getPassword().equals(Crypto.generateHashedPassword(oldPass))) {
      throw new EucalyptusServiceException("String_Node_Str");
    }
    String newEncrypted=Crypto.generateHashedPassword(newPass);
    if (user.getPassword().equals(newEncrypted)) {
      throw new EucalyptusServiceException("String_Node_Str");
    }
    if (user.getPassword().equals(Crypto.generateHashedPassword(user.getName()))) {
      throw new EucalyptusServiceException("String_Node_Str");
    }
    user.setPassword(newEncrypted);
    user.setPasswordExpires(System.currentTimeMillis() + User.PASSWORD_LIFETIME);
    if (!Strings.isNullOrEmpty(email)) {
      user.setInfo(User.EMAIL,email);
    }
  }
 catch (  Exception e) {
    if (e instanceof EucalyptusServiceException) {
      throw (EucalyptusServiceException)e;
    }
    LOG.error("String_Node_Str" + userId,e);
    LOG.debug(e,e);
    throw new EucalyptusServiceException("String_Node_Str" + userId + "String_Node_Str"+ e.getMessage());
  }
}

Fixed version (ground truth):
public static void changeUserPassword(String userId,String oldPass,String newPass,String email) throws EucalyptusServiceException {
  try {
    User user=Accounts.lookupUserById(userId);
    if (!user.getPassword().equals(Crypto.generateHashedPassword(oldPass))) {
      throw new EucalyptusServiceException("String_Node_Str");
    }
    String newEncrypted=Crypto.generateHashedPassword(newPass);
    if (user.getPassword().equals(newEncrypted)) {
      throw new EucalyptusServiceException("String_Node_Str");
    }
    if (newEncrypted.equals(Crypto.generateHashedPassword(user.getName()))) {
      throw new EucalyptusServiceException("String_Node_Str");
    }
    user.setPassword(newEncrypted);
    user.setPasswordExpires(System.currentTimeMillis() + User.PASSWORD_LIFETIME);
    if (!Strings.isNullOrEmpty(email)) {
      user.setInfo(User.EMAIL,email);
    }
  }
 catch (  Exception e) {
    if (e instanceof EucalyptusServiceException) {
      throw (EucalyptusServiceException)e;
    }
    LOG.error("String_Node_Str" + userId,e);
    LOG.debug(e,e);
    throw new EucalyptusServiceException("String_Node_Str" + userId + "String_Node_Str"+ e.getMessage());
  }
}
Program: 15408
Project: 15408
Buggy source:
private void verifySession(String sessionId){
  SessionInfo session;
  try {
    session=EucalyptusWebBackendImpl.verifySession(sessionId);
    User user=null;
    try {
      user=Accounts.lookupUserByName(session.getUserId());
    }
 catch (    Exception e) {
      throw new RuntimeException("String_Node_Str");
    }
    if (!user.isSystemAdmin()) {
      throw new RuntimeException("String_Node_Str");
    }
  }
 catch (  SerializableException e1) {
    throw new RuntimeException("String_Node_Str");
  }
  session.setLastAccessed(System.currentTimeMillis());
}

Fixed version (ground truth):
private void verifySession(String sessionId){
  WebSession ws=WebSessionManager.getInstance().getSession(sessionId);
  if (ws == null) {
    throw new RuntimeException("String_Node_Str" + sessionId);
  }
  User user;
  try {
    user=EuareWebBackend.getUser(ws.getUserName(),ws.getAccountName());
  }
 catch (  EucalyptusServiceException ex) {
    throw new RuntimeException("String_Node_Str",ex);
  }
  if (user == null || !user.isSystemAdmin()) {
    throw new RuntimeException("String_Node_Str");
  }
}
Program: 15409
Project: 15409
Buggy source:
private void setContentTypeHeader(HttpServletResponse res,ReportFormat format,String filename){
switch (format) {
case csv:
    res.setContentType("String_Node_Str");
  res.setHeader("String_Node_Str","String_Node_Str" + filename + "String_Node_Str");
break;
case html:
res.setContentType("String_Node_Str");
break;
case pdf:
res.setContentType("String_Node_Str");
res.setHeader("String_Node_Str","String_Node_Str" + filename + "String_Node_Str");
break;
case xls:
res.setContentType("String_Node_Str");
res.setHeader("String_Node_Str","String_Node_Str" + filename + "String_Node_Str");
break;
}
}

Fixed version (ground truth):
private void setContentTypeHeader(HttpServletResponse res,ReportFormat format,String filename){
switch (format) {
case CSV:
    res.setContentType("String_Node_Str");
  res.setHeader("String_Node_Str","String_Node_Str" + filename + "String_Node_Str");
break;
case HTML:
res.setContentType("String_Node_Str");
break;
case PDF:
res.setContentType("String_Node_Str");
res.setHeader("String_Node_Str","String_Node_Str" + filename + "String_Node_Str");
break;
case XLS:
res.setContentType("String_Node_Str");
res.setHeader("String_Node_Str","String_Node_Str" + filename + "String_Node_Str");
break;
}
}
Program: 15410
Project: 15410
Buggy source:
public String get(HttpServletRequest req) throws IllegalArgumentException {
  if (req.getParameter(this.name()) == null) {
    throw new IllegalArgumentException("String_Node_Str" + this.name() + "String_Node_Str");
  }
 else {
    return req.getParameter(this.name());
  }
}

Fixed version (ground truth):
public String get(HttpServletRequest req) throws IllegalArgumentException {
  return getRaw(req).toUpperCase().replace(' ','_');
}
Program: 15411
Project: 15411
Buggy source:
/** 
 * <p>Expects the following servlet params: type,format,session,start,end,criterion,groupByCriterion <p>Type, format, criterion, and groupByCriterion are taken from the enums: ReportType, ReportFormat, and ReportingCriterion. GroupByCriterion can also have the value "None". Start and end are in milliseconds. Session is a session id string.
 */
@Override protected void doGet(HttpServletRequest req,HttpServletResponse res) throws ServletException, IOException {
  this.verifySession(Param.session.get(req));
  final ReportType reportType=ReportType.valueOf(Param.type.get(req));
  final ReportFormat format=ReportFormat.valueOf(Param.format.get(req));
  final long start=Long.parseLong(Param.start.get(req));
  final long end=Long.parseLong(Param.end.get(req));
  final Period period=new Period(start,end);
  final ReportingCriterion criterion=ReportingCriterion.valueOf(Param.criterion.get(req));
  final Units displayUnits=Units.DEFAULT_DISPLAY_UNITS;
  ReportingCriterion groupByCriterion=null;
  String groupByParam=req.getParameter(Param.groupByCriterion.name());
  if (groupByParam != null && !groupByParam.equalsIgnoreCase("String_Node_Str")) {
    groupByCriterion=ReportingCriterion.valueOf(Param.groupByCriterion.get(req));
  }
  LOG.info(String.format("String_Node_Str" + "String_Node_Str",reportType,format,period,criterion,groupByCriterion));
  setContentTypeHeader(res,format,Param.type.get(req));
  ReportGenerator.generateReport(reportType,format,period,criterion,groupByCriterion,displayUnits,res.getOutputStream());
}

Fixed version (ground truth):
/** 
 * <p>Expects the following servlet params: type,format,session,start,end,criterion,groupByCriterion <p>Type, format, criterion, and groupByCriterion are taken from the enums: ReportType, ReportFormat, and ReportingCriterion. GroupByCriterion can also have the value "None". Start and end are in milliseconds. Session is a session id string.
 */
@Override protected void doGet(HttpServletRequest req,HttpServletResponse res) throws ServletException, IOException {
  this.verifySession(Param.session.getRaw(req));
  final ReportType reportType=ReportType.valueOf(Param.type.get(req));
  final ReportFormat format=ReportFormat.valueOf(Param.format.get(req));
  final long start=Long.parseLong(Param.start.get(req));
  final long end=Long.parseLong(Param.end.get(req));
  final Period period=new Period(start,end);
  final ReportingCriterion criterion=ReportingCriterion.valueOf(Param.criterion.get(req));
  final Units displayUnits=Units.DEFAULT_DISPLAY_UNITS;
  ReportingCriterion groupByCriterion=null;
  String groupByParam=req.getParameter(Param.groupByCriterion.name());
  if (groupByParam != null && !groupByParam.equalsIgnoreCase("String_Node_Str")) {
    groupByCriterion=ReportingCriterion.valueOf(Param.groupByCriterion.get(req));
  }
  LOG.info(String.format("String_Node_Str" + "String_Node_Str",reportType,format,period,criterion,groupByCriterion));
  setContentTypeHeader(res,format,Param.type.get(req));
  ReportGenerator.generateReport(reportType,format,period,criterion,groupByCriterion,displayUnits,res.getOutputStream());
}