1 of 65

Mithun P. Acharya, Chris Parnin, Nicholas A. Kraft, Aldo Dagnino, Xiao Qu

Code Drones logo credits: Vaishnavi Murthy

Best Visions Paper at ICSE 2016, Runner Up

codedrones.org

2 of 65

Make software artifacts intelligent … and let artifacts drive their own improvement/change

2

Code Drones” in one slide!

Classes�Bug Reports�Test Cases�Requirement Docs�...

3 of 65

3

4 of 65

What is the problem?

4

5 of 65

Problem

(Automated) Software Engineering requires significant “human in the loop” and is thus REACTIVE

5

6 of 65

Problem

(Automated) Software Engineering requires significant “human in the loop” and is thus REACTIVE

6

Library/API Migration

Patching Vulnerabilities

Code Reuse

Refactoring

...

Reactive approach to these lead to significant technical debt

7 of 65

What is Code Drones?

7

8 of 65

Code Drones is a new abstraction towards PROACTIVE Software Engineering ...

8

9 of 65

… led by intelligent software artifacts, thus reducing “human in the loop”

9

Humans

Intelligent Software Artifacts

10 of 65

Problem: Revisited with Code Drones

(Automated) Software Engineering requires significant “human in the loop” and is thus REACTIVE

… abstraction towards PROACTIVE Software Engineering

10

reduce with intelligent/proactive software artifacts

PROACTIVE

11 of 65

11

Examples of “Code Drones”-powered intelligent/proactive software artifacts

12 of 65

Problem: Bug Management is critical for software projects

  • Triaging
  • Prioritization
  • Assignment
  • Clustering
  • Duplicates
  • ....

12

13 of 65

Proactive/Intelligent Bugs with Code Drones

Bugs contact the right developers that can fix them

13

proactive/intelligent bug report!

14 of 65

Problem: Reuse opportunities are seldom known let alone be leveraged

14

Code Reuse

15 of 65

Proactive/Intelligent Components/Libraries with Code Drones

Components/Libraries communicate to developers (and implement) reuse opportunities in real time

15

Hi! dll from Sweden! Based on your context, here’s how you can use me!

16 of 65

Problem: Refactoring always put off until next release!

16

17 of 65

Proactive/Intelligent classes with Code Drones

Classes auto refactor for performance and security

17

Classes will have access to TEST/PRODUCTION �build/runtime data

18 of 65

Proactive/Intelligent classes with Code Drones

With CodeLens, tests, bugs, work items, ... already communicate with classes

For simple cases, a class will autofix itself based on the test result/data

18

CodeLens

19 of 65

Problem: Library migration and fixing vulnerabilities a big headache

19

Library/API Migration

Patching Vulnerabilities

20 of 65

Proactive/Intelligent Clients and Libraries with Code Drones

Classes auto upgrade libraries, run all test cases, and submit an auto pull request

20

21 of 65

Proactive/Intelligent Clients and Libraries with Code Drones

Classes auto upgrade libraries, run all test cases, and submit an auto pull request

21

API Monkeygithub.com/alt-code/APIMonkey

22 of 65

22

“Product Hunt” submissions

Startup!�

input

output

Includes:

Landing page on github�Project Management�...

@dailystartupbot

Now, that’s proactive!

23 of 65

What is the key idea behind Code Drones?

23

24 of 65

Make software artifacts intelligent … and let artifacts drive their own improvement/change

24

Classes�Bug Reports�Test Cases�Requirement Docs�...

25 of 65

… and let software artifacts go social with developers

25

26 of 65

Intelligent and social software artifacts are called Code Drones.

Thus we have class drones, bug drones, library drones, requirement drones, test drones, ....

26

27 of 65

Do I have to change my artifacts to make them intelligent?

27

28 of 65

28

29 of 65

How do I make artifacts intelligent then?

29

30 of 65

Put an intelligent agent behind every software artifact

30

31 of 65

How do I make the agent intelligent?

31

32 of 65

32

33 of 65

How do I make my artifacts social?

33

34 of 65

Promote code to first class citizens in github like developers

34

35 of 65

35

Developer-Artifact social network

Codebook graph that connects Pam and Dave via artifacts

Like Pam and Dave, Code Drones powered software artifacts will be intelligent too!

PAM

DAVE

ARTIFACTS

36 of 65

Proactive/Intelligent Clients and Libraries with Code Drones

Classes auto upgrade libraries, run all test cases, and submit an auto pull request

36

API Monkeygithub.com/alt-code/APIMonkey

37 of 65

37

First Code Drones assisted auto pull request that proactively:

a) upgrades about two dozen libraries AND

b) confirms that all 357 test cases pass after upgrade!

Pull request submitted by: API Monkey

38 of 65

38

I REVIEWED!

PULL REQUEST MERGED

39 of 65

39

40 of 65

40

357 tests passed after upgrade

41 of 65

41

Failed upgrading redis beyond 2.2.3

42 of 65

42

Why upgrading redis beyond 2.2.3 failed?

43 of 65

43

Library upgrades went fine!

Testing efforts saved

44 of 65

How do I make the agent intelligent?

44

45 of 65

Intelligence implemented as microservices in the cloud

45

Software Artifact

modify

subscribe

46 of 65

46

Traditional�SE

Search

Social

Reasoning

Automated Software Engineering

Concolic Execution

Search-Based SE Techniques

Regression Testing�Semantic Similarity�...�

MICROSERVICES

47 of 65

47

Traditional�SE

Search

Reasoning

Visual Studio Developer Assistant�Social network search, Boa

Web search, stackoverflow

Social

Drones search. Not humans!

Automated Software Engineering

Concolic Execution

Search-Based SE Techniques

Regression Testing�Semantic Similarity�...�

MICROSERVICES

48 of 65

48

Traditional�SE

Search

Reasoning

Social APIs

Social

Automated Software Engineering

Concolic Execution

Search-Based SE Techniques

Regression Testing�Semantic Similarity�...�

Visual Studio Developer Assistant�Social network search, Boa

Web search, stackoverflow

MICROSERVICES

49 of 65

49

Traditional�SE

Search

Reasoning

Social APIs

Simple If This Then That (IFTTT) APIs

Complex Watson/Siri-like APIs

Social

Automated Software Engineering

Concolic Execution

Search-Based SE Techniques

Regression Testing�Semantic Similarity�...�

Visual Studio Developer Assistant�Social network search, Boa

Web search, stackoverflow

MICROSERVICES

50 of 65

Who will implement Code Drones agents and Microservices?

50

51 of 65

51

Business model: Microservices can be sold for a premium!… and let the best microservice offering win!

52 of 65

52

The CROWD in crowdsourcing will be both humans and drones

drones

humans

53 of 65

53

COGNITIVE Business, Law, Oncology, Cooking, IoT, Finance, Sports, Insurance, Vehicles, � Healthcare, Transportation, Entertainment, Education, Retail, ...

54 of 65

With Code Drones, we have have taken the first step towards �Cognitive Software Engineering

54

Software Artifact

modify

subscribe

55 of 65

55

Code Drones

Proactive Software Engineering

Microintelligence�Cognitive Software Engineering

Multiagent Systems for Software Engineering�Human Bot Interaction

PERSPECTIVES

focus of this talk

56 of 65

56

Key idea: Make software artifacts intelligent

Code Drones

codedrones.org

57 of 65

57

codedrones.org

Proactive bug/issue management

Instant Reuse

Auto refactoring

Auto API migration

API Monkey

Code Drones

@dailystartupbot

Auto startup generator

Key idea: Make software artifacts intelligent

58 of 65

58

codedrones.org

Proactive bug/issue management

Instant Reuse

Auto refactoring

Auto API migration

@dailystartupbot

API Monkey

Auto startup generator

Immersive IDEs

No more editing code by hand!�Talk to your classes!

Code Drones

Key idea: Make software artifacts intelligent

59 of 65

59

codedrones.org

Proactive bug/issue management

Instant Reuse

Auto refactoring

Auto API migration

API Monkey

Auto startup generator

Immersive IDEs

No more editing code by hand!�Talk to your classes!

Social patching

Social Software Estimation

Distributed Verification and Testing

Applications to Mining Software Repositories

Code Drones

@dailystartupbot

Key idea: Make software artifacts intelligent

60 of 65

60

codedrones.org

61 of 65

61

62 of 65

Best review comment ever!

One of the reviewers of our paper:

Classes might even write recommendations on other classes and "unfriend" bad classes. I suppose a class might also brag about its performance, and why not, a class might also post selfies of its private methods, which some of its friends (classes) might "like"! ...

62

63 of 65

63

64 of 65

64

Software Artifacts as Friends

Humanizing Software Artifacts

Software Artifact Choreographed Software Engineering (SACSE)

Code Drones

65 of 65

65