repo_name
stringclasses 5
values | pr_number
int64 1.52k
15.5k
| pr_title
stringlengths 8
143
| pr_description
stringlengths 0
10.2k
| author
stringlengths 3
18
| date_created
unknown | date_merged
unknown | previous_commit
stringlengths 40
40
| pr_commit
stringlengths 40
40
| query
stringlengths 11
10.2k
| filepath
stringlengths 6
220
| before_content
stringlengths 0
597M
| after_content
stringlengths 0
597M
| label
int64 -1
1
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
libgdx/libgdx | 7,270 | Update missing build.gradle files with new syntax for registering tasks | Some Gradle build files were still using old syntax after https://github.com/libgdx/libgdx/pull/7134.
| obigu | "2023-11-05T15:31:03Z" | "2023-11-13T11:04:33Z" | 8e3b2ef2af2e1c1765b3441cb15cfbeddf4046fa | a25ceaddd8e9ea740b7e50e486ea4f815d2a3f58 | Update missing build.gradle files with new syntax for registering tasks. Some Gradle build files were still using old syntax after https://github.com/libgdx/libgdx/pull/7134.
| ./tests/gdx-tests/src/com/badlogic/gdx/tests/PngTest.java | /*******************************************************************************
* Copyright 2011 See AUTHORS file.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************/
package com.badlogic.gdx.tests;
import java.io.IOException;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.Pixmap;
import com.badlogic.gdx.graphics.PixmapIO.PNG;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.math.MathUtils;
import com.badlogic.gdx.tests.utils.GdxTest;
public class PngTest extends GdxTest {
SpriteBatch batch;
Texture badlogic, screenshot;
public void create () {
batch = new SpriteBatch();
badlogic = new Texture(Gdx.files.internal("data/badlogic.jpg"));
}
public void render () {
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
batch.begin();
if (screenshot == null) {
int width = Gdx.graphics.getWidth(), height = Gdx.graphics.getHeight();
for (int i = 0; i < 100; i++)
batch.draw(badlogic, MathUtils.random(width), MathUtils.random(height));
batch.flush();
FileHandle file = FileHandle.tempFile("screenshot-");
System.out.println(file.file().getAbsolutePath());
Pixmap pixmap = Pixmap.createFromFrameBuffer(0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
try {
PNG writer = new PNG((int)(pixmap.getWidth() * pixmap.getHeight() * 1.5f));
// writer.setCompression(Deflater.NO_COMPRESSION);
writer.write(file, pixmap);
writer.write(file, pixmap); // Write twice to make sure the object is reusable.
writer.dispose();
} catch (IOException ex) {
throw new RuntimeException(ex);
}
screenshot = new Texture(file);
}
batch.draw(screenshot, 0, 0);
batch.end();
}
}
| /*******************************************************************************
* Copyright 2011 See AUTHORS file.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************/
package com.badlogic.gdx.tests;
import java.io.IOException;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.Pixmap;
import com.badlogic.gdx.graphics.PixmapIO.PNG;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.math.MathUtils;
import com.badlogic.gdx.tests.utils.GdxTest;
public class PngTest extends GdxTest {
SpriteBatch batch;
Texture badlogic, screenshot;
public void create () {
batch = new SpriteBatch();
badlogic = new Texture(Gdx.files.internal("data/badlogic.jpg"));
}
public void render () {
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
batch.begin();
if (screenshot == null) {
int width = Gdx.graphics.getWidth(), height = Gdx.graphics.getHeight();
for (int i = 0; i < 100; i++)
batch.draw(badlogic, MathUtils.random(width), MathUtils.random(height));
batch.flush();
FileHandle file = FileHandle.tempFile("screenshot-");
System.out.println(file.file().getAbsolutePath());
Pixmap pixmap = Pixmap.createFromFrameBuffer(0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
try {
PNG writer = new PNG((int)(pixmap.getWidth() * pixmap.getHeight() * 1.5f));
// writer.setCompression(Deflater.NO_COMPRESSION);
writer.write(file, pixmap);
writer.write(file, pixmap); // Write twice to make sure the object is reusable.
writer.dispose();
} catch (IOException ex) {
throw new RuntimeException(ex);
}
screenshot = new Texture(file);
}
batch.draw(screenshot, 0, 0);
batch.end();
}
}
| -1 |
libgdx/libgdx | 7,270 | Update missing build.gradle files with new syntax for registering tasks | Some Gradle build files were still using old syntax after https://github.com/libgdx/libgdx/pull/7134.
| obigu | "2023-11-05T15:31:03Z" | "2023-11-13T11:04:33Z" | 8e3b2ef2af2e1c1765b3441cb15cfbeddf4046fa | a25ceaddd8e9ea740b7e50e486ea4f815d2a3f58 | Update missing build.gradle files with new syntax for registering tasks. Some Gradle build files were still using old syntax after https://github.com/libgdx/libgdx/pull/7134.
| ./tests/gdx-tests-android/assets/data/maps/tiled-animations/test-load-animations.tmx | <?xml version="1.0" encoding="UTF-8"?>
<map version="1.0" orientation="orthogonal" renderorder="right-down" width="16" height="16" tilewidth="32" tileheight="32" nextobjectid="18">
<tileset firstgid="1" name="Test" tilewidth="256" tileheight="256" tilecount="3" columns="0">
<tile id="0">
<image width="32" height="32" source="Start.bmp"/>
<animation>
<frame tileid="0" duration="500"/>
<frame tileid="1" duration="500"/>
</animation>
</tile>
<tile id="1">
<image width="32" height="32" source="../../badlogicsmall.jpg"/>
</tile>
<tile id="2">
<image width="256" height="256" source="../../badlogic.jpg"/>
</tile>
<tile id="3">
<image width="32" height="32" source="Start.bmp"/>
<animation>
<frame tileid="0" duration="200"/>
<frame tileid="1" duration="200"/>
</animation>
</tile>
</tileset>
<objectgroup name="Objects">
<object id="3" name="Ellipse" x="59.3333" y="335" width="130" height="87">
<ellipse/>
</object>
<object id="5" name="Polygon" x="238.667" y="351.333">
<polygon points="0,0 78,-4 32,73"/>
</object>
<object id="9" name="Rectangle" x="340" y="341.333" width="118.667" height="100"/>
<object id="12" name="Texture" gid="4" x="128" y="298.667" width="256" height="33.667"/>
<object id="14" gid="1073741825" x="384" y="256" width="64" height="32"/>
<object id="17" name="Polyline" x="364" y="155">
<polyline points="0,0 29,-60 57,4 91,-63"/>
</object>
</objectgroup>
</map>
| <?xml version="1.0" encoding="UTF-8"?>
<map version="1.0" orientation="orthogonal" renderorder="right-down" width="16" height="16" tilewidth="32" tileheight="32" nextobjectid="18">
<tileset firstgid="1" name="Test" tilewidth="256" tileheight="256" tilecount="3" columns="0">
<tile id="0">
<image width="32" height="32" source="Start.bmp"/>
<animation>
<frame tileid="0" duration="500"/>
<frame tileid="1" duration="500"/>
</animation>
</tile>
<tile id="1">
<image width="32" height="32" source="../../badlogicsmall.jpg"/>
</tile>
<tile id="2">
<image width="256" height="256" source="../../badlogic.jpg"/>
</tile>
<tile id="3">
<image width="32" height="32" source="Start.bmp"/>
<animation>
<frame tileid="0" duration="200"/>
<frame tileid="1" duration="200"/>
</animation>
</tile>
</tileset>
<objectgroup name="Objects">
<object id="3" name="Ellipse" x="59.3333" y="335" width="130" height="87">
<ellipse/>
</object>
<object id="5" name="Polygon" x="238.667" y="351.333">
<polygon points="0,0 78,-4 32,73"/>
</object>
<object id="9" name="Rectangle" x="340" y="341.333" width="118.667" height="100"/>
<object id="12" name="Texture" gid="4" x="128" y="298.667" width="256" height="33.667"/>
<object id="14" gid="1073741825" x="384" y="256" width="64" height="32"/>
<object id="17" name="Polyline" x="364" y="155">
<polyline points="0,0 29,-60 57,4 91,-63"/>
</object>
</objectgroup>
</map>
| -1 |
libgdx/libgdx | 7,270 | Update missing build.gradle files with new syntax for registering tasks | Some Gradle build files were still using old syntax after https://github.com/libgdx/libgdx/pull/7134.
| obigu | "2023-11-05T15:31:03Z" | "2023-11-13T11:04:33Z" | 8e3b2ef2af2e1c1765b3441cb15cfbeddf4046fa | a25ceaddd8e9ea740b7e50e486ea4f815d2a3f58 | Update missing build.gradle files with new syntax for registering tasks. Some Gradle build files were still using old syntax after https://github.com/libgdx/libgdx/pull/7134.
| ./tests/gdx-tests-android/assets/data/garuda.ttf |