<commit_before>package com.yzong.ccproj3;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
import com.amazonaws.auth.BasicAWSCredentials;
import com.amazonaws.services.dynamodbv2.AmazonDynamoDBClient;
import com.amazonaws.services.dynamodbv2.model.AttributeDefinition;
import com.amazonaws.services.dynamodbv2.model.CreateTableRequest;
import com.amazonaws.services.dynamodbv2.model.CreateTableResult;
import com.amazonaws.services.dynamodbv2.model.DescribeTableRequest;
import com.amazonaws.services.dynamodbv2.model.KeySchemaElement;
import com.amazonaws.services.dynamodbv2.model.KeyType;
import com.amazonaws.services.dynamodbv2.model.ProvisionedThroughput;
import com.amazonaws.services.dynamodbv2.model.TableDescription;

public class ccproj3d {

    static String TABLE_NAME = "proj3d";

    /**
     * @param args
     * @throws IOException
     * @throws InterruptedException
     */
    public static void main(String[] args) throws IOException,
            InterruptedException {
        // Load the Property File with AWS Credentials.
        Properties properties = new Properties();
        properties.load(ccproj3d.class
                .getResourceAsStream("/AwsCredentials.properties"));
        BasicAWSCredentials bawsc = new BasicAWSCredentials(
                properties.getProperty("accessKey"),
                properties.getProperty("secretKey"));
        // Create DynamoDB client.
        AmazonDynamoDBClient DDBClient = new AmazonDynamoDBClient(bawsc);
        DDBClient.setEndpoint("https://dynamodb.us-east-1.amazonaws.com");

        // Create table initialization request.
        CreateTableRequest createTableRequest = new CreateTableRequest();
        // Allocate R/W throughput of the table.
        ProvisionedThroughput throughput = new ProvisionedThroughput();
        throughput.withReadCapacityUnits(500L).withWriteCapacityUnits(200L);
        // The table has Hash Key attribute "Category" as String type, and Range
        // Key attribute "Picture" as Number type.
        List<AttributeDefinition> attributeDefinitions = new ArrayList<AttributeDefinition>();
        attributeDefinitions.add(new AttributeDefinition().withAttributeName(
                "Category").withAttributeType("S"));
        attributeDefinitions.add(new AttributeDefinition().withAttributeName(
                "Picture").withAttributeType("N"));
        // Specify the key schemas.
        List<KeySchemaElement> keySchemas = new ArrayList<KeySchemaElement>();
        keySchemas.add(new KeySchemaElement().withAttributeName("Category")
                .withKeyType(KeyType.HASH));
        keySchemas.add(new KeySchemaElement().withAttributeName("Picture")
                .withKeyType(KeyType.RANGE));
        // Generate the final request.
        createTableRequest.withTableName(TABLE_NAME)
                .withProvisionedThroughput(throughput)
                .withAttributeDefinitions(attributeDefinitions)
                .withKeySchema(keySchemas);

        // Send the initialization request to Amazon and wait.
        CreateTableResult createTableResult = DDBClient
                .createTable(createTableRequest);
        TableDescription tableDescription = createTableResult
                .getTableDescription();
        String tableName = tableDescription.getTableName();
        String tableStatus = tableDescription.getTableStatus();
        Long tableRThroughput = tableDescription.getProvisionedThroughput()
                .getReadCapacityUnits();
        Long tableWThroughput = tableDescription.getProvisionedThroughput()
                .getWriteCapacityUnits();
        System.out.println("Success! Following is the new table info:");
        System.out.printf(
                "Name: %s (%s)\nRead Throughput: %l\nWrite Throughput: %l\n",
                tableName, tableStatus, tableRThroughput, tableWThroughput);
        System.out.println("Waiting for the initialization of table...");
        Thread.sleep(15000);
        tableDescription = DDBClient.describeTable(
                new DescribeTableRequest().withTableName(tableName)).getTable();
        while (tableDescription.getTableStatus() != "ACTIVE") {
            System.out.println("Waiting for 5 more seconds...");
            Thread.sleep(5000);
            tableDescription = DDBClient.describeTable(
                    new DescribeTableRequest().withTableName(tableName))
                    .getTable();
        }
        System.out.printf("Success! The table %s is ready for use.\n",
                tableName);
        return;
    }
}<commit_msg>Minor changes -- table creation now working.<commit_after>package com.yzong.ccproj3;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
import com.amazonaws.auth.BasicAWSCredentials;
import com.amazonaws.services.dynamodbv2.AmazonDynamoDBClient;
import com.amazonaws.services.dynamodbv2.model.AttributeDefinition;
import com.amazonaws.services.dynamodbv2.model.CreateTableRequest;
import com.amazonaws.services.dynamodbv2.model.CreateTableResult;
import com.amazonaws.services.dynamodbv2.model.DescribeTableRequest;
import com.amazonaws.services.dynamodbv2.model.KeySchemaElement;
import com.amazonaws.services.dynamodbv2.model.KeyType;
import com.amazonaws.services.dynamodbv2.model.ProvisionedThroughput;
import com.amazonaws.services.dynamodbv2.model.TableDescription;

public class ccproj3d {

    static String TABLE_NAME = "proj3d";

    /**
     * @param args
     * @throws IOException
     * @throws InterruptedException
     */
    public static void main(String[] args) throws IOException,
            InterruptedException {
        // Load the Property File with AWS Credentials.
        Properties properties = new Properties();
        properties.load(ccproj3d.class
                .getResourceAsStream("/AwsCredentials.properties"));
        BasicAWSCredentials bawsc = new BasicAWSCredentials(
                properties.getProperty("accessKey"),
                properties.getProperty("secretKey"));
        // Create DynamoDB client.
        AmazonDynamoDBClient DDBClient = new AmazonDynamoDBClient(bawsc);
        DDBClient.setEndpoint("https://dynamodb.us-east-1.amazonaws.com");

        // Create table initialization request.
        CreateTableRequest createTableRequest = new CreateTableRequest();
        // Allocate R/W throughput of the table.
        ProvisionedThroughput throughput = new ProvisionedThroughput();
        throughput.withReadCapacityUnits(500L).withWriteCapacityUnits(200L);
        // The table has Hash Key attribute "Category" as String type, and Range
        // Key attribute "Picture" as Number type.
        List<AttributeDefinition> attributeDefinitions = new ArrayList<AttributeDefinition>();
        attributeDefinitions.add(new AttributeDefinition().withAttributeName(
                "Category").withAttributeType("S"));
        attributeDefinitions.add(new AttributeDefinition().withAttributeName(
                "Picture").withAttributeType("N"));
        // Specify the key schemas.
        List<KeySchemaElement> keySchemas = new ArrayList<KeySchemaElement>();
        keySchemas.add(new KeySchemaElement().withAttributeName("Category")
                .withKeyType(KeyType.HASH));
        keySchemas.add(new KeySchemaElement().withAttributeName("Picture")
                .withKeyType(KeyType.RANGE));
        // Generate the final request.
        createTableRequest.withTableName(TABLE_NAME)
                .withProvisionedThroughput(throughput)
                .withAttributeDefinitions(attributeDefinitions)
                .withKeySchema(keySchemas);

        // Send the initialization request to Amazon and wait.
        CreateTableResult createTableResult = DDBClient
                .createTable(createTableRequest);
        TableDescription tableDescription = createTableResult
                .getTableDescription();
        String tableName = tableDescription.getTableName();
        String tableStatus = tableDescription.getTableStatus();
        Long tableRThroughput = tableDescription.getProvisionedThroughput()
                .getReadCapacityUnits();
        Long tableWThroughput = tableDescription.getProvisionedThroughput()
                .getWriteCapacityUnits();
        System.out.println("Success! Following is the new table info:");
        System.out.printf(
                "Name: %s (%s)\nRead Throughput: %d\nWrite Throughput: %d\n",
                tableName, tableStatus, tableRThroughput, tableWThroughput);
        System.out.println("Waiting for the initialization of table... (20s)");
        Thread.sleep(20000);
        tableDescription = DDBClient.describeTable(
                new DescribeTableRequest().withTableName(tableName)).getTable();
        while (!tableDescription.getTableStatus().equals("ACTIVE")) {
            System.out.println("Waiting for 5 more seconds...");
            Thread.sleep(5000);
            tableDescription = DDBClient.describeTable(
                    new DescribeTableRequest().withTableName(tableName))
                    .getTable();
        }
        System.out.printf("Success! The table %s is ready for use.\n",
                tableName);
        return;
    }
}
{'fraction_non_alphanumeric': 0.09368613531246639, 'fraction_numerical': 0.006668817898246747, 'mean_word_length': 3.004306632213609, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3205666', 'n_tokens_mistral': 2436, 'n_tokens_neox': 2328, 'n_words': 467}