<commit_before>/**
 * Copyright (C) 2011 - <EMAIL> <<EMAIL>>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.crashnote.appengine.collect.impl;

import com.crashnote.appengine.util.AppengineUtil;
import com.crashnote.core.collect.impl.EnvCollector;
import com.crashnote.core.config.Config;
import com.crashnote.core.model.data.DataObject;

/**
 * Customized {@link EnvCollector} that collects additional information from the AppEngine
 * platform (like application id).
 */
public class AppengineEnvCollector<C extends Config>
    extends EnvCollector<C> {

    private static final String PROP_APP_ID = "com.google.appengine.application.id";
    private static final String PROP_APP_VER = "com.google.appengine.application.version";

    private static final String PROP_RT_VER = "com.google.appengine.runtime.version";
    private static final String PROP_RT_MODE = "com.google.appengine.runtime.environment";

    // SETUP ======================================================================================
<commit_msg>using AppEngine's system properties API in place of string literals<commit_after>/**
 * Copyright (C) 2011 - <EMAIL> <<EMAIL>>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.crashnote.appengine.collect.impl;

import com.crashnote.appengine.util.AppengineUtil;
import com.crashnote.core.collect.impl.EnvCollector;
import com.crashnote.core.config.Config;
import com.crashnote.core.model.data.DataObject;
import com.google.appengine.api.utils.SystemProperty;

/**
 * Customized {@link EnvCollector} that collects additional information from the AppEngine
 * platform (like application id).
 */
public class AppengineEnvCollector<C extends Config>
    extends EnvCollector<C> {

    private static final String PROP_APP_ID = SystemProperty.applicationId.key();
    private static final String PROP_APP_VER = SystemProperty.applicationVersion.key();

    private static final String PROP_RT_VER = SystemProperty.version.key();
    private static final String PROP_RT_MODE = SystemProperty.environment.key();

    // SETUP ======================================================================================

{'fraction_non_alphanumeric': 0.13699059561128527, 'fraction_numerical': 0.005015673981191223, 'mean_word_length': 4.647787610619469, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '6004122', 'n_tokens_mistral': 846, 'n_tokens_neox': 808, 'n_words': 291}