Dataset Viewer
Auto-converted to Parquet Duplicate
before_code
stringlengths
30
149k
reviewer_comment
stringlengths
16
20.6k
after_code
stringlengths
30
163k
diff_context
stringlengths
0
22.4k
file_path
stringlengths
6
155
comment_line
int64
0
26
language
stringclasses
19 values
quality_score
float64
0.07
1
comment_type
stringclasses
9 values
comment_length
int64
16
20.6k
before_lines
int64
2
4.61k
after_lines
int64
2
4.4k
is_negative
bool
2 classes
pr_title
stringlengths
7
140
pr_number
int64
18
61.2k
repo_name
stringclasses
29 values
repo_stars
int64
321
56k
repo_language
stringclasses
14 values
reviewer_username
stringclasses
378 values
author_username
stringclasses
739 values
user
stringlengths
361
200k
assistant
stringlengths
16
20.6k
system
stringclasses
1 value
this.owner.setHeight(bottom - top); } if (this._leftEdgeAnchor !== HorizontalAnchor.None) { this.owner.setX( left + this.owner.getX() - this.owner.getDrawableX() ); } if (this._topEdgeAnchor !== VerticalAnchor.None) { ...
Should we had `if (this.owner.getX() === this.owner.getDrawableX())` to avoid extra computations 90% of the time at the cost of the `if`?
this.owner.setHeight(bottom - top); } if (this._leftEdgeAnchor !== HorizontalAnchor.None) { this.owner.setX( left + this.owner.getX() - this.owner.getDrawableX() ); } if (this._topEdgeAnchor !== VerticalAnchor.None) { ...
@@ -270,8 +270,13 @@ namespace gdjs { this._rightEdgeAnchor !== HorizontalAnchor.None && this._leftEdgeAnchor !== HorizontalAnchor.None ) { - this.owner.setWidth(right - left); - this.owner.setX(left); + const width = right - left; + this....
Extensions/AnchorBehavior/anchorruntimebehavior.ts
26
TypeScript
0.571
question
137
51
51
false
Fix anchor behavior when objects has custom origin
6,970
4ian/GDevelop
10,154
JavaScript
D8H
D8H
Review this pull request change. Language: TypeScript File: Extensions/AnchorBehavior/anchorruntimebehavior.ts PR Title: Fix anchor behavior when objects has custom origin BEFORE CODE: this.owner.setHeight(bottom - top); } if (this._leftEdgeAnchor !== HorizontalAnchor.None) { ...
Should we had `if (this.owner.getX() === this.owner.getDrawableX())` to avoid extra computations 90% of the time at the cost of the `if`?
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
} setCustomCenter(customCenterX, customCenterY) { this._customCenterX = customCenterX; this._customCenterY = customCenterY; this.invalidateHitboxes(); } getRendererObject() { return null; } getWidth() { return this._customWidth; } getHeight() { return this._customHeight; } ...
```suggestion this._customHeight = height; ```
} setCustomCenter(customCenterX, customCenterY) { this._customCenterX = customCenterX; this._customCenterY = customCenterY; this.invalidateHitboxes(); } getRendererObject() { return null; } getWidth() { return this._customWidth; } getHeight() { return this._customHeight; } ...
@@ -62,6 +62,14 @@ return this._customHeight; } + setWidth(width) { + this._customWidth = width; + } + + setHeight(height) { + return this._customHeight = height;
GDJS/tests/tests/Extensions/testspriteruntimeobject.js
26
JavaScript
0.571
suggestion
51
41
41
false
Fix anchor behavior when objects has custom origin
6,970
4ian/GDevelop
10,154
JavaScript
4ian
D8H
Review this pull request change. Language: JavaScript File: GDJS/tests/tests/Extensions/testspriteruntimeobject.js PR Title: Fix anchor behavior when objects has custom origin BEFORE CODE: } setCustomCenter(customCenterX, customCenterY) { this._customCenterX = customCenterX; this._customCenterY = custo...
```suggestion this._customHeight = height; ```
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
* sub-expression that a given node represents. */ static const gd::String GetType(const gd::Platform &platform, const gd::ProjectScopedContainers &projectScopedContainers, const gd::String &rootType, gd::ExpressionNode& node) { gd::Expression...
This doesn't change anything. It's just to navigate more easily without going through deprecated functions.
* sub-expression that a given node represents. */ static const gd::String GetType(const gd::Platform &platform, const gd::ProjectScopedContainers &projectScopedContainers, const gd::String &rootType, gd::ExpressionNode& node) { gd::Expression...
@@ -72,7 +72,7 @@ class GD_CORE_API ExpressionTypeFinder : public ExpressionParser2NodeWorker { child(nullptr) {}; const gd::String &GetType() { - return gd::ParameterMetadata::GetExpressionValueType(type); + return gd::ValueTypeMetadata::GetExpressionPrimitiveValueType(type);
Core/GDCore/IDE/Events/ExpressionTypeFinder.h
26
C/C++
0.429
suggestion
107
51
51
false
Fix mouse and key parameters for event-functions
7,052
4ian/GDevelop
10,154
JavaScript
D8H
D8H
Review this pull request change. Language: C/C++ File: Core/GDCore/IDE/Events/ExpressionTypeFinder.h PR Title: Fix mouse and key parameters for event-functions BEFORE CODE: * sub-expression that a given node represents. */ static const gd::String GetType(const gd::Platform &platform, c...
This doesn't change anything. It's just to navigate more easily without going through deprecated functions.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
case 'RotateCamera': case 'ZoomCamera': case 'FixCamera': case 'CentreCamera': return ['smooth-camera-movement']; case 'ChangeTimeScale': return ['pause-menu']; case 'EcrireFichierExp': case 'EcrireFichierTxt': case 'LireFichierExp': case 'LireFichierTxt': case 'ReadN...
```suggestion return ['intermediate-toggle-states-with-variable']; ```
case 'RotateCamera': case 'ZoomCamera': case 'FixCamera': case 'CentreCamera': return ['smooth-camera-movement']; case 'ChangeTimeScale': return ['pause-menu']; case 'EcrireFichierExp': case 'EcrireFichierTxt': case 'LireFichierExp': case 'LireFichierTxt': case 'ReadN...
@@ -124,6 +126,8 @@ export const getInstructionTutorialIds = (type: string): Array<string> => { case 'ToggleObjectVariableAsBoolean': case 'ToggleGlobalVariableAsBoolean': case 'ToggleSceneVariableAsBoolean': + case 'SetBooleanObjectVariable': + case 'SetBooleanVariable': return ['iIntermedi...
newIDE/app/src/Utils/GDevelopServices/Tutorial.js
26
JavaScript
0.571
suggestion
78
49
49
false
Add tutorial bubbles on actions replacing deprecated ones
7,077
4ian/GDevelop
10,154
JavaScript
AlexandreSi
D8H
Review this pull request change. Language: JavaScript File: newIDE/app/src/Utils/GDevelopServices/Tutorial.js PR Title: Add tutorial bubbles on actions replacing deprecated ones BEFORE CODE: case 'RotateCamera': case 'ZoomCamera': case 'FixCamera': case 'CentreCamera': return ['smooth-camera-m...
```suggestion return ['intermediate-toggle-states-with-variable']; ```
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// @flow export default function getObjectByName( globalObjectsContainer: gdObjectsContainer | null, objectsContainer?: ?gdObjectsContainer, objectName: string ): ?gdObject { if (objectsContainer && objectsContainer.hasObjectNamed(objectName)) return objectsContainer.getObject(objectName); else if ( ...
`ObjectsContainersList` should be used instead. You can pass a `ProjectScopedContainersAccessor` to your component.
// @flow export default function getObjectByName( globalObjectsContainer: gdObjectsContainer | null, objectsContainer?: ?gdObjectsContainer, objectName: string ): ?gdObject { if (objectsContainer && objectsContainer.hasObjectNamed(objectName)) return objectsContainer.getObject(objectName); else if ( ...
@@ -15,3 +15,18 @@ export default function getObjectByName( return null; } + +export const hasObjectWithName = ( + globalObjectsContainer: gdObjectsContainer | null, + objectsContainer?: ?gdObjectsContainer, + objectName: string +): boolean => {
newIDE/app/src/Utils/GetObjectByName.js
23
JavaScript
0.571
suggestion
115
33
18
false
Fix instances paste from a scene to another
7,105
4ian/GDevelop
10,154
JavaScript
D8H
AlexandreSi
Review this pull request change. Language: JavaScript File: newIDE/app/src/Utils/GetObjectByName.js PR Title: Fix instances paste from a scene to another BEFORE CODE: // @flow export default function getObjectByName( globalObjectsContainer: gdObjectsContainer | null, objectsContainer?: ?gdObjectsContainer, o...
`ObjectsContainersList` should be used instead. You can pass a `ProjectScopedContainersAccessor` to your component.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
> <QuickPublish project={testProject.project} gameAndBuildsManager={fakeEmptyGameAndBuildsManager} isSavingProject={false} isRequiredToSaveAsNewCloudProject={() => // Indicates that the project is already saved, there will be // no need to sa...
I feel like this comment should be next to the props type in QuickPublish. I was not sure what it meant before reading this comment
onClose={action('onClose')} onContinueQuickCustomization={action('onContinueQuickCustomization')} onTryAnotherGame={action('onTryAnotherGame')} /> </AuthenticatedUserContext.Provider> </Template> ); }; export const AuthenticatedWithCloudProjectsMaximumReachedButSavedAl...
@@ -119,6 +124,39 @@ export const AuthenticatedWithTooManyCloudProjects = () => { </Template> ); }; + +export const AuthenticatedWithCloudProjectsMaximumReachedButSavedAlready = () => { + return ( + <Template> + <AuthenticatedUserContext.Provider + value={{ + ...fakeAuthenticatedUserWi...
newIDE/app/src/stories/componentStories/QuickCustomization/QuickPublish.stories.js
26
JavaScript
0.571
suggestion
131
51
51
false
Fix issues when reworking a quick customization project
7,109
4ian/GDevelop
10,154
JavaScript
AlexandreSi
4ian
Review this pull request change. Language: JavaScript File: newIDE/app/src/stories/componentStories/QuickCustomization/QuickPublish.stories.js PR Title: Fix issues when reworking a quick customization project BEFORE CODE: > <QuickPublish project={testProject.project} gameAndBuildsM...
I feel like this comment should be next to the props type in QuickPublish. I was not sure what it meant before reading this comment
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
if (!selectedItem) return; if (selectedItem.content.isDescendantOf(item.content)) { selectObjectFolderOrObjectWithContext(null); } }, [selectObjectFolderOrObjectWithContext, selectedItems] ); // Force List component to be mounted again if project or objectsContaine...
Removing the column, you removed the margin, you should maybe remove the `noMargin` in the child Column
* does not stay selected and not visible to the user. */ const onCollapseItem = React.useCallback( (item: TreeViewItem) => { if (!selectedItems || selectedItems.length !== 1) return; const selectedItem = selectedItems[0]; if (!selectedItem) return; if (selectedItem.co...
@@ -1363,28 +1393,16 @@ const ObjectsList = React.forwardRef<Props, ObjectsListInterface>( return ( <Background maxWidth> - <Column>
newIDE/app/src/ObjectsList/index.js
26
JavaScript
0.571
suggestion
103
51
51
false
Replace the "add folder" button by a drop-down menu action
7,117
4ian/GDevelop
10,154
JavaScript
AlexandreSi
D8H
Review this pull request change. Language: JavaScript File: newIDE/app/src/ObjectsList/index.js PR Title: Replace the "add folder" button by a drop-down menu action BEFORE CODE: if (!selectedItem) return; if (selectedItem.content.isDescendantOf(item.content)) { selectObjectFolderOrObjectWi...
Removing the column, you removed the margin, you should maybe remove the `noMargin` in the child Column
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
this._injectExternalLayout ); this._watermark.displayAtStartup(); //Uncomment to profile the first x frames of the game. // var x = 500; // var startTime = Date.now(); // console.profile("Stepping for " + x + " frames") // for(var i = 0; i < x; ++i) { ...
This check should not exist, you should stop gameLoop before disposing of the renderer.
? firstSceneName : // There is always at least a scene this.getSceneAndExtensionsData()!.sceneData.name; } /** * Start the game loop, to be called once assets are loaded. */ startGameLoop() { this._throwIfDisposed(); try { if (!this.hasScene()) { ...
@@ -888,6 +889,10 @@ namespace gdjs { this._hasJustResumed = false; this._renderer.startGameLoop((lastCallElapsedTime) => { try { + if (this._isDisposed) { + return false; + }
GDJS/Runtime/runtimegame.ts
26
TypeScript
0.286
suggestion
87
51
51
false
Add dispose method to Runtimegame
7,118
4ian/GDevelop
10,154
JavaScript
malec-palec
danvervlad
Review this pull request change. Language: TypeScript File: GDJS/Runtime/runtimegame.ts PR Title: Add dispose method to Runtimegame BEFORE CODE: this._injectExternalLayout ); this._watermark.displayAtStartup(); //Uncomment to profile the first x frames of the game. // var ...
This check should not exist, you should stop gameLoop before disposing of the renderer.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
? !!navigator.maxTouchPoints && navigator.maxTouchPoints > 2 : false, supportedCompressionMethods: getSupportedCompressionMethods(), }; }; _setupGameVisibilityEvents() { if (typeof navigator !== 'undefined' && typeof document !== 'undefined') { document.addEv...
Remove this check, and clear the interval instead.
enableMetrics(enable: boolean): void { this._disableMetrics = !enable; if (enable) { this._setupSessionMetrics(); } } /** * Helper function to get information about the platform running the game. */ getPlatformInfo = () => { return { // @ts-ignore ...
@@ -989,6 +1005,10 @@ namespace gdjs { * time. */ _setupSessionMetrics() { + if (this._isDisposed) { + return; + }
GDJS/Runtime/runtimegame.ts
26
TypeScript
0.286
refactor
50
51
51
false
Add dispose method to Runtimegame
7,118
4ian/GDevelop
10,154
JavaScript
malec-palec
danvervlad
Review this pull request change. Language: TypeScript File: GDJS/Runtime/runtimegame.ts PR Title: Add dispose method to Runtimegame BEFORE CODE: ? !!navigator.maxTouchPoints && navigator.maxTouchPoints > 2 : false, supportedCompressionMethods: getSupportedCompressionMethods(), ...
Remove this check, and clear the interval instead.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
} catch (e) { if (this._debuggerClient) this._debuggerClient.onUncaughtException(e); throw e; } }); setTimeout(() => { this._setupSessionMetrics(); }, 4000); } catch (e) { if (this._debuggerClient) this._debuggerC...
What is the aim of this check? Calling the dispose method once is the responsibility of whoever created the game.
const elapsedTime = accumulatedElapsedTime; accumulatedElapsedTime = 0; // Manage resize events. if (this._notifyScenesForGameResolutionResize) { this._sceneStack.onGameResolutionResized(); this._notifyScenesForGameResolutionResize = false; ...
@@ -937,6 +942,17 @@ namespace gdjs { } } + dispose(): void { + if (this._isDisposed) { + return; + } + + this._isDisposed = true;
GDJS/Runtime/runtimegame.ts
26
TypeScript
0.357
question
113
51
51
false
Add dispose method to Runtimegame
7,118
4ian/GDevelop
10,154
JavaScript
malec-palec
danvervlad
Review this pull request change. Language: TypeScript File: GDJS/Runtime/runtimegame.ts PR Title: Add dispose method to Runtimegame BEFORE CODE: } catch (e) { if (this._debuggerClient) this._debuggerClient.onUncaughtException(e); throw e; } }); ...
What is the aim of this check? Calling the dispose method once is the responsibility of whoever created the game.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
newScene.networkId = sceneSyncData.networkId; } hasMadeChangeToStack = true; // Continue to the next scene in the stack received from the host. continue; } // The scene is in the stack and has the right networkId. // Nothing to do, just contin...
Use `for...of` or `forEach` because there is no logic with `i` involved.
debugLogger.info( `Scene at position ${i} and name ${sceneAtThisPositionInOurStack.getName()} has a different networkId ${ sceneAtThisPositionInOurStack.networkId } than the expected ${sceneSyncData.networkId}, replacing.` ); // The scene is in the sta...
@@ -354,5 +354,12 @@ namespace gdjs { return hasMadeChangeToStack; } + + dispose(): void { + for (let i = 0; i < this._stack.length; ++i) { + this._stack[i].unloadScene(); + }
GDJS/Runtime/scenestack.ts
26
TypeScript
0.429
suggestion
72
31
51
false
Add dispose method to Runtimegame
7,118
4ian/GDevelop
10,154
JavaScript
malec-palec
danvervlad
Review this pull request change. Language: TypeScript File: GDJS/Runtime/scenestack.ts PR Title: Add dispose method to Runtimegame BEFORE CODE: newScene.networkId = sceneSyncData.networkId; } hasMadeChangeToStack = true; // Continue to the next scene in the stack received f...
Use `for...of` or `forEach` because there is no logic with `i` involved.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
logger.error('Window closing failed. See error:', error); } } } else { if ( typeof navigator !== 'undefined' && // @ts-ignore navigator.app && // @ts-ignore navigator.app.exitApp ) { // @ts-ignore n...
Call `this._threeRenderer?.dispose();`.
} /** * Close the game, if applicable. */ stopGame() { // Try to detect the environment to use the most adapted // way of closing the app const remote = this.getElectronRemote(); if (remote) { const browserWindow = remote.getCurrentWindow(); if (browserWind...
@@ -924,6 +924,14 @@ namespace gdjs { // HTML5 games on mobile/browsers don't have a way to close their window/page. } + dispose() { + this._pixiRenderer?.destroy(true); + this._pixiRenderer = null; + this._threeRenderer = null;
GDJS/Runtime/pixi-renderers/runtimegame-pixi-renderer.ts
26
TypeScript
0.214
suggestion
39
51
51
false
Add dispose method to Runtimegame
7,118
4ian/GDevelop
10,154
JavaScript
malec-palec
danvervlad
Review this pull request change. Language: TypeScript File: GDJS/Runtime/pixi-renderers/runtimegame-pixi-renderer.ts PR Title: Add dispose method to Runtimegame BEFORE CODE: logger.error('Window closing failed. See error:', error); } } } else { if ( typeof navig...
Call `this._threeRenderer?.dispose();`.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
} } } else { if ( typeof navigator !== 'undefined' && // @ts-ignore navigator.app && // @ts-ignore navigator.app.exitApp ) { // @ts-ignore navigator.app.exitApp(); } } // HTML5 games on mobi...
Remove gameCanvas and domElementsContainer from the parent element.
/** * Close the game, if applicable. */ stopGame() { // Try to detect the environment to use the most adapted // way of closing the app const remote = this.getElectronRemote(); if (remote) { const browserWindow = remote.getCurrentWindow(); if (browserWindow) { ...
@@ -924,6 +924,14 @@ namespace gdjs { // HTML5 games on mobile/browsers don't have a way to close their window/page. } + dispose() { + this._pixiRenderer?.destroy(true); + this._pixiRenderer = null; + this._threeRenderer = null; + this._gameCanvas = null;
GDJS/Runtime/pixi-renderers/runtimegame-pixi-renderer.ts
26
TypeScript
0.286
suggestion
67
51
51
false
Add dispose method to Runtimegame
7,118
4ian/GDevelop
10,154
JavaScript
malec-palec
danvervlad
Review this pull request change. Language: TypeScript File: GDJS/Runtime/pixi-renderers/runtimegame-pixi-renderer.ts PR Title: Add dispose method to Runtimegame BEFORE CODE: } } } else { if ( typeof navigator !== 'undefined' && // @ts-ignore navigator.ap...
Remove gameCanvas and domElementsContainer from the parent element.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
/* * GDevelop JS Platform * Copyright 2013-2023 Florian Rival (Florian.Rival@gmail.com). All rights reserved. * This project is released under the MIT License. */ namespace gdjs { /** * A resource managers that download and remember downloaded content for one * kind of resource. */ export interface Res...
Please, add jsdoc description.
/** * Load the specified resource. * * This method will be run during the game. It should only do light tasks * like file downloading. */ loadResource(resourceName: string): Promise<void>; /** * Process the specified resource. * * This method will only be run while l...
@@ -29,5 +29,7 @@ namespace gdjs { * Return the kind of resources handled by this manager. */ getResourceKinds(): Array<ResourceKind>; + + dispose(): void;
GDJS/Runtime/ResourceManager.ts
26
TypeScript
0.071
suggestion
30
36
29
false
Add dispose method to Runtimegame
7,118
4ian/GDevelop
10,154
JavaScript
malec-palec
danvervlad
Review this pull request change. Language: TypeScript File: GDJS/Runtime/ResourceManager.ts PR Title: Add dispose method to Runtimegame BEFORE CODE: /* * GDevelop JS Platform * Copyright 2013-2023 Florian Rival (Florian.Rival@gmail.com). All rights reserved. * This project is released under the MIT License. */ ...
Please, add jsdoc description.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
xhr.send(); } /** * Check if the given json resource was loaded (preloaded or loaded with `loadJson`). * @param resourceName The name of the json resource. * @returns true if the content of the json resource is loaded. false otherwise. */ isJsonLoaded(resourceName: string): boolea...
Do not forget to call the function.
xhr.send(); } /** * Check if the given json resource was loaded (preloaded or loaded with `loadJson`). * @param resourceName The name of the json resource. * @returns true if the content of the json resource is loaded. false otherwise. */ isJsonLoaded(resourceName: string): boolea...
@@ -200,5 +200,10 @@ namespace gdjs { getLoadedJson(resourceName: string): Object | null { return this._loadedJsons.getFromName(resourceName) || null; } + + dispose(): void { + this._loadedJsons.clear(); + this._callbacks.clear
GDJS/Runtime/jsonmanager.ts
26
TypeScript
0.071
suggestion
35
30
34
false
Add dispose method to Runtimegame
7,118
4ian/GDevelop
10,154
JavaScript
malec-palec
danvervlad
Review this pull request change. Language: TypeScript File: GDJS/Runtime/jsonmanager.ts PR Title: Add dispose method to Runtimegame BEFORE CODE: xhr.send(); } /** * Check if the given json resource was loaded (preloaded or loaded with `loadJson`). * @param resourceName The name of the json ...
Do not forget to call the function.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
'include' : // For other resources, use "same-origin" as done by default by fetch. 'same-origin', } ); const fontData = await response.text(); this._loadedFontsData.set(resource, fontData); } catch (error) { logger.error( ...
Might be: `this._pixiBitmapFontsToUninstall.length = 0;`
'include' : // For other resources, use "same-origin" as done by default by fetch. 'same-origin', } ); const fontData = await response.text(); this._loadedFontsData.set(resource, fontData); } catch (error) { logger.error( ...
@@ -289,6 +289,18 @@ namespace gdjs { ); } } + + dispose(): void { + for (const bitmapFontInstallKey in this._pixiBitmapFontsInUse) { + PIXI.BitmapFont.uninstall(bitmapFontInstallKey); + } + for (const bitmapFontInstallKey of this._pixiBitmapFontsToUninstall) { + ...
GDJS/Runtime/pixi-renderers/pixi-bitmapfont-manager.ts
26
TypeScript
0.357
suggestion
56
35
41
false
Add dispose method to Runtimegame
7,118
4ian/GDevelop
10,154
JavaScript
malec-palec
danvervlad
Review this pull request change. Language: TypeScript File: GDJS/Runtime/pixi-renderers/pixi-bitmapfont-manager.ts PR Title: Add dispose method to Runtimegame BEFORE CODE: 'include' : // For other resources, use "same-origin" as done by default by fetch. 'same-origin', ...
Might be: `this._pixiBitmapFontsToUninstall.length = 0;`
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
this._loadedTextures.clear(); const threeTextures: THREE.Texture[] = []; this._loadedThreeTextures.values(threeTextures); this._loadedThreeTextures.clear(); for (const threeTexture of threeTextures) { threeTexture.dispose(); } const threeMaterials: THREE.Material[] = ...
Will this work? ``` for (const pixiTexture of this._diskTextures.values()) { if (pixiTexture.destroyed) { continue; } pixiTexture.destroy(); } this._diskTextures.clear(); ``` Minus new array creation.
* To be called when the game is disposed. * Clear caches of loaded textures and materials. */ dispose(): void { this._loadedTextures.clear(); const threeTextures: THREE.Texture[] = []; this._loadedThreeTextures.values(threeTextures); this._loadedThreeTextures.clear(); f...
@@ -463,6 +463,54 @@ namespace gdjs { } return particleTexture; } + + dispose(): void { + this._loadedTextures.clear(); + + const threeTextures: THREE.Texture[] = []; + this._loadedThreeTextures.values(threeTextures); + this._loadedThreeTextures.clear(); + for (const three...
GDJS/Runtime/pixi-renderers/pixi-image-manager.ts
26
TypeScript
0.786
suggestion
262
51
51
false
Add dispose method to Runtimegame
7,118
4ian/GDevelop
10,154
JavaScript
malec-palec
danvervlad
Review this pull request change. Language: TypeScript File: GDJS/Runtime/pixi-renderers/pixi-image-manager.ts PR Title: Add dispose method to Runtimegame BEFORE CODE: this._loadedTextures.clear(); const threeTextures: THREE.Texture[] = []; this._loadedThreeTextures.values(threeTextures); th...
Will this work? ``` for (const pixiTexture of this._diskTextures.values()) { if (pixiTexture.destroyed) { continue; } pixiTexture.destroy(); } this._diskTextures.clear(); ``` Minus new array creation.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
/** * @brief Return the scene variables of the current scene or the current * extension. It allows legacy "scenevar" parameters to accept extension * variables. */ const gd::VariablesContainer &GetLegacySceneVariables() const { return legacySceneVariables; }; const gd::PropertiesContainersList ...
These are not references/pointers but values, meaning that ProjectScopedContainers moved from "I'm just a set of lists pointing to things in your project" to "I actually hold stuff, and you will have a bad time if you destroyed me and kept references to things".
/** * @brief Return the scene variables of the current scene or the current * extension. It allows legacy "scenevar" parameters to accept extension * variables. */ const gd::VariablesContainer *GetLegacySceneVariables() const { return legacySceneVariables; }; const gd::PropertiesContainersList ...
@@ -236,6 +230,8 @@ class ProjectScopedContainers { private: gd::ObjectsContainersList objectsContainersList; gd::VariablesContainersList variablesContainersList; + gd::VariablesContainer legacyGlobalVariables; + gd::VariablesContainer legacySceneVariables;
Core/GDCore/Project/ProjectScopedContainers.h
26
C/C++
0.5
suggestion
262
31
31
false
Allow legacy scene variable parameters to use extension variables
7,121
4ian/GDevelop
10,154
JavaScript
4ian
D8H
Review this pull request change. Language: C/C++ File: Core/GDCore/Project/ProjectScopedContainers.h PR Title: Allow legacy scene variable parameters to use extension variables BEFORE CODE: /** * @brief Return the scene variables of the current scene or the current * extension. It allows legacy "scenevar" p...
These are not references/pointers but values, meaning that ProjectScopedContainers moved from "I'm just a set of lists pointing to things in your project" to "I actually hold stuff, and you will have a bad time if you destroyed me and kept references to things".
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
auto &initialInstances = eventsBasedObject.GetInitialInstances(); initialInstances.InsertNewInitialInstance().SetLayer("My layer"); initialInstances.InsertNewInitialInstance().SetLayer("My layer"); initialInstances.InsertNewInitialInstance().SetLayer("My layer"); initialInstances.InsertNewInitialIn...
The previous description better fit what the test actually covers.
auto &initialInstances = eventsBasedObject.GetInitialInstances(); initialInstances.InsertNewInitialInstance().SetLayer("My layer"); initialInstances.InsertNewInitialInstance().SetLayer("My layer"); initialInstances.InsertNewInitialInstance().SetLayer("My layer"); initialInstances.InsertNewInitialIn...
@@ -4452,13 +4452,13 @@ TEST_CASE("MergeLayers", "[common]") { REQUIRE(initialInstances.GetLayerInstancesCount("My other layer") == 1); } - SECTION("Can rename a leaderboard in scene events") { + SECTION("Can find and rename leaderboards in a project") {
Core/tests/WholeProjectRefactorer.cpp
26
C++
0.286
suggestion
66
51
51
false
Fix leaderboards not properly replaced in projects using them in custom objects
7,131
4ian/GDevelop
10,154
JavaScript
D8H
4ian
Review this pull request change. Language: C++ File: Core/tests/WholeProjectRefactorer.cpp PR Title: Fix leaderboards not properly replaced in projects using them in custom objects BEFORE CODE: auto &initialInstances = eventsBasedObject.GetInitialInstances(); initialInstances.InsertNewInitialInstance().Set...
The previous description better fit what the test actually covers.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
} onInstructionTypeChanged={onInstructionTypeChanged} /> {editorOpen && project && !objectGroup && ( <ObjectVariablesDialog project={project} projectScopedContainersAccessor={projectScopedContainersAccessor} objectName={objectName} ...
Sounds suspicious as not used then?
} onInstructionTypeChanged={onInstructionTypeChanged} /> {editorOpen && project && !!variablesContainers.length && !objectGroup && ( <ObjectVariablesDialog project={project} projectScopedContainersAccessor={project...
@@ -188,37 +188,43 @@ export default React.forwardRef<ParameterFieldProps, ParameterFieldInterface>( } onInstructionTypeChanged={onInstructionTypeChanged} /> - {editorOpen && project && !objectGroup && ( - <ObjectVariablesDialog - project={project} - ...
newIDE/app/src/EventsSheet/ParameterFields/ObjectVariableField.js
26
JavaScript
0.143
question
35
43
49
false
Prevent opening variables dialog for objects & groups if there is no object
7,132
4ian/GDevelop
10,154
JavaScript
4ian
ClementPasteau
Review this pull request change. Language: JavaScript File: newIDE/app/src/EventsSheet/ParameterFields/ObjectVariableField.js PR Title: Prevent opening variables dialog for objects & groups if there is no object BEFORE CODE: } onInstructionTypeChanged={onInstructionTypeChanged} /> ...
Sounds suspicious as not used then?
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// We could pass it a string, but lets do it right this.removeJoint(parseInt(jId, 10)); } } } } // Remove the joint this.world.DestroyJoint(joint); delete this.joints[jointId]; } } } gdjs.registerRuntimeSc...
In the future, a `destroy()` method on the shared data would be I think safer (in the sense: it's part of the class, so there is less chance you forget to update it when needed) and we we should probably made the "shared data" something first class that is handled by the runtime scene (rather than something that is man...
if ( this.joints[jId].GetType() === Box2D.e_gearJoint && (Box2D.getPointer( (this.joints[jId] as Box2D.b2GearJoint).GetJoint1() ) === Box2D.getPointer(joint) || Box2D.getPointer( (this.joints[jId] as Bo...
@@ -300,14 +309,11 @@ namespace gdjs { } } gdjs.registerRuntimeSceneUnloadedCallback(function (runtimeScene) { - if ( - // @ts-ignore - runtimeScene.physics2SharedData && - // @ts-ignore - runtimeScene.physics2SharedData.world - ) { - // @ts-ignore - Box2D.destroy(runtimeS...
Extensions/Physics2Behavior/physics2runtimebehavior.ts
26
TypeScript
0.786
suggestion
360
51
51
false
[Physics2] Fix a memory leak on object instances
7,136
4ian/GDevelop
10,154
JavaScript
4ian
D8H
Review this pull request change. Language: TypeScript File: Extensions/Physics2Behavior/physics2runtimebehavior.ts PR Title: [Physics2] Fix a memory leak on object instances BEFORE CODE: // We could pass it a string, but lets do it right this.removeJoint(parseInt(jId, 10)); ...
In the future, a `destroy()` method on the shared data would be I think safer (in the sense: it's part of the class, so there is less chance you forget to update it when needed) and we we should probably made the "shared data" something first class that is handled by the runtime scene (rather than something that is man...
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// we need to relay the ownership change to others, // and expect an acknowledgment from them. if (gdjs.multiplayer.isCurrentPlayerHost()) { const connectedPeerIds = gdjs.multiplayerPeerJsHelper.getAllPeers(); // We don't need to send the message to the player who s...
So this was sending too many messages!
// we need to relay the ownership change to others, // and expect an acknowledgment from them. if (gdjs.multiplayer.isCurrentPlayerHost()) { const connectedPeerIds = gdjs.multiplayerPeerJsHelper.getAllPeers(); // We don't need to send the message to the player who s...
@@ -917,12 +917,12 @@ namespace gdjs { // As we are the host, we do not cancel the message if it times out. shouldCancelMessageIfTimesOut: false, }); - for (const peerId of otherPeerIds) { - debugLogger.info( - `Relaying ownership change ...
Extensions/Multiplayer/messageManager.ts
26
TypeScript
0.071
suggestion
38
51
51
false
Fix destroying an object even if flagged as "DoNothing" in the multiplayer behavior
7,137
4ian/GDevelop
10,154
JavaScript
4ian
ClementPasteau
Review this pull request change. Language: TypeScript File: Extensions/Multiplayer/messageManager.ts PR Title: Fix destroying an object even if flagged as "DoNothing" in the multiplayer behavior BEFORE CODE: // we need to relay the ownership change to others, // and expect an acknowledgment from...
So this was sending too many messages!
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
} catch (error) { console.error('Error while login:', error); throw error; } } async loginOrSignupWithProvider({ provider, signal, }: {| provider: IdentityProvider, signal?: AbortSignal, |}) { if (signal && signal.aborted) { return Promise.reject( new UserC...
this seemed duplicated in this file and the browser one. This was always causing an error in the console because the signal always aborts (we trigger it when we close the dialog) I don't think this deserves to raise an error as it's the expected path?
} catch (error) { console.error('Error while login:', error); throw error; } } async loginOrSignupWithProvider({ provider, signal, }: {| provider: IdentityProvider, signal?: AbortSignal, |}) { if (signal && signal.aborted) { return Promise.reject( new UserC...
@@ -61,11 +61,6 @@ class LocalLoginProvider implements LoginProvider, FirebaseBasedLoginProvider { if (signal) { signal.addEventListener('abort', () => { terminateWebSocket(); - reject(
newIDE/app/src/LoginProvider/LocalLoginProvider.js
26
JavaScript
0.643
refactor
253
51
51
false
Fix infinite loading when canceling login with provider
7,138
4ian/GDevelop
10,154
JavaScript
ClementPasteau
ClementPasteau
Review this pull request change. Language: JavaScript File: newIDE/app/src/LoginProvider/LocalLoginProvider.js PR Title: Fix infinite loading when canceling login with provider BEFORE CODE: } catch (error) { console.error('Error while login:', error); throw error; } } async loginOrSignupWit...
this seemed duplicated in this file and the browser one. This was always causing an error in the console because the signal always aborts (we trigger it when we close the dialog) I don't think this deserves to raise an error as it's the expected path?
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
End of preview. Expand in Data Studio

Github-Codereview-Dataset

Made with ❤️ using 🦥 Unsloth Studio

github-codereview-dataset was generated with Unsloth Recipe Studio. It contains 10,000 generated records.


🚀 Quick Start

from datasets import load_dataset

# Load the main dataset
dataset = load_dataset("manishsaini1/github-codereview-dataset", "data", split="train")
df = dataset.to_pandas()

📊 Dataset Summary

  • 📈 Records: 10,000
  • 📋 Columns: 23

📋 Schema & Statistics

Column Type Column Type Unique (%) Null (%) Details
user string expression 9791 (97.9%) 0 (0.0%) -
assistant string expression 7414 (74.1%) 0 (0.0%) -
system string expression 1 (0.0%) 0 (0.0%) -

⚙️ Generation Details

Generated with 23 column configuration(s):

  • expression: 3 column(s)

  • seed-dataset: 20 column(s)

📄 Full configuration available in builder_config.json and detailed metadata in metadata.json.


📚 Citation

If you use Data Designer in your work, please cite the project as follows:

@misc{nemo-data-designer,
  author = {The NeMo Data Designer Team, NVIDIA},
  title = {NeMo Data Designer: A framework for generating synthetic data from scratch or based on your own seed data},
  howpublished = {\url{https://github.com/NVIDIA-NeMo/DataDesigner}},
  year = 2026,
  note = {GitHub Repository},
}

💡 About NeMo Data Designer

NeMo Data Designer is a general framework for generating high-quality synthetic data that goes beyond simple LLM prompting. It provides:

  • Diverse data generation using statistical samplers, LLMs, or existing seed datasets
  • Relationship control between fields with dependency-aware generation
  • Quality validation with built-in Python, SQL, and custom local and remote validators
  • LLM-as-a-judge scoring for quality assessment
  • Fast iteration with preview mode before full-scale generation

For more information, visit: https://github.com/NVIDIA-NeMo/DataDesigner (pip install data-designer)

Downloads last month
41