Program: 11307
Project: 11307
Buggy source:
public void createStubItemWithGlobalSecondaryIndexTable() throws Exception {
  final String tableName=unitTestSchemaName + "String_Node_Str" + stubItemWithGsiTableName;
  boolean tableCreated=false;
  try {
    final DescribeTableResult result=amazonDynamoDbClient.describeTable(tableName);
    if (isTableCreated(tableName,result)) {
      tableCreated=true;
    }
  }
 catch (  final ResourceNotFoundException e) {
    tableCreated=false;
  }
  if (!tableCreated) {
    final Collection<AttributeDefinition> attributeDefinitions=new ArrayList<>();
    attributeDefinitions.add(new AttributeDefinition("String_Node_Str",ScalarAttributeType.S));
    attributeDefinitions.add(new AttributeDefinition("String_Node_Str",ScalarAttributeType.S));
    attributeDefinitions.add(new AttributeDefinition("String_Node_Str",ScalarAttributeType.N));
    final Collection<KeySchemaElement> keySchema=new ArrayList<>();
    keySchema.add(new KeySchemaElement("String_Node_Str","String_Node_Str").withKeyType(KeyType.HASH));
    final GlobalSecondaryIndex globalSecondaryIndex=new GlobalSecondaryIndex();
    final Collection<KeySchemaElement> globalSecondaryIndexKeySchema=new ArrayList<>();
    globalSecondaryIndexKeySchema.add(new KeySchemaElement("String_Node_Str","String_Node_Str").withKeyType(KeyType.HASH));
    globalSecondaryIndexKeySchema.add(new KeySchemaElement("String_Node_Str","String_Node_Str").withKeyType(KeyType.RANGE));
    globalSecondaryIndex.setIndexName("String_Node_Str");
    globalSecondaryIndex.setKeySchema(globalSecondaryIndexKeySchema);
    globalSecondaryIndex.setProvisionedThroughput(new ProvisionedThroughput(10L,10L));
    final Projection projection=new Projection();
    projection.setProjectionType(ProjectionType.ALL);
    globalSecondaryIndex.setProjection(projection);
    final CreateTableRequest createTableRequest=new CreateTableRequest().withTableName(tableName).withAttributeDefinitions(attributeDefinitions).withKeySchema(keySchema).withGlobalSecondaryIndexes(globalSecondaryIndex).withProvisionedThroughput(new ProvisionedThroughput(10L,10L));
    amazonDynamoDbClient.createTable(createTableRequest);
    final long startTime=System.currentTimeMillis();
    do {
      Thread.sleep(1000);
      final DescribeTableResult describeTableResult=amazonDynamoDbClient.describeTable(tableName);
      tableCreated=isTableCreated(tableName,describeTableResult);
    }
 while (!tableCreated && System.currentTimeMillis() - startTime < 60000);
  }
}

Fixed version (ground truth):
public void createStubItemWithGlobalSecondaryIndexTable() throws Exception {
  final String tableName=unitTestSchemaName + "String_Node_Str" + stubItemWithGsiTableName;
  boolean tableCreated=false;
  try {
    final DescribeTableResult result=amazonDynamoDbClient.describeTable(tableName);
    if (isTableCreated(tableName,result)) {
      tableCreated=true;
    }
  }
 catch (  final ResourceNotFoundException e) {
    tableCreated=false;
  }
  if (!tableCreated) {
    final Collection<AttributeDefinition> attributeDefinitions=new ArrayList<>();
    attributeDefinitions.add(new AttributeDefinition("String_Node_Str",ScalarAttributeType.S));
    attributeDefinitions.add(new AttributeDefinition("String_Node_Str",ScalarAttributeType.S));
    attributeDefinitions.add(new AttributeDefinition("String_Node_Str",ScalarAttributeType.N));
    final Collection<KeySchemaElement> keySchema=new ArrayList<>();
    keySchema.add(new KeySchemaElement("String_Node_Str","String_Node_Str").withKeyType(KeyType.HASH));
    final GlobalSecondaryIndex globalSecondaryIndex=buildSimpleCompoundGlobalSecondaryIndex("String_Node_Str","String_Node_Str","String_Node_Str");
    final CreateTableRequest createTableRequest=new CreateTableRequest().withTableName(tableName).withAttributeDefinitions(attributeDefinitions).withKeySchema(keySchema).withGlobalSecondaryIndexes(globalSecondaryIndex).withProvisionedThroughput(new ProvisionedThroughput(10L,10L));
    amazonDynamoDbClient.createTable(createTableRequest);
    final long startTime=System.currentTimeMillis();
    do {
      Thread.sleep(1000);
      final DescribeTableResult describeTableResult=amazonDynamoDbClient.describeTable(tableName);
      tableCreated=isTableCreated(tableName,describeTableResult);
    }
 while (!tableCreated && System.currentTimeMillis() - startTime < 60000);
  }
}