because you can’t fix what you don’t know is broken… · because you can’t fix what ......

66
Because you can’t fix what you don’t know is broken…

Upload: phungbao

Post on 07-Apr-2018

229 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

Because you can’t fix what you don’t know is broken…

Page 2: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

About me

2

• Initiator of the Automated Error Reporting Initiative • Project Lead of Eclipse Code Recommenders • Eclipse Committer since 2010 • Plug-in Developer for 10+ years (Eclipse 2.1) • Member of the Eclipse Architecture Council • Co-Lead of Java User Group Darmstadt • CEO of Codetrails

• Passion to improve developers day-to-day work with intelligent and practical tools - mostly using Data Mining on Big (Software Engineering) Data.

@marcelbruchmarcelbruch

Page 3: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

Adding a new character to the plot

3

SoftwareUser

{ — — –}ApplicationDeveloper

Product Manager

Page 4: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

Imagine the following situation…

4

SoftwareUser

{ — — –}ApplicationDeveloper

Product Manager

Page 5: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

But when the user starts the app…

5

Page 6: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

6Can you feel their pain…?

This image is not available in your country

Page 7: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

In the logs you’d find…

7

Page 8: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

✘ ✘ ✘

The tragedy of manual error reports

8

✘ ✘

!

maintenance

✘ ✘ ✘

Release SR 2

production

SR 1

Page 9: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

!

The tragedy of manual error reports

9

maintenance

Release SR 2

production

SR 1

✘ ✘ ✘

Page 10: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

10Not too happy but feeling okay…

This image is not available in your country

Page 11: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

What can we do?

11

Application Developer

?{ — — –}

Page 12: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

The Automated Error Reporting Initiative

12

Page 13: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

Live Demo

13

Page 14: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

About server responses,Bugzilla, and immediate feedback

„Keep users informed about your progress…“

14

Page 15: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

Systems Overview

15

AERI Web UI Eclipse BugzillaEclipse IDEs

„Direct Reporter Feedback“

Page 16: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

Not yet tracked problems…

16

Page 17: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

Committers needinfo…

17

Status: – – –

Resolution: – – –

Bug 442500 – ….

Page 18: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

Fixed…

18

Status: – – –

Resolution: – – –

Bug 442500 – ….

Page 19: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

Won’t Fix…

19

Status: – – –

Resolution: – – –

Bug 442500 – ….

Page 20: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

Invalid (aka log messages)

20

Status: – – –

Resolution: – – –

Bug 442500 – ….

Page 21: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

About caching, filtering,anonymization, and other shortcuts…

„What goes to eclipse.org?“

21

Page 22: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

Do we send all errors to Eclipse…?

22

really

Page 23: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

The error reporting funnel

23

structural filter

Page 24: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

#1: Structural Filtering

24

java.net.UnknownHostException: marketplace.eclipse.org at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184) at java.net.Socket.connect(Socket.java:538) at com.example.HttpClient.openServer(HttpClient.java:527) at com.example.http.HttpClient.<init>(HttpClient.java:211) at com.example.HttpURLConnection.connect(HttpURLConnection.java:932) at org.eclipse.recommenders.internal.news.rcp.PollFeedJob.run(PollFeedJob.java:69) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

Error connecting to ‘http://marketplace.eclipse.org/rss.xml’.

Page 25: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

#2: Did I already sent this?

25

structural filter

personal filter

Page 26: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

#3: Did anyone else sent this?

26

structural filter

personal filter

global hist.

Page 27: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

structural filter

personal filter

If you hit a known issue…

27

global hist.

Page 28: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

#4: Review

28

review

structural filter

personal filter

global hist.

Page 29: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

#4: Review

29

Page 30: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

The server sideWalkthrough through the committer front-end

30

Page 31: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

The core concepts

31

Page 32: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

The Core Concepts

32

✘✘

✘ ✘✘✘✘✘✘ Incidents

Problems

Projects

Page 33: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

The committer front-end

33

Page 34: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

Creating bug reports

34

Page 35: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

Creating bug reports

35

Page 36: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

Notifying committers

36

Page 37: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

Project Alerts

37

Page 38: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

Weekly or daily email digests

38

Page 39: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

Some fun factse = mc2 —> errors = (more code)2

39

Page 40: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

DisclaimerDon’t draw preliminary conclusions!

Please consult your personal statistican…

Page 41: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

How many milestones testers?

450 simrel committers 1200 eclipse committers Testers?~7000 error reporters

Page 42: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

Milestones adoption

42

RC3 RC2 RC1 M7 M6

M5 M4 M3 M2 M1

1000

220

160

650

450400

560

600Do new milestones introduce new problems?

70

10

# reporters one week high

SR2 SR1 R

LunaMars

Page 43: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

0

350

700

1050

1400

4.4.0 4.4.1 4.4.2 M1 M2 M3 M4 M5 M6 M7 RC1 RC2 RC3

Milestones adoption

43

Christmas

Addition to all EPP packages

RCs

Addition to first EPP packages

Page 44: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

How hard do they suffer?

44

300 - 3000 reports 25 testers

50-300 reports 330 testers

3-50 reports 3600 testers

1-2 reports 3000 testers

Page 45: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

What do they report?

45

0

750

1500

2250

3000

‚Normal‘ ErrorsOut of MemoryFreezesStack Overflows3rd Party Involved

Top 100 of 7000

Me

Page 46: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

What kind of errors are send?

46

3rd Party Involved 16 %

Stack Overflows 0 %

Freezes 9 %

Out Of Memory 1 %

'Normal' Errors 74 %

Page 47: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

What are the most popular exceptions?

47

32 %

12 %

25 %

3 %

8 %2 %

18 %

Page 48: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

What are the most popular exceptions?

48

Other 32 %

No {Class | Method | Field} DefFoundError 12 %

NullPointerException 25 %

IndexOutOfBoundsException 3 %

IllegalArgumentException 8 %

ClassCastException 2 %

{File} IOException 18 %

Page 49: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

NullPointerExceptions by Projects

49

0

1000

2000

3000

NullPointerException

Code Recommenders

65

Statisticians, note: Projects automatically marked as „being responsible“ fixing these NullPointerExceptions but does not mean the NPE happened in their code.

Page 50: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

Tip: Enable null analysis

50

@Overrideprotected void run(@Nullable List<Incident> slice) {

for (Incident incident : slice) {

Page 51: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

JDT offers a lot…

51

Page 52: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

Tip: Never return null

52

@Overridepublic Optional<String> getReason() { return Optional.ofNullable(cause);}

Use java.util.Optional or com.google.common.base.Optional instead

Page 53: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

Oh Class, Were Art Thou?

53

Use proper import ranges and define uses on your exports to get rid of {Class | Method | Field} DefNotFoundErrors, LinkageErrors, and some ClassCastExceptions. OSGI needs that information to work properly…

Export-Package: org.eclipse.recommenders.utils; uses:="org.osgi.framework, org.eclipse.core.runtime, com.google.common.base, com.google.common.collect"

Import-Package: com.google.common.annotations;version="[15.0.0,16.0.0)",

Page 54: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

Index out of bounds?

54

a b c d e

-1 and array.length do not work. No matter how often you try…

There is no tool support for this. Just unit tests and code that tries to fail gracefully.

Page 55: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

Tip: If error messages are not helpful…

55

try { // …} catch (Exception e) {log(„An error occurred“, e);

}

21% of all logged errors do not contain stack traces.

try { // …} catch (Exception e) {log(„Invalid argument {}“, value, e);

}

Page 56: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

Are your users ready for Java 8?

56

both2,5%

Java 1.733%

Java 1,8 64%

Java 1.90,3%

Which VM do users run the Eclipse IDE with?

Page 57: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

Do people anonymize their messages?

57

Sometimes 3 %

No 81 %

Yes 16 %

Are you concerned that your exception message may reveal sensitive data?

Page 58: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

Bugfixing RatesSpeak plain: Does it work?

58

Page 60: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

Fixed bugs by projects

60

More (35) 84

--- 11

EGit 15

Papyrus 19

Recommenders 41

Xtext 42

Oomph 58

Page 61: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

In progress & fixed bugs

61

0

30

60

90

120

Oomph TMF Recommenders Papyrus EGit ---

97

1914

1729

20

111519

4142

58

FixedIn Progress

Page 62: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

Future Work?Feature requests are tracked in bugzilla. Make sure your request is in there and vote for it.

Client:• Separate view to „review, analyze and send later“ • Making client reusable in other (Eclipse- or SWT-based) applications • Additional client-side automated analysis

Server:• Ensure scalability of the system • Improve duplicate detections • Go Neon if feedback is good.

Hosting an error reporting service for Java software?• Need one? TTML.

62

Page 63: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

How to reach EPP Logging

63

• Code: Check out the EPP Logging Oomph profile • Wiki : https://wiki.eclipse.org/EPP/Logging • Manual: https://dev.eclipse.org/recommenders/community/confess/#/about • Forum: https://www.eclipse.org/forums/index.php/f/69/ • Bugzilla: https://bugs.eclipse.org/bugs/buglist.cgi?component=logging&product=EPP • Mail: [email protected]

Page 64: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

Credits

• Daniel Haftstein, Codetrails – Eclipse client conception and implementation • Marcel Bruch, Codetrails – Server-side conception and implementation

• Webmasters, Eclipse Foundation – Eclipse server infrastructure & integration • Thanks to many early adopters and committers providing feedback

64

Page 65: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

Feedback

65

Page 66: Because you can’t fix what you don’t know is broken… · Because you can’t fix what ... Projects automatically marked as „being responsible“ fixing these ... Contact

Contact Us

66

Codetrails GmbH Robert-Bosch-Str. 7 64293 Darmstadt, Germany

www: codetrails.com phone: 06151 / 2767 092 email: [email protected]

Dr. Marcel Bruch CEO

mobile: 0179 / 1317 721 email: [email protected]