AmazonScience/SWE-PolyBench_500 huggingface dataset:
Repository: microsoft/vscode (TypeScript)
Task type: Bug Fix

Issue:
Doing `code <file>` from integrated terminal in portable mode uses wrong user data
Does this issue occur when all extensions are disabled?: No

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version: 1.74.2
- OS Version:  Arch with Linux v6.1.3

Steps to Reproduce:
1. Open VS Code in portable mode (VSCODE_PORTABLE env var set to a directory)
2. Open a file in the instance by typing `code <file>` in the integrated terminal.
3. VS Code opens a new window rather than opening the file as a tab, and the new window reads userdata from `~/.vscode` instead of "$VSCODE_PORTABLE".

Possible solution:
I investigated and noticed that the integrated terminal in VS Code reads the `VSCODE_PORTABLE` env var as unset even if it is set by the OS. As a workaround, I have added this to my config, and it works:
```
	"terminal.integrated.env.linux": { "VSCODE_PORTABLE": "${env:VSCODE_PORTABLE}" },
```



Discussion:
Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.74.3. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!
Happens on the latest version as well:

![image](https://user-images.githubusercontent.com/31820255/212296920-9952436c-e2fd-4386-b3c7-ca5196fdcd5c.png)
Oh if we just need `VSCODE_PORTABLE` set for this to work I can remove that from the env sanitization.

Solution patch:
diff --git a/src/vs/base/common/processes.ts b/src/vs/base/common/processes.ts
--- a/src/vs/base/common/processes.ts
+++ b/src/vs/base/common/processes.ts
@@ -108,7 +108,7 @@ export function sanitizeProcessEnvironment(env: IProcessEnvironment, ...preserve
 	}, {} as Record<string, boolean>);
 	const keysToRemove = [
 		/^ELECTRON_.+$/,
-		/^VSCODE_(?!SHELL_LOGIN).+$/,
+		/^VSCODE_(?!(PORTABLE|SHELL_LOGIN)).+$/,
 		/^SNAP(|_.*)$/,
 		/^GDK_PIXBUF_.+$/,
 	];


Test patch:
diff --git a/src/vs/base/test/common/processes.test.ts b/src/vs/base/test/common/processes.test.ts
--- a/src/vs/base/test/common/processes.test.ts
+++ b/src/vs/base/test/common/processes.test.ts
@@ -19,7 +19,7 @@ suite('Processes', () => {
 			VSCODE_DEV: 'x',
 			VSCODE_IPC_HOOK: 'x',
 			VSCODE_NLS_CONFIG: 'x',
-			VSCODE_PORTABLE: 'x',
+			VSCODE_PORTABLE: '3',
 			VSCODE_PID: 'x',
 			VSCODE_SHELL_LOGIN: '1',
 			VSCODE_CODE_CACHE_PATH: 'x',
@@ -30,6 +30,7 @@ suite('Processes', () => {
 		processes.sanitizeProcessEnvironment(env);
 		assert.strictEqual(env['FOO'], 'bar');
 		assert.strictEqual(env['VSCODE_SHELL_LOGIN'], '1');
-		assert.strictEqual(Object.keys(env).length, 2);
+		assert.strictEqual(env['VSCODE_PORTABLE'], '3');
+		assert.strictEqual(Object.keys(env).length, 3);
 	});
 });
Repository: mui/material-ui (TypeScript)
Task type: Bug Fix

Issue:
[TimePicker] Switching am pm does not change the time
<!-- Time picker not  getting trigger on am pm change From timepicker popup -->

<!--
  Thank you very much for contributing to Material-UI by creating an issue! ❤️
  To avoid duplicate issues we ask you to check off the following list.
-->

<!-- Checked checkbox should look like this: [x] -->

- [x] The issue is present in the latest release.
- [x] I have searched the [issues](https://github.com/mui-org/material-ui/issues) of this repository and believe that this is not a duplicate.

## Current Behavior 😯

<!-- On Change should be call when AM|PM changed -->
![TimepickerNotTriggerOnAMPM](https://user-images.githubusercontent.com/65675288/120169037-26756500-c21d-11eb-92c4-2a380a789754.gif)


## Expected Behavior 🤔

Timepicker should be get change when we click on AM|PM

## Steps to Reproduce 🕹


Steps:

1. Open https://codesandbox.io/s/tgqwo?file=/demo.tsx
2. Change time.
3. Change AM|PM you will notice that TextField value not get changed.



Discussion:

Solution patch:
diff --git a/packages/mui-lab/src/internal/pickers/hooks/date-helpers-hooks.tsx b/packages/mui-lab/src/internal/pickers/hooks/date-helpers-hooks.tsx
--- a/packages/mui-lab/src/internal/pickers/hooks/date-helpers-hooks.tsx
+++ b/packages/mui-lab/src/internal/pickers/hooks/date-helpers-hooks.tsx
@@ -57,7 +57,7 @@ export function useMeridiemMode<TDate>(
   const handleMeridiemChange = React.useCallback(
     (mode: 'am' | 'pm') => {
       const timeWithMeridiem = convertToMeridiem<TDate>(date, mode, Boolean(ampm), utils);
-      onChange(timeWithMeridiem, 'shallow');
+      onChange(timeWithMeridiem, 'partial');
     },
     [ampm, date, onChange, utils],
   );


Test patch:
diff --git a/packages/mui-lab/src/DesktopTimePicker/DesktopTimePicker.test.tsx b/packages/mui-lab/src/DesktopTimePicker/DesktopTimePicker.test.tsx
--- a/packages/mui-lab/src/DesktopTimePicker/DesktopTimePicker.test.tsx
+++ b/packages/mui-lab/src/DesktopTimePicker/DesktopTimePicker.test.tsx
@@ -201,6 +201,29 @@ describe('<DesktopTimePicker />', () => {
     expect(nextViewButton).to.have.attribute('disabled');
   });
 
+  it('fires a change event when meridiem changes', () => {
+    const handleChange = spy();
+    render(
+      <DesktopTimePicker
+        ampm
+        onChange={handleChange}
+        open
+        renderInput={(params) => <TextField {...params} />}
+        value={adapterToUse.date('2019-01-01T04:20:00.000')}
+      />,
+    );
+    const buttonPM = screen.getByRole('button', { name: 'PM' });
+
+    act(() => {
+      buttonPM.click();
+    });
+
+    expect(handleChange.callCount).to.equal(1);
+    expect(handleChange.firstCall.args[0]).toEqualDateTime(
+      adapterToUse.date('2019-01-01T16:20:00.000'),
+    );
+  });
+
   context('input validation', () => {
     const shouldDisableTime: TimePickerProps['shouldDisableTime'] = (value) => value === 10;
Repository: tailwindlabs/tailwindcss (TypeScript)
Task type: Bug Fix

Issue:
.font-sans missing sans-serif
So the defaultConfig `.font-sans` font stack doesn't have `sans-serif` as the last fallback.
Although be unlikely that every font is missing, but if so the font stack actually falls back to Times New Roman on Chrome and Firefox (and most likely others).

ps.: Actually the only windows default in the list is Segoe UI.


Discussion:
Yeah, good point @tlgreg. I'll add that.

Solution patch:
diff --git a/defaultConfig.js b/defaultConfig.js
--- a/defaultConfig.js
+++ b/defaultConfig.js
@@ -204,6 +204,7 @@ module.exports = {
       'Fira Sans',
       'Droid Sans',
       'Helvetica Neue',
+      'sans-serif',
     ],
     'serif': [
       'Constantia',


Test patch:
diff --git a/__tests__/fixtures/tailwind-output.css b/__tests__/fixtures/tailwind-output.css
--- a/__tests__/fixtures/tailwind-output.css
+++ b/__tests__/fixtures/tailwind-output.css
@@ -672,7 +672,7 @@ button,
 }
 
 .font-sans {
-  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue;
+  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
 }
 
 .font-serif {
@@ -3632,7 +3632,7 @@ button,
   }
 
   .sm\:font-sans {
-    font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue;
+    font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
   }
 
   .sm\:font-serif {
@@ -6593,7 +6593,7 @@ button,
   }
 
   .md\:font-sans {
-    font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue;
+    font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
   }
 
   .md\:font-serif {
@@ -9554,7 +9554,7 @@ button,
   }
 
   .lg\:font-sans {
-    font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue;
+    font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
   }
 
   .lg\:font-serif {
@@ -12515,7 +12515,7 @@ button,
   }
 
   .xl\:font-sans {
-    font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue;
+    font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
   }
 
   .xl\:font-serif {
Repository: tailwindlabs/tailwindcss (TypeScript)
Task type: Bug Fix

Issue:
Default placeholder color discrepancy
The placeholder text for a textarea seems to be a different color from that of the inputs.

![screen shot 2017-11-06 at 11 02 45 am](https://user-images.githubusercontent.com/1329131/32453572-28f3eb78-c2e2-11e7-9be0-10e9a0efac50.png)

_Screenshot from Chrome Canary 64.0.3260.0_


Discussion:

Solution patch:
diff --git a/css/preflight.css b/css/preflight.css
--- a/css/preflight.css
+++ b/css/preflight.css
@@ -536,7 +536,7 @@ svg { fill: currentColor; }
 
 button, input, optgroup, select, textarea { font-family: inherit; }
 
-input::placeholder {
+input::placeholder, textarea::placeholder {
     color: inherit;
     opacity: .5;
 }


Test patch:
diff --git a/__tests__/fixtures/tailwind-output.css b/__tests__/fixtures/tailwind-output.css
--- a/__tests__/fixtures/tailwind-output.css
+++ b/__tests__/fixtures/tailwind-output.css
@@ -548,7 +548,8 @@ textarea {
   font-family: inherit;
 }
 
-input::placeholder {
+input::placeholder,
+textarea::placeholder {
   color: inherit;
   opacity: .5;
 }
Repository: tailwindlabs/tailwindcss (TypeScript)
Task type: Bug Fix

Issue:
Border-radius preflight is always aplied
When I have a button: `<input type="button">` and apply the `rounded` class to it, it will still always be `border-radius: 0`.

The css that takes the highest priority is in the preflight: https://github.com/tailwindcss/tailwindcss/blob/be3f9d38505ff7be9e5f507c054c08d5cc221960/css/preflight.css#L538


Discussion:
Yeah, they have an element in the selector too.

This would be the best I think without fighting specificity and not increasing the size of utilities:
```css
input[type="button" i]:not([class*="rounded" i]),
input[type="submit" i]:not([class*="rounded" i]),
input[type="reset" i]:not([class*="rounded" i]),
input[type="file" i]:not([class*="rounded" i])::-webkit-file-upload-button,
button {
  border-radius: 0;
}
```
The ```!imporant``` config prevents me from things like this.
https://tailwindcss.com/docs/configuration#important
Or just remove the `input` tag from the selectors (so specificity will be the same as the utility), as I see normalize already does that when applying `-webkit-appearance: button`, so it should be well tested in a reset.
My solution was meant as a quick fix for you.
There are other places where problems with specitifity can occur.

https://github.com/tailwindcss/tailwindcss/blob/be3f9d38505ff7be9e5f507c054c08d5cc221960/css/preflight.css#L501-L504
https://github.com/tailwindcss/tailwindcss/blob/be3f9d38505ff7be9e5f507c054c08d5cc221960/css/preflight.css#L113-L117

I'll stick with important for my projects.

Solution patch:
diff --git a/css/preflight.css b/css/preflight.css
--- a/css/preflight.css
+++ b/css/preflight.css
@@ -535,11 +535,10 @@ fieldset {
  *
  * We can remove this when the reversion is in a normal Chrome release.
  */
-input[type="button" i],
-input[type="submit" i],
-input[type="reset" i],
-input[type="file" i]::-webkit-file-upload-button,
-button {
+button,
+[type="button"],
+[type="reset"],
+[type="submit"] {
   border-radius: 0;
 }
 


Test patch:
diff --git a/__tests__/fixtures/tailwind-output.css b/__tests__/fixtures/tailwind-output.css
--- a/__tests__/fixtures/tailwind-output.css
+++ b/__tests__/fixtures/tailwind-output.css
@@ -535,11 +535,10 @@ fieldset {
  *
  * We can remove this when the reversion is in a normal Chrome release.
  */
-input[type="button" i],
-input[type="submit" i],
-input[type="reset" i],
-input[type="file" i]::-webkit-file-upload-button,
-button {
+button,
+[type="button"],
+[type="reset"],
+[type="submit"] {
   border-radius: 0;
 }
Repository: tailwindlabs/tailwindcss (TypeScript)
Task type: Feature

Issue:
Feature Proposal: Add :focus-within @variant
I'd be useful to have a `:focus-within` variant, for better styling control in forms.

Functionality-wise, it'd work exactly the same has `focus`, `active`, and `hover`, as its rules would too follow the structure `.[variant-name]:[class-name]:[variant-name]`, with no side-effects.


Discussion:
If I'm not mistaken, this’d only imply changes in these two:

https://github.com/tailwindcss/tailwindcss/blob/0f0a4f45e8e2122e99850d11ad2c576be249e366/src/lib/substituteVariantsAtRules.js#L21-L34

https://github.com/tailwindcss/tailwindcss/blob/0f0a4f45e8e2122e99850d11ad2c576be249e366/src/lib/substituteVariantsAtRules.js#L51-L55

…plus the corresponding [tests](https://github.com/tailwindcss/tailwindcss/blob/0f0a4f45e8e2122e99850d11ad2c576be249e366/__tests__/variantsAtRule.test.js), correct?

If so, I can surely contribute those changes, if there’s a go-ahead from the core team on the feature.

Solution patch:
diff --git a/defaultConfig.stub.js b/defaultConfig.stub.js
--- a/defaultConfig.stub.js
+++ b/defaultConfig.stub.js
@@ -852,6 +852,7 @@ module.exports = {
   |   - responsive
   |   - hover
   |   - focus
+  |   - focus-within
   |   - active
   |   - group-hover
   |
diff --git a/src/lib/substituteVariantsAtRules.js b/src/lib/substituteVariantsAtRules.js
--- a/src/lib/substituteVariantsAtRules.js
+++ b/src/lib/substituteVariantsAtRules.js
@@ -17,6 +17,7 @@ const defaultVariantGenerators = {
     })
   }),
   hover: generatePseudoClassVariant('hover'),
+  'focus-within': generatePseudoClassVariant('focus-within'),
   focus: generatePseudoClassVariant('focus'),
   active: generatePseudoClassVariant('active'),
 }
@@ -44,7 +45,7 @@ export default function(config, { variantGenerators: pluginVariantGenerators })
           variantGenerators[variant](atRule, config)
         })
       } else {
-        _.forEach(['group-hover', 'hover', 'focus', 'active'], variant => {
+        _.forEach(['group-hover', 'hover', 'focus-within', 'focus', 'active'], variant => {
           if (variants.includes(variant)) {
             variantGenerators[variant](atRule, config)
           }


Test patch:
diff --git a/__tests__/variantsAtRule.test.js b/__tests__/variantsAtRule.test.js
--- a/__tests__/variantsAtRule.test.js
+++ b/__tests__/variantsAtRule.test.js
@@ -70,6 +70,27 @@ test('it can generate focus variants', () => {
   })
 })
 
+test('it can generate focus-within variants', () => {
+  const input = `
+    @variants focus-within {
+      .banana { color: yellow; }
+      .chocolate { color: brown; }
+    }
+  `
+
+  const output = `
+      .banana { color: yellow; }
+      .chocolate { color: brown; }
+      .focus-within\\:banana:focus-within { color: yellow; }
+      .focus-within\\:chocolate:focus-within { color: brown; }
+  `
+
+  return run(input).then(result => {
+    expect(result.css).toMatchCss(output)
+    expect(result.warnings().length).toBe(0)
+  })
+})
+
 test('it can generate group-hover variants', () => {
   const input = `
     @variants group-hover {
Repository: tailwindlabs/tailwindcss (TypeScript)
Task type: Feature

Issue:
Ability to disable all core plugins (corePlugins: false?)
As discussed on Discord, it would be useful to be able to disable all core plugins without explicitly listing them all, for instance when using Tailwind in a test suite for a plugin. Adam suggested `corePlugins: false`.


Discussion:
Looking for this as well! I use Tailwind to generate mini util files for use in Shadow DOM. 

How can we provide a whitelist of plugins instead?

Solution patch:
diff --git a/src/util/configurePlugins.js b/src/util/configurePlugins.js
--- a/src/util/configurePlugins.js
+++ b/src/util/configurePlugins.js
@@ -1,7 +1,7 @@
 export default function(pluginConfig, plugins) {
   return Object.keys(plugins)
     .filter(pluginName => {
-      return pluginConfig[pluginName] !== false
+      return pluginConfig !== false && pluginConfig[pluginName] !== false
     })
     .map(pluginName => {
       return plugins[pluginName]()


Test patch:
diff --git a/__tests__/configurePlugins.test.js b/__tests__/configurePlugins.test.js
--- a/__tests__/configurePlugins.test.js
+++ b/__tests__/configurePlugins.test.js
@@ -16,3 +16,15 @@ test('setting a plugin to false removes it', () => {
 
   expect(configuredPlugins).toEqual(['fontSize', 'backgroundPosition'])
 })
+
+test('passing only false removes all plugins', () => {
+  const plugins = {
+    fontSize: () => 'fontSize',
+    display: () => 'display',
+    backgroundPosition: () => 'backgroundPosition',
+  }
+
+  const configuredPlugins = configurePlugins(false, plugins)
+
+  expect(configuredPlugins).toEqual([])
+})
Repository: coder/code-server (TypeScript)
Task type: Feature

Issue:
[Feat]: Set the host address with environment variable
## What is your suggestion?
It would be nice if we could set the host address with an environment variable, just as like as the port.

## Why do you want this feature?
There is a [docker-based project](https://github.com/linuxserver/docker-code-server), and I can change the listening port by using environment variable, but I can't change the address because it does not use environment variable. My container have it's own IPv6 address and I would like to bind to it with port 80. Currently I can't access the server with ipv6 address because it listens on `0.0.0.0` (ipv4 only).

## Are there any workarounds to get this functionality today?
I haven't found a solution yet, but I'm on it.

## Are you interested in submitting a PR for this?
Yes, that's why I'm opening this issue.


Discussion:

Solution patch:
diff --git a/src/node/cli.ts b/src/node/cli.ts
--- a/src/node/cli.ts
+++ b/src/node/cli.ts
@@ -732,6 +732,9 @@ export function bindAddrFromArgs(addr: Addr, args: UserProvidedArgs): Addr {
   if (args["bind-addr"]) {
     addr = parseBindAddr(args["bind-addr"])
   }
+  if (process.env.CODE_SERVER_HOST) {
+    addr.host = process.env.CODE_SERVER_HOST
+  }
   if (args.host) {
     addr.host = args.host
   }


Test patch:
diff --git a/test/unit/node/cli.test.ts b/test/unit/node/cli.test.ts
--- a/test/unit/node/cli.test.ts
+++ b/test/unit/node/cli.test.ts
@@ -789,6 +789,50 @@ describe("bindAddrFromArgs", () => {
     expect(actual).toStrictEqual(expected)
   })
 
+  it("should use process.env.CODE_SERVER_HOST if set", () => {
+    const [setValue, resetValue] = useEnv("CODE_SERVER_HOST")
+    setValue("coder")
+
+    const args: UserProvidedArgs = {}
+
+    const addr = {
+      host: "localhost",
+      port: 8080,
+    }
+
+    const actual = bindAddrFromArgs(addr, args)
+    const expected = {
+      host: "coder",
+      port: 8080,
+    }
+
+    expect(actual).toStrictEqual(expected)
+    resetValue()
+  })
+
+  it("should use the args.host over process.env.CODE_SERVER_HOST if both set", () => {
+    const [setValue, resetValue] = useEnv("CODE_SERVER_HOST")
+    setValue("coder")
+
+    const args: UserProvidedArgs = {
+      host: "123.123.123.123",
+    }
+
+    const addr = {
+      host: "localhost",
+      port: 8080,
+    }
+
+    const actual = bindAddrFromArgs(addr, args)
+    const expected = {
+      host: "123.123.123.123",
+      port: 8080,
+    }
+
+    expect(actual).toStrictEqual(expected)
+    resetValue()
+  })
+
   it("should use process.env.PORT if set", () => {
     const [setValue, resetValue] = useEnv("PORT")
     setValue("8000")
Repository: huggingface/transformers (Python)
Task type: Bug Fix

Issue:
tokenizer_bert.py not call _clean_text?
for transformers/src/transformers/tokenization_bert.py, there is a function called _clean_text.
But seems this function is not be called at all?

In google bert(https://github.com/google-research/bert/blob/master/tokenization.py) there exists a same function and that function has been called at the beginning of the tokenization.


Discussion:

Solution patch:
diff --git a/src/transformers/tokenization_bert.py b/src/transformers/tokenization_bert.py
--- a/src/transformers/tokenization_bert.py
+++ b/src/transformers/tokenization_bert.py
@@ -398,6 +398,7 @@ def tokenize(self, text, never_split=None):
         """
         # union() returns a new set by concatenating the two sets.
         never_split = self.never_split.union(set(never_split)) if never_split else self.never_split
+        text = self._clean_text(text)
 
         # This was added on November 1st, 2018 for the multilingual and Chinese
         # models. This is also applied to the English models now, but it doesn't


Test patch:
diff --git a/tests/test_tokenization_bert.py b/tests/test_tokenization_bert.py
--- a/tests/test_tokenization_bert.py
+++ b/tests/test_tokenization_bert.py
@@ -222,6 +222,17 @@ def test_is_punctuation(self):
         self.assertFalse(_is_punctuation("A"))
         self.assertFalse(_is_punctuation(" "))
 
+    def test_clean_text(self):
+        tokenizer = self.get_tokenizer()
+        rust_tokenizer = self.get_rust_tokenizer()
+
+        # Example taken from the issue https://github.com/huggingface/tokenizers/issues/340
+        self.assertListEqual([tokenizer.tokenize(t) for t in ["Test", "\xad", "test"]], [["[UNK]"], [], ["[UNK]"]])
+
+        self.assertListEqual(
+            [rust_tokenizer.tokenize(t) for t in ["Test", "\xad", "test"]], [["[UNK]"], [], ["[UNK]"]]
+        )
+
     @slow
     def test_sequence_builders(self):
         tokenizer = self.tokenizer_class.from_pretrained("bert-base-uncased")