aa7f3a8ebae0d551a51bbd02003b5c7dae1ef6c9,language/movie_nl/main.py,,get_sentiment_entities,#Any#Any#,190

Before Change



    sentiments, entities = analyze_document(service, document)

    sentiments = [sent for sent in sentiments if sent[0] is not None]
    negative_sentiments = [
        polarity for polarity, magnitude in sentiments if polarity < 0.0]
    positive_sentiments = [
        polarity for polarity, magnitude in sentiments if polarity > 0.0]

    negative = sum(negative_sentiments)
    positive = sum(positive_sentiments)
    total = positive + negative

    return (total, entities)

After Change


    

    sentiments, entities = analyze_document(service, document)
    score = sentiments.get("score")

    return (score, entities)

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: aa7f3a8ebae0d551a51bbd02003b5c7dae1ef6c9
Time: 2016-11-14
Author: puneith@users.noreply.github.com
File Name: language/movie_nl/main.py
Class Name:
Method Name: get_sentiment_entities


Project Name: bokeh/bokeh
Commit Name: f1bc5b054e29f6d8e948fe7222936a2b0a975535
Time: 2019-10-07
Author: mattpap@gmail.com
File Name: bokeh/util/compiler.py
Class Name:
Method Name: _bundle_models


Project Name: flow-project/flow
Commit Name: 27d568c5cf6c5b011d075ea8113288a852170b32
Time: 2019-02-17
Author: akreidieh@gmail.com
File Name: flow/scenarios/loop_merge.py
Class Name: TwoLoopsOneMergingScenario
Method Name: gen_custom_start_pos