Program: 53290
Project: 53290
Buggy source:
@Override public void setValue(int index,Object value){
  if (index == 1) {
    super.setValue(index,value);
  }
 else   if (index == 2) {
    m_ObjectList.clear();
    if (value != null) {
      for (      Object item : (Object[])value) {
        ObjectType type=ObjectType.forValue(((Number)Array.get(item,0)).intValue());
        int version=((Number)Array.get(item,1)).intValue();
        String ln=GXDLMSObject.toLogicalName((byte[])Array.get(item,2));
        GXDLMSObject obj=getParent().findByLN(type,ln);
        if (obj == null) {
          obj=gurux.dlms.GXDLMSClient.createObject(type);
          obj.setLogicalName(ln);
          obj.setVersion(version);
        }
        updateAccessRights(obj,(Object[])Array.get(item,3));
        m_ObjectList.add(obj);
      }
    }
  }
 else   if (index == 3) {
    if (value != null) {
      ClientSAP=(short)GXCommon.intValue(Array.get(value,0));
      ServerSAP=(short)GXCommon.intValue(Array.get(value,1));
    }
  }
 else   if (index == 4) {
    if (value instanceof byte[]) {
      int pos=-1;
      byte[] arr=(byte[])value;
      if (arr[0] == 0x60) {
        ApplicationContextName.setJointIsoCtt(0);
        ++pos;
        ApplicationContextName.setCountry(0);
        ++pos;
        ApplicationContextName.setCountryName(0);
        ++pos;
        ApplicationContextName.setIdentifiedOrganization(arr[++pos]);
        ApplicationContextName.setDlmsUA(arr[++pos]);
        ApplicationContextName.setApplicationContext(arr[++pos]);
        ApplicationContextName.setContextId(arr[++pos]);
      }
 else {
        if (arr[++pos] != 2 && arr[++pos] != 7) {
          throw new IllegalArgumentException();
        }
        if (arr[++pos] != 0x11) {
          throw new IllegalArgumentException();
        }
        ApplicationContextName.setJointIsoCtt(arr[++pos]);
        if (arr[++pos] != 0x11) {
          throw new IllegalArgumentException();
        }
        ApplicationContextName.setCountry(arr[++pos]);
        if (arr[++pos] != 0x12) {
          throw new IllegalArgumentException();
        }
        int tmp[]=new int[]{pos};
        ApplicationContextName.setCountryName(GXCommon.getUInt16(arr,tmp));
        pos=tmp[1];
        if (arr[++pos] != 0x11) {
          throw new IllegalArgumentException();
        }
        ApplicationContextName.setIdentifiedOrganization(arr[++pos]);
        if (arr[++pos] != 0x11) {
          throw new IllegalArgumentException();
        }
        ApplicationContextName.setDlmsUA(arr[++pos]);
        if (arr[++pos] != 0x11) {
          throw new IllegalArgumentException();
        }
        ApplicationContextName.setApplicationContext(arr[++pos]);
        if (arr[++pos] != 0x11) {
          throw new IllegalArgumentException();
        }
        ApplicationContextName.setContextId(arr[++pos]);
      }
    }
 else {
      if (value != null) {
        ApplicationContextName.setJointIsoCtt(((Number)Array.get(value,0)).intValue());
        ApplicationContextName.setCountry(((Number)Array.get(value,1)).intValue());
        ApplicationContextName.setCountryName(((Number)Array.get(value,2)).intValue());
        ApplicationContextName.setIdentifiedOrganization(((Number)Array.get(value,3)).intValue());
        ApplicationContextName.setDlmsUA(((Number)Array.get(value,4)).intValue());
        ApplicationContextName.setApplicationContext(((Number)Array.get(value,5)).intValue());
        ApplicationContextName.setContextId(((Number)Array.get(value,6)).intValue());
      }
    }
  }
 else   if (index == 5) {
    if (value != null) {
      XDLMSContextInfo.setConformance(Array.get(value,0).toString());
      XDLMSContextInfo.setMaxReceivePduSize(((Number)Array.get(value,1)).intValue());
      XDLMSContextInfo.setMaxSendPpuSize(((Number)Array.get(value,2)).intValue());
      XDLMSContextInfo.setDlmsVersionNumber(((Number)Array.get(value,3)).intValue());
      XDLMSContextInfo.setQualityOfService(((Number)Array.get(value,4)).intValue());
      XDLMSContextInfo.setCypheringInfo((byte[])Array.get(value,5));
    }
  }
 else   if (index == 6) {
    if (value != null) {
      if (value instanceof byte[]) {
        int pos=-1;
        byte[] arr=(byte[])value;
        if (arr[0] == 0x60) {
          AuthenticationMechanismMame.setJointIsoCtt(0);
          ++pos;
          AuthenticationMechanismMame.setCountry(0);
          ++pos;
          AuthenticationMechanismMame.setCountryName(0);
          ++pos;
          AuthenticationMechanismMame.setIdentifiedOrganization(arr[++pos]);
          AuthenticationMechanismMame.setDlmsUA(arr[++pos]);
          AuthenticationMechanismMame.setAuthenticationMechanismName(arr[++pos]);
          AuthenticationMechanismMame.setMechanismId(Authentication.forValue(arr[++pos]));
        }
 else {
          if (arr[++pos] != 2 && arr[++pos] != 7) {
            throw new IllegalArgumentException();
          }
          if (arr[++pos] != 0x11) {
            throw new IllegalArgumentException();
          }
          AuthenticationMechanismMame.setJointIsoCtt(arr[++pos]);
          if (arr[++pos] != 0x11) {
            throw new IllegalArgumentException();
          }
          AuthenticationMechanismMame.setCountry(arr[++pos]);
          if (arr[++pos] != 0x12) {
            throw new IllegalArgumentException();
          }
          int[] tmp=new int[]{pos};
          AuthenticationMechanismMame.setCountryName(GXCommon.getUInt16(arr,tmp));
          pos=tmp[0];
          if (arr[++pos] != 0x11) {
            throw new IllegalArgumentException();
          }
          AuthenticationMechanismMame.setIdentifiedOrganization(arr[++pos]);
          if (arr[++pos] != 0x11) {
            throw new IllegalArgumentException();
          }
          AuthenticationMechanismMame.setDlmsUA(arr[++pos]);
          if (arr[++pos] != 0x11) {
            throw new IllegalArgumentException();
          }
          AuthenticationMechanismMame.setAuthenticationMechanismName(arr[++pos]);
          if (arr[++pos] != 0x11) {
            throw new IllegalArgumentException();
          }
          AuthenticationMechanismMame.setMechanismId(Authentication.forValue(arr[++pos]));
        }
      }
 else {
        if (value != null) {
          AuthenticationMechanismMame.setJointIsoCtt(((Number)Array.get(value,0)).intValue());
          AuthenticationMechanismMame.setCountry(((Number)Array.get(value,1)).intValue());
          AuthenticationMechanismMame.setCountryName(((Number)Array.get(value,2)).intValue());
          AuthenticationMechanismMame.setIdentifiedOrganization(((Number)Array.get(value,3)).intValue());
          AuthenticationMechanismMame.setDlmsUA(((Number)Array.get(value,4)).intValue());
          AuthenticationMechanismMame.setAuthenticationMechanismName(((Number)Array.get(value,5)).intValue());
          AuthenticationMechanismMame.setMechanismId(Authentication.forValue(((Number)Array.get(value,6)).intValue()));
        }
      }
    }
  }
 else   if (index == 7) {
    Secret=(byte[])value;
  }
 else   if (index == 8) {
    if (value == null) {
      setAssociationStatus(AssociationStatus.NonAssociated);
    }
 else {
      setAssociationStatus(AssociationStatus.values()[((Number)value).intValue()]);
    }
  }
 else   if (index == 9) {
    setSecuritySetupReference(GXDLMSObject.toLogicalName((byte[])value));
  }
 else {
    throw new IllegalArgumentException("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void setValue(int index,Object value){
  if (index == 1) {
    super.setValue(index,value);
  }
 else   if (index == 2) {
    m_ObjectList.clear();
    if (value != null) {
      for (      Object item : (Object[])value) {
        ObjectType type=ObjectType.forValue(((Number)Array.get(item,0)).intValue());
        int version=((Number)Array.get(item,1)).intValue();
        String ln=GXDLMSObject.toLogicalName((byte[])Array.get(item,2));
        GXDLMSObject obj=getParent().findByLN(type,ln);
        if (obj == null) {
          obj=gurux.dlms.GXDLMSClient.createObject(type);
          obj.setLogicalName(ln);
          obj.setVersion(version);
        }
        if (obj instanceof IGXDLMSBase) {
          updateAccessRights(obj,(Object[])Array.get(item,3));
          m_ObjectList.add(obj);
        }
      }
    }
  }
 else   if (index == 3) {
    if (value != null) {
      ClientSAP=(short)GXCommon.intValue(Array.get(value,0));
      ServerSAP=(short)GXCommon.intValue(Array.get(value,1));
    }
  }
 else   if (index == 4) {
    if (value instanceof byte[]) {
      int pos=-1;
      byte[] arr=(byte[])value;
      if (arr[0] == 0x60) {
        ApplicationContextName.setJointIsoCtt(0);
        ++pos;
        ApplicationContextName.setCountry(0);
        ++pos;
        ApplicationContextName.setCountryName(0);
        ++pos;
        ApplicationContextName.setIdentifiedOrganization(arr[++pos]);
        ApplicationContextName.setDlmsUA(arr[++pos]);
        ApplicationContextName.setApplicationContext(arr[++pos]);
        ApplicationContextName.setContextId(arr[++pos]);
      }
 else {
        if (arr[++pos] != 2 && arr[++pos] != 7) {
          throw new IllegalArgumentException();
        }
        if (arr[++pos] != 0x11) {
          throw new IllegalArgumentException();
        }
        ApplicationContextName.setJointIsoCtt(arr[++pos]);
        if (arr[++pos] != 0x11) {
          throw new IllegalArgumentException();
        }
        ApplicationContextName.setCountry(arr[++pos]);
        if (arr[++pos] != 0x12) {
          throw new IllegalArgumentException();
        }
        int tmp[]=new int[]{pos};
        ApplicationContextName.setCountryName(GXCommon.getUInt16(arr,tmp));
        pos=tmp[1];
        if (arr[++pos] != 0x11) {
          throw new IllegalArgumentException();
        }
        ApplicationContextName.setIdentifiedOrganization(arr[++pos]);
        if (arr[++pos] != 0x11) {
          throw new IllegalArgumentException();
        }
        ApplicationContextName.setDlmsUA(arr[++pos]);
        if (arr[++pos] != 0x11) {
          throw new IllegalArgumentException();
        }
        ApplicationContextName.setApplicationContext(arr[++pos]);
        if (arr[++pos] != 0x11) {
          throw new IllegalArgumentException();
        }
        ApplicationContextName.setContextId(arr[++pos]);
      }
    }
 else {
      if (value != null) {
        ApplicationContextName.setJointIsoCtt(((Number)Array.get(value,0)).intValue());
        ApplicationContextName.setCountry(((Number)Array.get(value,1)).intValue());
        ApplicationContextName.setCountryName(((Number)Array.get(value,2)).intValue());
        ApplicationContextName.setIdentifiedOrganization(((Number)Array.get(value,3)).intValue());
        ApplicationContextName.setDlmsUA(((Number)Array.get(value,4)).intValue());
        ApplicationContextName.setApplicationContext(((Number)Array.get(value,5)).intValue());
        ApplicationContextName.setContextId(((Number)Array.get(value,6)).intValue());
      }
    }
  }
 else   if (index == 5) {
    if (value != null) {
      XDLMSContextInfo.setConformance(Array.get(value,0).toString());
      XDLMSContextInfo.setMaxReceivePduSize(((Number)Array.get(value,1)).intValue());
      XDLMSContextInfo.setMaxSendPpuSize(((Number)Array.get(value,2)).intValue());
      XDLMSContextInfo.setDlmsVersionNumber(((Number)Array.get(value,3)).intValue());
      XDLMSContextInfo.setQualityOfService(((Number)Array.get(value,4)).intValue());
      XDLMSContextInfo.setCypheringInfo((byte[])Array.get(value,5));
    }
  }
 else   if (index == 6) {
    if (value != null) {
      if (value instanceof byte[]) {
        int pos=-1;
        byte[] arr=(byte[])value;
        if (arr[0] == 0x60) {
          AuthenticationMechanismMame.setJointIsoCtt(0);
          ++pos;
          AuthenticationMechanismMame.setCountry(0);
          ++pos;
          AuthenticationMechanismMame.setCountryName(0);
          ++pos;
          AuthenticationMechanismMame.setIdentifiedOrganization(arr[++pos]);
          AuthenticationMechanismMame.setDlmsUA(arr[++pos]);
          AuthenticationMechanismMame.setAuthenticationMechanismName(arr[++pos]);
          AuthenticationMechanismMame.setMechanismId(Authentication.forValue(arr[++pos]));
        }
 else {
          if (arr[++pos] != 2 && arr[++pos] != 7) {
            throw new IllegalArgumentException();
          }
          if (arr[++pos] != 0x11) {
            throw new IllegalArgumentException();
          }
          AuthenticationMechanismMame.setJointIsoCtt(arr[++pos]);
          if (arr[++pos] != 0x11) {
            throw new IllegalArgumentException();
          }
          AuthenticationMechanismMame.setCountry(arr[++pos]);
          if (arr[++pos] != 0x12) {
            throw new IllegalArgumentException();
          }
          int[] tmp=new int[]{pos};
          AuthenticationMechanismMame.setCountryName(GXCommon.getUInt16(arr,tmp));
          pos=tmp[0];
          if (arr[++pos] != 0x11) {
            throw new IllegalArgumentException();
          }
          AuthenticationMechanismMame.setIdentifiedOrganization(arr[++pos]);
          if (arr[++pos] != 0x11) {
            throw new IllegalArgumentException();
          }
          AuthenticationMechanismMame.setDlmsUA(arr[++pos]);
          if (arr[++pos] != 0x11) {
            throw new IllegalArgumentException();
          }
          AuthenticationMechanismMame.setAuthenticationMechanismName(arr[++pos]);
          if (arr[++pos] != 0x11) {
            throw new IllegalArgumentException();
          }
          AuthenticationMechanismMame.setMechanismId(Authentication.forValue(arr[++pos]));
        }
      }
 else {
        if (value != null) {
          AuthenticationMechanismMame.setJointIsoCtt(((Number)Array.get(value,0)).intValue());
          AuthenticationMechanismMame.setCountry(((Number)Array.get(value,1)).intValue());
          AuthenticationMechanismMame.setCountryName(((Number)Array.get(value,2)).intValue());
          AuthenticationMechanismMame.setIdentifiedOrganization(((Number)Array.get(value,3)).intValue());
          AuthenticationMechanismMame.setDlmsUA(((Number)Array.get(value,4)).intValue());
          AuthenticationMechanismMame.setAuthenticationMechanismName(((Number)Array.get(value,5)).intValue());
          AuthenticationMechanismMame.setMechanismId(Authentication.forValue(((Number)Array.get(value,6)).intValue()));
        }
      }
    }
  }
 else   if (index == 7) {
    Secret=(byte[])value;
  }
 else   if (index == 8) {
    if (value == null) {
      setAssociationStatus(AssociationStatus.NonAssociated);
    }
 else {
      setAssociationStatus(AssociationStatus.values()[((Number)value).intValue()]);
    }
  }
 else   if (index == 9) {
    setSecuritySetupReference(GXDLMSObject.toLogicalName((byte[])value));
  }
 else {
    throw new IllegalArgumentException("String_Node_Str");
  }
}