Program: 79492
Project: 79492
Buggy source:
public static String waitForPasswordOnAws(ComputeService computeService,final NodeMetadata node,long timeout,TimeUnit timeUnit) throws TimeoutException {
  ComputeServiceContext computeServiceContext=computeService.getContext();
  AWSEC2Api ec2Client=computeServiceContext.unwrapApi(AWSEC2Api.class);
  final WindowsApi client=ec2Client.getWindowsApi().get();
  final String region=node.getLocation().getParent().getId();
  Predicate<String> passwordReady=new Predicate<String>(){
    @Override public boolean apply(    String s){
      if (Strings.isNullOrEmpty(s))       return false;
      PasswordData data=client.getPasswordDataInRegion(region,s);
      if (data == null)       return false;
      return !Strings.isNullOrEmpty(data.getPasswordData());
    }
  }
;
  LOG.info("String_Node_Str" + node.getProviderId() + "String_Node_Str"+ node.getId());
  Predicate passwordReadyRetryable=Predicates2.retry(passwordReady,timeUnit.toMillis(timeout),10 * 1000,TimeUnit.MILLISECONDS);
  boolean ready=passwordReadyRetryable.apply(node.getProviderId());
  if (!ready)   throw new TimeoutException("String_Node_Str" + node + "String_Node_Str"+ region+ "String_Node_Str"+ timeout+ "String_Node_Str"+ timeUnit.name());
  PasswordDataAndPrivateKey dataAndKey=new PasswordDataAndPrivateKey(client.getPasswordDataInRegion(region,node.getProviderId()),node.getCredentials().getPrivateKey());
  WindowsLoginCredentialsFromEncryptedData f=computeServiceContext.utils().injector().getInstance(WindowsLoginCredentialsFromEncryptedData.class);
  LoginCredentials credentials=f.apply(dataAndKey);
  return credentials.getPassword();
}

Fixed version (ground truth):
public static String waitForPasswordOnAws(ComputeService computeService,final NodeMetadata node,long timeout,TimeUnit timeUnit) throws TimeoutException {
  ComputeServiceContext computeServiceContext=computeService.getContext();
  AWSEC2Api ec2Client=computeServiceContext.unwrapApi(AWSEC2Api.class);
  final WindowsApi client=ec2Client.getWindowsApi().get();
  final String region=node.getLocation().getParent().getId();
  Predicate<String> passwordReady=new Predicate<String>(){
    @Override public boolean apply(    String s){
      if (Strings.isNullOrEmpty(s))       return false;
      PasswordData data=client.getPasswordDataInRegion(region,s);
      if (data == null)       return false;
      return !Strings.isNullOrEmpty(data.getPasswordData());
    }
  }
;
  LOG.info("String_Node_Str" + node.getProviderId() + "String_Node_Str"+ node.getId());
  Predicate<String> passwordReadyRetryable=Predicates2.retry(passwordReady,timeUnit.toMillis(timeout),10 * 1000,TimeUnit.MILLISECONDS);
  boolean ready=passwordReadyRetryable.apply(node.getProviderId());
  if (!ready)   throw new TimeoutException("String_Node_Str" + node + "String_Node_Str"+ region+ "String_Node_Str"+ timeout+ "String_Node_Str"+ timeUnit.name());
  PasswordDataAndPrivateKey dataAndKey=new PasswordDataAndPrivateKey(client.getPasswordDataInRegion(region,node.getProviderId()),node.getCredentials().getPrivateKey());
  WindowsLoginCredentialsFromEncryptedData f=computeServiceContext.utils().injector().getInstance(WindowsLoginCredentialsFromEncryptedData.class);
  LoginCredentials credentials=f.apply(dataAndKey);
  return credentials.getPassword();
}