test_class.file: tigase-server 7.1.0/src/test/java/tigase/xmpp/impl/roster/RosterElementTest.java
test_class.identifier: RosterElementTest
test_case.body: @Test
  	public void testSetName() {
  		RosterElement e = new RosterElement(JID.jidInstanceNS("a@b.c"), null, new String[] {}, null);
  		assertNull(e.getName());
  		assertTrue(e.isModified());
  
  		e.getRosterElement();
  		assertFalse(e.isModified());
  
  		e.setName(null);
  		assertFalse(e.isModified());
  		assertNull(e.getName());
  
  		e.setName("jeff");
  		assertTrue(e.isModified());
  		assertEquals("jeff", e.getName());
  
  		e.getRosterElement();
  		assertFalse(e.isModified());
  
  		e.setName("jeff");
  		assertFalse(e.isModified());
  		assertEquals("jeff", e.getName());
  
  		e.setName("bob");
  		assertTrue(e.isModified());
  		assertEquals("bob", e.getName());
  
  		e.getRosterElement();
  		assertFalse(e.isModified());
  
  		e.setName(null);
  		assertTrue(e.isModified());
  		assertNull(e.getName());
  
  		e.getRosterElement();
  		assertFalse(e.isModified());
  
  		e.setName(null);
  		assertFalse(e.isModified());
  		assertNull(e.getName());
  	}
test_case.class_method_signature: RosterElementTest.testSetName()
test_case.full_signature: @Test public void testSetName()
test_case.identifier: testSetName
test_case.invocations: jidInstanceNS assertNull getName assertTrue isModified getRosterElement assertFalse isModified setName assertFalse isModified assertNull getName setName assertTrue isModified assertEquals getName getRosterElement assertFalse isModified setName assertFalse isModified assertEquals getName setName assertTrue isModified assertEquals getName getRosterElement assertFalse isModified setName assertTrue isModified assertNull getName getRosterElement assertFalse isModified setName assertFalse isModified assertNull getName
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSetName()
focal_class.declarator: INITIAL_LAST_SEEN_VAL = 1000l
focal_class.modifier: protected static final
focal_class.original_string: protected static final long INITIAL_LAST_SEEN_VAL = 1000l;
focal_class.type: long
focal_class.var_name: INITIAL_LAST_SEEN_VAL
focal_class.declarator: ACTIVITY_ATT          = "activity"
focal_class.modifier: private static final
focal_class.original_string: private static final String ACTIVITY_ATT          = "activity";
focal_class.type: String
focal_class.var_name: ACTIVITY_ATT
focal_class.declarator: ELEM_NAME             = "contact"
focal_class.modifier: private static final
focal_class.original_string: private static final String ELEM_NAME             = "contact";
focal_class.type: String
focal_class.var_name: ELEM_NAME
focal_class.declarator: GRP_ATT               = "groups"
focal_class.modifier: private static final
focal_class.original_string: private static final String GRP_ATT               = "groups";
focal_class.type: String
focal_class.var_name: GRP_ATT
focal_class.declarator: INITIAL_ACTIVITY_VAL  = 1d
focal_class.modifier: private static final
focal_class.original_string: private static final double INITIAL_ACTIVITY_VAL  = 1d;
focal_class.type: double
focal_class.var_name: INITIAL_ACTIVITY_VAL
focal_class.declarator: INITIAL_WEIGHT_VAL    = 1d
focal_class.modifier: private static final
focal_class.original_string: private static final double INITIAL_WEIGHT_VAL    = 1d;
focal_class.type: double
focal_class.var_name: INITIAL_WEIGHT_VAL
focal_class.declarator: JID_ATT               = "jid"
focal_class.modifier: private static final
focal_class.original_string: private static final String JID_ATT               = "jid";
focal_class.type: String
focal_class.var_name: JID_ATT
focal_class.declarator: LAST_SEEN_ATT         = "last-seen"
focal_class.modifier: private static final
focal_class.original_string: private static final String LAST_SEEN_ATT         = "last-seen";
focal_class.type: String
focal_class.var_name: LAST_SEEN_ATT
focal_class.declarator: log                   =
  		Logger.getLogger(RosterElement.class.getName())
focal_class.modifier: private static final
focal_class.original_string: private static final Logger log                   =
  		Logger.getLogger(RosterElement.class.getName());
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: NAME_ATT              = "name"
focal_class.modifier: private static final
focal_class.original_string: private static final String NAME_ATT              = "name";
focal_class.type: String
focal_class.var_name: NAME_ATT
focal_class.declarator: OTHER_ATT             = "other"
focal_class.modifier: private static final
focal_class.original_string: private static final String OTHER_ATT             = "other";
focal_class.type: String
focal_class.var_name: OTHER_ATT
focal_class.declarator: STRINGPREP_ATT        = "preped"
focal_class.modifier: private static final
focal_class.original_string: private static final String STRINGPREP_ATT        = "preped";
focal_class.type: String
focal_class.var_name: STRINGPREP_ATT
focal_class.declarator: SUBS_ATT              = "subs"
focal_class.modifier: private static final
focal_class.original_string: private static final String SUBS_ATT              = "subs";
focal_class.type: String
focal_class.var_name: SUBS_ATT
focal_class.declarator: WEIGHT_ATT            = "weight"
focal_class.modifier: private static final
focal_class.original_string: private static final String WEIGHT_ATT            = "weight";
focal_class.type: String
focal_class.var_name: WEIGHT_ATT
focal_class.declarator: groups                = null
focal_class.modifier: private
focal_class.original_string: private String[] groups                = null;
focal_class.type: String[]
focal_class.var_name: groups
focal_class.declarator: jid                        = null
focal_class.modifier: private
focal_class.original_string: private JID jid                        = null;
focal_class.type: JID
focal_class.var_name: jid
focal_class.declarator: name                    = null
focal_class.modifier: private
focal_class.original_string: private String name                    = null;
focal_class.type: String
focal_class.var_name: name
focal_class.declarator: otherData               = null
focal_class.modifier: private
focal_class.original_string: private String otherData               = null;
focal_class.type: String
focal_class.var_name: otherData
focal_class.declarator: lastSeen                  = INITIAL_LAST_SEEN_VAL
focal_class.modifier: private
focal_class.original_string: private long lastSeen                  = INITIAL_LAST_SEEN_VAL;
focal_class.type: long
focal_class.var_name: lastSeen
focal_class.declarator: activity                = INITIAL_ACTIVITY_VAL
focal_class.modifier: private
focal_class.original_string: private double activity                = INITIAL_ACTIVITY_VAL;
focal_class.type: double
focal_class.var_name: activity
focal_class.declarator: session = null
focal_class.modifier: private
focal_class.original_string: private XMPPResourceConnection session = null;
focal_class.type: XMPPResourceConnection
focal_class.var_name: session
focal_class.declarator: stringpreped            = null
focal_class.modifier: private
focal_class.original_string: private String stringpreped            = null;
focal_class.type: String
focal_class.var_name: stringpreped
focal_class.declarator: subscription  = null
focal_class.modifier: private
focal_class.original_string: private SubscriptionType subscription  = null;
focal_class.type: SubscriptionType
focal_class.var_name: subscription
focal_class.declarator: weight                  = INITIAL_WEIGHT_VAL
focal_class.modifier: private
focal_class.original_string: private double weight                  = INITIAL_WEIGHT_VAL;
focal_class.type: double
focal_class.var_name: weight
focal_class.declarator: presence_sent          = false
focal_class.modifier: private
focal_class.original_string: private boolean presence_sent          = false;
focal_class.type: boolean
focal_class.var_name: presence_sent
focal_class.declarator: persistent             = true
focal_class.modifier: private
focal_class.original_string: private boolean persistent             = true;
focal_class.type: boolean
focal_class.var_name: persistent
focal_class.declarator: onlineMap = new ConcurrentHashMap<String, Boolean>()
focal_class.modifier: private
focal_class.original_string: private Map<String, Boolean> onlineMap = new ConcurrentHashMap<String, Boolean>();
focal_class.type: Map<String, Boolean>
focal_class.var_name: onlineMap
focal_class.declarator: modified = false
focal_class.modifier: private
focal_class.original_string: private boolean modified = false;
focal_class.type: boolean
focal_class.var_name: modified
focal_class.file: tigase-server 7.1.0/src/main/java/tigase/xmpp/impl/roster/RosterElement.java
focal_class.identifier: RosterElement
focal_class.class_method_signature: RosterElement.RosterElement(Element roster_el, XMPPResourceConnection session)
focal_class.full_signature: public  RosterElement(Element roster_el, XMPPResourceConnection session)
focal_class.identifier: RosterElement
focal_class.modifiers: public
focal_class.parameters: (Element roster_el, XMPPResourceConnection session)
focal_class.signature:  RosterElement(Element roster_el, XMPPResourceConnection session)
focal_class.class_method_signature: RosterElement.RosterElement(JID jid, String name, String[] groups,
  											 XMPPResourceConnection session)
focal_class.full_signature: public  RosterElement(JID jid, String name, String[] groups,
  											 XMPPResourceConnection session)
focal_class.identifier: RosterElement
focal_class.modifiers: public
focal_class.parameters: (JID jid, String name, String[] groups,
  											 XMPPResourceConnection session)
focal_class.signature:  RosterElement(JID jid, String name, String[] groups,
  											 XMPPResourceConnection session)
focal_class.class_method_signature: RosterElement.addGroups(String[] groups)
focal_class.full_signature: public void addGroups(String[] groups)
focal_class.identifier: addGroups
focal_class.modifiers: public
focal_class.parameters: (String[] groups)
focal_class.return: void
focal_class.signature: void addGroups(String[] groups)
focal_class.class_method_signature: RosterElement.getGroups()
focal_class.full_signature: public String[] getGroups()
focal_class.identifier: getGroups
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String[]
focal_class.signature: String[] getGroups()
focal_class.class_method_signature: RosterElement.getJid()
focal_class.full_signature: public JID getJid()
focal_class.identifier: getJid
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: JID
focal_class.signature: JID getJid()
focal_class.class_method_signature: RosterElement.getName()
focal_class.full_signature: public String getName()
focal_class.identifier: getName
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getName()
focal_class.class_method_signature: RosterElement.getOtherData()
focal_class.full_signature: public String getOtherData()
focal_class.identifier: getOtherData
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getOtherData()
focal_class.class_method_signature: RosterElement.getRosterElement()
focal_class.full_signature: public Element getRosterElement()
focal_class.identifier: getRosterElement
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Element
focal_class.signature: Element getRosterElement()
focal_class.class_method_signature: RosterElement.getRosterItem()
focal_class.full_signature: public Element getRosterItem()
focal_class.identifier: getRosterItem
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Element
focal_class.signature: Element getRosterItem()
focal_class.class_method_signature: RosterElement.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_class.class_method_signature: RosterElement.getSubscription()
focal_class.full_signature: public SubscriptionType getSubscription()
focal_class.identifier: getSubscription
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: SubscriptionType
focal_class.signature: SubscriptionType getSubscription()
focal_class.class_method_signature: RosterElement.isModified()
focal_class.full_signature: public boolean isModified()
focal_class.identifier: isModified
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isModified()
focal_class.class_method_signature: RosterElement.isOnline()
focal_class.full_signature: public boolean isOnline()
focal_class.identifier: isOnline
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isOnline()
focal_class.class_method_signature: RosterElement.isPresence_sent()
focal_class.full_signature: public boolean isPresence_sent()
focal_class.identifier: isPresence_sent
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isPresence_sent()
focal_class.class_method_signature: RosterElement.setGroups(String[] groups)
focal_class.full_signature: public final void setGroups(String[] groups)
focal_class.identifier: setGroups
focal_class.modifiers: public final
focal_class.parameters: (String[] groups)
focal_class.return: void
focal_class.signature: void setGroups(String[] groups)
focal_class.class_method_signature: RosterElement.setName(final String name)
focal_class.full_signature: public final void setName(final String name)
focal_class.identifier: setName
focal_class.modifiers: public final
focal_class.parameters: (final String name)
focal_class.return: void
focal_class.signature: void setName(final String name)
focal_class.class_method_signature: RosterElement.setOnline(String resource, boolean online)
focal_class.full_signature: public void setOnline(String resource, boolean online)
focal_class.identifier: setOnline
focal_class.modifiers: public
focal_class.parameters: (String resource, boolean online)
focal_class.return: void
focal_class.signature: void setOnline(String resource, boolean online)
focal_class.class_method_signature: RosterElement.setOtherData(String other_data)
focal_class.full_signature: public void setOtherData(String other_data)
focal_class.identifier: setOtherData
focal_class.modifiers: public
focal_class.parameters: (String other_data)
focal_class.return: void
focal_class.signature: void setOtherData(String other_data)
focal_class.class_method_signature: RosterElement.setPresence_sent(boolean presence_sent)
focal_class.full_signature: public void setPresence_sent(boolean presence_sent)
focal_class.identifier: setPresence_sent
focal_class.modifiers: public
focal_class.parameters: (boolean presence_sent)
focal_class.return: void
focal_class.signature: void setPresence_sent(boolean presence_sent)
focal_class.class_method_signature: RosterElement.setSubscription(SubscriptionType subscription)
focal_class.full_signature: public void setSubscription(SubscriptionType subscription)
focal_class.identifier: setSubscription
focal_class.modifiers: public
focal_class.parameters: (SubscriptionType subscription)
focal_class.return: void
focal_class.signature: void setSubscription(SubscriptionType subscription)
focal_class.class_method_signature: RosterElement.setJid(JID jid)
focal_class.full_signature: private void setJid(JID jid)
focal_class.identifier: setJid
focal_class.modifiers: private
focal_class.parameters: (JID jid)
focal_class.return: void
focal_class.signature: void setJid(JID jid)
focal_class.class_method_signature: RosterElement.setJid(String jid)
focal_class.full_signature: private void setJid(String jid)
focal_class.identifier: setJid
focal_class.modifiers: private
focal_class.parameters: (String jid)
focal_class.return: void
focal_class.signature: void setJid(String jid)
focal_class.class_method_signature: RosterElement.isPersistent()
focal_class.full_signature: public boolean isPersistent()
focal_class.identifier: isPersistent
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isPersistent()
focal_class.class_method_signature: RosterElement.setPersistent(boolean persistent)
focal_class.full_signature: public void setPersistent(boolean persistent)
focal_class.identifier: setPersistent
focal_class.modifiers: public
focal_class.parameters: (boolean persistent)
focal_class.return: void
focal_class.signature: void setPersistent(boolean persistent)
focal_class.class_method_signature: RosterElement.getActivity()
focal_class.full_signature: public double getActivity()
focal_class.identifier: getActivity
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: double
focal_class.signature: double getActivity()
focal_class.class_method_signature: RosterElement.setActivity(double activity)
focal_class.full_signature: public void setActivity(double activity)
focal_class.identifier: setActivity
focal_class.modifiers: public
focal_class.parameters: (double activity)
focal_class.return: void
focal_class.signature: void setActivity(double activity)
focal_class.class_method_signature: RosterElement.getWeight()
focal_class.full_signature: public double getWeight()
focal_class.identifier: getWeight
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: double
focal_class.signature: double getWeight()
focal_class.class_method_signature: RosterElement.setWeight(double weight)
focal_class.full_signature: public void setWeight(double weight)
focal_class.identifier: setWeight
focal_class.modifiers: public
focal_class.parameters: (double weight)
focal_class.return: void
focal_class.signature: void setWeight(double weight)
focal_class.class_method_signature: RosterElement.getLastSeen()
focal_class.full_signature: public long getLastSeen()
focal_class.identifier: getLastSeen
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long getLastSeen()
focal_class.class_method_signature: RosterElement.setLastSeen(long lastSeen)
focal_class.full_signature: public void setLastSeen(long lastSeen)
focal_class.identifier: setLastSeen
focal_class.modifiers: public
focal_class.parameters: (long lastSeen)
focal_class.return: void
focal_class.signature: void setLastSeen(long lastSeen)
focal_method.body: public final void setName(final String name) {
  		if(name==this.name || (name!=null && this.name!=null && name.equals(this.name))){
  			return ;
  		} else {
  			this.name = name==null?null:XMLUtils.unescape(name);
  			this.modified = true;
  		}
  		
  		
  
  			
  		
  		
  		
  //		String old_name = this.name;
  //		if (name == null) {
  //			this.name = this.jid.getLocalpart();
  //			if ((this.name == null) || this.name.trim().isEmpty()) {
  //				this.name = this.jid.getBareJID().toString();
  //			}
  //		} else {
  //			this.name = XMLUtils.unescape(name);
  //		}
  //		if (!this.name.equals(old_name)) {
  //			modified = true;
  //		}
  	}
focal_method.class_method_signature: RosterElement.setName(final String name)
focal_method.full_signature: public final void setName(final String name)
focal_method.identifier: setName
focal_method.invocations: equals unescape
focal_method.modifiers: public final
focal_method.parameters: (final String name)
focal_method.return: void
focal_method.signature: void setName(final String name)