nus-yam/ex-repair huggingface dataset:
Program: 15249
Project: 15249
Buggy source:
private static void processTransition(final ServiceConfiguration parent,final Completion transitionCallback,final TransitionActions transitionAction){
  ServiceTransitionCallback trans=null;
  try {
    if (parent.isVmLocal() || (parent.isHostLocal() && Bootstrap.isCloudController())) {
      try {
        trans=LocalTransitionCallbacks.valueOf(transitionAction.name());
      }
 catch (      Exception ex) {
        LOG.error(ex,ex);
        throw ex;
      }
    }
 else     if (Bootstrap.isCloudController()) {
      try {
        trans=RemoteTransitionCallbacks.valueOf(transitionAction.name());
      }
 catch (      Exception ex) {
        LOG.error(ex,ex);
        throw ex;
      }
    }
 else {
      LOG.debug("String_Node_Str" + parent);
    }
    if (trans != null) {
      LOG.debug("String_Node_Str" + trans.getClass() + "String_Node_Str"+ transitionAction.name()+ "String_Node_Str"+ parent);
      trans.fire(parent);
    }
    transitionCallback.fire();
  }
 catch (  Throwable ex) {
    if (ServiceExceptions.filterExceptions(parent,ex)) {
      transitionCallback.fireException(ex);
    }
 else {
      transitionCallback.fire();
    }
  }
}

Fixed version (ground truth):
private static void processTransition(final ServiceConfiguration parent,final Completion transitionCallback,final TransitionActions transitionAction){
  ServiceTransitionCallback trans=null;
  try {
    if (parent.isVmLocal() || (parent.isHostLocal() && Bootstrap.isCloudController())) {
      try {
        trans=LocalTransitionCallbacks.valueOf(transitionAction.name());
      }
 catch (      Exception ex) {
        LOG.error(ex,ex);
        throw ex;
      }
    }
 else     if (Bootstrap.isCloudController()) {
      try {
        trans=RemoteTransitionCallbacks.valueOf(transitionAction.name());
      }
 catch (      Exception ex) {
        LOG.error(ex,ex);
        throw ex;
      }
    }
 else {
      LOG.debug("String_Node_Str" + parent);
    }
    if (trans != null) {
      LOG.debug("String_Node_Str" + trans.getClass() + "String_Node_Str"+ transitionAction.name()+ "String_Node_Str"+ parent);
      trans.fire(parent);
    }
    transitionCallback.fire();
  }
 catch (  Throwable ex) {
    if (ServiceExceptions.filterExceptions(parent,ex)) {
      transitionCallback.fireException(ex);
      throw new RuntimeException(ex);
    }
 else {
      transitionCallback.fire();
    }
  }
}
Program: 15252
Project: 15252
Buggy source:
/** 
 * @see com.eucalyptus.util.async.Request#getCallback()
 * @return
 */
@Override public Callback.TwiceChecked<Q,R> getCallback(){
  return this.callback;
}

Fixed version (ground truth):
/** 
 * @see com.eucalyptus.util.async.Request#getCallback()
 * @return
 */
@Override public Callback.TwiceChecked<Q,R> getCallback(){
  return this.wrapperCallback;
}
Program: 15253
Project: 15253
Buggy source:
@Override public void fire(R r){
  try {
    if (Logs.EXTREME) {
      Logs.extreme().debug(cb.getClass().getCanonicalName() + "String_Node_Str" + r);
    }
    cb.fire(r);
    try {
      AsyncRequest.this.result.set(r);
      AsyncRequest.this.callbackSequence.fire(r);
    }
 catch (    Throwable ex) {
      AsyncRequest.this.result.setException(ex);
      LOG.error(ex,ex);
    }
  }
 catch (  RuntimeException ex) {
    LOG.error(ex,ex);
    AsyncRequest.this.result.setException(ex);
    AsyncRequest.this.callbackSequence.fireException(ex);
  }
catch (  Exception ex) {
    AsyncRequest.this.result.setException(ex);
    AsyncRequest.this.callbackSequence.fireException(ex);
  }
}

Fixed version (ground truth):
@Override public void fire(R r){
  try {
    if (Logs.EXTREME) {
      Logs.extreme().debug(cb.getClass().getCanonicalName() + "String_Node_Str" + r);
    }
    cb.fire(r);
    AsyncRequest.this.result.set(r);
    try {
      AsyncRequest.this.callbackSequence.fire(r);
    }
 catch (    Throwable ex) {
      AsyncRequest.this.result.setException(ex);
      LOG.error(ex,ex);
    }
  }
 catch (  RuntimeException ex) {
    LOG.error(ex,ex);
    AsyncRequest.this.result.setException(ex);
    AsyncRequest.this.callbackSequence.fireException(ex);
  }
catch (  Exception ex) {
    AsyncRequest.this.result.setException(ex);
    AsyncRequest.this.callbackSequence.fireException(ex);
  }
}
Program: 15254
Project: 15254
Buggy source:
@Override public String toString(){
  return String.format("String_Node_Str",this.callback);
}

Fixed version (ground truth):
@Override public String toString(){
  return String.format("String_Node_Str",this.wrapperCallback);
}
Program: 15255
Project: 15255
Buggy source:
@Override public void initialize(Q request) throws Exception {
  if (Logs.EXTREME) {
    Logs.extreme().debug(cb.getClass().getCanonicalName() + "String_Node_Str" + request);
  }
}

Fixed version (ground truth):
@Override public void initialize(Q request) throws Exception {
  if (Logs.EXTREME) {
    Logs.extreme().debug(cb.getClass().getCanonicalName() + "String_Node_Str" + request);
  }
  try {
    cb.initialize(request);
  }
 catch (  Exception ex) {
    LOG.error(ex,ex);
    AsyncRequest.this.result.setException(ex);
    AsyncRequest.this.callbackSequence.fireException(ex);
  }
}
Program: 15257
Project: 15257
Buggy source:
@SuppressWarnings("String_Node_Str") public static Runnable addListenerHandler(final CheckedListenableFuture<?> future,final Callback<?> listener){
  Runnable r;
  future.addListener(r=new Callbacks.BasicCallbackProcessor(future,listener),Threads.currentThreadExecutor());
  return r;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public static Runnable addListenerHandler(final CheckedListenableFuture<?> future,final Callback<?> listener){
  Runnable r;
  future.addListener(r=new Callbacks.BasicCallbackProcessor(future,listener),Threads.lookup(Empyrean.class,Callbacks.class,BasicCallbackProcessor.class.toString()));
  return r;
}
Program: 15258
Project: 15258
Buggy source:
/** 
 * TODO: DOCUMENT Component.java
 * @param config
 * @return
 */
public boolean hasService(ServiceConfiguration config){
  return this.services.containsKey(config.getFullName());
}

Fixed version (ground truth):
/** 
 * TODO: DOCUMENT Component.java
 * @param config
 * @return
 */
public boolean hasService(ServiceConfiguration config){
  return this.services.containsKey(config);
}
Program: 15259
Project: 15259
Buggy source:
private static <T extends EmpyreanMessage>T sendEmpyreanRequest(final ServiceConfiguration parent,final EmpyreanMessage msg) throws Throwable {
  ServiceConfiguration config=ServiceConfigurations.createEphemeral(Empyrean.INSTANCE,parent.getInetAddress());
  LOG.debug("String_Node_Str" + msg.getClass().getSimpleName() + "String_Node_Str"+ parent.getFullName());
  Throwable lastEx=null;
  for (int i=0; i < BOOTSTRAP_REMOTE_RETRIES; i++) {
    try {
      T reply=(T)AsyncRequests.sendSync(config,msg);
      return reply;
    }
 catch (    RetryableConnectionException ex) {
      try {
        TimeUnit.SECONDS.sleep(BOOTSTRAP_REMOTE_RETRY_INTERVAL_SECONDS);
      }
 catch (      InterruptedException ex1) {
        Thread.currentThread().interrupt();
      }
      lastEx=ex;
      continue;
    }
catch (    ExecutionException ex) {
      LOG.error(ex,ex);
      if (ex.getCause() instanceof RetryableConnectionException) {
        try {
          TimeUnit.SECONDS.sleep(BOOTSTRAP_REMOTE_RETRY_INTERVAL_SECONDS);
        }
 catch (        InterruptedException ex1) {
          Thread.currentThread().interrupt();
        }
        lastEx=ex.getCause();
        continue;
      }
 else {
        throw ex;
      }
    }
catch (    Throwable ex) {
      LOG.error(ex,ex);
      throw ex;
    }
  }
  throw new ServiceRegistrationException("String_Node_Str" + lastEx + "String_Node_Str"+ BOOTSTRAP_REMOTE_RETRIES+ "String_Node_Str"+ config.getUri()+ "String_Node_Str"+ msg,lastEx);
}

Fixed version (ground truth):
private static <T extends EmpyreanMessage>T sendEmpyreanRequest(final ServiceConfiguration parent,final EmpyreanMessage msg) throws Throwable {
  ServiceConfiguration config=ServiceConfigurations.createEphemeral(Empyrean.INSTANCE,parent.getInetAddress());
  LOG.debug("String_Node_Str" + msg.getClass().getSimpleName() + "String_Node_Str"+ parent.getFullName());
  Throwable lastEx=null;
  for (int i=0; i < BOOTSTRAP_REMOTE_RETRIES; i++) {
    try {
      T reply=(T)AsyncRequests.sendSync(config,msg);
      return reply;
    }
 catch (    RetryableConnectionException ex) {
      try {
        TimeUnit.MILLISECONDS.sleep(BOOTSTRAP_REMOTE_RETRY_INTERVAL_MSEC);
      }
 catch (      InterruptedException ex1) {
        Thread.currentThread().interrupt();
      }
      lastEx=ex;
      continue;
    }
catch (    ExecutionException ex) {
      LOG.error(ex,ex);
      if (ex.getCause() instanceof RetryableConnectionException) {
        try {
          TimeUnit.MILLISECONDS.sleep(BOOTSTRAP_REMOTE_RETRY_INTERVAL_MSEC);
        }
 catch (        InterruptedException ex1) {
          Thread.currentThread().interrupt();
        }
        lastEx=ex.getCause();
        continue;
      }
 else {
        throw ex;
      }
    }
catch (    Throwable ex) {
      LOG.error(ex,ex);
      throw ex;
    }
  }
  throw new ServiceRegistrationException("String_Node_Str" + lastEx + "String_Node_Str"+ BOOTSTRAP_REMOTE_RETRIES+ "String_Node_Str"+ config.getUri()+ "String_Node_Str"+ msg,lastEx);
}
Program: 15260
Project: 15260
Buggy source:
/** 
 * TODO: DOCUMENT Bootstrap.java
 */
@SuppressWarnings("String_Node_Str") public static void initBootstrappers(){
  for (  Bootstrapper bootstrap : BootstrapperDiscovery.getBootstrappers()) {
    Class<ComponentId> compType;
    String bc=bootstrap.getClass().getCanonicalName();
    Bootstrap.Stage stage=bootstrap.getBootstrapStage();
    compType=bootstrap.getProvides();
    if (Bootstrap.checkDepends(bootstrap)) {
      if (ComponentId.class.equals(compType)) {
        for (        Component c : Components.list()) {
          EventRecord.here(Bootstrap.class,EventType.BOOTSTRAPPER_ADDED,stage.name(),bc,"String_Node_Str" + c.getName()).info();
          c.getBootstrapper().addBootstrapper(bootstrap);
        }
      }
 else       if (Empyrean.class.equals(compType)) {
        EventRecord.here(Bootstrap.class,EventType.BOOTSTRAPPER_ADDED,stage.name(),bc,"String_Node_Str" + compType.getSimpleName()).info();
        stage.addBootstrapper(bootstrap);
      }
    }
 else     if (ComponentId.class.isAssignableFrom(compType)) {
      ComponentId comp;
      try {
        comp=compType.newInstance();
        Components.lookup(comp).getBootstrapper().addBootstrapper(bootstrap);
      }
 catch (      InstantiationException ex) {
        LOG.error(ex,ex);
      }
catch (      IllegalAccessException ex) {
        LOG.error(ex,ex);
      }
    }
 else {
      Exceptions.error(new ClassCastException("String_Node_Str" + bootstrap.getClass().getCanonicalName() + "String_Node_Str"));
    }
  }
}

Fixed version (ground truth):
/** 
 * TODO: DOCUMENT Bootstrap.java
 */
@SuppressWarnings("String_Node_Str") public static void initBootstrappers(){
  for (  Bootstrapper bootstrap : BootstrapperDiscovery.getBootstrappers()) {
    Class<ComponentId> compType;
    String bc=bootstrap.getClass().getCanonicalName();
    Bootstrap.Stage stage=bootstrap.getBootstrapStage();
    compType=bootstrap.getProvides();
    if (Bootstrap.checkDepends(bootstrap)) {
      if (ComponentId.class.equals(compType)) {
        for (        Component c : Components.list()) {
          EventRecord.here(Bootstrap.class,EventType.BOOTSTRAPPER_ADDED,stage.name(),bc,"String_Node_Str" + c.getName()).info();
          c.getBootstrapper().addBootstrapper(bootstrap);
        }
      }
 else       if (Empyrean.class.equals(compType)) {
        EventRecord.here(Bootstrap.class,EventType.BOOTSTRAPPER_ADDED,stage.name(),bc,"String_Node_Str" + compType.getSimpleName()).info();
        stage.addBootstrapper(bootstrap);
      }
    }
 else     if (ComponentId.class.isAssignableFrom(compType)) {
      ComponentId comp;
      try {
        comp=compType.newInstance();
        Components.lookup(comp).getBootstrapper().addBootstrapper(bootstrap);
      }
 catch (      InstantiationException ex) {
        LOG.error(ex,ex);
      }
catch (      IllegalAccessException ex) {
        LOG.error(ex,ex);
      }
    }
 else {
      LOG.error(new ClassCastException("String_Node_Str" + bootstrap.getClass().getCanonicalName() + "String_Node_Str"));
    }
  }
}
Program: 15261
Project: 15261
Buggy source:
static final CheckedListenableFuture<ServiceConfiguration> startTransitionChain(final ServiceConfiguration config){
  if (!State.NOTREADY.equals(config.lookupState()) && !State.DISABLED.equals(config.lookupState()) && !State.ENABLED.equals(config.lookupState())) {
    Callable<CheckedListenableFuture<ServiceConfiguration>> transition=null;
    if (State.STOPPED.isIn(config) || State.INITIALIZED.isIn(config) || State.BROKEN.isIn(config)) {
      transition=Automata.sequenceTransitions(config,Component.State.BROKEN,Component.State.INITIALIZED,Component.State.LOADED,Component.State.NOTREADY,Component.State.DISABLED);
    }
 else {
      transition=Automata.sequenceTransitions(config,config.lookupState(),Component.State.NOTREADY,Component.State.DISABLED);
    }
    try {
      return transition.call();
    }
 catch (    Throwable ex) {
      LOG.error(ex,ex);
      return Futures.predestinedFailedFuture(ex);
    }
  }
 else {
    return Futures.predestinedFuture(config);
  }
}

Fixed version (ground truth):
static final CheckedListenableFuture<ServiceConfiguration> startTransitionChain(final ServiceConfiguration config){
  if (!State.NOTREADY.equals(config.lookupState()) && !State.DISABLED.equals(config.lookupState()) && !State.ENABLED.equals(config.lookupState())) {
    Callable<CheckedListenableFuture<ServiceConfiguration>> transition=null;
    if (State.STOPPED.isIn(config)) {
      transition=Automata.sequenceTransitions(config,Component.State.INITIALIZED,Component.State.LOADED,Component.State.NOTREADY,Component.State.DISABLED);
    }
 else     if (State.INITIALIZED.isIn(config)) {
      transition=Automata.sequenceTransitions(config,Component.State.LOADED,Component.State.NOTREADY,Component.State.DISABLED);
    }
 else     if (State.BROKEN.isIn(config)) {
      transition=Automata.sequenceTransitions(config,Component.State.BROKEN,Component.State.INITIALIZED,Component.State.LOADED,Component.State.NOTREADY,Component.State.DISABLED);
    }
 else {
      transition=Automata.sequenceTransitions(config,config.lookupState(),Component.State.NOTREADY,Component.State.DISABLED);
    }
    try {
      return transition.call();
    }
 catch (    Throwable ex) {
      LOG.error(ex,ex);
      return Futures.predestinedFailedFuture(ex);
    }
  }
 else {
    return Futures.predestinedFuture(config);
  }
}
Program: 15263
Project: 15263
Buggy source:
private static CheckException newServiceCheckException(String correlationId,Severity severity,ServiceConfiguration config,Throwable t){
  if (t instanceof Error) {
    return new CheckException(correlationId,t,Severity.FATAL,config);
  }
 else   if (Severity.WARNING.ordinal() > severity.ordinal() && t instanceof RuntimeException) {
    return new CheckException(correlationId,t,Severity.WARNING,config);
  }
 else   if (t instanceof CheckException) {
    return new CheckException(correlationId,t,severity,config);
  }
 else {
    return new CheckException(correlationId,t,Severity.DEBUG,config);
  }
}

Fixed version (ground truth):
private static CheckException newServiceCheckException(String correlationId,Severity severity,ServiceConfiguration config,Throwable t){
  if (t instanceof Error) {
    return new CheckException(correlationId,t,Severity.FATAL,config);
  }
 else   if (Severity.WARNING.ordinal() > severity.ordinal() && t instanceof RuntimeException) {
    return new CheckException(correlationId,t,Severity.WARNING,config);
  }
 else   if (t instanceof CheckException) {
    return new CheckException(correlationId,t,severity,config);
  }
 else {
    return new CheckException(correlationId,t,severity,config);
  }
}
Program: 15264
Project: 15264
Buggy source:
public static void dispatchAll(BaseMessage message) throws EucalyptusCloudException {
  for (  ServiceConfiguration service : Components.lookup(Storage.class).enabledServices()) {
    service.lookupService().getDispatcher().dispatch(message);
  }
}

Fixed version (ground truth):
public static void dispatchAll(BaseMessage message) throws EucalyptusCloudException {
  for (  ServiceConfiguration service : Components.lookup(Storage.class).enabledServices()) {
    try {
      service.lookupService().getDispatcher().dispatch(message);
    }
 catch (    NoSuchServiceException ex) {
      LOG.error(ex,ex);
    }
  }
}
Program: 15265
Project: 15265
Buggy source:
public static void applyTransition(Component component,Component.Transition transition){
  StateMachine<ServiceConfiguration,State,Transition> fsm=component.getLocalServiceConfiguration().lookupStateMachine();
  if (fsm.isLegalTransition(transition)) {
    for (int i=0; i < INIT_RETRIES; i++) {
      try {
        EventRecord.caller(Bootstrap.class,EventType.COMPONENT_INFO,transition.name(),component.getName(),component.getComponentId()).info();
        fsm.transitionByName(transition).get();
        break;
      }
 catch (      ExistingTransitionException ex) {
        LOG.error(ex);
      }
catch (      Throwable ex) {
        LOG.error(ex);
      }
      try {
        TimeUnit.MILLISECONDS.sleep(50);
      }
 catch (      InterruptedException ex) {
        Thread.currentThread().interrupt();
      }
    }
  }
}

Fixed version (ground truth):
public static void applyTransition(Component component,Component.Transition transition){
  StateMachine<ServiceConfiguration,State,Transition> fsm=component.getLocalServiceConfiguration().getStateMachine();
  if (fsm.isLegalTransition(transition)) {
    for (int i=0; i < INIT_RETRIES; i++) {
      try {
        EventRecord.caller(Bootstrap.class,EventType.COMPONENT_INFO,transition.name(),component.getName(),component.getComponentId()).info();
        fsm.transitionByName(transition).get();
        break;
      }
 catch (      ExistingTransitionException ex) {
        LOG.error(ex);
      }
catch (      Throwable ex) {
        LOG.error(ex);
      }
      try {
        TimeUnit.MILLISECONDS.sleep(50);
      }
 catch (      InterruptedException ex) {
        Thread.currentThread().interrupt();
      }
    }
  }
}
Program: 15267
Project: 15267
Buggy source:
/** 
 * Returns the   {@link Service} instance which was registered with the provided {@link ServiceConfiguration}, if it exists. If a service with the given name does not exist a NoSuchElementException is thrown.
 * @see #lookup(FullName)
 * @param configuration
 * @return {@link Service} corresponding to provided the {@link ServiceConfiguration}
 * @throws NoSuchElementException
 */
public Service lookup(ServiceConfiguration config) throws NoSuchElementException {
  if (!this.services.containsKey(config)) {
    throw new NoSuchElementException("String_Node_Str" + config);
  }
 else {
    return this.services.get(config);
  }
}

Fixed version (ground truth):
/** 
 * Returns the   {@link Service} instance which was registered with the provided {@link ServiceConfiguration}, if it exists. If a service with the given name does not exist a NoSuchElementException is thrown.
 * @see #lookup(FullName)
 * @param configuration
 * @return {@link Service} corresponding to provided the {@link ServiceConfiguration}
 * @throws NoSuchElementException
 */
public Service lookup(ServiceConfiguration config) throws NoSuchElementException {
  if (!this.services.containsKey(config)) {
    throw new NoSuchElementException("String_Node_Str" + config.getName());
  }
 else {
    return this.services.get(config);
  }
}
Program: 15268
Project: 15268
Buggy source:
/** 
 * @param config
 * @return
 * @throws NoSuchElementException
 * @see com.eucalyptus.component.Component.ServiceRegistry#lookup(com.eucalyptus.component.ServiceConfiguration)
 */
public Service lookupService(ServiceConfiguration config) throws NoSuchElementException {
  return this.serviceRegistry.lookup(config);
}

Fixed version (ground truth):
/** 
 * @param config
 * @return
 * @throws NoSuchServiceException
 * @see com.eucalyptus.component.Component.ServiceRegistry#lookup(com.eucalyptus.component.ServiceConfiguration)
 */
public Service lookupService(ServiceConfiguration config) throws NoSuchServiceException {
  return this.serviceRegistry.lookup(config);
}
Program: 15270
Project: 15270
Buggy source:
public static void fireExceptionEvent(ServiceConfiguration config,ServiceChecks.Severity severity,Throwable t){
  LifecycleEvent event=null;
  String correlationId=null;
  try {
    correlationId=Contexts.lookup().getCorrelationId();
  }
 catch (  IllegalContextAccessException ex) {
    correlationId=UUID.randomUUID().toString();
  }
  CheckException checkEx=(t instanceof CheckException) ? (CheckException)t : severity.transform(config,t);
switch (checkEx.getSeverity()) {
case DEBUG:
    event=new ServiceStateEvent(config,checkEx);
  break;
case INFO:
event=new ServiceStateEvent(config,checkEx);
break;
case WARNING:
event=new ServiceStateEvent(config,checkEx);
break;
case ERROR:
event=handleErrorEvent(config,correlationId,checkEx);
break;
case URGENT:
event=handleErrorEvent(config,correlationId,checkEx);
break;
case FATAL:
event=handleErrorEvent(config,correlationId,checkEx);
break;
}
config.lookupService().fireEvent(event);
}

Fixed version (ground truth):
public static void fireExceptionEvent(ServiceConfiguration config,ServiceChecks.Severity severity,Throwable t){
  LifecycleEvent event=null;
  String correlationId=null;
  try {
    correlationId=Contexts.lookup().getCorrelationId();
  }
 catch (  IllegalContextAccessException ex) {
    correlationId=UUID.randomUUID().toString();
  }
  CheckException checkEx=(t instanceof CheckException) ? (CheckException)t : severity.transform(config,t);
switch (checkEx.getSeverity()) {
case DEBUG:
    event=new ServiceStateEvent(config,checkEx);
  break;
case INFO:
event=new ServiceStateEvent(config,checkEx);
break;
case WARNING:
event=new ServiceStateEvent(config,checkEx);
break;
case ERROR:
event=handleErrorEvent(config,correlationId,checkEx);
break;
case URGENT:
event=handleErrorEvent(config,correlationId,checkEx);
break;
case FATAL:
event=handleErrorEvent(config,correlationId,checkEx);
break;
}
try {
config.lookupService().fireEvent(event);
}
 catch (NoSuchServiceException ex) {
LOG.error(ex,ex);
}
}
Program: 15271
Project: 15271
Buggy source:
private CheckException(String correlationId,Throwable cause,Severity severity,ServiceConfiguration config){
  super(cause.getMessage());
  if (cause instanceof CheckException) {
    this.setStackTrace(cause.getStackTrace());
  }
 else {
    this.initCause(cause);
  }
  this.severity=severity;
  this.config=config;
  this.uuid=uuid(cause);
  this.correlationId=(correlationId == null ? this.uuid : correlationId);
  this.timestamp=new Date();
  this.eventState=config.lookupStateMachine().getState();
  this.eventEpoch=Topology.epoch();
}

Fixed version (ground truth):
private CheckException(String correlationId,Throwable cause,Severity severity,ServiceConfiguration config){
  super(cause.getMessage());
  if (cause instanceof CheckException) {
    this.setStackTrace(cause.getStackTrace());
  }
 else {
    this.initCause(cause);
  }
  this.severity=severity;
  this.config=config;
  this.uuid=uuid(cause);
  this.correlationId=(correlationId == null ? this.uuid : correlationId);
  this.timestamp=new Date();
  this.eventState=config.lookupState();
  this.eventEpoch=Topology.epoch();
}
Program: 15272
Project: 15272
Buggy source:
public abstract Service lookupService();

Fixed version (ground truth):
public abstract Service lookupService() throws NoSuchServiceException ;
Program: 15273
Project: 15273
Buggy source:
@Override public ServiceConfiguration apply(ServiceConfiguration config){
  if (!Bootstrap.isFinished()) {
    LOG.debug(this.toString() + "String_Node_Str" + config);
    return config;
  }
 else   if (!config.lookupStateMachine().isBusy()) {
    State initialState=config.lookupState();
    State nextState=config.lookupState();
    if (State.NOTREADY.equals(initialState) || State.BROKEN.equals(initialState)) {
      nextState=State.DISABLED;
    }
 else     if (initialState.ordinal() < State.NOTREADY.ordinal()) {
      return config;
    }
    try {
      Future<ServiceConfiguration> result=ServiceTransitions.transitionChain(config,nextState);
      ServiceConfiguration endConfig=result.get();
      State endState=endConfig.lookupState();
      LOG.debug(this.toString() + "String_Node_Str" + endConfig+ "String_Node_Str"+ initialState+ "String_Node_Str"+ nextState+ "String_Node_Str"+ endState);
      return endConfig;
    }
 catch (    InterruptedException ex) {
      Thread.currentThread().interrupt();
      return config;
    }
catch (    Exception ex) {
      LOG.error(ex,ex);
      throw new UndeclaredThrowableException(ex);
    }
  }
 else {
    return config;
  }
}

Fixed version (ground truth):
@Override public ServiceConfiguration apply(ServiceConfiguration config){
  if (!Bootstrap.isFinished()) {
    LOG.debug(this.toString() + "String_Node_Str" + config);
    return config;
  }
 else   if (!config.getStateMachine().isBusy()) {
    State initialState=config.lookupState();
    State nextState=config.lookupState();
    if (State.NOTREADY.equals(initialState) || State.BROKEN.equals(initialState)) {
      nextState=State.DISABLED;
    }
 else     if (initialState.ordinal() < State.NOTREADY.ordinal()) {
      return config;
    }
    try {
      Future<ServiceConfiguration> result=ServiceTransitions.transitionChain(config,nextState);
      ServiceConfiguration endConfig=result.get();
      State endState=endConfig.lookupState();
      LOG.debug(this.toString() + "String_Node_Str" + endConfig+ "String_Node_Str"+ initialState+ "String_Node_Str"+ nextState+ "String_Node_Str"+ endState);
      return endConfig;
    }
 catch (    InterruptedException ex) {
      Thread.currentThread().interrupt();
      return config;
    }
catch (    Exception ex) {
      LOG.error(ex,ex);
      throw new UndeclaredThrowableException(ex);
    }
  }
 else {
    return config;
  }
}
Program: 15274
Project: 15274
Buggy source:
@Override public Component.State lookupState(){
  return this.getStateMachine().getState();
}

Fixed version (ground truth):
@Override public Component.State lookupState(){
  if (!this.lookupComponent().hasService(this)) {
    return Component.State.NONE;
  }
 else {
    try {
      return this.lookupService().getStateMachine().getState();
    }
 catch (    NoSuchServiceException ex) {
      return Component.State.NONE;
    }
  }
}
Program: 15275
Project: 15275
Buggy source:
@Override public StateMachine<ServiceConfiguration,Component.State,Component.Transition> getStateMachine(){
  return this.lookupService().getStateMachine();
}

Fixed version (ground truth):
@Override public StateMachine<ServiceConfiguration,Component.State,Component.Transition> getStateMachine(){
  try {
    return this.lookupService().getStateMachine();
  }
 catch (  NoSuchServiceException ex) {
    LOG.error(ex,ex);
    throw new IllegalStateException("String_Node_Str" + this.getName(),ex);
  }
}
Program: 15276
Project: 15276
Buggy source:
@Override public Collection<ServiceCheckRecord> lookupDetails(){
  return this.lookupService().getDetails();
}

Fixed version (ground truth):
@Override public Collection<ServiceCheckRecord> lookupDetails(){
  try {
    return this.lookupService().getDetails();
  }
 catch (  NoSuchServiceException ex) {
    LOG.error(ex,ex);
    return Lists.newArrayList();
  }
}
Program: 15277
Project: 15277
Buggy source:
@Override public final Service lookupService(){
  return Components.lookup(this.lookupComponentId()).lookupService(this);
}

Fixed version (ground truth):
@Override public final Service lookupService() throws NoSuchServiceException {
  return Components.lookup(this.lookupComponentId()).lookupService(this);
}
Program: 15278
Project: 15278
Buggy source:
@Override public String toString(){
  return String.format("String_Node_Str",this.getComponentId().name(),this.partition,this.name,this.hostName,this.port,this.servicePath,(this.isVmLocal() ? "String_Node_Str" : "String_Node_Str"),(this.isHostLocal() ? "String_Node_Str" : "String_Node_Str"));
}

Fixed version (ground truth):
@Override public String toString(){
  StringBuilder builder=new StringBuilder();
  builder.append("String_Node_Str").append(this.lookupComponentId().name()).append("String_Node_Str");
  try {
    builder.append(this.getFullName().toString()).append("String_Node_Str").append(this.hostName).append("String_Node_Str").append(this.port).append("String_Node_Str").append(this.servicePath).append("String_Node_Str");
  }
 catch (  Exception ex) {
    builder.append(this.partition).append("String_Node_Str").append(this.name).append("String_Node_Str").append(this.hostName).append("String_Node_Str").append(this.port).append("String_Node_Str").append(this.servicePath).append("String_Node_Str");
  }
  if (this.isVmLocal()) {
    builder.append("String_Node_Str");
  }
  if (this.isHostLocal()) {
    builder.append("String_Node_Str");
  }
  builder.append(this.lookupState());
  return builder.toString();
}
Program: 15279
Project: 15279
Buggy source:
public static Dispatcher lookup(ServiceConfiguration config){
  return config.lookupService().getDispatcher();
}

Fixed version (ground truth):
public static Dispatcher lookup(ServiceConfiguration config){
  try {
    return config.lookupService().getDispatcher();
  }
 catch (  NoSuchServiceException ex) {
    LOG.error(ex,ex);
    throw new NoSuchElementException("String_Node_Str" + config.toString());
  }
}
Program: 15280
Project: 15280
Buggy source:
public static Dispatcher lookupSingle(Component c) throws NoSuchElementException {
  try {
    ServiceConfiguration first=c.lookupServiceConfigurations().first();
    if (!Component.State.ENABLED.isIn(first)) {
      LOG.error("String_Node_Str" + c);
      throw new NoSuchElementException("String_Node_Str" + c.getName() + "String_Node_Str"+ c.lookupServiceConfigurations());
    }
 else {
      return first.lookupService().getDispatcher();
    }
  }
 catch (  NoSuchElementException ex) {
    LOG.error("String_Node_Str" + c,ex);
    throw new NoSuchElementException("String_Node_Str" + c);
  }
}

Fixed version (ground truth):
public static Dispatcher lookupSingle(Component c) throws NoSuchElementException {
  try {
    ServiceConfiguration first=c.lookupServiceConfigurations().first();
    if (!Component.State.ENABLED.isIn(first)) {
      LOG.error("String_Node_Str" + c);
      throw new NoSuchElementException("String_Node_Str" + c.getName() + "String_Node_Str"+ c.lookupServiceConfigurations());
    }
 else {
      return first.lookupService().getDispatcher();
    }
  }
 catch (  NoSuchServiceException ex) {
    LOG.error("String_Node_Str" + c,ex);
    throw new NoSuchElementException("String_Node_Str" + c);
  }
}
Program: 15282
Project: 15282
Buggy source:
private boolean doTransition(EventType transition,CheckedFunction<Bootstrapper,Boolean> checkedFunction){
  String name=transition.name().replaceAll("String_Node_Str","String_Node_Str").toLowerCase();
  this.updateBootstrapDependencies();
  for (  Stage s : Bootstrap.Stage.values()) {
    for (    Bootstrapper b : this.bootstrappers.get(s)) {
      EventRecord.here(this.component.getClass(),transition,"String_Node_Str",s.name(),b.getClass().getCanonicalName()).debug();
      try {
        boolean result=checkedFunction.apply(b);
        if (!result) {
          throw Exceptions.error(new TransitionException(b.getClass().getSimpleName() + "String_Node_Str" + name+ "String_Node_Str"+ this.component.getName()));
        }
      }
 catch (      Throwable e) {
        throw Exceptions.error(new TransitionException(b.getClass().getSimpleName() + "String_Node_Str" + e.getMessage()+ "String_Node_Str"+ name+ "String_Node_Str"+ this.component.getName(),e));
      }
    }
  }
  return true;
}

Fixed version (ground truth):
private boolean doTransition(EventType transition,CheckedFunction<Bootstrapper,Boolean> checkedFunction){
  String name=transition.name().replaceAll("String_Node_Str","String_Node_Str").toLowerCase();
  this.updateBootstrapDependencies();
  for (  Stage s : Bootstrap.Stage.values()) {
    for (    Bootstrapper b : this.bootstrappers.get(s)) {
      EventRecord.here(this.component.getClass(),transition,this.component.getComponentId().name(),"String_Node_Str",s.name(),b.getClass().getCanonicalName()).debug();
      try {
        boolean result=checkedFunction.apply(b);
        if (!result) {
          throw Exceptions.error(new TransitionException(b.getClass().getSimpleName() + "String_Node_Str" + name+ "String_Node_Str"+ this.component.getName()));
        }
      }
 catch (      Throwable e) {
        throw Exceptions.error(new TransitionException(b.getClass().getSimpleName() + "String_Node_Str" + e.getMessage()+ "String_Node_Str"+ name+ "String_Node_Str"+ this.component.getName(),e));
      }
    }
  }
  return true;
}
Program: 15283
Project: 15283
Buggy source:
public static ArrayList<String> processAccountSignups(User requestUser,ArrayList<String> accountNames,boolean approve,String backendUrl) throws EucalyptusServiceException {
  if (EuarePermission.allowProcessAccountSignup(requestUser)) {
    throw new EucalyptusServiceException("String_Node_Str");
  }
  ArrayList<String> success=Lists.newArrayList();
  for (  String accountName : accountNames) {
    try {
      Account account=Accounts.lookupAccountByName(accountName);
      User admin=account.lookupUserByName(User.ACCOUNT_ADMIN);
      if (admin.getRegistrationStatus().equals(RegistrationStatus.REGISTERED)) {
        if (approve) {
          admin.setRegistrationStatus(RegistrationStatus.APPROVED);
          notifyAccountApproval(admin,accountName,backendUrl);
        }
 else {
          notiftyAccountRejection(admin,accountName,backendUrl);
          Accounts.deleteAccount(accountName,false,true);
        }
        success.add(accountName);
      }
 else {
        throw new IllegalArgumentException("String_Node_Str" + accountName + "String_Node_Str");
      }
    }
 catch (    Exception e) {
      LOG.error("String_Node_Str" + (approve ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ accountName,e);
      LOG.debug(e,e);
    }
  }
  return success;
}

Fixed version (ground truth):
public static ArrayList<String> processAccountSignups(User requestUser,ArrayList<String> accountNames,boolean approve,String backendUrl) throws EucalyptusServiceException {
  if (!EuarePermission.allowProcessAccountSignup(requestUser)) {
    throw new EucalyptusServiceException("String_Node_Str");
  }
  ArrayList<String> success=Lists.newArrayList();
  for (  String accountName : accountNames) {
    try {
      Account account=Accounts.lookupAccountByName(accountName);
      User admin=account.lookupUserByName(User.ACCOUNT_ADMIN);
      if (admin.getRegistrationStatus().equals(RegistrationStatus.REGISTERED)) {
        if (approve) {
          admin.setRegistrationStatus(RegistrationStatus.APPROVED);
          notifyAccountApproval(admin,accountName,backendUrl);
        }
 else {
          notiftyAccountRejection(admin,accountName,backendUrl);
          Accounts.deleteAccount(accountName,false,true);
        }
        success.add(accountName);
      }
 else {
        throw new IllegalArgumentException("String_Node_Str" + accountName + "String_Node_Str");
      }
    }
 catch (    Exception e) {
      LOG.error("String_Node_Str" + (approve ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ accountName,e);
      LOG.debug(e,e);
    }
  }
  return success;
}
Program: 15284
Project: 15284
Buggy source:
public static ArrayList<String> processAccountSignups(User requestUser,ArrayList<String> accountNames,boolean approve,String backendUrl) throws EucalyptusServiceException {
  if (EuarePermission.allowProcessAccountSignup(requestUser)) {
    throw new EucalyptusServiceException("String_Node_Str");
  }
  ArrayList<String> success=Lists.newArrayList();
  for (  String accountName : accountNames) {
    try {
      Account account=Accounts.lookupAccountByName(accountName);
      User admin=account.lookupUserByName(User.ACCOUNT_ADMIN);
      if (admin.getRegistrationStatus().equals(RegistrationStatus.REGISTERED)) {
        if (approve) {
          admin.setRegistrationStatus(RegistrationStatus.APPROVED);
          notifyAccountApproval(admin,accountName,backendUrl);
        }
 else {
          notiftyAccountRejection(admin,accountName,backendUrl);
          Accounts.deleteAccount(accountName,false,true);
        }
        success.add(accountName);
      }
 else {
        throw new IllegalArgumentException("String_Node_Str" + accountName + "String_Node_Str");
      }
    }
 catch (    Exception e) {
      LOG.error("String_Node_Str" + (approve ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ accountName,e);
      LOG.debug(e,e);
    }
  }
  return success;
}

Fixed version (ground truth):
public static ArrayList<String> processAccountSignups(User requestUser,ArrayList<String> accountNames,boolean approve,String backendUrl) throws EucalyptusServiceException {
  if (!EuarePermission.allowProcessAccountSignup(requestUser)) {
    throw new EucalyptusServiceException("String_Node_Str");
  }
  ArrayList<String> success=Lists.newArrayList();
  for (  String accountName : accountNames) {
    try {
      Account account=Accounts.lookupAccountByName(accountName);
      User admin=account.lookupUserByName(User.ACCOUNT_ADMIN);
      if (admin.getRegistrationStatus().equals(RegistrationStatus.REGISTERED)) {
        if (approve) {
          admin.setRegistrationStatus(RegistrationStatus.APPROVED);
          notifyAccountApproval(admin,accountName,backendUrl);
        }
 else {
          notiftyAccountRejection(admin,accountName,backendUrl);
          Accounts.deleteAccount(accountName,false,true);
        }
        success.add(accountName);
      }
 else {
        throw new IllegalArgumentException("String_Node_Str" + accountName + "String_Node_Str");
      }
    }
 catch (    Exception e) {
      LOG.error("String_Node_Str" + (approve ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ accountName,e);
      LOG.debug(e,e);
    }
  }
  return success;
}
Program: 15285
Project: 15285
Buggy source:
@Override public void incomingMessage(ChannelHandlerContext ctx,MessageEvent event) throws Exception {
  final Object o=event.getMessage();
  if (o instanceof MappingHttpRequest) {
    final MappingHttpMessage httpRequest=(MappingHttpMessage)o;
    final SOAPEnvelope envelope=httpRequest.getSoapEnvelope();
    final Element secNode=WSSecurity.getSecurityElement(envelope);
    final XMLSignature sig=WSSecurity.getXMLSignature(secNode);
    String sigValue=new String(sig.getSignatureValue());
    SecurityContext.enqueueSignature(sigValue);
    final X509Certificate cert=WSSecurity.verifySignature(secNode,sig);
    if (cert != null) {
      if (!cert.equals(SystemCredentialProvider.getCredentialProvider(Eucalyptus.class).getCertificate())) {
        throw new WSSecurityException(WSSecurityException.FAILED_AUTHENTICATION);
      }
    }
    Contexts.lookup(((MappingHttpMessage)o).getCorrelationId()).setUser(FakePrincipals.SYSTEM_USER);
  }
}

Fixed version (ground truth):
@Override public void incomingMessage(ChannelHandlerContext ctx,MessageEvent event) throws Exception {
  final Object o=event.getMessage();
  if (o instanceof MappingHttpRequest) {
    final MappingHttpMessage httpRequest=(MappingHttpMessage)o;
    final SOAPEnvelope envelope=httpRequest.getSoapEnvelope();
    final Element secNode=WSSecurity.getSecurityElement(envelope);
    final XMLSignature sig=WSSecurity.getXMLSignature(secNode);
    String sigValue=new String(sig.getSignatureValue());
    SecurityContext.enqueueSignature(sigValue);
    try {
      X509Certificate cert=WSSecurity.verifySignature(secNode,sig);
      Logs.exhaust().debug(cert);
      if (cert == null || !cert.equals(SystemCredentialProvider.getCredentialProvider(Eucalyptus.class).getCertificate())) {
        throw new WebServicesException("String_Node_Str" + cert);
      }
    }
 catch (    Exception ex) {
      Logs.exhaust().error(ex,ex);
      throw new WebServicesException("String_Node_Str" + ex.getMessage(),ex);
    }
    Contexts.lookup(((MappingHttpMessage)o).getCorrelationId()).setUser(FakePrincipals.SYSTEM_USER);
  }
}
Program: 15286
Project: 15286
Buggy source:
@Override public void incomingMessage(final ChannelHandlerContext ctx,final MessageEvent event) throws Exception {
  if (event.getMessage() instanceof MappingHttpMessage) {
    MappingHttpMessage httpMessage=(MappingHttpMessage)event.getMessage();
    String content=httpMessage.getContent().toString("String_Node_Str");
    httpMessage.setMessageString(content);
    HoldMe.canHas.lock();
    SOAPEnvelope env=null;
    try {
      StAXSOAPModelBuilder soapBuilder=null;
      try {
        SOAPFactory factory=HoldMe.getOMSOAP11Factory();
        soapBuilder=new StAXSOAPModelBuilder(HoldMe.getXMLStreamReader(content),factory,SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);
      }
 catch (      Exception e) {
        SOAPFactory factory=HoldMe.getOMSOAP12Factory();
        soapBuilder=new StAXSOAPModelBuilder(HoldMe.getXMLStreamReader(content),factory,SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
      }
      env=(SOAPEnvelope)soapBuilder.getDocumentElement();
    }
 catch (    Exception ex) {
      LOG.error(ex,ex);
    }
 finally {
      HoldMe.canHas.unlock();
    }
    httpMessage.setSoapEnvelope(env);
  }
}

Fixed version (ground truth):
@Override public void incomingMessage(final ChannelHandlerContext ctx,final MessageEvent event) throws Exception {
  if (event.getMessage() instanceof MappingHttpMessage) {
    MappingHttpMessage httpMessage=(MappingHttpMessage)event.getMessage();
    String content=httpMessage.getContent().toString("String_Node_Str");
    httpMessage.setMessageString(content);
    HoldMe.canHas.lock();
    SOAPEnvelope env=null;
    try {
      StAXSOAPModelBuilder soapBuilder=null;
      try {
        SOAPFactory factory=HoldMe.getOMSOAP11Factory();
        soapBuilder=new StAXSOAPModelBuilder(HoldMe.getXMLStreamReader(content),factory,SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);
      }
 catch (      Exception e) {
        SOAPFactory factory=HoldMe.getOMSOAP12Factory();
        soapBuilder=new StAXSOAPModelBuilder(HoldMe.getXMLStreamReader(content),factory,SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
      }
      env=(SOAPEnvelope)soapBuilder.getDocumentElement();
    }
 catch (    Exception ex) {
      LOG.error("String_Node_Str" + content);
      LOG.error(ex,ex);
      throw new WebServicesException("String_Node_Str" + content,ex);
    }
 finally {
      HoldMe.canHas.unlock();
    }
    httpMessage.setSoapEnvelope(env);
  }
}
Program: 15287
Project: 15287
Buggy source:
@Override public void fire(ServiceConfiguration config){
  try {
    List<ConfigurableProperty> props=PropertyDirectory.getPropertyEntrySet(config.getComponentId().name());
    for (    ConfigurableProperty prop : props) {
      if (prop instanceof SingletonDatabasePropertyEntry) {
      }
 else       if (prop instanceof MultiDatabasePropertyEntry) {
        ((MultiDatabasePropertyEntry)prop).setIdentifierValue(config.getPartition());
      }
      PropertyDirectory.removeProperty(prop);
    }
  }
 catch (  Throwable ex) {
    LOG.error(ex,ex);
  }
}

Fixed version (ground truth):
@Override public void fire(ServiceConfiguration config){
  try {
    List<ConfigurableProperty> props=PropertyDirectory.getPropertyEntrySet(config.getComponentId().name());
    for (    ConfigurableProperty prop : props) {
      if (prop instanceof SingletonDatabasePropertyEntry) {
      }
 else       if (prop instanceof MultiDatabasePropertyEntry) {
        ((MultiDatabasePropertyEntry)prop).setIdentifierValue(config.getPartition());
        PropertyDirectory.removeProperty(prop);
      }
    }
  }
 catch (  Throwable ex) {
    LOG.error(ex,ex);
  }
}
Program: 15288
Project: 15288
Buggy source:
@Override public void fire(Volume t){
  t.setState(State.GENERATING);
  try {
    ListenerRegistry.getInstance().fireEvent(new StorageEvent(StorageEvent.EventType.EbsVolume,true,t.getSize(),t.getOwnerUserId(),t.getOwnerAccountId(),t.getScName(),t.getPartition()));
    CreateStorageVolumeType req=new CreateStorageVolumeType(t.getDisplayName(),t.getSize(),snapId,null).regardingUserRequest(request);
    ServiceDispatcher.lookup(sc).send(req);
  }
 catch (  Exception ex) {
    LOG.error("String_Node_Str" + t.toString(),ex);
    Transactions.join().delete(t);
    throw new UndeclaredThrowableException(ex);
  }
}

Fixed version (ground truth):
@Override public void fire(Volume t){
  t.setState(State.GENERATING);
  try {
    ListenerRegistry.getInstance().fireEvent(new StorageEvent(StorageEvent.EventType.EbsVolume,true,t.getSize(),t.getOwnerUserId(),t.getOwnerAccountId(),t.getScName(),t.getPartition()));
    CreateStorageVolumeType req=new CreateStorageVolumeType(t.getDisplayName(),t.getSize(),snapId,null).regardingUserRequest(request);
    ServiceDispatcher.lookup(sc).send(req);
  }
 catch (  Exception ex) {
    LOG.error("String_Node_Str" + t.toString(),ex);
    throw new UndeclaredThrowableException(ex);
  }
}
Program: 15289
Project: 15289
Buggy source:
public static Volume createStorageVolume(final ServiceConfiguration sc,UserFullName owner,final String snapId,Integer newSize,final BaseMessage request) throws ExecutionException {
  String newId=Crypto.generateId(owner.getAccountNumber(),ID_PREFIX);
  Volume newVol=Transactions.save(new Volume(owner,newId,newSize,sc.getName(),sc.getPartition(),snapId),new Callback<Volume>(){
    @Override public void fire(    Volume t){
      t.setState(State.GENERATING);
      try {
        ListenerRegistry.getInstance().fireEvent(new StorageEvent(StorageEvent.EventType.EbsVolume,true,t.getSize(),t.getOwnerUserId(),t.getOwnerAccountId(),t.getScName(),t.getPartition()));
        CreateStorageVolumeType req=new CreateStorageVolumeType(t.getDisplayName(),t.getSize(),snapId,null).regardingUserRequest(request);
        ServiceDispatcher.lookup(sc).send(req);
      }
 catch (      Exception ex) {
        LOG.error("String_Node_Str" + t.toString(),ex);
        Transactions.join().delete(t);
        throw new UndeclaredThrowableException(ex);
      }
    }
  }
);
  return newVol;
}

Fixed version (ground truth):
public static Volume createStorageVolume(final ServiceConfiguration sc,UserFullName owner,final String snapId,Integer newSize,final BaseMessage request) throws ExecutionException {
  String newId=Crypto.generateId(owner.getAccountNumber(),ID_PREFIX);
  Volume newVol=Transactions.save(new Volume(owner,newId,newSize,sc.getName(),sc.getPartition(),snapId),new Callback<Volume>(){
    @Override public void fire(    Volume t){
      t.setState(State.GENERATING);
      try {
        ListenerRegistry.getInstance().fireEvent(new StorageEvent(StorageEvent.EventType.EbsVolume,true,t.getSize(),t.getOwnerUserId(),t.getOwnerAccountId(),t.getScName(),t.getPartition()));
        CreateStorageVolumeType req=new CreateStorageVolumeType(t.getDisplayName(),t.getSize(),snapId,null).regardingUserRequest(request);
        ServiceDispatcher.lookup(sc).send(req);
      }
 catch (      Exception ex) {
        LOG.error("String_Node_Str" + t.toString(),ex);
        throw new UndeclaredThrowableException(ex);
      }
    }
  }
);
  return newVol;
}
Program: 15291
Project: 15291
Buggy source:
@SuppressWarnings("String_Node_Str") public ImageInfo grantPermission(final Account account){
  try {
    Transactions.one(new ImageInfo(this.displayName),new Callback<ImageInfo>(){
      @Override public void fire(      final ImageInfo t){
        EntityWrapper<ImageInfo> db=Transactions.join();
        LaunchPermission imgAuth=new LaunchPermission(t,account.getAccountNumber());
        if (!t.getPermissions().contains(imgAuth)) {
          t.getPermissions().add(imgAuth);
        }
      }
    }
);
  }
 catch (  ExecutionException e) {
    LOG.debug(e,e);
  }
  return this;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public ImageInfo grantPermission(final Account account){
  try {
    Transactions.one(new ImageInfo(this.displayName),new Callback<ImageInfo>(){
      @Override public void fire(      final ImageInfo t){
        LaunchPermission imgAuth=new LaunchPermission(t,account.getAccountNumber());
        if (!t.getPermissions().contains(imgAuth)) {
          t.getPermissions().add(imgAuth);
        }
      }
    }
);
  }
 catch (  ExecutionException e) {
    LOG.debug(e,e);
  }
  return this;
}