sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Add refactoring action to export selected JSX code as stateless component
Labels: Suggestion,Domain: Refactorings,Experience Enhancement

Please add refactoring action that will improve productivity while working with JSX/TSX. Suppose that I have the following code:

```ts
class Page extends React.Component {
    render() {
        return (
            <div>
                <h1>{this.props.header}</h1>
            </div>
        );
    }
}
```

I would like to select line with `<h1>` and chose from context menu "Extract to stateless component".  And that would create the following stateless component:

```ts
const NewComponent = ({ header }) => (<h1>{header}</h1>);
```

The selected text would be replaced with that:

```ts
<NewComponent header={this.props.header} />
```
Repository: vscode
Issue: SCM - Support workspace diff navigation
Labels: feature-request,scm

- Please improve the source control view by making it searchable, folder-wise grouping, bulk select. 
- Allowing to write git commands right there would be great.
- Keyboard shortcuts to navigate through changed files
Repository: rust
Issue: rustc: Disable color codes in non-tty terminal environments
Labels: A-frontend,C-enhancement,T-compiler

When `rustc` is invoked from non-tty shell contexts, such as being piped to less `rustc ... | less`, or when `rustc` is run from an Emacs or Vim terminal, then terminal codes like `$<2>` should not be emitted on compiler messages.
Repository: vscode
Issue: Support args for `editor.action.trimTrailingWhitespace` command
Labels: feature-request,api

- VSCode Version: 1.11.1
- OS Version: Windows 10 Pro

## Feature Request
Support 2 additional args for the `editor.action.trimTrailingWhitespace` command:
```js
commands.executeCommand(
    'editor.action.trimTrailingWhitespace',
    uri,  // (optional, but useful when the doc in question is not within an active editor)
    reason  // (manual, auto-save, etc.), useful for NOT trimming auto whitespace
);
```
Repository: opencv
Issue: Compilation error:Segmentation fault (core dumped) CMake Error at cuda_compile_generated_pyrlk.cu.o.cmake:266 (message): with current master branch
Labels: bug,priority: low,category: gpu/cuda (contrib)

```
System information (version)
- OpenCV => 3.2
[opencv cmake-result.txt](https://github.com/opencv/opencv/files/909411/opencv.cmake-result.txt)

- Operating System / Platform => ubuntu 16.04 64 Bit
- Compiler => gcc version 5.4.0 20160609

configure command:
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=$(python -c "import sys; 
print(sys.prefix)") -D PYTHON_EXECUTABLE=$(which python) -D 
OPENCV_EXTRA_MODULES_PATH=/path/to/to/opencv_contrib/modules -D WITH_QT=ON -D 
WITH_OPENGL=ON -D WITH_JPPEG=ON -D WITH_PNG=ON -D WITH_CUDA=ON -D 
WITH_IPP=ON -D ENABLE_FAST_MATH=1 -D CUDA_FAST_MATH=1 -D WITH_CUBLAS=1 -D 
WITH_NVCUVID=ON -D WITH_V4L=ON -D WITH_FFMPEG=ON -D WITH_GSTREAMER=OFF -D
WITH_OPENMP=ON  -D WITH_TBB=ON ..
```
I reported this bug:
  `https://github.com/opencv/opencv/issues/8509`
some guy recommended me to give latest master branch a try,and got this compilation error:
```
[ 95%] Built target opencv_test_cudaobjdetect
[ 96%] Built target opencv_interactive-calibration
[ 96%] Linking CXX executable ../../bin/opencv_test_optflow
[ 96%] Linking CXX executable ../../bin/opencv_perf_optflow
[ 96%] Built target opencv_perf_cudaobjdetect
[ 96%] Linking CXX executable ../../bin/opencv_test_stitching
[ 96%] Built target opencv_perf_tracking
[ 96%] Linking CXX executable ../../bin/opencv_perf_stitching
[ 96%] Built target opencv_test_tracking
[ 96%] Built target opencv_perf_optflow
[ 96%] Built target opencv_test_optflow
[ 97%] Built target opencv_test_stitching
[ 97%] Built target opencv_perf_stitching
Segmentation fault (core dumped)
CMake Error at cuda_compile_generated_pyrlk.cu.o.cmake:266 (message):
  Error generating file
  /path/to/opencv/release/modules/cudaoptflow/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_pyrlk.cu.o


modules/cudaoptflow/CMakeFiles/opencv_cudaoptflow.dir/build.make:318: the rule for target„modules/cudaoptflow/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_pyrlk.cu.o“ failed
make[2]: *** [modules/cudaoptflow/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_pyrlk.cu.o] error 1
CMakeFiles/Makefile2:14889: 
the rule for target,modules/cudaoptflow/CMakeFiles/opencv_cudaoptflow.dir/all“ failed
make[1]: *** [modules/cudaoptflow/CMakeFiles/opencv_cudaoptflow.dir/all] error 2
Makefile:149: 
the rule for target,all“ failed
make: *** [all] error 2
```
Repository: kubernetes
Issue: clientset interface functions deprecated
Labels: kind/cleanup,sig/api-machinery,lifecycle/frozen

Since we mark functions of clientset interface such as Core(), Autoscaling().... as deprecated, should we change all the calling of Core() to specific version like CoreV1() ... ?

https://github.com/kubernetes/kubernetes/blob/master/pkg/client/clientset_generated/clientset/clientset.go
Repository: go
Issue: x/tools/refactor/rename: bad positions in "ambiguous specifier" error message
Labels: Tools,Refactoring

In directory `$GOROOT/src`:

```
$ gorename -from \"cmd/internal/obj/arm64\"::c -to ___ -d
gorename: ambiguous specifier c matches var at asm7.go:6, var at asm7.go:6, var at asm7.go:2, var at asm7.go:5, var at asm7.go:43, var at asm7.go:2
```

The positions here are bogus; there is no object c at any of these places. These appear to be line offsets relative to functions containing local variables called c.

There's also an implicit feature request here. I'm running this command to find all the local variables named c. Then I will inspect them, pick a good new name for them, and gorename them one at a time. The `-to=___` is just because a `-to` is required, and `-d` is to avoid actually changing the files; I don't really want any of that, I just want to know where the c's are. Maybe there's a better way? Perhaps a gorename flag that just tells you the declaration site of all impacted objects?

cc @alandonovan
Repository: go
Issue: x/crypto/ssh/terminal: ReadPassword doesn't work on redirected stdin giving inappropriate ioctl for device
Labels: NeedsInvestigation

Please answer these questions before submitting your issue. Thanks!

### What version of Go are you using (`go version`)?

go version go1.8 linux/amd64

### What operating system and processor architecture are you using (`go env`)?

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/ncw/go"
GORACE=""
GOROOT="/opt/go/go1.8"
GOTOOLDIR="/opt/go/go1.8/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build011975399=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"

### What did you do?

Use ReadPassword with redirected stdin - it gives error "inappropriate ioctl for device"

Save this code as [readpass.go](https://play.golang.org/p/y3n7UEmCgC)

```
$ go build readpass.go
$ ./readpass 
2017/04/10 16:18:22 Read "hello"
$ echo "hello" | ./readpass
2017/04/10 16:18:34 inappropriate ioctl for device
$ 
```

### What did you expect to see?

    2017/04/10 16:18:22 Read "hello"

I would expect ReadPass to figure out that it is not reading from a terminal before issuing ioctls that are terminal specific.

### What did you see instead?

    2017/04/10 16:18:34 inappropriate ioctl for device

Originally reported in: https://github.com/ncw/rclone/issues/1308
Repository: angular
Issue: Feature: provide a way to dispose DetachedRouteHandle
Labels: feature,area: router,feature: under consideration,feature: votes required

<!--
IF YOU DON'T FILL OUT THE FOLLOWING INFORMATION WE MIGHT CLOSE YOUR ISSUE WITHOUT INVESTIGATING
-->

**I'm submitting a ...**  (check one with "x")
```
[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
```

**Current behavior**
Typically, when providing custom implementation of `RouteReuseStrategy`, we store `DetachedRouteHandle` in map and dispose of it later when `retrieve()` function is called. But if user never visits the route again, `DetachedRouteHandle` will never be disposed. It can create memory leaks. Also, stored component will never unsubscribe from observables, which could lead to application gradually slowing down. The impact is significant in larger apps.

**Expected behavior**
An injectable service with function to properly dispose `DetachedRouteHandle` object should be added.
Other option would be exposing `componentRef` as public property of `DetachedRouteHandle`.

**Minimal reproduction of the problem with instructions**
N/A

**What is the motivation / use case for changing the behavior?**
`RouteReuseStrategy` cause memory leaks.

* **Angular version:** 2.4.X
<!-- Check whether this is still an issue in the most recent Angular version -->
Repository: rust
Issue: lldb print error and crash
Labels: A-debuginfo,T-compiler,C-bug

I tried to debug wth lldb this code:

```
use std::collections::HashMap;

#[derive(Debug)]
enum En<'a> {
    None,
    Bar(&'a Bar<'a>),
}

#[derive(Debug)]
struct Bar<'a> {
    next: En<'a>,
}

fn main() {
    let mut all_objects = HashMap::new();
    let bar: Bar = Bar {
        next: En::None,
    };
    all_objects.insert(1, bar);
    let b1 = all_objects.get(&1).unwrap();
    println!("b1={:?}", b1); //line 22
    println!("end");
}
```
When try to set breakpoint to line 22 and print b1:
```

$ lldb target/debug/test
(lldb) target create "target/debug/test"
Current executable set to 'target/debug/test' (x86_64).
(lldb) b 22
Breakpoint 1: 2 locations.
(lldb) r
Process 11600 launched: '/home/chabapok/RustProjects/2/test1/target/debug/test' (x86_64)
Process 11600 stopped
* thread #1, name = 'test', stop reason = breakpoint 1.1
    frame #0: 0x000055555556501f test`test::main at main.rs:22
   19  	    };
   20  	    all_objects.insert(1, bar);
   21  	    let b1 = all_objects.get(&1).unwrap();
-> 22  	    println!("b1={:?}", b1); //line 22
   23  	    println!("end");
   24  	}
(lldb) p b1
error: test DWARF DIE at 0x0000007c (class En) has a member variable 0x00000082 (RUST$ENCODED$ENUM$0$None) whose type is a forward declaration, not a complete definition.
Please file a bug against the compiler and include the preprocessed output for /home/chabapok/RustProjects/2/test1/./src/main.rs
Stack dump:
0.	HandleCommand(command = "p b1")
1.	<eof> parser at end of file
2.	Parse:41:1: Generating code for declaration '$__lldb_expr'
Segmentation fault (core dumped)
```
ubuntu 14.04, x64, rustc 1.18.0-nightly
llvm,clang,lldb builded from master branch
Repository: flutter
Issue: Would like an example of how to do lazy network fetch and caching with a ListView
Labels: framework,f: scrolling,d: api docs,d: examples,customer: crowd,P3,team-framework,triaged-framework

This came up twice today.  Once from @collinjackson (in the context of firebase storage) and once from @kleak over gitter in the context of writing a chat app with history scrolling.

Seems an example showing how to do lazy fetching from a web service and wires that into an infinitely scrolling ListView with some caching.

I suspect many folks would crib from such an example if we had one.

(@dvdwasibi may have already written one?)
Repository: flutter
Issue: Make "Slow Mode" ribbon interactive, showing a message that explains what it is
Labels: c: new feature,framework,from: study,P3,team-framework,triaged-framework

Tap slow mode banner: tapping it should make a dialog appear with information about debug mode.
Repository: opencv
Issue: GPUMat is not available in Java bindings of OpenCV
Labels: feature,priority: low,category: gpu/cuda (contrib)

<!--
If you have a question rather than reporting a bug please go to http://answers.opencv.org where you get much faster responses.
If you need further assistance please read [How To Contribute](https://github.com/opencv/opencv/wiki/How_to_contribute).

This is a template helping you to create an issue which can be processed as quickly as possible. This is the bug reporting section for the OpenCV library.
-->

##### System information (version)
<!-- Example
- OpenCV => 3.1
- Operating System / Platform => Windows 64 Bit
- Compiler => Visual Studio 2015
-->

- OpenCV =>3.2.0
- Operating System / Platform =>Windows 64 Bit
- Compiler =>Visual Studio 2015

##### Detailed description

<!-- your description -->
There is no GpuMat class found in Java wrapper of OpenCV, ans also there is some functions which is missing in Java wrapper, ....
##### Steps to reproduce

<!-- to add code example fence it with triple backticks and optional file extension
    ```.cpp
    // C++ code example
    ```
 or attach as .txt or .zip file
-->
Repository: react
Issue: A number input will always have left pad 0 though parseFloat value in onChange
Labels: Type: Bug,Component: DOM

**Do you want to request a *feature* or report a *bug*?**
bug

**What is the current behavior?**
I have a number input with defalut value 0 and in onChange function I'll parse value to float to avoid invalid input, but I'll always get left pad 0 on input UI. But in previouse version, my code works.

**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar (template: https://jsfiddle.net/84v837e9/).**
<input type="number" value={this.state.value} onChange={e=>this.setState({value: parseFloat(e.target.value)? parseFloat(e.target.value) : 0})}

**What is the expected behavior?**
Should not have left pad 0.

**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
react 15.5.3, all browser / all OS. It works in 15.4.2
Repository: neovim
Issue: vpeekc_any() appears superfluous in nvim
Labels: refactor

`vpeekc_any()` calls `vpeekc()`, then if it gets `NUL` from it and if `typebuf.tb_len > 0` it returns `ESC` instead.
The comments above this function say it's becase
> * Trick: when no typeahead found, but there is something in the typeahead
> * buffer, it must be an ESC that is recognized as the start of a key code.

`vgetorpeek(false)` (called by `vpeekc()`) returns `NUL` if `vgetc_busy > 0 && ex_normal_busy == 0` or if there is nothing in the typebuffer and the user doesn't press a key before a timeout.
`old_char` (which is the only other place `vpeekc()` looks for a character) is only set by `vungetc()`.
`vungetc()` is only ever called with a character gotten from either `plain_vgetc()` or `safe_vgetc()`.
Both `plain_vgetc()` `safe_vgetc()` never return `NUL`.

Hence the only way replacing `vpeekc_any()` with `vpeekc()` could change behaviour, is if it's called for it's side-effect of transforming a recursive call to `vgetc()` into an `ESC`.
`vpeekc_any()` is called in `ins_compl_check_keys()`, `f_getchar()`, and `command_line_changed()`, I **have not** checked whether any of these fit that case.
Repository: vscode
Issue: [folding] Folding HTML tags should hide the closing tag. 
Labels: feature-request,editor-folding

<!-- Do you have a question? Please ask it on http://stackoverflow.com/questions/tagged/vscode -->

- VSCode Version: 1.11.1
- OS Version: Windows

instead of showing:
< div ... >
< /div>

just show 
< div ...>

when folded
Repository: go
Issue: runtime: crash in hybrid barrier initializing C memory
Labels: NeedsInvestigation,compiler/runtime

Received report via email of code crashing in write barrier finding a bad pointer (pointing to a free span). Code looks like:

	keys := (*[1 << 20]*C.char)(unsafe.Pointer(C.malloc(C.size_t(uintptr(n)) * C.size_t(unsafe.Sizeof((*C.char)(nil))))))[:0:n]
	values := (*[1 << 20]*C.char)(unsafe.Pointer(C.malloc(C.size_t(uintptr(n)) * C.size_t(unsafe.Sizeof((*C.char)(nil))))))[:0:n]
	for key, vals := range req.Header {
		for _, value := range vals {
			keys = append(keys, C.CString(key))
			values = append(values, C.CString(value))
		}
	}

The problem appears to be that C.malloc returns uninitialized memory. Then the initialization of that memory during append overwrites uninitialized pointer slots, and the new hybrid write barrier tries to follow the uninitialized pointers as if they were real pointers.

Prior to the hybrid barrier, the old data being overwritten for off-heap memory was never considered. Now it is. This will invalidate code like the above. It took a long time to notice, so apparently this is rare.

One workaround is to make C.malloc return zeroed memory, which would have a performance cost people might not like (especially since it doesn't seem to matter to most people?). Another workaround is to tell people to use C.calloc for allocating C data structures with pointers, or maybe rewriting just the C.malloc calls that mention pointer sizes.

Really the best fix would be for the GC not to follow these pointers. @aclements says there are some cases where do want the write barrier to follow pointers in non-managed-memory, specifically non-global off-heap runtime structures, but maybe we can distinguish these from other kinds of memory (like C memory) somehow.

If there is a simple fix _and_ we receiver any reports of external problems along these lines, we can consider including the fix in Go 1.8.2.
Repository: rust
Issue: Inconsistency in trait item resolution between `Box<Trait>` and `impl Trait`
Labels: A-type-system,A-resolve,A-trait-system,T-compiler,C-bug,T-types

Consider this example:
```rust
#![feature(conservative_impl_trait)]

// use m::Tr;

mod m {
    pub trait Tr {
        fn method(&self) {}
    }
    impl Tr for u8 {}
    
    pub fn dynamic_tr() -> Box<Tr> { Box::new(0) }
    pub fn static_tr() -> impl Tr { 0u8 }
}

fn main() {
    m::dynamic_tr().method(); // OK
    m::static_tr().method(); // ERROR: no method named `method` found for type `impl m::Tr` in the current scope
}
```

Here we are trying to call methods of traits that are not in scope.
Typically such methods are not resolved, but there's an exception - trait objects.
Trait objects are magic - when you call a method of `Trait` on a value of type `Trait` then `Trait` is automatically considered in scope (or maybe this method is treated as inherent, I haven't looked how exactly the implementation works). This is the reason why `m::dynamic_tr().method()` works. Even if this is a special case, it's a reasonable special case - if you have a value of type `Trait` in hands, you typically want to call some trait methods on it and it would be a nuisance to require `Trait` imported in scope for this.
I don't know what RFC or PR introduced these exact rules, but the fact is that they are used in practice.

All the logic above is applicable to `impl Trait`, but this special case doesn't apply to it and `m::static_tr().method()` reports an "unresolved method" error.
Repository: angular
Issue: Create system for managing global event listeners
Labels: area: core,core: event listeners,core: host and host bindings,core: change detection,needs: discussion

**I'm submitting a ...**  (check one with "x")
```
[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
```

**Current behavior**
Currently if one binds lots of event listeners on `document` or `window`, i.e. components/directives used via ngFor, application can crawl to a slow

**Expected behavior**
Binding event listeners should be simple without having to architect around performance concerns

**Minimal reproduction of the problem with instructions**
Warning: If running the preview, run when not afraid of browser crashing (even on the desktop)
http://plnkr.co/edit/oMMi6tFR3YZMKtMqvSys?p=info

**What is the motivation / use case for changing the behavior?**
I believe a good opportunity lies here to have Angular optimize handling the event delegation through binding single event listeners on `document` and `window` for global events and iterating through event listeners in order to allow for simpler application design around management of global events.

**Please tell us about your environment:**
macOS Sierra 10.12.3

* **Angular version:** 4.0.1

* **Browser:** all
 
* **Language:** all

* **Node (for AoT issues):** `node --version` = N/A
Repository: flutter
Issue: Have Scaffold know how to provide a SliverAppBar to a child ListView
Labels: c: new feature,framework,f: material design,f: scrolling,P3,team-design,triaged-design

The usage for the current implementation of SliverAppBar is unclear.  There are two different ways of populating a material appbar:

```dart
new Scaffold(
  // 1
  appBar: new AppBar(), 
  body: new CustomScrollView(
        slivers: [
          // 2
          new SliverAppBar(
            title: new Text('ScrollViewContents'),
            floating: true,
          ),
          new SliverList(
            delegate: myItems0.sliverChildListDelegate(),
          ),
        ],
    ),
  );
```

In client code, having two different ways of doing this makes code
 - much more difficult to maintain (bugs may happen in one page but not another b) 
 - much harder to change between appbar models (switching requires migrating between the scrolling models instead of dropping in a different implementation)

In leafy, this dual interface issue and the associated code complexity is a blocker to us adding scrollable appbar behavior.
Repository: go
Issue: x/build: get Alpine builders passing
Labels: help wanted,Builders,NeedsFix

Thanks to @jessfraz's setting up an Alpine Linux builder (#17891), we now get to deal with more bugs, like this one:

https://build.golang.org/log/09a1850a53ff39d403984ecc8c29114ecd0a4109
```
--- FAIL: TestCgoPprofPIE (8.39s)
	crash_cgo_test.go:285: signal: segmentation fault (core dumped)
FAIL
FAIL	runtime	16.270s
```

@ianlancetaylor?
Repository: TypeScript
Issue: Go to Definition for Non JS/TS File Imports
Labels: Suggestion,Awaiting More Feedback,VS Code Tracked,Domain: JavaScript,Domain: Symbol Navigation

<!-- BUGS: Please use this template. -->
<!-- QUESTIONS: This is not a general support forum! Ask Qs at http://stackoverflow.com/questions/tagged/typescript -->
<!-- SUGGESTIONS: See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md -->

From https://github.com/Microsoft/vscode/issues/24276

**Issue**
Users of tools such as webpack often load non js/ts assets, such as css or images, using `require` or `import`:

```js
require('./main.css');
import './image.png'
...
```

Operations such as `go to definition` currently do not work on these paths

**Proposal**
`go to definition` on these resource paths should try to open the corresponding resource in the editor.