abir18/sample_suggestion_acceptance huggingface dataset:
Original:                 def process_attributes(buffer: +"", **attributes)
Modified:           def process_attributes(buffer = +"", **attributes)
Suggestion accepted: False
Original:     config.setApiServer('http://nylas.com');
Modified:     config.setApiServer('https://nylas.com');
Suggestion accepted: False
Original:             parsed_body = JSON.parse(raw_body) rescure nil
Modified:             parsed_body = JSON.parse(raw_body) rescue nil
Suggestion accepted: True
Original:       # Public: Sort Code.
Modified:       # Public: The String sort code. E.g. "089999".
Suggestion accepted: True
Original:       # Public: Account number.
Modified:       # Public: The String account number. E.g. "66374958".
Suggestion accepted: True
Original:         return tree_map(_resolve, args)
Modified:     def to_torch(cls, args: Any):        return tree_map_only(cls, lambda x: x._t, args)
Suggestion accepted: True
Original:          respond_to?(:after_template) && after_template
Modified:          after_template if respond_to?(:after_template)
Suggestion accepted: False
Original:  annotations := append(c.additionalAnnotations, "kubectl.kubernetes.io/last-applied-configuration")
Modified:  annotations := append([]string{"kubectl.kubernetes.io/last-applied-configuration"}, c.additionalAnnotations...)
Suggestion accepted: True
Original:   performance: 'Performance',
Modified:   performance: 'Perf',
Suggestion accepted: False
Original:   inject('fire<%= options.injectionMapping[service] %>Obj', firebase.<%= service %>)
Modified:   inject('fire<%= options.injectionMapping[service] %>Obj', firebase.<%= options.serviceMapping[service] %>)
Suggestion accepted: True
Original:     inject('fire<%= options.injectionMapping[service] %>Obj', firebase.<%= service %>)
Modified:     inject('fire<%= options.injectionMapping[service] %>Obj', firebase.<%= options.serviceMapping[service] %>)
Suggestion accepted: False
Original:                           blockquote { visit_children(node)}
Modified:                              blockquote { visit_children(node) }
Suggestion accepted: True
Original:                   return unless render?
Modified:                   return buffer unless render?
Suggestion accepted: True
Original:               end
Modified:               register_element :element_name
Suggestion accepted: False
Original:                                   Here's how you can register custom elements.
Modified:                                    Here's how you can register custom elements. The custom element will only be available in the view where it is registered and subclasses of that view.
Suggestion accepted: True
Original:               register_element :hello
Modified:               register_element :trix_editor
Suggestion accepted: True
Original:                 end
Modified:                 trix_editor input: "content" autofocus: true
Suggestion accepted: True
Original:                                         ""
Modified:                                  Phlex.configuration.logger.warn "Cannot evaluate view translate path ...`                                      ""
Suggestion accepted: False
Original:                                           end
Modified:                                             if unchanged                                                    case output                                                     when ActiveSupport::SafeBuffer                                                          raw(output)                                                     when String                                                             text(output)                                                    end                                             end
Suggestion accepted: True
Original:                                                   end
Modified:                                                     if defined?(ActiveSupport::SafeBuffer) && output.is_a?(ActiveSupport::SafeBuffer)                                                               raw(output)                                                     else                                                            text(output)                                                    end
Suggestion accepted: True
Modified:                        def self.field(method_name, type:)
Suggestion accepted: False
Original:                  input_field :search_field, type: "search"
Modified:                   def field_name(*field)                          @_view_context.field_name(ActiveModel::Naming.param_key(@model.class), *field)                  end
Suggestion accepted: True
Original:                                  end
Modified:                                    case (arguments = @arguments&.parts)                                    in []                                           nil                                     in [SyntaxTree::BareAssocHash, *]                                               nil                                     in [first]                                              first                                   else                                            arguments                                       end
Suggestion accepted: False
Original:     attr_reader :helpers
Modified:     def helpers      @_view_context    end
Suggestion accepted: False
Original:                 %(    config.autoload_paths << Rails.root.join("app")\n)
Modified:            %(    config.autoload_paths << "#{root}/app"
Suggestion accepted: False
Original:          end
Modified:            it "renders comments" do                      expect(output).to be ==                         %(<div>\n  <span>\n    Matz\n  </span>\n  <span>\n    hey, folks\n  </span>\n\n  \n  Hello, World from a ViewComponent!\n\n\n  \n    <p>Start Card A</p>\n    \n<article class=\"drop-shadow p-5 rounded\"><h3 class=\"font-bold\">Hello from A</h3></article></div>\n)             end
Suggestion accepted: False
Original:          end
Modified:            it "renders comments" do                      expect(output).to be ==                         %(<div>\n  <span>\n    _why\n  </span>\n  <span>\n    I&#39;m back\n  </span>\n\n  \n\n  \n    <p>Start Card A</p>\n    \n<article class=\"drop-shadow p-5 rounded\"><h3 class=\"font-bold\">Hello from A</h3></article></div>\n\n)         end
Suggestion accepted: False
Original:  # Rails isnt in this env, dont load the engine.
Modified:       # Rails isn't in this env, don't load the engine.
Suggestion accepted: True
Original:       output = yield(self) if block_given?
Modified:       output = yield(self)
Suggestion accepted: True
Original:       @_target << CGI.escape_html(content.to_s)
Modified:       case content      when String        @_target << CGI.escape_html(content)      when Symbol        @_target << CGI.escape_html(content.name)      else        @_target << CGI.escape_html(content.to_s)      end
Suggestion accepted: False
Original:               @_target << "<#{tag}>" << CGI.escape_html(content.to_s) << "</#{tag}>"
Modified:               case content              when String                @_target << "<#{tag}>" << CGI.escape_html(content) << "</#{tag}>"              when Symbol                @_target << "<#{tag}>" << CGI.escape_html(content.name) << "</#{tag}>"              else                @_target << "<#{tag}>" << CGI.escape_html(content.to_s) << "</#{tag}>"              end
Suggestion accepted: False
Original:       attributes.keys.each do |key|
Modified:       attributes.each_key do |key|
Suggestion accepted: True
Original:           _raw ApplicationControllerForPhlex.new.render_to_string(partial:, locals: kwargs)
Modified:           _raw ApplicationControllerForPhlex.new.view_context.render(...)
Suggestion accepted: False
Original: Phlex::Context.send(:include, Phlex::Rails::Rendering)
Modified: Phlex::Context.include(Phlex::Rails::Rendering)
Suggestion accepted: True
Original:       attributes[:href] = attributes[:href].gsub("javascript:", "") if attributes[:href]
Modified:       attributes[:href].sub!(/^\s*(javascript:)+/, "") if attributes[:href]
Suggestion accepted: True
Original:       @classes.gsub!(UNDERSCORE, DASH) if Phlex.configuration.convert_underscores_to_dashes.eql?(true)
Modified:       @classes.gsub!(UNDERSCORE, DASH) if Phlex.configuration.convert_underscores_to_dashes
Suggestion accepted: True
Original:     end
Modified:     describe "when configured to convert_underscores_to_dashes"      it "converts underscores to dashes and produces the classes" do        expect(output).to eq %{<div class="a-b"></div>}      end    end
Suggestion accepted: False
Original:       kwargs.keys.each do
Modified:     def initialize(**assigns)      assigns.keys.each do
Suggestion accepted: False
Original:     assert_equal("Ticket", I18n.t(defaults.shift, **options))
Modified:     defaults = [:product, "Ticket"]    options = {:scope=>[:activerecord, :models], :count=>1, :default=> defaults}    assert_equal("Ticket", I18n.t(:"product/ticket", **options))
Suggestion accepted: False
Original:       # are supported in the current version of Pysch.
Modified:       # are supported in the current version of Psych.
Suggestion accepted: False
Original:           YAML.load_file('test/test_data/locales/en.yml', k => v)
Modified:           YAML.load('', **{k => v})
Suggestion accepted: False
Original:     # There is a breaking chang in ruby that produces warning with ruby 2.7 and won't work as expected with ruby 3.0
Modified:     # There is a breaking change in ruby that produces warning with ruby 2.7 and won't work as expected with ruby 3.0
Suggestion accepted: True
Original:         I18n.#{method} is currently disabled, likely because your application is still in it's loading phase.
Modified:         I18n.#{method} is currently disabled, likely because your application is still in its loading phase.
Suggestion accepted: True
Original:     mock_client.describe_vpc_endpoint_services(
Modified:     mock_client.describe_vpc_endpoint_services.assert_called_with(
Suggestion accepted: True
Original:     to_delete_set = set()
Modified:     to_delete_set = set(map(tuple, to_delete))
Suggestion accepted: True
Original:     s3_mock.delete_objects.call_count == 2
Modified:     assert s3_mock.delete_objects.call_count == 2
Suggestion accepted: True
Original:                       select none or more partition keys to be used. If you
Modified:                       select the partition keys to be used in the query phase. If you
Suggestion accepted: True
Original:                     ? `Select one or more column from the table`
Modified:                     ? `Select one or more columns from the table`
Suggestion accepted: True
Original:                       of smaller queries.`}
Modified:                     : `To control the granularity of each query, you can                      select the partition keys to be used in the query phase. If you                      select none, only one query will be performed for the data                      mapper. If you select all, more queries will be run to scan each partition                      of the data separately.`}
Suggestion accepted: True
Original:         raise ValueError("Unsupported Encryption SDK version")
Modified:         raise ValueError("Unsupported Amazon S3 Encryption Client Version")
Suggestion accepted: True
Original:         lines.pop()
Modified:     lines = content.strip().splitlines()
Suggestion accepted: False
Original:                   : "Unknown (Planning pending)"
Modified:                   : "Unknown (Plan pending)"
Suggestion accepted: False
Original: // creating a parquet schema from a Go strut and using the parquet.(*Schema).Traverse
Modified: // creating a parquet schema from a Go struct and using the parquet.(*Schema).Traverse
Suggestion accepted: False
Original:     return any(x['Column'].find(".") >= 0 for x in to_delete)
Modified:     return any('.' in x['Column'] for x in to_delete)
Suggestion accepted: True
Original:     return str[len(prefix):(len(str) - len(suffix))]
Modified:     return str[len(prefix):-len(suffix)]
Suggestion accepted: False
Original:     if col_type in ["char", "string", "varchar"]:
Modified:     if col_type in ("char", "string", "varchar"):
Suggestion accepted: True
Original:     if col_type in ["bigint", "int", "smallint", "tinyint"]:
Modified:     if col_type in ("bigint", "int", "smallint", "tinyint"):
Suggestion accepted: True
Original:         "sqlalchemy>=1.2.0,<=1.4.29",
Modified:         "sqlalchemy>=1.2.0,<=1.4.28",
Suggestion accepted: False
Original:     if col_type in ["double", "float"]:
Modified:     if col_type in ("double", "float"):
Suggestion accepted: True
Original:             <Alert type="error" title="An error happened">
Modified:             <Alert type="error" title="An Error Occurred">
Suggestion accepted: True
Original:         <Alert type="error" title="An error happened">
Modified:         <Alert type="error" title="An Error Occurred">
Suggestion accepted: True
Original:           <Alert type="error" title="An error happened">
Modified:           <Alert type="error" title="An Error Occurred">
Suggestion accepted: True
Original:         <Alert type="error" title="Unable to load Events">
Modified:         <Alert type="error" title="Unable to Load Events">
Suggestion accepted: False
Original:         mvqs = {}
Modified:     qs = event.get("queryStringParameters", {})    mvqs = event.get("multiValueQueryStringParameters", {})
Suggestion accepted: False
Original:         raise ValueError("from_version ({}) was more recent than to_version ({})".format(
Modified:         raise ValueError("from_version ({}) is more recent than to_version ({})".format(
Suggestion accepted: True
Original:     if(from_index == -1):
Modified:     if from_index == -1:
Suggestion accepted: True
Original:     if(to_index == -1):
Modified:     if to_index == -1:
Suggestion accepted: True
Original:     if(to_index < from_index):
Modified:     if to_index < from_index:
Suggestion accepted: True
Original:     delete_markers = object_versions['DeleteMarkers']
Modified:     delete_markers = object_versions.get('DeleteMarkers', [])
Suggestion accepted: True
Original:     versions = object_versions['Versions']
Modified:     versions = object_versions.get('Versions', [])
Suggestion accepted: True
Original:     @staticmethod
Modified:     @staticmethod
Suggestion accepted: True
Original:         "sqlalchemy>=1.2.0,<=1.4.28",
Modified:         "sqlalchemy>=1.2.0,<=1.4.27",
Suggestion accepted: True
Original:         "body": json.dumps({"Settings": config})
Modified:         "body": json.dumps({"Settings": config}, cls=DecimalEncoder)
Suggestion accepted: False
Original: from boto_utils import get_config
Modified: from boto_utils import get_config, DecimalEncoder
Suggestion accepted: False
Original:         "Users in the Deletion Queue": queue.MatchIds.length,
Modified:         "Matches in the Deletion Queue": queue.MatchIds.length,
Suggestion accepted: False
Original:               and then clicking <strong>View S3 Bucket Policy</strong>.
Modified:               and then choosing <strong>View S3 Bucket Policy</strong>.
Suggestion accepted: False
Original:               Now you must update the S3 Bucket Policy for the S3 Bucket
Modified:               You must update the S3 Bucket Policy for the S3 Bucket
Suggestion accepted: False
Original:               perform any required deletions. In the Data Mappers page you can
Modified:               perform any required deletions. On the Data Mappers page you can
Suggestion accepted: False
Original:     geography=["GeoAlchemy2==0.12.5", "shapely"],
Modified:     geography=["GeoAlchemy2", "shapely"],    
Suggestion accepted: False
Original:     assert results > 0
Modified:     results = session.query(table.c.string).where(        not_(table.c.string.regexp_match(".*foo.*")).all()    )    assert len(results) > 0
Suggestion accepted: False
Original:         table.c.string.regexp_match(".*52 St &.*").all()
Modified: def test_regexp_match(session, table):    results = session.query(table.c.string).where(        table.c.string.regexp_match(".*52 St &.*")).all()
Suggestion accepted: False
Original:     )
Modified: def test_not_regexp_match(session, table):    results = session.query(table.c.string).where(        not_(table.c.string.regexp_match("^Barrow St & Hudson St$"))).all()
Suggestion accepted: False
Original:         "pyarrow>=3.0.0,<=9",
Modified:         "pyarrow>=3.0.0,<10.0dev",
Suggestion accepted: False
Original: import textwrap
Modified: # Copyright 2021 Google LLC## Use of this source code is governed by an MIT-style# license that can be found in the LICENSE file or at# https://opensource.org/licenses/MIT.
Suggestion accepted: True
Original:     ...
Modified:     pass
Suggestion accepted: True
Original:         "sqlalchemy>=1.4.32,<=1.4.32",
Modified:         "sqlalchemy>=1.2.0,<=1.4.27",
Suggestion accepted: False
Original:         "sqlalchemy>=1.4.32,<=1.4.32",
Modified:         "sqlalchemy>=1.2.0,<=1.4.27",
Suggestion accepted: True
Original:                                 target.write(DialogFlowConverter.create_function(
Modified:                                 target.write(self.create_function(
Suggestion accepted: True
Original:         {"type": "service_account", "project_id": "service-account-project",},
Modified:         {"type": "service_account", "project_id": "service-account-project"},
Suggestion accepted: False
Original:         "sqlalchemy>=1.2.0,<=1.4.27",
Modified:         "sqlalchemy>=1.2.0,<=1.4.26",
Suggestion accepted: True
Original: # limitations under the License.
Modified: # Copyright (c) 2021 The sqlalchemy-bigquery Authors## Permission is hereby granted, free of charge, to any person obtaining a copy of# this software and associated documentation files (the "Software"), to deal in# the Software without restriction, including without limitation the rights to# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of# the Software, and to permit persons to whom the Software is furnished to do so,# subject to the following conditions:## The above copyright notice and this permission notice shall be included in all# copies or substantial portions of the Software.## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Suggestion accepted: True
Original:                     f" not {name}."
Modified:                     f" not {repr(name)}."
Suggestion accepted: True
Original:         # one, we create an alias for it, so as not to conlfict with an existing
Modified:         # one, we create an alias for it, so as not to conflict with an existing
Suggestion accepted: True
Original:         This is not a user-facing methos.
Modified:         This is not a user-facing method.
Suggestion accepted: False
Original:                 naming.LabelPGBackRestRepo:   "repo1",
Modified:              naming.LabelPGBackRestRepo:   pb.Spec.RepoName,
Suggestion accepted: True
Original:             # If project_id is missing, use defualt project_id
Modified:             # If project_id is missing, use default project_id
Suggestion accepted: True
Original:                     err.message.indexOf(' Unterminated string in JSON') > -1,
Modified:                     err.message.indexOf('Unterminated string in JSON') > -1,
Suggestion accepted: True
Original:     calls ++;
Modified:     calls++;
Suggestion accepted: True
Original:   server.listen(async () => {
Modified:   server.listen(() => {
Suggestion accepted: True
Original: func (s *DuplicateEnvVarTestSuite) TestDeploymentWithNoDuplicatsPass() {
Modified: func (s *DuplicateEnvVarTestSuite) TestDeploymentWithNoDuplicatesPass() {
Suggestion accepted: False
Original:                                  envVarNames[envVar.Name]++
Modified:                                     envVarNames[envVar.Name]++                                      if num, ok := envVarNames[envVar.Name]; !ok || num != 2 {                                               continue                                        }                                       results = append(results, diagnostic.Diagnostic{                                                Message: fmt.Sprintf(                                                   "Duplicate environment variable %s in container %q found",                                                    envVar.Name,                                                    container.Name,                                         ),                                      })
Suggestion accepted: False
Original:                                                         Message: fmt.Sprintf("probe port %s does not a port in container %q.", port.StrVal, container.Name),
Modified:                                                        Message: fmt.Sprintf("probe port %s does not match a port in container %q.", port.StrVal, container.Name),
Suggestion accepted: False
Original:                                                  Message: fmt.Sprintf("probe port %s does not match a port in container %q.", port.StrVal, container.Name),
Modified:                                                  Message: fmt.Sprintf("probe port %q does not match a port in container %q.", port.StrVal, container.Name),
Suggestion accepted: True
Original: func (l *MockLintContext) ModifyIngess(t *testing.T, name string, f func(ingress *networkingV1.Ingress)) {
Modified: func (l *MockLintContext) ModifyIngress(t *testing.T, name string, f func(ingress *networkingV1.Ingress)) {
Suggestion accepted: True
Original:                                 errorList.AddStringf("could not expand path: %q", expandedPath)
Modified:                             errorList.AddWrapf(err, "could not expand path: %q", expandedPath)
Suggestion accepted: False
Original:                                                   // Found the all!
Modified:                                                       // Found them all!
Suggestion accepted: True
Original:  selectors := map[string]bool{}
Modified:  selectors := map[string]struct{}
Suggestion accepted: False
Original:                                 errorList.AddStringf("could not expand non-absolute path: %q", absPath)
Modified:                             errorList.AddWrapf(err, "could not expand non-absolute path: %q", absPath)
Suggestion accepted: False
Original:           if err := registry.Register(&chk); err != nil {
Modified:         for i := range checks {         if err := registry.Register(&checks[i]); err != nil {
Suggestion accepted: True
Original:  c.SetArgs(args)
Modified:         c.SetArgs(args) c.SilenceUsage = true
Suggestion accepted: False
Original: type ReplicaTestSuite struct {
Modified: type NodeAffinityTestSuite struct {
Suggestion accepted: True
Original:   // Key of the forbidden label.
Modified:  // Key of the forbidden annotation.
Suggestion accepted: True
Original:   // Value of the forbidden label.
Modified:        // Value of the forbidden annotation.
Suggestion accepted: True
Original: }
Modified: type PodSpec struct { // This overrides the Containers field in the v1.PodSpec, therefore making sure that callers    // only access the Containers array through utility functions in this package.  Containers struct{}     v1.PodSpec}
Suggestion accepted: False
Original:                                  Message: "pod/ deploymentLike object is non-isolated",
Modified:                                      Message: "pods created by this object are non-isolated",
Suggestion accepted: True
Original:                                         return []diagnostic.Diagnostic{{Message: fmt.Sprintf("container %q has a %s pull image policy", container.Name, container.ImagePullPolicy)}}
Modified:                                        return []diagnostic.Diagnostic{{Message: fmt.Sprintf("container %q has ImagePullPolicy set to %s", container.Name, container.ImagePullPolicy)}}
Suggestion accepted: False
Original:                   }
Modified:                       forbiddenPolicies := set.NewStringSet(p.ForbiddenPolicies...)
Suggestion accepted: True