WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Run the following program on the following input:

package main

import (
"bytes"
"io/ioutil"
"os"
"golang.org/x/image/bmp"
)

func main() {
data, _ := ioutil.ReadFile(os.Args[1])
img, err := bmp.Decode(bytes.NewReader(data))
if err != nil {
return
}
var w bytes.Buffer
err = bmp.Encode(&w, img)
if err != nil {
panic(err)
}
}

https://drive.google.com/file/d/0B20Uwp8Hs1oCc1dwYXJlMTRna0E/view?usp=sharing

It crashes as:

panic: runtime error: makeslice: len out of range

goroutine 1 [running]:
runtime.gopanic(0x4d6b40, 0xc20800e590)
src/runtime/panic.go:477 +0x3fe fp=0xc208041c50 sp=0xc208041bd0
runtime.makeslice(0x4ac5a0, 0x3c00009f60, 0x3c00009f60, 0x0, 0x0, 0x0)
src/runtime/slice.go:26 +0xce fp=0xc208041ca0 sp=0xc208041c50
golang.org/x/image/bmp.decodeRGB(0x7fe619a4d2d8, 0xc20800a480, 0x7fe619a4d0d0, 0xc20802e020, 0x400000aa, 0x3c, 0x0, 0x0, 0x0, 0x0, ...)
src/golang.org/x/image/bmp/reader.go:57 +0x185 fp=0xc208041e30 sp=0xc208041ca0
golang.org/x/image/bmp.Decode(0x7fe619a4d2d8, 0xc20800a480, 0x0, 0x0, 0x0, 0x0)
src/golang.org/x/image/bmp/reader.go:112 +0x15b fp=0xc208041ed0 sp=0xc208041e30
main.main()
/tmp/bmp.go:12 +0x132 fp=0xc208041f90 sp=0xc208041ed0

I am on commit 65a798f031fd31a65574938bed2ec44c2bcba496

Issue 2:
Run the following program on the following input:

package main

import (
"bytes"
"io/ioutil"
"os"
"golang.org/x/image/bmp"
)

func main() {
data, _ := ioutil.ReadFile(os.Args[1])
img, err := bmp.Decode(bytes.NewReader(data))
if err != nil {
return
}
var w bytes.Buffer
err = bmp.Encode(&w, img)
if err != nil {
panic(err)
}
}

https://drive.google.com/file/d/0B20Uwp8Hs1oCTzFrMndWMjNtTHM/view?usp=sharing

It crashes as:

fatal error: runtime: out of memory

goroutine 1 [running]:
runtime.systemstack_switch()
src/runtime/asm_amd64.s:216 fp=0xc208041b58 sp=0xc208041b50
runtime.mallocgc(0x1000000300, 0x4b27c0, 0x1, 0x0)
src/runtime/malloc.go:625 +0x8f1 fp=0xc208041c28 sp=0xc208041b58
runtime.newarray(0x4b27c0, 0x1000000300, 0x1)
src/runtime/malloc.go:736 +0xce fp=0xc208041c68 sp=0xc208041c28
runtime.makeslice(0x4ac5a0, 0x1000000300, 0x1000000300, 0x0, 0x0, 0x0)
src/runtime/slice.go:32 +0x178 fp=0xc208041cb8 sp=0xc208041c68
golang.org/x/image/bmp.decodeNRGBA(0x7f87732092d8, 0xc208014420, 0x7f87732090d0, 0xc20802e020, 0x10, 0x4000000c, 0x1, 0x0, 0x0, 0x0, ...)
src/golang.org/x/image/bmp/reader.go:83 +0x185 fp=0xc208041e30 sp=0xc208041cb8
golang.org/x/image/bmp.Decode(0x7f87732092d8, 0xc208014420, 0x0, 0x0, 0x0, 0x0)
src/golang.org/x/image/bmp/reader.go:114 +0x1be fp=0xc208041ed0 sp=0xc208041e30
main.main()
/tmp/bmp.go:12 +0x132 fp=0xc208041f90 sp=0xc208041ed0

I am on commit 65a798f031fd31a65574938bed2ec44c2bcba496
Issue 1:
Using data-toggle="buttons" doesn't set the initial active state of the radio/checkbox buttons if they are already checked.

In the following example, the first button should get a class of active when the widget is initialized, but it does not.

<div class="btn-group" data-toggle="buttons">
<label class="btn btn-primary">
<input type="radio" name="options" id="option1" checked="checked"> Option 1
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="option2"> Option 2
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="option3"> Option 3
</label>
</div>

Issue 2:
Hi guys! Love your work!

Have some issues with checkbox and radio Buttons on Button-groups. I've try to pre-load option with a form, but got all buttons disabled. Hope you'll fix it.

Thank you!
Issue 1:
Getting a TypeError while using np.unique with array of dtype=object

Reproducing code example:

import numpy as np

a = np.array([1, 2, 3, 2, 'a', 'b', 'a'], dtype=object)
np.unique(a)

Error message:

----> 1 np.unique(a)

<__array_function__ internals> in unique(*args, **kwargs)

~/miniconda3/lib/python3.7/site-packages/numpy/lib/arraysetops.py in unique(ar, return_index, return_inverse, return_counts, axis)
260 ar = np.asanyarray(ar)
261 if axis is None:
--> 262 ret = _unique1d(ar, return_index, return_inverse, return_counts)
263 return _unpack_tuple(ret)
264

~/miniconda3/lib/python3.7/site-packages/numpy/lib/arraysetops.py in _unique1d(ar, return_index, return_inverse, return_counts)
308 aux = ar[perm]
309 else:
--> 310 ar.sort()
311 aux = ar
312 mask = np.empty(aux.shape, dtype=np.bool_)

TypeError: '<' not supported between instances of 'str' and 'int'

Numpy/Python version information:

1.18.0 3.7.5 (default, Oct 25 2019, 10:52:18)

[Clang 4.0.1 (tags/RELEASE_401/final)]

Issue 2:
Original ticket http://projects.scipy.org/numpy/ticket/2188 on 2012-07-23 by @yarikoptic, assigned to unknown.

tested against current master (present in 1.6.2 as well):

If with python2.x series it works ok, without puking:

$> python2.7 -c 'import numpy as np; print repr(repr(np.unique(np.array([1,2, None, "str"]))))'
'array([None, 1, 2, str], dtype=object)'

NB I will report a bug on repr here separately if not yet filed

it fails with python3.x altogether:

$> python3.2 -c 'import numpy as np; print(repr(repr(np.unique(np.array([1,2,None, "str"])))))'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python3.2/dist-packages/numpy/lib/arraysetops.py", line 194, in unique
ar.sort()
TypeError: unorderable types: int() > NoneType()

whenever IMHO it must operate correctly -- semantic of unique() action should not imply ability to sort the elements
Issue 1:
Summary of the new feature/enhancement

It would be more useful if already running programs are shown first in the results list in the quick launcher (like the old WindowWalker). Or maybe an option to change the priority.

Proposed technical implementation details (optional)

In the results list, the running programs should be first in the list.

Issue 2:
Environment

Windows build number: Enterprise 1903
PowerToys version: 0.18.0
PowerToy module for which you are reporting the bug (if applicable): PowerToys Run

Steps to reproduce

Open an application, manually or with PTR (Firefox Developer Edition and Slack in my case)

Activate shortcut to open PTR

Type in name of application (Firefox, Slack)

Press Enter

Expected behavior

Switch to most recently used window that matches title

List matching entries in descending order based on when last used (would be nice to have application icon as well, rather than the blue-circled icon)

Display entries to launch new instances of the application below

Actual behavior

New instance of application launches.

In the case of typing in Firefox, a new instance of mainstream Firefox launched.

Screenshots
Issue 1:
.text-center and .text-right do not apply to table td / th elements, as the align left rule for those takes precedence.

I've added this as a workaround; an alternative might be to add !important to the .text- rules

.table th, .table td {
&.text-center { text-align: center; }
&.text-right { text-align: right; }
}

Issue 2:
Hi,

The new text-left, text-center and text-right classes doesn't work on the table cells. Maybe it would be nice to add an !important hack to force alignment ?
Issue 1:
Bug report

What is the current behavior?

Using a test of the form

rules: [{
test: /\/filename.ext$/
}]

will fail on node users in the MINGW64 / msys2 / msysgit environment because the path separator is \.

If the current behavior is a bug, please provide the steps to reproduce.

Run webpack in a native Windows environment.

Observe path separators are \ and not /.

Observe this interacts poorly with path testing in Webpack.

What is the expected behavior?

Paths might have to be tested twice, once with forward slashes and once with backslashes.

Other relevant information:

webpack version: 5.32.0

Node.js version: v16.0.0

Operating System: Windows 10

Additional tools: MSYS2 (i.e. the native bash provided by the Git client for Windows)

Issue 2:
I'm attempting to use dynamic requires, but I want the mappings to have lower-case aliases (I'm experimenting with the routing). When I'm using it like this:

compiler.plugin('context-module-factory', function (cmf) {
cmf.plugin('alternatives', function (items, callback) {
items.push({
context: items[0].context,
request: items[0].request.substr(0, items[0].request.length - 3).toLowerCase()
});
callback(null, items);
});
});

I end up with this in the bundle:

var map = {
"./Dialogue": 22,
"./Dialogue.js": 22,
"./Locales": 23,
"./Locales.js": 23,
"./dialogue": 24,
"./locales": 25
};

It works, but it attaches the same blocks twice, which isn't how it's intended. Is there a way to overcome this without dirty hacks?
Issue 1:
Bug report

What is the current behavior?

webpack-dev-server (via webpack serve) compiles twice on every save in VSCode. This doesn't happen when using an other editor such as Sublime.

If the current behavior is a bug, please provide the steps to reproduce.

Create a fresh package with webpack, webpack-cli and webpack-dev-server as devDependencies.

// src/index.js

console.log("Hi");

Launch the server:

webpack serve --mode=production

Open the src/index.js file in VSCode. You'll notice in the console's output that every time you press save, the code gets compiled twice. Try with an other editor (such as Sublime) and you'll see that compilation occurs once, as expected.

What is the expected behavior?

Compilation should occur only once.

Other relevant information:

webpack version: v5.67.0

Node.js version: v16.13.0

Operating System: MacOS Monterey

Additional tools: VSCode v1.63.2 (with default settings + no extensions)

Issue 2:
Bug report

What is the current behavior?

Hot module reloading is not working after updating webpack to v5.66.0.

If the current behavior is a bug, please provide the steps to reproduce.

Clone https://github.com/saltire/react-node-boilerplate.

Run npm i webpack@latest to update to 5.66.0.

Run npm run watch.

Modify src/App.jsx. The browser console reports bundle rebuilding twice, the request to main.xxxxx.hot-update.json fails with status 404, and the app does not update.

Notice the issue does not occur if webpack 5.65.0 is installed.

What is the expected behavior?

When making a change to a jsx file, the app should reload automatically.

Other relevant information:

webpack version: 5.66.0

Node.js version: 16

Operating System: MacOS

Additional tools

This repo uses webpack-dev-middleware, webpack-hot-middleware, react-refresh, and @pmmmwh/react-refresh-webpack-plugin, among other packages. The issue may stem from a conflict with one of these, but I don't have enough internal knowledge of webpack or these packages to say which. It could also be a misconfiguration on my part. I'm filing the issue with webpack because I was able to isolate the problem to an update of this package.

Let me know if you need any more info!
Issue 1:
@tomasteicher: 'When I want to delete a node, i need to delete all its relationships first. Maybe it would be good when there would be a method that do all this deletions together.

For example, when I am deleting a node, I am using this my custom method

/**

* delete all nodes from first parameter with all its relationships from the

* database

*

* @param nodes ArrayList of nodes to delete

*/

public static void deleteNodesWithRelationships(ArrayList nodes) {

if (nodes == null || nodes.size() == 0) {

return;

} else {

Map<String, Object> params = new HashMap<String, Object>();

params.put("nodes", nodes);

String query = "START n = node({nodes}) MATCH n-[r]-() DELETE n, r";

ExecutionResult result = executionEngine.execute(query, params);

}

}

I am not sure whether this method is optimal for its task. Therefore it would be better when this task (remove node with its relationships) would be part of Neo4j Java API, for example as a method of GraphDatabaseService interface.'

Issue 2:
This a request for a convenience modifier described in the subject. This would allow Cypher queries to be constructed without having to figure out how to add additional clauses to delete the nodes' relationships.

Rationale:

For a "simple" delete this is easy enough:

START n = node(...) MATCH n-[r?]-() DELETE r,n

But when the query gets more complex, the clause needed to find the relationships becomes more complex as well.

It would be convenient if the Cypher query could simply indicate the intent of deleting certain nodes and Cypher takes care of doing whatever needs to be done to make that happen. It could look something like:

START n = node(...), m=node(...) MATCH [match clause that may find other nodes] FORCE DELETE n, m, other_nodes...

This is in keeping with query languages like SQL, in which you define a predicate. That predicate is then used to either return the result or delete the result without requiring additions to the predicate itself.
Issue 1:
Error Description - Screen is keep moving up and down. Following error is thrown

Detail Error from the logs

waiting for getByTestId('actions-7').getByTestId('button-anchor')

locator resolved to <button type="button" id="button-anchor" class="css-16nx…>…

attempting click action

waiting for element to be visible, enabled and stable

forcing action

element is visible, enabled and stable

scrolling into view if needed

done scrolling

performing click action

click action done

waiting for scheduled navigations to finish

navigations have finished

System info

Playwright Version: [v1.XX] "@playwright/test": "^1.35.1"

Operating System: [All, Windows 11, Ubuntu 20, macOS 13.2, etc.]MacOS

Browser: [All, Chromium, Firefox, WebKit]chrome

Other info:

Source code

I provided exact source code that allows reproducing the issue locally.

Link to the GitHub repository with the repro

[https://github.com/your_profile/playwright_issue_title]

or

Config file

// playwright.config.ts
import { defineConfig, devices } from '@playwright/test';

export default defineConfig({
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'], },
},
});

Test file (self-contained)

it('should check the box using setChecked', async ({ page }) => {
await page.setContent(`<input id='checkbox' type='checkbox'></input>`);
await page.getByRole('checkbox').check();
await expect(page.getByRole('checkbox')).toBeChecked();
});

Steps

table contain a set of rows. Each row has a modal dialogue box. by clicking on the modal dialogue box a menu should appear with label as "Re-award base". Since there are many rows scrolling has been implemented.

[Run the test]

[...]

Expected

[Describe expected behavior]

Actual

Expected the row element should be clicked and open the modal dialogue box.

But actually the screen keep moving up and down saying the element is unstable

Issue 2:
System info

Playwright Version: [v1.33]

Operating System: Mac

Browser: All

Other info:

Source code

I provided exact source code that allows reproducing the issue locally.

Link to the GitHub repository with the repro

[https://github.com/your_profile/playwright_issue_title]

or

Config file

// playwright.config.ts
import { defineConfig, devices } from '@playwright/test';

export default defineConfig({
fullyParallel: true,
});

Test file (self-contained)

import { test, expect } from '@playwright/test';

// test.describe.configure({ mode: 'parallel' });

test.describe('basic test', () => {
test('first', async ({ page }) => {
await page.goto('https://playwright.dev/');
await expect(page).toHaveTitle(/Playwright/);
});

test('second', async ({ page }) => {
await page.goto('https://playwright.dev/');
await expect(page).toHaveTitle(/Playwright/);
});
});

Steps

npx playwright test

Expected

According to the doc, I can set fullyParallel: true to run all tests within a single file in parallel without having test.describe.configure({ mode: 'parallel' }); in each file.

Actual

Currently, using fullyParallel: true doesn't run them tests within a single file in parallel. I have use test.describe.configure({ mode: 'parallel' }); to make it work
Issue 1:
I am observing that an error thrown by a dynamic import always results in an "uncaught error". Here is an example:

// a.ts
try {
await import('./b.ts')
} catch {
console.log('catch')
}

// b.ts
throw Error()

Expected Output:

catch

Actual Output:

catch
error: Uncaught Error
at file:///b.ts:1:7

Issue 2:
There is relevant failing test in html/webappapis/structured-clone/structured-clone.any.js. We are likely not forwarding the error somewhere.
Issue 1:
It would be nice to be able to set a flag that will trigger invariant warnings any time a prop is referenced from or passed into a component, but that was not declared in propTypes.

Issue 2:
It would be great if in debug mode react would warn you when you pass in a property on props which is not specified in the propTypes object for that component. i.e. a way to enforce that props should ONLY have the props specified in propTypes and no others.

This would prevent use of undocumented properties and also allow better code maintenance as unused props would be more easily removed.
Issue 1:
Issue originally made by @ochafik

Bug information

Babel version: 6.1.1 (babel-core 6.0.20)

Node version: 5.5.0

npm version: 3.3.12

Options

--presets es2015

Input code

class Foo { foo() { let foo = 1 } }

Description

The following code causes a bug:

echo "class Foo { foo() { let foo = 1 } }" | babel --presets es2015

TypeError: unknown: Duplicate declaration "foo"
> 1 | class Foo { foo() { let foo = 1 } }

Note that using var instead of let is fine:

echo "class Foo { foo() { var foo = 1 } }" | babel --presets es2015

Issue 2:
Bug Report

Current Behavior

babel throws

Duplicate declaration "foo" (This is an error on an internal node. Probably an internal error.)

Input Code

REPL or Repo link if applicable:

https://babeljs.io/repl#?babili=false&browsers=Chrome%20%3E%3D%2045%2Clast%202%20Firefox%20versions%2Cie%20%3E%3D%209%2CEdge%20%3E%3D%2012%2CiOS%20%3E%3D%209%2CAndroid%20%3E%3D%204%2Clast%202%20ChromeAndroid%20versions&build=&builtIns=false&spec=false&loose=false&code_lz=BQQwzgngdgxgBMAlHAvAPjgbwFBzw8aeJVDHffGAeyjABc4AzKq1OAFgCYBuXfAX0RI-g4XiA&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=false&fileSize=false&timeTravel=false&sourceType=module&lineWrap=true&presets=&prettier=false&targets=&version=7.0.0-beta.34&envVersion=7.0.0-beta.34

Note: you have to manually add @babel/transform-regenerator 7.0.0 plugin since the url does not synchronize plugin selections.

(async () => {
(async () => {
const foo = 42;
})()
})()

Expected behavior/code

Compiled as regenerator calls

Babel Configuration (.babelrc, package.json, cli command)

module.exports = {
plugins: [
"@babel/transform-regenerator"
]
}

Environment

Babel version(s): v7.0.0

Node/npm version: Node 10

OS: macOS 10.14

Monorepo no

How you are using Babel: cli

Possible Solution

Workaround: add await to the nested async function.

Additional context/Screenshots

Possibly related: #8525
Issue 1:
$ cat x.go
package p

type T interface{
_()
_()
}

$ go tool 6g x.go
x.go:6: internal compiler error: sigcmp vs sortinter _ _

It's inclear what a compiler should do, and the spec is silent. See spec issue #6604.
Once 6604 is resolved, this should be fixed.

For the reference: gccgo reports a duplicate method error which is peculiar since we
never report duplicates of _ objects. For instance, in structs we count on being able to
define multiple _ fields.

Issue 2:
by getisboy:

What steps will reproduce the problem?
1. Compile the following code using 8g and run it:

package main

import "fmt"

func main() {
slice := make([]int, 6, 6);
fmt.Print(int(float(len(slice))), " ");
for i := 1; i < int(float(len(slice))); i++ {}
fmt.Println(int(float(len(slice))));
}

What is the expected output? What do you see instead?
This should print "6 6", but instead it prints "6 -2147483648".

What is your $GOOS? $GOARCH?
$GOOS is linux
$GOARCH is 386

Which revision are you using? (hg identify)
"77ab01e09eb7 tip"

Please provide any additional information below.
The bug only occurs when the length of the slice is 6 or greater.
The value of len(slice) is the same before and after the loop.
If you remove the line containing the loop, it prints the correct output.
I tried running it on gofmt.com and it runs correctly.
Issue 1:
Apache Airflow version

2.5.1

What happened

Create two files with DAGs

Both DAGs must have the same ID

Airflow will constantly update DAG structure/code resulting in dozens of weird behaviors and errors:

wrong DAG visualization

wrong DAG code

errors about missing tasks from time to time

What you think should happen instead

Airflow should show an error to the user and disable both DAGs.

How to reproduce

Create two files with DAGs

Both DAGs should have the same ID

Operating System

Ubuntu 22.04

Versions of Apache Airflow Providers

No response

Deployment

Docker-Compose

Deployment details

No response

Anything else

No response

Are you willing to submit PR?

Yes I am willing to submit a PR!

Code of Conduct

I agree to follow this project's Code of Conduct

Issue 2:
Description

I would like to see an error in Airflow UI (like "Broken DAG: duplicate DAG-id") when a DAG is present that has the same (non-unique) DAG-id as another DAG. Currently, Airflow silently ignores one of these duplicated DAGs.

Use case / motivation

For users that either knowingly or unknowingly have multiple DAGs with the same DAG-id (which could happen especially in the case of dynamically generating DAGs), unintended/weird functionality can result as Airflow tries to figure out which DAG is the right one. It is not clear how Airflow will choose, and if that choice can change each time it parses for DAG changes.

Additional Info

Currently in Airflow, my understanding is that the DAG file processor creates a new process and a new DagBag per file. As a result each DagBag only parses one DAG-script and thus DAGs with duplicate ids in different scripts are never detected. https://github.com/apache/airflow/blob/main/airflow/dag_processing/processor.py#L613

Additionally, there's already a test and exception (AirflowDagDuplicatedIdException) in place for this, but it depends on a single DagBag having multiple DAGs in it, which isn't the case when actually running Airflow, from discussion with @BasPH and @uranusjr.

https://github.com/apache/airflow/blob/2.1.3/airflow/models/dagbag.py#L405-L409

https://github.com/apache/airflow/blob/main/tests/models/test_dagbag.py#L143-L173

Related Issues

I did not find other issues related to this, when searching for "duplicate DAG" or "duplicate DAG-id".