for(IntChoiceFromSet cg : cgMap.keySet()) {
int event = cgMap.get(cg);
LinkedList<Integer[]> choiceLists = backtrackMap.get(event);
- if (choiceLists.peekFirst() != null) {
+ if (choiceLists != null && choiceLists.peekFirst() != null) {
Integer[] choiceList = choiceLists.removeFirst();
// Deploy the new choice list for this CG
cg.setNewValues(choiceList);
!fieldClass.startsWith("sun") &&
!fieldClass.startsWith("com") &&
!fieldClass.startsWith("gov") &&
- !fieldClass.startsWith("groovy")) {
- analyzeReadWriteAccesses(executedInsn, fieldClass);
+ !fieldClass.startsWith("groovy") &&
+ // and fields generated for the Groovy library
+ !fieldClass.endsWith("stMC") &&
+ !fieldClass.endsWith("callSiteArray") &&
+ !fieldClass.endsWith("metaClass") &&
+ !fieldClass.endsWith("staticClassInfo") &&
+ !fieldClass.endsWith("__constructor__")) {
+ // Analyze only after being initialized
+ if (isInitialized) {
+ analyzeReadWriteAccesses(executedInsn, fieldClass);
+ }
}
}
// Analyze conflicts from next instructions
!fieldClass.startsWith("sun") &&
!fieldClass.startsWith("com") &&
!fieldClass.startsWith("gov") &&
- !fieldClass.startsWith("groovy")) {
+ !fieldClass.startsWith("groovy") &&
+ // and fields generated for the Groovy library
+ !fieldClass.endsWith("stMC") &&
+ !fieldClass.endsWith("callSiteArray") &&
+ !fieldClass.endsWith("metaClass") &&
+ !fieldClass.endsWith("staticClassInfo") &&
+ !fieldClass.endsWith("__constructor__")) {
// Check for conflict (go backward from currentChoice and get the first conflict)
// If the current event has conflicts with multiple events, then these will be detected
// one by one as this recursively checks backward when backtrack set is revisited and executed.
// 1) Check for conflicts with Write fields for both Read and Write instructions
// 2) Check for conflicts with Read fields for Write instructions
if (((nextInsn instanceof WriteInstruction || nextInsn instanceof ReadInstruction) &&
- rwSet.writeFieldExists(fieldClass)) ||
- (nextInsn instanceof WriteInstruction && rwSet.readFieldExists(fieldClass))) {
+ rwSet.writeFieldExists(fieldClass)) ||
+ (nextInsn instanceof WriteInstruction && rwSet.readFieldExists(fieldClass))) {
// We do not record and service the same backtrack pair/point twice!
// If it has been serviced before, we just skip this
if (recordConflictPair(choiceCounter, eventNumber)) {