Skip to content

Commit

Permalink
Merge pull request #34 from coinse/dev_feb
Browse files Browse the repository at this point in the history
dev_feb
  • Loading branch information
jaeyonglee0205 authored Feb 4, 2025
2 parents a72cbb6 + d1a0bed commit ed4a6ed
Show file tree
Hide file tree
Showing 44 changed files with 2,195 additions and 1,031 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Check for new bugs

on:
schedule:
- cron: "0 0 1 * *"
- cron: "0 0 1 */3 *"
jobs:
auto-collect:
runs-on: ubuntu-latest
Expand All @@ -25,7 +25,7 @@ jobs:
id: script
run: |
current_date=$(date -u "+%Y-%m-%d")
previous_date=$(date -u -d "$current_date" -d "6 months ago" "+%Y-%m-%d")
previous_date=$(date -u -d "3 months ago" "+%Y-%m-%d")
o_list=$(python collect_raw_data.py -t ${{ secrets.GITHUB_TOKEN }} -f data/existing_repos.json -d $previous_date -e)
echo $o_list >> body_1.txt
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,27 @@ of training data contamination.

## Available Bugs

As of July 1st, 2024:
As of February 1st, 2025:

| Project | Bugs | Deprecated |
| ------- | ---- | ---------- |
| fastjson | 1 | 0 |
| nacos | 6 | 0 |
| dubbo | 1 | 0 |
| rocketmq | 28 | 0 |
| rocketmq | 35 | 0 |
| assertj | 4 | 0 |
| checkstyle | 21 | 1 |
| jackson-core | 3 | 0 |
| jackson-databind | 7 | 0 |
| jackson-databind | 8 | 0 |
| jackson-dataformat-xml | 1 | 0 |
| gson | 12 | 0 |
| sslcontext-kickstart | 7 | 0 |
| jsoup | 5 | 0 |
| openapi-generator | 9 | 0 |
| openapi-generator | 11 | 0 |
| seata | 2 | 0 |
| retrofit | 1 | 0 |
| Apktool | 1 | 0 |
| **Total** | **107** | **1** |
| **Total** | **119** | **1** |

## Setting up GHRB

Expand Down Expand Up @@ -155,7 +155,7 @@ The current script is specifically designed for the automated pipeline for maint

## Maintenance

~~The current workflow is implemented to collect new reproducible bugs from the existing repositories at first day of each month.~~
The current workflow is implemented to collect new reproducible bugs from the existing repositories at first day of every three months.

## Publication

Expand Down
1 change: 1 addition & 0 deletions commit_db/jackson-databind_bugs.csv
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ bug_id,revision.id.buggy,revision.id.fixed,report.id,report.url
5,79423936840c469b9a8b54166a48efea8d8ba3a2,094f7b445d95a768c529e7d8305809cb9f500022,FasterXML_jackson-databind-4320,https://github.com/FasterXML/jackson-databind/issues/4309
6,e6145c3658b3f4ba7a01aff4c1cd211ad5701dc9,d6f0a9e1f3798643baa3fada27e6da02b970ec9c,FasterXML_jackson-databind-4467,https://github.com/FasterXML/jackson-databind/issues/4464
7,3ed7f4572534383e54f9fd0d2521131f64283410,7ae72a5195446350307c9f38ae0dc4e38eb4eaaa,FasterXML_jackson-databind-4641,https://github.com/FasterXML/jackson-databind/issues/4634
8,85f4b5507a6110404955aec117849bcbbd18231f,f59cb9a89fe8d3d4656c018ce764ac3f7fc5934b,FasterXML_jackson-databind-4684,https://github.com/FasterXML/jackson-databind/issues/4680
2 changes: 2 additions & 0 deletions commit_db/openapi-generator_bugs.csv
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ bug_id,revision.id.buggy,revision.id.fixed,report.id,report.url
7,45a657f59d73e5da1d33715272f6e98fe6f7174f,b2a7f435c824ad5a36ad46420c7cd92ccf5d4240,OpenAPITools_openapi-generator-18338,https://github.com/OpenAPITools/openapi-generator/issues/17276
8,1471e7a0d065e3da419b391758f6b022b625a290,c7b33c47624230f88276399c83850b39d4eaed0a,OpenAPITools_openapi-generator-18379,https://github.com/OpenAPITools/openapi-generator/issues/18082
9,0768ddcd7c7bd8b03871486fd5f07ac0bb04d65a,e939d6d9f60c701601ad0accfa7c69b655c267d8,OpenAPITools_openapi-generator-18478,https://github.com/OpenAPITools/openapi-generator/issues/18477
10,474307675b9f1505fc7bd94eff6de63d9172cd02,d29196a1f0ad41fc17f5d4875650f87480d66a40,OpenAPITools_openapi-generator-20109,https://github.com/OpenAPITools/openapi-generator/issues/19039
11,e1549037438b698f5cf654b92f52c3b25065a63c,4b5dfc430e1ebf6fbe2f96c31fba177c122d0569,OpenAPITools_openapi-generator-20391,https://github.com/OpenAPITools/openapi-generator/issues/20390
7 changes: 7 additions & 0 deletions commit_db/rocketmq_bugs.csv
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,10 @@ bug_id,revision.id.buggy,revision.id.fixed,report.id,report.url
26,4be8fd43720c8635fe135404a7fd000c00bb2a15,d60198f621baac54bffb981d7a797a04dfa0bb5a,apache_rocketmq-8240,https://github.com/apache/rocketmq/issues/8239
27,86d59d2485b5fed162db3743e11c0902de3e34ad,8341c13d064c96e9ef70da4fcf17e49d3e1847f9,apache_rocketmq-8404,https://github.com/apache/rocketmq/issues/8402
28,71ec1eda49277a47815159cd3d118854c8dcb3c4,720c87e85dd95be8e56166a7f00c652ce0f1d458,apache_rocketmq-8585,https://github.com/apache/rocketmq/issues/8584
29,e5e38396ba32293b3bd40a5a40ff402d42dce928,71ec1eda49277a47815159cd3d118854c8dcb3c4,apache_rocketmq-8484,https://github.com/apache/rocketmq/issues/8483
30,e7eda2c95763a79921f39627e6a0fcbf3b8442c6,587e9767e93ed7734dac4cf2b2d64d61529128f1,apache_rocketmq-8654,https://github.com/apache/rocketmq/issues/8653
31,78575af0b8ddd409ea71facceb87c144951269ae,ae7179d75e11f469d68be05fbf556fde42c8a795,apache_rocketmq-8766,https://github.com/apache/rocketmq/issues/8765
32,e75554d5a8b7708d5a8a5ae9bd723b614f8adf7c,11f0002a3c85ae449d72f911b03b7b74e275b265,apache_rocketmq-8807,https://github.com/apache/rocketmq/issues/8806
33,804847e87765f835afa147887f9507b8a41ae08c,fb3b87da1bb3337039cc80d7a3fcf2dff4bd6ce3,apache_rocketmq-8986,https://github.com/apache/rocketmq/issues/8984
34,0548593b30466e527f0591e757e6efa204ab793d,9ce83452a62f3fb910454bab92c092c83d561bdb,apache_rocketmq-9101,https://github.com/apache/rocketmq/issues/9105
35,a3afb05cb32f6c63fe8af5aef7a86ad1a4d5797f,2538c3414d17604b930bcd52dba15edf210c4ab8,apache_rocketmq-9107,https://github.com/apache/rocketmq/issues/9106
183 changes: 183 additions & 0 deletions data/prod_diff/FasterXML_jackson-databind-4684.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
diff --git a/src/main/java/com/fasterxml/jackson/databind/deser/std/UntypedObjectDeserializer.java b/src/main/java/com/fasterxml/jackson/databind/deser/std/UntypedObjectDeserializer.java
index 3cf164fa79..7710adbc63 100644
--- a/src/main/java/com/fasterxml/jackson/databind/deser/std/UntypedObjectDeserializer.java
+++ b/src/main/java/com/fasterxml/jackson/databind/deser/std/UntypedObjectDeserializer.java
@@ -47,6 +47,13 @@ public class UntypedObjectDeserializer

protected JsonDeserializer<Object> _numberDeserializer;

+ /**
+ * Object.class may also have custom key deserializer
+ *
+ * @since 2.19
+ */
+ private KeyDeserializer _customKeyDeserializer;
+
/**
* If {@link java.util.List} has been mapped to non-default implementation,
* we'll store type here
@@ -73,7 +80,7 @@ public class UntypedObjectDeserializer
*/
@Deprecated
public UntypedObjectDeserializer() {
- this(null, null);
+ this(null, (JavaType) null);
}

public UntypedObjectDeserializer(JavaType listType, JavaType mapType) {
@@ -95,6 +102,7 @@ public class UntypedObjectDeserializer
_numberDeserializer = (JsonDeserializer<Object>) numberDeser;
_listType = base._listType;
_mapType = base._mapType;
+ _customKeyDeserializer = base._customKeyDeserializer;
_nonMerging = base._nonMerging;
}

@@ -111,9 +119,27 @@ public class UntypedObjectDeserializer
_numberDeserializer = base._numberDeserializer;
_listType = base._listType;
_mapType = base._mapType;
+ _customKeyDeserializer = base._customKeyDeserializer;
_nonMerging = nonMerging;
}

+ /**
+ * @since 2.19
+ */
+ protected UntypedObjectDeserializer(UntypedObjectDeserializer base,
+ KeyDeserializer keyDeser)
+ {
+ super(Object.class);
+ _mapDeserializer = base._mapDeserializer;
+ _listDeserializer = base._listDeserializer;
+ _stringDeserializer = base._stringDeserializer;
+ _numberDeserializer = base._numberDeserializer;
+ _listType = base._listType;
+ _mapType = base._mapType;
+ _nonMerging = base._nonMerging;
+ _customKeyDeserializer = keyDeser;
+ }
+
/*
/**********************************************************
/* Initialization
@@ -190,19 +216,32 @@ public class UntypedObjectDeserializer
// 14-Jun-2017, tatu: [databind#1625]: may want to block merging, for root value
boolean preventMerge = (property == null)
&& Boolean.FALSE.equals(ctxt.getConfig().getDefaultMergeable(Object.class));
+ // Since 2.19, 31-Aug-2024: [databind#4680] Allow custom key deserializer for Object.class
+ KeyDeserializer customKeyDeser = ctxt.findKeyDeserializer(ctxt.constructType(Object.class), property);
+ // but make sure to ignore standard/default key deserializer (perf optimization)
+ if (customKeyDeser != null) {
+ if (ClassUtil.isJacksonStdImpl(customKeyDeser)) {
+ customKeyDeser = null;
+ }
+ }
// 20-Apr-2014, tatu: If nothing custom, let's use "vanilla" instance,
// simpler and can avoid some of delegation
if ((_stringDeserializer == null) && (_numberDeserializer == null)
&& (_mapDeserializer == null) && (_listDeserializer == null)
+ && (customKeyDeser == null) // [databind#4680] Since 2.19 : Allow custom key deserializer for Object.class
&& getClass() == UntypedObjectDeserializer.class) {
return UntypedObjectDeserializerNR.instance(preventMerge);
}

+ UntypedObjectDeserializer deser = this;
if (preventMerge != _nonMerging) {
- return new UntypedObjectDeserializer(this, preventMerge);
+ deser = new UntypedObjectDeserializer(deser, preventMerge);
}
-
- return this;
+ // [databind#4680] Since 2.19 : Allow custom key deserializer for Object.class
+ if (customKeyDeser != null) {
+ deser = new UntypedObjectDeserializer(deser, customKeyDeser);
+ }
+ return deser;
}

/*
@@ -496,6 +535,7 @@ public class UntypedObjectDeserializer
// empty map might work; but caller may want to modify... so better just give small modifiable
return new LinkedHashMap<>(2);
}
+ key1 = _customDeserializeKey(key1, ctxt);
// minor optimization; let's handle 1 and 2 entry cases separately
// 24-Mar-2015, tatu: Ideally, could use one of 'nextXxx()' methods, but for
// that we'd need new method(s) in JsonDeserializer. So not quite yet.
@@ -508,6 +548,8 @@ public class UntypedObjectDeserializer
result.put(key1, value1);
return result;
}
+ key2 = _customDeserializeKey(key2, ctxt);
+
p.nextToken();
Object value2 = deserialize(p, ctxt);

@@ -521,6 +563,8 @@ public class UntypedObjectDeserializer
}
return result;
}
+ key = _customDeserializeKey(key, ctxt);
+
// And then the general case; default map size is 16
LinkedHashMap<String, Object> result = new LinkedHashMap<>();
result.put(key1, value1);
@@ -535,9 +579,9 @@ public class UntypedObjectDeserializer
final Object oldValue = result.put(key, newValue);
if (oldValue != null) {
return _mapObjectWithDups(p, ctxt, result, key, oldValue, newValue,
- p.nextFieldName());
+ _customDeserializeNullableKey(p.nextFieldName(), ctxt));
}
- } while ((key = p.nextFieldName()) != null);
+ } while ((key = _customDeserializeNullableKey(p.nextFieldName(), ctxt)) != null);
return result;
}

@@ -559,12 +603,44 @@ public class UntypedObjectDeserializer
if ((oldValue != null) && squashDups) {
_squashDups(result, key, oldValue, newValue);
}
- nextKey = p.nextFieldName();
+ nextKey = _customDeserializeNullableKey(p.nextFieldName(), ctxt);
}

return result;
}

+ /**
+ * Helper function to allow custom key deserialization without null handling.
+ * Similar to {@link #_customDeserializeNullableKey(String, DeserializationContext)}, but
+ * null handling is done by the caller.
+ *
+ * @returns Custom-deserialized key if both custom key deserializer is set.
+ * Otherwise the original key.
+ */
+ private final String _customDeserializeKey(String key, DeserializationContext ctxt) throws IOException {
+ if (_customKeyDeserializer != null) {
+ return (String) _customKeyDeserializer.deserializeKey(key, ctxt);
+ }
+ return key;
+ }
+
+ /**
+ * Helper function to allow custom key deserialization with null handling.
+ * Similar to {@link #_customDeserializeKey(String, DeserializationContext)}, but instead
+ * only returns custom-deserialized key if key is not null.
+ *
+ * @returns Custom-deserialized key if both custom key deserializer is set and key is not null.
+ * Otherwise the original key.
+ */
+ private final String _customDeserializeNullableKey(String key, DeserializationContext ctxt) throws IOException {
+ if (_customKeyDeserializer != null) {
+ if (key != null) {
+ return (String) _customKeyDeserializer.deserializeKey(key, ctxt);
+ }
+ }
+ return key;
+ }
+
@SuppressWarnings("unchecked")
private void _squashDups(final Map<String, Object> result, String key,
Object oldValue, Object newValue)
13 changes: 13 additions & 0 deletions data/prod_diff/OpenAPITools_openapi-generator-20109.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java
index 875c881a3970..69a0f3e80317 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java
@@ -477,7 +477,7 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
HashMap<String, String> tsImport = new HashMap<>();
// TVG: This is used as class name in the import statements of the model file
tsImport.put("classname", im);
- tsImport.put("filename", toModelFilename(im));
+ tsImport.put("filename", convertUsingFileNamingConvention(im));
tsImports.add(tsImport);
}
}
27 changes: 27 additions & 0 deletions data/prod_diff/OpenAPITools_openapi-generator-20391.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java
index a015dee2a21b..f1308e2b7e7d 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java
@@ -6524,6 +6524,9 @@ public class DefaultCodegen implements CodegenConfig {
// input.name => input_name
modifiable = this.sanitizeValue(modifiable, "\\.", "_", exceptions);

+ // input:name => input_name
+ modifiable = this.sanitizeValue(modifiable, ":", "_", exceptions);
+
// input-name => input_name
modifiable = this.sanitizeValue(modifiable, "-", "_", exceptions);

diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CrystalClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CrystalClientCodegen.java
index 684df587ffb5..422866c16b23 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CrystalClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CrystalClientCodegen.java
@@ -405,7 +405,7 @@ public class CrystalClientCodegen extends DefaultCodegen {
String[] parts = modelName.split("::");
ArrayList<String> new_parts = new ArrayList<String>();
for (String part : parts) {
- new_parts.add(sanitizeName(part));
+ new_parts.add(sanitizeName(part, "\\W", new ArrayList<>(List.of(":"))));
}
return String.join("::", new_parts);
}
52 changes: 52 additions & 0 deletions data/prod_diff/apache_rocketmq-8484.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
diff --git a/broker/src/main/java/org/apache/rocketmq/broker/client/ConsumerManager.java b/broker/src/main/java/org/apache/rocketmq/broker/client/ConsumerManager.java
index 9f838b5154..b1057e2a8d 100644
--- a/broker/src/main/java/org/apache/rocketmq/broker/client/ConsumerManager.java
+++ b/broker/src/main/java/org/apache/rocketmq/broker/client/ConsumerManager.java
@@ -145,8 +145,9 @@ public class ConsumerManager {
callConsumerIdsChangeListener(ConsumerGroupEvent.UNREGISTER, next.getKey());
}
}
-
- callConsumerIdsChangeListener(ConsumerGroupEvent.CHANGE, next.getKey(), info.getAllChannel());
+ if (!isBroadcastMode(info.getMessageModel())) {
+ callConsumerIdsChangeListener(ConsumerGroupEvent.CHANGE, next.getKey(), info.getAllChannel());
+ }
}
}
return removed;
@@ -196,7 +197,7 @@ public class ConsumerManager {
}

if (r1 || r2) {
- if (isNotifyConsumerIdsChangedEnable) {
+ if (isNotifyConsumerIdsChangedEnable && !isBroadcastMode(consumerGroupInfo.getMessageModel())) {
callConsumerIdsChangeListener(ConsumerGroupEvent.CHANGE, group, consumerGroupInfo.getAllChannel());
}
}
@@ -219,7 +220,7 @@ public class ConsumerManager {
consumerGroupInfo = prev != null ? prev : tmp;
}
boolean updateChannelRst = consumerGroupInfo.updateChannel(clientChannelInfo, consumeType, messageModel, consumeFromWhere);
- if (updateChannelRst && isNotifyConsumerIdsChangedEnable) {
+ if (updateChannelRst && isNotifyConsumerIdsChangedEnable && !isBroadcastMode(consumerGroupInfo.getMessageModel())) {
callConsumerIdsChangeListener(ConsumerGroupEvent.CHANGE, group, consumerGroupInfo.getAllChannel());
}
if (null != this.brokerStatsManager) {
@@ -244,7 +245,7 @@ public class ConsumerManager {
callConsumerIdsChangeListener(ConsumerGroupEvent.UNREGISTER, group);
}
}
- if (isNotifyConsumerIdsChangedEnable) {
+ if (isNotifyConsumerIdsChangedEnable && !isBroadcastMode(consumerGroupInfo.getMessageModel())) {
callConsumerIdsChangeListener(ConsumerGroupEvent.CHANGE, group, consumerGroupInfo.getAllChannel());
}
}
@@ -334,4 +335,8 @@ public class ConsumerManager {
}
}
}
+
+ private boolean isBroadcastMode(final MessageModel messageModel) {
+ return MessageModel.BROADCASTING.equals(messageModel);
+ }
}
Loading

0 comments on commit ed4a6ed

Please sign in to comment.