<commit_before>--- ../../src-unpatched/trunk/org/jivesoftware/smack/util/PacketParserUtils.java	2009-12-06 19:45:45.000000000 +0100
+++ org/jivesoftware/smack/util/PacketParserUtils.java	2009-12-06 19:48:13.000000000 +0100
@@ -25,7 +25,6 @@
 import org.jivesoftware.smack.provider.ProviderManager;
 import org.xmlpull.v1.XmlPullParser;
 
-import java.beans.PropertyDescriptor;
 import java.io.ByteArrayInputStream;
 import java.io.ObjectInputStream;
 import java.util.ArrayList;
@@ -433,14 +432,14 @@
             if (eventType == XmlPullParser.START_TAG) {
                 String name = parser.getName();
                 String stringValue = parser.nextText();
-                PropertyDescriptor descriptor = new PropertyDescriptor(name, objectClass);
-                // Load the class type of the property.
-                Class propertyType = descriptor.getPropertyType();
+                Class propertyType = object.getClass().getMethod(
+                    "get" + Character.toUpperCase(name.charAt(0)) + name.substring(1)).getReturnType();
                 // Get the value of the property by converting it from a
                 // String to the correct object type.
                 Object value = decode(propertyType, stringValue);
                 // Set the value of the bean.
-                descriptor.getWriteMethod().invoke(object, value);
+                object.getClass().getMethod("set" + Character.toUpperCase(name.charAt(0)) + name.substring(1), propertyType)
+                .invoke(object, value);
             }
             else if (eventType == XmlPullParser.END_TAG) {
                 if (parser.getName().equals(elementName)) {
<commit_msg>Fixed patch 22 to apply on new smack trunk/head<commit_after>--- ../../src-unpatched/trunk/org/jivesoftware/smack/util/PacketParserUtils.java	2009-12-06 19:45:45.000000000 +0100
+++ org/jivesoftware/smack/util/PacketParserUtils.java	2009-12-06 19:48:13.000000000 +0100
@@ -25,7 +25,6 @@
 import org.jivesoftware.smack.provider.ProviderManager;
 import org.xmlpull.v1.XmlPullParser;
 
-import java.beans.PropertyDescriptor;
 import java.io.ByteArrayInputStream;
 import java.io.ObjectInputStream;
 import java.util.ArrayList;
@@ -828,14 +827,14 @@
             if (eventType == XmlPullParser.START_TAG) {
                 String name = parser.getName();
                 String stringValue = parser.nextText();
-                PropertyDescriptor descriptor = new PropertyDescriptor(name, objectClass);
-                // Load the class type of the property.
-                Class<?> propertyType = descriptor.getPropertyType();
+                Class propertyType = object.getClass().getMethod(
+                    "get" + Character.toUpperCase(name.charAt(0)) + name.substring(1)).getReturnType();
                 // Get the value of the property by converting it from a
                 // String to the correct object type.
                 Object value = decode(propertyType, stringValue);
                 // Set the value of the bean.
-                descriptor.getWriteMethod().invoke(object, value);
+                object.getClass().getMethod("set" + Character.toUpperCase(name.charAt(0)) + name.substring(1), propertyType)
+                .invoke(object, value);
             }
             else if (eventType == XmlPullParser.END_TAG) {
                 if (parser.getName().equals(elementName)) {

{'fraction_non_alphanumeric': 0.11958762886597939, 'fraction_numerical': 0.04477172312223859, 'mean_word_length': 2.3623762376237623, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 4, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1446888', 'n_tokens_mistral': 1029, 'n_tokens_neox': 907, 'n_words': 200}