Concurrency Lecture 5 Flashcards

Mutation Operators

1
Q

What is a mutation operator?

A

A bug that we inject into our concurrency code to find help find faults in our code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Name the steps in the Quality Assurance Process.

A
  1. Get system source code that is to be tested.
  2. Do a static analysis of the code.
  3. Create a set of test targets.
  4. Write the tests according to the targets.
  5. Execute the test.sets.
  6. Perform a test set evaluation of the results.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the advantages of using mutation operators?

A
  • They give us better insight into the code we are testing

- Help decide whether or not the coverage metric we are using is suitable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Why can only writing tests for our code not be as good as also using mutation operators?

A
  • Sometimes tests cannot reveal all concurrency faults and bugs.
  • It can be hard to write tests for every single test target we found
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What do we do once we have added mutation operators to our code?

A

We run the mutated code with the tests that we wrote. Then we observe what new bugs have been revealed by our mutations. We then calculate the mutation score.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How do we calculate mutation score?

A

(Number of bugs revealed)
_______________________________ x 100
(Total number of bugs)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are bug patterns?

A

Bugs that arise in faulty code. They are common mistakes that a programmer makes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What does the mutation operator: Modify Method Timeout do?

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does the mutation operator: Modify Synchronized Block Parameter do?

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does the mutation operator: Exchange Synchronized Block Parameters do?

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does the mutation operator: Remove Thread Method Call do?

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does the mutation operator: Remove Concurrency Mechanism Method Call do?

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does the mutation operator: Replace notifyAll() With notify() do?

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What does the mutation operator: Replace join() With sleep() do?

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What does the mutation operator: Remove Synchronized Keyword From Method do?

A

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What does the mutation operator: Remove Synchronized Method do?

A

17
Q

What does the mutation operator: Remove Finally Around Unlock do?

A

….

18
Q

What does the mutation operator: Replace One Concurrency Mechanism With Another do?

A

19
Q

What does the mutation operator: Exchange Explicit Block Object do?

A

20
Q

What does the mutation operator: Shift Critical Region do?

A

21
Q

What does the mutation operator: Expand Critical Region do?

A

22
Q

What does the mutation operator: Shrink Critical Region do?

A

23
Q

What does the mutation operator: Split Critical Region do?

A