repository stringclasses 549
values | merge stringlengths 40 40 | parent_a stringlengths 40 40 | parent_b stringlengths 40 40 | path stringlengths 13 252 | conflict_in_file int64 0 330 | conflicts_in_file int64 1 382 | before listlengths 0 20 | side_a listlengths 0 30 | base listlengths 0 1.67k ⌀ | side_b listlengths 0 30 | after listlengths 0 20 | answer listlengths 0 62 | windows_line_endings bool 2
classes | id stringlengths 16 16 | labels listlengths 0 41 ⌀ | kind stringclasses 8
values | tags dict | licence stringclasses 4
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
FAForever/downlords-faf-client | f6e7d7818a08f895a4b59a4a3cdd21ddc72613d1 | 15e4a40a4a3f063d4d92de06c70d492feab58589 | fa586803fd970c57fa2757ae9b13b0b8adc4f1a7 | src/main/java/com/faforever/client/game/PlayerCardTooltipController.java | 0 | 1 | [
"import org.springframework.beans.factory.annotation.Autowired;\n",
"\n",
"\n",
"public class PlayerCardTooltipController {\n",
"\n",
" @FXML\n",
" Label playerInfo;\n",
"\n",
" @FXML\n",
" ImageView playerFlag;\n",
"\n",
" @Autowired\n",
" CountryFlagService countryFlagService;\n",
... | [
" String playerInfoLocalized = i18n.get(\"playerCardTooltipFormat\", playerInfoBean.getUsername(), RatingUtil.getGlobalRating(playerInfoBean));\n"
] | [
" String playerInfoLocalized = i18n.get(\"playerInfoTooltipFormat\", playerInfoBean.getUsername(), RatingUtil.getRating(playerInfoBean));\n"
] | [
" String playerInfoLocalized = i18n.get(\"playerInfoTooltipFormat\", playerInfoBean.getUsername(), RatingUtil.getGlobalRating(playerInfoBean));\n"
] | [
" playerInfo.setText(playerInfoLocalized);\n",
" }\n",
"\n",
" public Node getRoot() {\n",
" return playerInfo;\n",
" }\n",
"}\n"
] | [
" String playerInfoLocalized = i18n.get(\"playerInfoTooltipFormat\", playerInfoBean.getUsername(), RatingUtil.getGlobalRating(playerInfoBean));\n"
] | false | 0bb90a4ccd5e8439 | [
"B1"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | f6e7d7818a08f895a4b59a4a3cdd21ddc72613d1 | 15e4a40a4a3f063d4d92de06c70d492feab58589 | fa586803fd970c57fa2757ae9b13b0b8adc4f1a7 | src/main/java/com/faforever/client/player/PlayerServiceImpl.java | 0 | 1 | [
"import com.faforever.client.legacy.domain.PlayerInfo;\n",
"import com.faforever.client.user.UserService;\n",
"import com.faforever.client.util.Assert;\n",
"import javafx.collections.FXCollections;\n",
"import javafx.collections.ObservableMap;\n",
"import org.jetbrains.annotations.NotNull;\n",
"import o... | [
" private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());\n"
] | [] | [
" private static final Lock CURRENT_PLAYER_LOCK = new ReentrantLock();\n",
"\n"
] | [
" private final ObservableMap<String, PlayerInfoBean> players;\n",
" @Autowired\n",
" LobbyServerAccessor lobbyServerAccessor;\n",
" @Autowired\n",
" UserService userService;\n",
"\n",
" @Autowired\n",
" GameService gameService;\n",
" private List<String> foeList;\n",
" private List<Strin... | [
" private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());\n",
" private static final Lock CURRENT_PLAYER_LOCK = new ReentrantLock();\n",
"\n"
] | false | 12938ae1b95c5372 | [
"A1",
"B1",
"B2"
] | A then B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | f6e7d7818a08f895a4b59a4a3cdd21ddc72613d1 | 15e4a40a4a3f063d4d92de06c70d492feab58589 | fa586803fd970c57fa2757ae9b13b0b8adc4f1a7 | src/main/java/com/faforever/client/util/RatingUtil.java | 0 | 3 | [
"package com.faforever.client.util;\n",
"\n",
"import com.faforever.client.chat.PlayerInfoBean;\n",
"import com.faforever.client.legacy.domain.PlayerInfo;\n",
"import com.faforever.client.stats.RatingInfo;\n",
"\n",
"import java.util.regex.Matcher;\n",
"import java.util.regex.Pattern;\n",
"\n",
"p... | [
" public static int getGlobalRating(PlayerInfo playerInfo) {\n",
" return getRating(playerInfo.getRatingMean(), playerInfo.getRatingDeviation());\n"
] | [
" public static int getRating(PlayerInfo playerInfo) {\n",
" return getRating(playerInfo.getRatingMean(), playerInfo.getRatingDeviation());\n"
] | [
" public static int getRoundedGlobalRating(PlayerInfoBean player) {\n",
" return getRoundedRating(getGlobalRating(player));\n",
" }\n",
"\n",
" public static int getRoundedRating(int rating) {\n",
" return (rating + 50) / 100 * 100;\n",
" }\n",
"\n",
" public static int getGlobalRating(Pl... | [
" }\n",
"\n",
" private static int getRating(float ratingMean, float ratingDeviation) {\n",
" return (int) (ratingMean - 3 * ratingDeviation);\n",
" }\n",
"\n"
] | [
" public static int getRoundedGlobalRating(PlayerInfoBean player) {\n",
" return getRoundedRating(getGlobalRating(player));\n",
" }\n",
"\n",
" public static int getRoundedRating(int rating) {\n",
" return (rating + 50) / 100 * 100;\n",
" }\n",
"\n",
" public static int getGlobalRating(Pl... | false | 66dea46c28b027fa | [
"B1",
"B2",
"B3",
"B4",
"B5",
"B6",
"B7",
"B8",
"B9",
"B10"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | f6e7d7818a08f895a4b59a4a3cdd21ddc72613d1 | 15e4a40a4a3f063d4d92de06c70d492feab58589 | fa586803fd970c57fa2757ae9b13b0b8adc4f1a7 | src/main/java/com/faforever/client/util/RatingUtil.java | 1 | 3 | [
" }\n",
"\n",
" private static int getRating(float ratingMean, float ratingDeviation) {\n",
" return (int) (ratingMean - 3 * ratingDeviation);\n",
" }\n",
"\n"
] | [
" public static int getLeaderboardRating(PlayerInfo playerInfo) {\n",
" return getRating(playerInfo.getLadderRatingMean(), playerInfo.getLadderRatingDeviation());\n",
" }\n",
"\n",
" public static int getLeaderboardRating(PlayerInfoBean playerInfoBean) {\n",
" return getRating(playerInfoBean.getL... | [
" public static int getRating(RatingInfo ratingInfo) {\n",
" return getRating(ratingInfo.getMean(), ratingInfo.getDev());\n"
] | [
" public static int getRoundedLeaderboardRating(PlayerInfoBean player) {\n",
" return getRoundedRating(getLeaderboardRating(player));\n"
] | [
" }\n",
"\n"
] | [
" public static int getRoundedLeaderboardRating(PlayerInfoBean player) {\n",
" return getRoundedRating(getLeaderboardRating(player));\n"
] | false | c7d1ed14cea56637 | [
"B1",
"B2"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 8191f00d56bfbcc0a86d54b14d77ebac1e3a7bb7 | 31636d4d4926e62dbccb5e4aed522fc9651667f6 | c47417ebe23328fac1360a7526118dd47631cd7b | src/main/java/com/faforever/client/config/ServiceConfig.java | 0 | 2 | [
"import com.faforever.client.legacy.StatisticsServerAccessorImpl;\n",
"import com.faforever.client.legacy.UidService;\n",
"import com.faforever.client.legacy.UnixUidService;\n",
"import com.faforever.client.legacy.WindowsUidService;\n",
"import com.faforever.client.legacy.htmlparser.HtmlParser;\n",
"impor... | [
"import com.faforever.client.parsecom.CloudAccessor;\n",
"import com.faforever.client.parsecom.ParseCloudAccessor;\n"
] | [
"import com.faforever.client.parsecom.CloudService;\n",
"import com.faforever.client.parsecom.ParseCloudService;\n"
] | [
"import com.faforever.client.parsecom.CloudService;\n",
"import com.faforever.client.parsecom.MockCloudService;\n",
"import com.faforever.client.parsecom.ParseCloudService;\n"
] | [
"import com.faforever.client.patch.GameUpdateService;\n",
"import com.faforever.client.patch.GameUpdateServiceImpl;\n",
"import com.faforever.client.patch.GitWrapper;\n",
"import com.faforever.client.patch.JGitWrapper;\n",
"import com.faforever.client.patch.UpdateServerAccessor;\n",
"import com.faforever.... | [
"import com.faforever.client.parsecom.CloudAccessor;\n",
"import com.faforever.client.parsecom.MockCloudService;\n",
"import com.faforever.client.parsecom.ParseCloudAccessor;\n"
] | false | 89fe4f39549b5b33 | [
"A1",
"B2",
"A2"
] | mix of lines | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 8191f00d56bfbcc0a86d54b14d77ebac1e3a7bb7 | 31636d4d4926e62dbccb5e4aed522fc9651667f6 | c47417ebe23328fac1360a7526118dd47631cd7b | src/main/java/com/faforever/client/config/ServiceConfig.java | 1 | 2 | [
" @Bean\n",
" ClientUpdateService updateService() {\n",
" if (environment.containsProperty(\"faf.testing\")) {\n",
" return new MockClientUpdateService();\n",
" } else {\n",
" return new ClientUpdateServiceImpl();\n",
" }\n",
" }\n",
"\n",
" @Bean\n",
" UidService uidServ... | [
" CloudAccessor parseComService() {\n",
" return new ParseCloudAccessor();\n"
] | [
" CloudService parseComService() {\n",
" return new ParseCloudService();\n"
] | [
" CloudService cloudService() {\n",
" if (environment.containsProperty(\"faf.testing\")) {\n",
" return new MockCloudService();\n",
" } else {\n",
" return new ParseCloudService();\n",
" }\n"
] | [
" }\n",
"\n",
" @Bean\n",
" PlayServices playServices() {\n",
" return new GooglePlayServices();\n",
" }\n",
"\n",
" @Bean\n",
" GravatarService gravatarService() {\n",
" return new GravatarServiceImpl();\n",
" }\n",
"}\n"
] | [
" CloudAccessor cloudAccessor() {\n",
" if (environment.containsProperty(\"faf.testing\")) {\n",
" return new MockCloudService();\n",
" } else {\n",
" return new ParseCloudAccessor();\n",
" }\n"
] | false | 5aafd0e73abcdb91 | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 8191f00d56bfbcc0a86d54b14d77ebac1e3a7bb7 | 31636d4d4926e62dbccb5e4aed522fc9651667f6 | c47417ebe23328fac1360a7526118dd47631cd7b | src/main/java/com/faforever/client/config/UiConfig.java | 0 | 1 | [
" @Bean\n",
" @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)\n",
" GamesTilesContainerController gamesTiledController() {\n",
" return loadController(\"games_tiles_container.fxml\");\n",
" }\n",
"\n",
" @Bean\n",
" @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)\n",
" UserInfoWindowContro... | [
" AchievementItemController achievementItemController() {\n",
" return loadController(\"achievement_item.fxml\");\n",
" }\n",
"\n",
" @Bean\n",
" @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)\n",
" // TODO @mj: naming consistency\n",
" NewsListItemController newsTileController() {\n"
] | [
" // TODO @mj: naming consistency\n",
" NewsListItemController newsTileController() {\n"
] | [
" NewsListItemController newsListItemController() {\n"
] | [
" return loadController(\"news_list_item.fxml\");\n",
" }\n",
"\n",
" @Bean\n",
" @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)\n",
" PersistentNotificationController persistentNotificationController() {\n",
" return loadController(\"persistent_notification.fxml\");\n",
" }\n",
"\n",
... | [
" AchievementItemController achievementItemController() {\n",
" return loadController(\"achievement_item.fxml\");\n",
" }\n",
"\n",
" @Bean\n",
" @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)\n",
" NewsListItemController newsListItemController() {\n"
] | false | c3464b94f4efbcf9 | [
"A1",
"A2",
"A3",
"A4",
"A5",
"A6",
"B1"
] | mix of lines | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 8191f00d56bfbcc0a86d54b14d77ebac1e3a7bb7 | 31636d4d4926e62dbccb5e4aed522fc9651667f6 | c47417ebe23328fac1360a7526118dd47631cd7b | src/main/java/com/faforever/client/gravatar/GravatarServiceImpl.java | 1 | 3 | [
"import javafx.scene.image.Image;\n",
"import org.jetbrains.annotations.NotNull;\n",
"import org.slf4j.Logger;\n",
"import org.slf4j.LoggerFactory;\n",
"import org.springframework.core.env.Environment;\n",
"\n",
"import javax.annotation.Resource;\n",
"import java.lang.invoke.MethodHandles;\n",
"\n",... | [
" @Resource\n",
" Environment environment;\n"
] | [
" private Gravatar gravatar;\n",
"\n",
" public GravatarServiceImpl() {\n",
" gravatar = new Gravatar(Gravatar.DEFAULT_SIZE, GravatarRating.GENERAL_AUDIENCES, GravatarDefaultImage.GRAVATAR_ICON);\n",
" }\n"
] | [
"\n",
" public GravatarServiceImpl() {\n",
" }\n"
] | [
"\n",
" @Override\n",
" public Image getGravatar(String email) {\n"
] | [
" @Resource\n",
" Environment environment;\n"
] | false | 2ff4d2f4f55c2b24 | [
"A1",
"A2"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 8191f00d56bfbcc0a86d54b14d77ebac1e3a7bb7 | 31636d4d4926e62dbccb5e4aed522fc9651667f6 | c47417ebe23328fac1360a7526118dd47631cd7b | src/test/java/com/faforever/client/rankedmatch/Ranked1v1ControllerTest.java | 0 | 4 | [
" private GameService gameService;\n",
" @Mock\n",
" private PreferencesService preferencesService;\n",
" @Mock\n",
" private PlayerService playerService;\n",
" @Mock\n",
" private Environment environment;\n",
" @Mock\n",
" private LeaderboardService leaderboardService;\n",
" @Mock\n",
... | [
" private ObjectProperty<PlayerInfoBean> currentPlayerProperty;\n"
] | [
" private PlayerInfoBean currentPlayer;\n"
] | [] | [
" private ObservableList<Faction> factionList;\n",
" private LeaderboardEntryBean leaderboardEntryBean;\n",
" private ObjectProperty<PlayerInfoBean> currentPlayerProperty;\n",
"\n",
" @Before\n",
" public void setUp() throws Exception {\n",
" instance = loadController(\"ranked_1v1.fxml\");\n",
... | [
" private ObjectProperty<PlayerInfoBean> currentPlayerProperty;\n"
] | false | 66d4db243c8e3e35 | [
"A1"
] | side A | {
"test_file": true,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 687439d9d8f48b8a288c50dce03991bc170f3c46 | 16ea0a6c631479328ea4dfb194f144e7f18f69ac | 979a40d8cef85183cd07b73ea3ad0bf13c57254f | src/main/java/com/faforever/client/config/UiConfig.java | 0 | 1 | [
"import com.faforever.client.chat.UrlPreviewResolverImpl;\n",
"import com.faforever.client.chat.UserInfoWindowController;\n",
"import com.faforever.client.fx.DialogFactory;\n",
"import com.faforever.client.fx.DialogFactoryImpl;\n",
"import com.faforever.client.fx.SceneFactory;\n",
"import com.faforever.cl... | [
"import com.faforever.client.map.CommentCardController;\n",
"import com.faforever.client.map.MapPreviewLargeController;\n"
] | [] | [
"import com.faforever.client.main.hub.CommunityHubController;\n",
"import com.faforever.client.main.hub.ConcurrentUsersController;\n",
"import com.faforever.client.mod.ModVaultController;\n"
] | [
"import com.faforever.client.news.NewsController;\n",
"import com.faforever.client.news.NewsListItemController;\n",
"import com.faforever.client.notification.ImmediateNotificationController;\n",
"import com.faforever.client.notification.PersistentNotificationController;\n",
"import com.faforever.client.noti... | [] | false | a0c85a0beca216e5 | [] | neither side | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 687439d9d8f48b8a288c50dce03991bc170f3c46 | 16ea0a6c631479328ea4dfb194f144e7f18f69ac | 979a40d8cef85183cd07b73ea3ad0bf13c57254f | src/main/java/com/faforever/client/legacy/LobbyServerAccessorImpl.java | 0 | 1 | [
"import org.springframework.util.StringUtils;\n",
"\n",
"import java.io.IOException;\n",
"import java.io.OutputStream;\n",
"import java.lang.invoke.MethodHandles;\n",
"import java.net.Socket;\n",
"import java.util.ArrayList;\n",
"import java.util.Collection;\n",
"import java.util.List;\n",
"\n",
... | [
" private static final int VERSION = 0;\n"
] | [
" private static final int VERSION = 123;\n"
] | [] | [
" private static final long RECONNECT_DELAY = 3000;\n",
" private final Gson gson;\n",
"\n",
" @Autowired\n",
" Environment environment;\n",
"\n",
" @Autowired\n",
" PreferencesService preferencesService;\n",
"\n",
" @Autowired\n",
" LeaderParser leaderParser;\n",
"\n",
" @Autowired... | [] | false | de55d050e515fafe | [] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 0717163a9b699341df602545324c78cdedb9be8d | ad661fd7c1825cf3b277a0b084385a3327cb5387 | 931ee1bcd3f791688d868cc654ff2c031d4cecc2 | src/main/java/com/faforever/client/Main.java | 0 | 1 | [
"import com.faforever.client.util.JavaFxUtil;\n",
"import javafx.application.Application;\n",
"import javafx.scene.image.Image;\n",
"import javafx.scene.text.Font;\n",
"import javafx.stage.Stage;\n",
"import javafx.stage.StageStyle;\n",
"import org.springframework.context.ApplicationContext;\n",
"impo... | [
" context.register(BaseConfig.class, UiConfig.class, ServiceConfig.class, TaskConfig.class, CacheConfig.class, LuceneConfig.class);\n"
] | [
" context.register(BaseConfig.class, UiConfig.class, ServiceConfig.class, TaskConfig.class, CacheConfig.class);\n"
] | [
" context.getBeanFactory().registerSingleton(\"stage\", stage);\n",
" context.register(BaseConfig.class, UiConfig.class, ServiceConfig.class, TaskConfig.class, CacheConfig.class);\n"
] | [
" context.registerShutdownHook();\n",
" context.refresh();\n",
"\n",
" stage.getIcons().add(new Image(\"/images/tray_icon.png\"));\n",
" stage.initStyle(StageStyle.TRANSPARENT);\n",
"\n",
" showLoginWindow(context);\n",
" }\n",
"\n",
" @Override\n",
" public void stop() throws ... | [
" context.getBeanFactory().registerSingleton(\"stage\", stage);\n",
" context.register(BaseConfig.class, UiConfig.class, ServiceConfig.class, TaskConfig.class, CacheConfig.class, LuceneConfig.class);\n"
] | false | 63291234df64bec0 | [
"B1",
"A1"
] | mix of lines | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 0717163a9b699341df602545324c78cdedb9be8d | ad661fd7c1825cf3b277a0b084385a3327cb5387 | 931ee1bcd3f791688d868cc654ff2c031d4cecc2 | src/main/java/com/faforever/client/api/FafApiAccessor.java | 0 | 1 | [
"package com.faforever.client.api;\n",
"\n"
] | [
"import com.faforever.client.events.AchievementDefinition;\n",
"import com.faforever.client.events.PlayerAchievement;\n",
"import com.faforever.client.mod.ModInfoBean;\n"
] | [
"import com.faforever.client.events.AchievementDefinition;\n",
"import com.faforever.client.events.PlayerAchievement;\n"
] | [
"import com.faforever.client.achievements.AchievementDefinition;\n",
"import com.faforever.client.achievements.PlayerAchievement;\n"
] | [
"\n",
"import java.util.List;\n",
"\n",
"public interface FafApiAccessor {\n",
"\n",
" List<PlayerAchievement> getPlayerAchievements(int playerId);\n",
"\n",
" List<AchievementDefinition> getAchievementDefinitions();\n",
"\n",
" AchievementDefinition getAchievementDefinition(String achievementI... | [
"import com.faforever.client.events.AchievementDefinition;\n",
"import com.faforever.client.events.PlayerAchievement;\n",
"import com.faforever.client.mod.ModInfoBean;\n"
] | false | 485b9f449670c122 | [
"A1",
"A2",
"A3"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 0717163a9b699341df602545324c78cdedb9be8d | ad661fd7c1825cf3b277a0b084385a3327cb5387 | 931ee1bcd3f791688d868cc654ff2c031d4cecc2 | src/main/java/com/faforever/client/config/ServiceConfig.java | 0 | 1 | [
"import com.faforever.client.replay.ReplayServiceImpl;\n",
"import com.faforever.client.reporting.ReportingService;\n",
"import com.faforever.client.reporting.ReportingServiceImpl;\n",
"import com.faforever.client.stats.StatisticsService;\n",
"import com.faforever.client.stats.StatisticsServiceImpl;\n",
"... | [
"import com.google.api.client.util.Beta;\n",
"import org.apache.lucene.store.Directory;\n",
"import org.apache.lucene.store.RAMDirectory;\n",
"import org.springframework.beans.factory.annotation.Autowired;\n"
] | [
"import org.springframework.beans.factory.annotation.Autowired;\n"
] | [] | [
"import org.springframework.context.annotation.Bean;\n",
"import org.springframework.context.annotation.Import;\n",
"import org.springframework.core.env.Environment;\n",
"import org.springframework.scheduling.TaskScheduler;\n",
"import org.springframework.scheduling.concurrent.ConcurrentTaskScheduler;\n",
... | [
"import com.google.api.client.util.Beta;\n",
"import org.apache.lucene.store.Directory;\n",
"import org.apache.lucene.store.RAMDirectory;\n",
"import org.springframework.beans.factory.annotation.Autowired;\n"
] | false | 6ad07e6f6e2daa0f | [
"A1",
"A2",
"A3",
"A4"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 0717163a9b699341df602545324c78cdedb9be8d | ad661fd7c1825cf3b277a0b084385a3327cb5387 | 931ee1bcd3f791688d868cc654ff2c031d4cecc2 | src/main/java/com/faforever/client/legacy/MockFafApiAccessor.java | 0 | 1 | [
"package com.faforever.client.legacy;\n",
"\n",
"import com.faforever.client.achievements.AchievementDefinition;\n",
"import com.faforever.client.achievements.PlayerAchievement;\n",
"import com.faforever.client.api.FafApiAccessor;\n"
] | [
"import com.faforever.client.events.AchievementDefinition;\n",
"import com.faforever.client.events.PlayerAchievement;\n",
"import com.faforever.client.mod.ModInfoBean;\n"
] | [
"import com.faforever.client.events.AchievementDefinition;\n",
"import com.faforever.client.events.PlayerAchievement;\n"
] | [] | [
"\n",
"import java.util.Arrays;\n",
"import java.util.Collections;\n",
"import java.util.List;\n",
"\n",
"public class MockFafApiAccessor implements FafApiAccessor {\n",
"\n",
" @Override\n",
" public List<PlayerAchievement> getPlayerAchievements(int playerId) {\n",
" return Collections.empty... | [
"import com.faforever.client.events.AchievementDefinition;\n",
"import com.faforever.client.events.PlayerAchievement;\n",
"import com.faforever.client.mod.ModInfoBean;\n"
] | false | 65be936a1fd28069 | [
"A1",
"A2",
"A3"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 0717163a9b699341df602545324c78cdedb9be8d | ad661fd7c1825cf3b277a0b084385a3327cb5387 | 931ee1bcd3f791688d868cc654ff2c031d4cecc2 | src/main/java/com/faforever/client/mod/ModTileController.java | 0 | 1 | [
"package com.faforever.client.mod;\n",
"\n",
"import com.faforever.client.i18n.I18n;\n",
"import com.faforever.client.notification.NotificationService;\n",
"import com.faforever.client.preferences.PreferencesService;\n",
"import com.faforever.client.reporting.ReportingService;\n",
"import com.faforever.... | [] | [
"import java.util.concurrent.CompletableFuture;\n"
] | [
"import javax.annotation.Resource;\n",
"import java.util.concurrent.CompletableFuture;\n"
] | [
"import java.util.function.Consumer;\n",
"\n",
"public class ModTileController {\n",
"\n",
" @FXML\n",
" Pane progressLayout;\n",
" @FXML\n",
" Label progressLabel;\n",
" @FXML\n",
" Label commentsLabel;\n",
" @FXML\n",
" ImageView thumbnailImageView;\n",
" @FXML\n",
" Label name... | [
"import javax.annotation.Resource;\n",
"import java.util.concurrent.CompletableFuture;\n"
] | false | db5dab7f540a604a | [
"B1",
"B2"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | b4e381776d6fd8e522b194c7686a9258de0be907 | 92fa0c22824f1e7c83bd2b1ad1889a087b3d582d | 37894a774b546b304b4df2258774edfcf3328dcf | src/main/java/com/faforever/client/chat/UserInfoWindowController.java | 0 | 1 | [
" Platform.runLater(() -> plotPlayerStatistics(result));\n",
" }\n",
"\n",
" @Override\n",
" public void error(Throwable e) {\n",
" // FIXME display to user\n",
" logger.warn(\"Statistics could not be loaded\", e);\n",
" }\n",
" });\n",
" }\n",
"\n",
... | [
" int minRating = RatingUtil.getGlobalRating(ratingInfo);\n",
" LocalDateTime dateTime = LocalDate.from(ratingInfo.date).atTime(ratingInfo.time);\n"
] | [
" int minRating = RatingUtil.getRating(ratingInfo);\n",
" LocalDateTime dateTime = LocalDate.from(ratingInfo.date).atTime(ratingInfo.time);\n"
] | [
" int minRating = RatingUtil.getRating(ratingInfo);\n",
" LocalDateTime dateTime = LocalDate.from(ratingInfo.getDate()).atTime(ratingInfo.getTime());\n"
] | [
" values.add(new XYChart.Data<>(dateTime.atZone(ZoneId.systemDefault()).toEpochSecond(), minRating));\n",
" }\n",
"\n",
" series.getData().setAll(FXCollections.observableList(values));\n",
" rating90DaysChart.getData().setAll(series);\n",
" }\n",
"\n",
" @FXML\n",
" void onRatingOve... | [
" int minRating = RatingUtil.getGlobalRating(ratingInfo);\n",
" LocalDateTime dateTime = LocalDate.from(ratingInfo.date).atTime(ratingInfo.time);\n"
] | false | 4da0babe178bafc6 | [
"A1",
"A2"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | b4e381776d6fd8e522b194c7686a9258de0be907 | 92fa0c22824f1e7c83bd2b1ad1889a087b3d582d | 37894a774b546b304b4df2258774edfcf3328dcf | src/main/java/com/faforever/client/game/GamesController.java | 0 | 1 | [
"\n",
" private void populateContainer(Node root) {\n",
" gameViewContainer.getChildren().setAll(root);\n",
" AnchorPane.setBottomAnchor(root, 0d);\n",
" AnchorPane.setLeftAnchor(root, 0d);\n",
" AnchorPane.setRightAnchor(root, 0d);\n",
" AnchorPane.setTopAnchor(root, 0d);\n",
" }\n",... | [
" hosterLabel.textProperty().bind(gameInfoBean.hostProperty());\n",
" gameModeLabel.textProperty().bind(gameInfoBean.featuredModProperty());\n",
" mapLabel.textProperty().bind(gameInfoBean.mapTechnicalNameProperty());\n"
] | [
" hosterLabel.textProperty().bind(gameInfoBean.hostProperty());\n",
" gameModeLabel.textProperty().bind(gameInfoBean.featuredModProperty());\n",
" mapLabel.textProperty().bind(gameInfoBean.technicalNameProperty());\n"
] | [
" hostLabel.textProperty().bind(gameInfoBean.hostProperty());\n",
" mapLabel.textProperty().bind(gameInfoBean.technicalNameProperty());\n",
"\n",
" gameInfoBean.featuredModProperty().addListener((observable, oldValue, newValue) -> {\n",
" updateGameType(newValue);\n",
" });\n",
" upd... | [
" createTeams(gameInfoBean.getTeams());\n",
" }\n",
"\n",
" private void updateGameType(String newValue) {\n",
" GameTypeBean gameType = gameService.getGameTypeByString(newValue);\n",
" String fullName = gameType != null ? gameType.getFullName() : null;\n",
" gameTypeLabel.setText(StringUt... | [
" hostLabel.textProperty().bind(gameInfoBean.hostProperty());\n",
" mapLabel.textProperty().bind(gameInfoBean.technicalNameProperty());\n",
"\n",
" gameInfoBean.featuredModProperty().addListener((observable, oldValue, newValue) -> {\n",
" updateGameType(newValue);\n",
" });\n",
" upd... | false | ea62df4ef539968c | [
"B1",
"B2",
"B3",
"B4",
"B5",
"B6",
"B7",
"B8",
"B9"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | b4e381776d6fd8e522b194c7686a9258de0be907 | 92fa0c22824f1e7c83bd2b1ad1889a087b3d582d | 37894a774b546b304b4df2258774edfcf3328dcf | src/main/java/com/faforever/client/util/RatingUtil.java | 0 | 1 | [
" private RatingUtil() {\n",
" // Utility class\n",
" }\n",
"\n",
" public static int getGlobalRating(PlayerInfo playerInfo) {\n",
" return getRating(playerInfo.getRatingMean(), playerInfo.getRatingDeviation());\n",
" }\n",
"\n",
" public static int getLadderRating(PlayerInfo playerInfo) ... | [
" public static int getGlobalRating(RatingInfo ratingInfo) {\n",
" return getRating(ratingInfo.mean, ratingInfo.dev);\n"
] | [
" public static int getRating(RatingInfo ratingInfo) {\n",
" return getRating(ratingInfo.mean, ratingInfo.dev);\n"
] | [
" public static int getRating(RatingInfo ratingInfo) {\n",
" return getRating(ratingInfo.getMean(), ratingInfo.getDev());\n"
] | [
" }\n",
"\n",
" public static int getGlobalRating(PlayerInfoBean playerInfo) {\n",
" return getRating(playerInfo.getGlobalRatingMean(), playerInfo.getGlobalRatingDeviation());\n",
" }\n",
"\n",
" public static String extractRating(String title) {\n",
" Matcher matcher = RATING_PATTERN.matche... | [
" public static int getGlobalRating(RatingInfo ratingInfo) {\n",
" return getRating(ratingInfo.mean, ratingInfo.dev);\n"
] | false | d17d8cb07e636629 | [
"A1",
"A2"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 5426e6f6994d8397603c022b43edb50531b5025e | 0e3b921898774bfaf05666e34afacbe24bacfb8d | 64b56a8981956ee33eadacb5b070922caef8850a | src/main/java/com/faforever/client/game/CreateGameController.java | 0 | 1 | [
" filteredMapBeans = new FilteredList<>(\n",
" mapService.getInstalledMaps().sorted((o1, o2) -> o1.getDisplayName().compareToIgnoreCase(o2.getDisplayName()))\n",
" );\n",
"\n",
" mapListView.setItems(filteredMapBeans);\n",
" mapListView.setCellFactory(param -> new StringListCell<>(MapBe... | [
" CompletableFuture.runAsync(() -> {\n"
] | [
"\n",
" MapSize mapSize = newValue.getSize();\n",
"\n",
" CompletableFuture.runAsync(() -> {\n"
] | [
" Platform.runLater(() -> {\n"
] | [
" Image largePreview = mapService.loadPreview(newValue.getFolderName(), PreviewSize.LARGE);\n",
" mapPreviewPane.setBackground(new Background(new BackgroundImage(largePreview, NO_REPEAT, NO_REPEAT, CENTER,\n",
" new BackgroundSize(BackgroundSize.AUTO, BackgroundSize.AUTO, false, false, true, ... | [
" CompletableFuture.runAsync(() -> {\n"
] | false | e9ca98f48f07bfcd | [
"A1"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 5426e6f6994d8397603c022b43edb50531b5025e | 0e3b921898774bfaf05666e34afacbe24bacfb8d | 64b56a8981956ee33eadacb5b070922caef8850a | src/test/java/com/faforever/client/notification/ImmediateNotificationControllerTest.java | 0 | 1 | [
"package com.faforever.client.notification;\n",
"\n",
"import com.faforever.client.test.AbstractPlainJavaFxTest;\n",
"import javafx.scene.control.Button;\n",
"import org.junit.Assert;\n",
"import org.junit.Before;\n",
"import org.junit.Test;\n",
"import org.testfx.util.WaitForAsyncUtils;\n",
"\n",
... | [
" @Mock\n",
" private WebViewConfigurer webViewConfigurer;\n",
"\n"
] | [
" private ImmediateNotificationController instance;\n",
"\n",
" @Mock\n",
" private WebViewConfigurer webViewConfigurer;\n",
"\n"
] | [] | [
" private ImmediateNotificationController instance;\n",
"\n",
" @Before\n",
" public void setUp() throws Exception {\n",
" instance = new ImmediateNotificationController();\n",
" loadFxml(\"theme/immediate_notification.fxml\", clazz -> instance);\n",
" }\n",
"\n",
" @Test\n",
" public ... | [
" @Mock\n",
" private WebViewConfigurer webViewConfigurer;\n",
"\n"
] | false | 2c9f7535aa4f3d6d | [
"A1",
"A2",
"A3"
] | side A | {
"test_file": true,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | d8567b5c2fd106392fc6e85afe8104f0dd6de523 | d9eee6c8671d7d4144bb26744c635f6d1835ffdd | 97cfeacd5d81fa52462142a8091c89396a52d0c2 | src/main/java/com/faforever/client/legacy/MockLobbyServerAccessor.java | 0 | 1 | [
" @Autowired\n",
" TaskService taskService;\n",
" @Autowired\n",
" NotificationService notificationService;\n",
" @Autowired\n",
" I18n i18n;\n",
" private OnPlayerInfoListener onPlayerInfoListener;\n",
"\n",
" public MockLobbyServerAccessor() {\n",
" onModInfoMessageListeners = new Arr... | [
" gameTypeInfo.setFullname(\"Forged Alliance Forever\");\n",
" gameTypeInfo.setName(\"faf\");\n",
" gameTypeInfo.setLive(true);\n",
" gameTypeInfo.setHost(true);\n"
] | [
" gameTypeInfo.fullname = \"Forged Alliance Forever\";\n",
" gameTypeInfo.name = \"faf\";\n",
" gameTypeInfo.live = true;\n",
" gameTypeInfo.host = true;\n"
] | [
" gameTypeInfo.fullname = \"Forged Alliance Forever\";\n",
" gameTypeInfo.name = \"faf\";\n",
" gameTypeInfo.live = true;\n",
" gameTypeInfo.host = true;\n",
" gameTypeInfo.desc = \"Description\";\n"
] | [
"\n",
" onModInfoMessageListener.onGameTypeInfo(gameTypeInfo);\n",
" }\n",
"\n",
" if (onPlayerInfoListener != null) {\n",
" PlayerInfo playerInfo = new PlayerInfo();\n",
" playerInfo.setLogin(userService.getUsername());\n",
" playerInfo.setClan(\"ABC\... | [
" gameTypeInfo.setFullname(\"Forged Alliance Forever\");\n",
" gameTypeInfo.setName(\"faf\");\n",
" gameTypeInfo.setLive(true);\n",
" gameTypeInfo.setHost(true);\n",
" gameTypeInfo.setDesc(\"Description\");\n"
] | false | f9ab44c9159750e0 | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | d8567b5c2fd106392fc6e85afe8104f0dd6de523 | d9eee6c8671d7d4144bb26744c635f6d1835ffdd | 97cfeacd5d81fa52462142a8091c89396a52d0c2 | src/test/java/com/faforever/client/game/GameTiledControllerTest.java | 0 | 1 | [
"package com.faforever.client.game;\n",
"\n"
] | [] | [
"import com.faforever.client.legacy.domain.GameInfo;\n"
] | [
"import com.faforever.client.legacy.domain.GameInfo;\n",
"import com.faforever.client.map.MapService;\n"
] | [
"import com.faforever.client.test.AbstractSpringJavaFxTest;\n",
"import com.faforever.client.util.Callback;\n",
"import javafx.collections.FXCollections;\n",
"import javafx.collections.ObservableList;\n",
"import javafx.scene.Node;\n",
"import javafx.scene.layout.Pane;\n",
"import org.junit.Before;\n",
... | [
"import com.faforever.client.legacy.domain.GameInfo;\n",
"import com.faforever.client.map.MapService;\n"
] | false | 13af74c7b8c328f3 | [
"B1",
"B2"
] | side B | {
"test_file": true,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | af58dd86cfd2fbdb69b99b606b55b87b23050804 | 3db78c4956b6bcb1259c55d73fab754ba05fb806 | a38704517a6ddd2be93aaa152ca6520450d53e37 | src/main/java/com/faforever/client/main/MainController.java | 0 | 1 | [
" taskProgressBar.progressProperty().bind(task.progressProperty());\n",
"\n",
" taskProgressLabel.setVisible(true);\n",
" taskProgressLabel.textProperty().bind(task.titleProperty());\n",
" });\n",
" }\n",
"\n",
" private void hideAllMenuDropdowns() {\n",
" mainNavigation.getCh... | [
" // We need to initialize all skins, so initially add the chat root to the scene graph.\n",
" setContent(chatController.getRoot());\n"
] | [] | [
" lobbyService.setOnFafConnectedListener(this);\n",
" lobbyService.setOnLobbyConnectingListener(this);\n",
" lobbyService.setOnFafDisconnectedListener(this);\n"
] | [
"\n",
" persistentNotificationsPopup = new Popup();\n",
" persistentNotificationsPopup.getContent().setAll(persistentNotificationsController.getRoot());\n",
" persistentNotificationsPopup.setAnchorLocation(PopupWindow.AnchorLocation.CONTENT_TOP_RIGHT);\n",
" persistentNotificationsPopup.setAutoF... | [
" // We need to initialize all skins, so initially add the chat root to the scene graph.\n",
" setContent(chatController.getRoot());\n",
"\n",
" lobbyService.setOnFafConnectedListener(this);\n",
" lobbyService.setOnLobbyConnectingListener(this);\n",
" lobbyService.setOnFafDisconnectedListen... | false | ce5f18a25f397040 | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | af58dd86cfd2fbdb69b99b606b55b87b23050804 | 3db78c4956b6bcb1259c55d73fab754ba05fb806 | a38704517a6ddd2be93aaa152ca6520450d53e37 | src/test/java/com/faforever/client/main/MainControllerTest.java | 0 | 4 | [
" when(preferences.getForgedAlliance()).thenReturn(forgedAlliancePrefs);\n",
" when(preferences.getNotification()).thenReturn(notificationPrefs);\n",
" when(notificationPrefs.toastPositionProperty()).thenReturn(new SimpleObjectProperty<>(ToastPosition.BOTTOM_RIGHT));\n",
" when(notificationPrefs.g... | [
" when(portCheckService.checkGamePortInBackground()).thenReturn(CompletableFuture.completedFuture(PUBLIC));\n"
] | [
" when(portCheckService.checkGamePortInBackground()).thenReturn(CompletableFuture.completedFuture(true));\n"
] | [
" fakeLogin();\n",
"\n"
] | [
" when(communityHubController.getRoot()).thenReturn(new Pane());\n",
" WaitForAsyncUtils.waitForAsyncFx(1000, () -> instance.display());\n",
" when(mainWindowPrefs.getLastView()).thenReturn(instance.communityButton.getId());\n",
"\n",
" verify(portCheckService).checkGamePortInBackground();\n",
... | [
" fakeLogin();\n",
"\n"
] | false | 72757a4169063b44 | [
"B1",
"B2"
] | side B | {
"test_file": true,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | af58dd86cfd2fbdb69b99b606b55b87b23050804 | 3db78c4956b6bcb1259c55d73fab754ba05fb806 | a38704517a6ddd2be93aaa152ca6520450d53e37 | src/test/java/com/faforever/client/main/MainControllerTest.java | 1 | 4 | [
" @Test\n",
" @Ignore(\"Not yet implemented\")\n",
" public void testOnPortCheckHelpClicked() throws Exception {\n",
" instance.onPortCheckHelpClicked();\n",
" }\n",
"\n",
" @Test\n",
" @Ignore(\"Not yet implemented\")\n",
" public void testOnChangePortClicked() throws Exception {\n",
" ... | [
" when(portCheckService.checkGamePortInBackground()).thenReturn(CompletableFuture.completedFuture(PUBLIC));\n",
"\n"
] | [
" when(portCheckService.checkGamePortInBackground()).thenReturn(CompletableFuture.completedFuture(true));\n",
"\n"
] | [] | [
" instance.onPortCheckRetryClicked();\n",
"\n",
" verify(portCheckService).checkGamePortInBackground();\n",
" }\n",
"\n",
" @Test\n",
" @Ignore(\"Not yet implemented\")\n",
" public void testOnFafReconnectClicked() throws Exception {\n",
" instance.onFafReconnectClicked();\n",
" }\n"... | [] | false | aaef4236957c3b21 | [] | side B | {
"test_file": true,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | af58dd86cfd2fbdb69b99b606b55b87b23050804 | 3db78c4956b6bcb1259c55d73fab754ba05fb806 | a38704517a6ddd2be93aaa152ca6520450d53e37 | src/test/java/com/faforever/client/main/MainControllerTest.java | 2 | 4 | [
" WaitForAsyncUtils.waitForAsyncFx(5000, () -> instance.portCheckStatusButton.setText(disconnected));\n",
"\n",
" CompletableFuture<ConnectivityState> future = new CompletableFuture<>();\n",
" future.completeExceptionally(new Exception(\"test exception\"));\n",
" when(portCheckService.checkGameP... | [
" when(portCheckService.checkGamePortInBackground()).thenReturn(CompletableFuture.completedFuture(PUBLIC));\n"
] | [
" when(portCheckService.checkGamePortInBackground()).thenReturn(CompletableFuture.completedFuture(true));\n"
] | [
" attachToRoot();\n",
" fakeLogin();\n"
] | [
"\n",
" WaitForAsyncUtils.waitForAsyncFx(1000, () -> instance.display());\n",
"\n",
" String textAfterConnection = instance.portCheckStatusButton.getText();\n",
" assertThat(textAfterConnection, not(disconnected));\n",
" }\n",
"\n",
" @Test\n",
" public void testOnGamePortCheckResultUnre... | [
" attachToRoot();\n",
" fakeLogin();\n"
] | false | 89a4f8820ef62b19 | [
"B1",
"B2"
] | side B | {
"test_file": true,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | af58dd86cfd2fbdb69b99b606b55b87b23050804 | 3db78c4956b6bcb1259c55d73fab754ba05fb806 | a38704517a6ddd2be93aaa152ca6520450d53e37 | src/test/java/com/faforever/client/main/MainControllerTest.java | 3 | 4 | [
"\n",
" WaitForAsyncUtils.waitForAsyncFx(1000, () -> instance.display());\n",
"\n",
" String textAfterConnection = instance.portCheckStatusButton.getText();\n",
" assertThat(textAfterConnection, not(disconnected));\n",
" }\n",
"\n",
" @Test\n",
" public void testOnGamePortCheckResultUnre... | [
" when(portCheckService.checkGamePortInBackground()).thenReturn(CompletableFuture.completedFuture(PROXY));\n"
] | [
" when(portCheckService.checkGamePortInBackground()).thenReturn(CompletableFuture.completedFuture(false));\n"
] | [
" when(portCheckService.checkGamePortInBackground()).thenReturn(CompletableFuture.completedFuture(false));\n",
" attachToRoot();\n",
" fakeLogin();\n"
] | [
"\n",
" WaitForAsyncUtils.waitForAsyncFx(1000, () -> instance.display());\n",
"\n",
" String textAfterConnection = instance.portCheckStatusButton.getText();\n",
" assertThat(textAfterConnection, not(disconnected));\n",
" }\n",
"\n",
" @Test\n",
" @Ignore(\"Not yet implemented\")\n",
" ... | [
" when(portCheckService.checkGamePortInBackground()).thenReturn(CompletableFuture.completedFuture(PROXY));\n"
] | false | f7be3960d9f7a88a | [
"A1"
] | side A | {
"test_file": true,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 296860ff1f615e14a01cc6eae855fd9231c504e6 | b2f627094452d4795dadae52424b229f53c8bc21 | d07c9814e6dd31b8b83d8c07136344e06340f0d5 | src/main/java/com/faforever/client/Main.java | 0 | 1 | [
"package com.faforever.client;\n",
"\n",
"import com.faforever.client.config.*;\n"
] | [
"import com.faforever.client.fx.JavaFxHostService;\n"
] | [
"import com.faforever.client.config.BaseConfig;\n",
"import com.faforever.client.config.CacheConfig;\n",
"import com.faforever.client.config.LuceneConfig;\n",
"import com.faforever.client.config.ServiceConfig;\n",
"import com.faforever.client.config.TaskConfig;\n",
"import com.faforever.client.config.UiCo... | [] | [
"import com.faforever.client.fx.JavaFxUtil;\n",
"import com.faforever.client.fx.PlatformServiceImpl;\n",
"import com.faforever.client.main.MainController;\n",
"import com.faforever.client.preferences.PreferencesService;\n",
"import com.faforever.client.theme.ThemeService;\n",
"import com.google.common.ann... | [] | false | 484f6572664b5010 | [] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | eeaf35b67dcde29eeda13f913106158bb88c77ca | 683b0c891d0e76c9a54c1c687706be04b0d266ea | cb5caa098becfd5d4da313d8f80f82a319b8f353 | src/main/java/com/faforever/client/chat/ChannelTabController.java | 1 | 2 | [
"import org.springframework.context.ApplicationContext;\n",
"\n"
] | [
"import javax.annotation.PostConstruct;\n"
] | [] | [
"import javax.annotation.Resource;\n"
] | [
"import java.util.ArrayList;\n",
"import java.util.Collection;\n",
"import java.util.HashMap;\n",
"import java.util.Map;\n",
"import java.util.concurrent.ConcurrentHashMap;\n",
"\n",
"public class ChannelTabController extends AbstractChatTabController {\n",
"\n",
" @VisibleForTesting\n",
" stati... | [
"import javax.annotation.Resource;\n",
"import javax.annotation.PostConstruct;\n"
] | false | 42a58af571947ddb | [
"B1",
"A1"
] | B then A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | eeaf35b67dcde29eeda13f913106158bb88c77ca | 683b0c891d0e76c9a54c1c687706be04b0d266ea | cb5caa098becfd5d4da313d8f80f82a319b8f353 | src/main/java/com/faforever/client/chat/ChatUserContextMenuController.java | 2 | 3 | [
" MenuItem watchGameItem;\n",
"\n",
" @FXML\n",
" MenuItem viewReplaysItem;\n",
"\n",
" @FXML\n",
" MenuItem inviteItem;\n",
"\n",
" @FXML\n",
" SeparatorMenuItem moderatorActionSeparator;\n",
"\n",
" @FXML\n",
" MenuItem kickItem;\n",
"\n",
" @FXML\n",
" MenuItem banItem;\n... | [
" @Autowired\n",
" UserService userService;\n",
"\n",
" @Autowired\n",
" ChatService chatService;\n",
"\n",
" @Autowired\n",
" PreferencesService preferencesService;\n",
"\n",
" @Autowired\n"
] | [
" @Autowired\n"
] | [
" @Resource\n"
] | [
" ApplicationContext applicationContext;\n",
"\n",
" @Resource\n",
" SceneFactory sceneFactory;\n",
"\n",
" @Resource\n",
" PlayerService playerService;\n",
"\n",
" @Autowired\n",
" GameService gameService;\n",
"\n",
" @Autowired\n",
" ReplayService replayService;\n",
"\n",
" @... | [
" @Resource\n",
" UserService userService;\n",
"\n",
" @Resource\n",
" ChatService chatService;\n",
"\n",
" @Resource\n",
" PreferencesService preferencesService;\n",
"\n",
" @Resource\n"
] | false | 41b9efc8740bdc4c | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | eeaf35b67dcde29eeda13f913106158bb88c77ca | 683b0c891d0e76c9a54c1c687706be04b0d266ea | cb5caa098becfd5d4da313d8f80f82a319b8f353 | src/main/java/com/faforever/client/chat/ChatUserControl.java | 3 | 6 | [
" FxmlLoader fxmlLoader;\n"
] | [
" @Autowired\n"
] | [
"\n",
" @Autowired\n"
] | [
"\n",
" @Resource\n"
] | [
" AvatarService avatarService;\n"
] | [
"\n",
" @Resource\n"
] | false | a306cdbb95e5f5e1 | [
"B1",
"B2"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | eeaf35b67dcde29eeda13f913106158bb88c77ca | 683b0c891d0e76c9a54c1c687706be04b0d266ea | cb5caa098becfd5d4da313d8f80f82a319b8f353 | src/main/java/com/faforever/client/chat/ChatUserControl.java | 4 | 6 | [
" AvatarService avatarService;\n"
] | [
" @Autowired\n"
] | [
"\n",
" @Autowired\n"
] | [
"\n",
" @Resource\n"
] | [
" CountryFlagService countryFlagService;\n"
] | [
"\n",
" @Resource\n"
] | false | 2dbfb054b8a62968 | [
"B1",
"B2"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | eeaf35b67dcde29eeda13f913106158bb88c77ca | 683b0c891d0e76c9a54c1c687706be04b0d266ea | cb5caa098becfd5d4da313d8f80f82a319b8f353 | src/main/java/com/faforever/client/preferences/SettingsController.java | 0 | 1 | [
"package com.faforever.client.preferences;\n",
"\n",
"import com.faforever.client.chat.ChatColorMode;\n",
"import com.faforever.client.i18n.I18n;\n",
"import com.faforever.client.util.JavaFxUtil;\n",
"import javafx.collections.FXCollections;\n",
"import javafx.fxml.FXML;\n",
"import javafx.scene.contr... | [
"import org.jetbrains.annotations.NotNull;\n",
"import org.springframework.beans.factory.annotation.Autowired;\n"
] | [
"import org.springframework.beans.factory.annotation.Autowired;\n"
] | [] | [
"\n",
"import javax.annotation.PostConstruct;\n",
"import javax.annotation.Resource;\n",
"import java.text.NumberFormat;\n",
"\n",
"public class SettingsController {\n",
"\n",
" @FXML\n",
" ComboBox<ChatColorMode> colorMode;\n",
"\n",
" @FXML\n",
" CheckBox hideFoeCheckBox;\n",
"\n",
"... | [
"import org.jetbrains.annotations.NotNull;\n",
"import org.springframework.beans.factory.annotation.Autowired;\n"
] | false | 47ef6056e1675c6a | [
"A1",
"A2"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | ad4255e53b65377f4914fcf0bc86804d0eaffd67 | c93c2c9744293c1892dc3d9bbf34c7e3db956166 | 0d03fecc1dca61010ceb6f40c7dd4aef455f45f8 | src/main/java/com/faforever/client/player/PlayerServiceImpl.java | 0 | 2 | [
"import java.util.List;\n",
"import java.util.Set;\n",
"import java.util.concurrent.locks.Lock;\n",
"import java.util.concurrent.locks.ReentrantLock;\n",
"\n",
"public class PlayerServiceImpl implements PlayerService, OnPlayerInfoListener, OnFoeListListener, OnFriendListListener {\n",
"\n",
" private... | [
" private PlayerInfoBean currentPlayer;\n",
" private GameStatus gamestatus;\n"
] | [
" private PlayerInfoBean currentPlayer;\n"
] | [
" private ObjectProperty<PlayerInfoBean> currentPlayer;\n"
] | [
"\n",
" public PlayerServiceImpl() {\n",
" players = FXCollections.observableHashMap();\n",
" friendList = new ArrayList<>();\n",
" foeList = new ArrayList<>();\n"
] | [
" private ObjectProperty<PlayerInfoBean> currentPlayer;\n",
" private GameStatus gamestatus;\n"
] | false | dbdf3cd7f48030b6 | [
"B1",
"A2"
] | mix of lines | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | ad4255e53b65377f4914fcf0bc86804d0eaffd67 | c93c2c9744293c1892dc3d9bbf34c7e3db956166 | 0d03fecc1dca61010ceb6f40c7dd4aef455f45f8 | src/main/java/com/faforever/client/player/PlayerServiceImpl.java | 1 | 2 | [
"\n",
" public PlayerServiceImpl() {\n",
" players = FXCollections.observableHashMap();\n",
" friendList = new ArrayList<>();\n",
" foeList = new ArrayList<>();\n"
] | [
" gamestatus = GameStatus.NONE;\n",
" }\n",
"\n",
" public GameStatus getGamestatus() {\n",
" return gamestatus;\n",
" }\n",
"\n",
" public void setGamestatus(GameStatus gamestatus) {\n",
" this.gamestatus = gamestatus;\n"
] | [] | [
" currentPlayer = new SimpleObjectProperty<>();\n"
] | [
" }\n",
"\n",
" @PostConstruct\n",
" void init() {\n",
" lobbyServerAccessor.setOnPlayerInfoMessageListener(this);\n",
" lobbyServerAccessor.setOnFoeListListener(this);\n",
" lobbyServerAccessor.setOnFriendListListener(this);\n",
" gameService.addOnGameInfoBeanListener(change -> {\n",
... | [
" gamestatus = GameStatus.NONE;\n",
" currentPlayer = new SimpleObjectProperty<>();\n",
" }\n",
"\n",
" public GameStatus getGamestatus() {\n",
" return gamestatus;\n",
" }\n",
"\n",
" public void setGamestatus(GameStatus gamestatus) {\n",
" this.gamestatus = gamestatus;\n"
] | false | 65c896aa546bd8ca | [
"A1",
"B1",
"A2",
"A3",
"A4",
"A5",
"A6",
"A7",
"A8",
"A9"
] | mix of lines | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | ad4255e53b65377f4914fcf0bc86804d0eaffd67 | c93c2c9744293c1892dc3d9bbf34c7e3db956166 | 0d03fecc1dca61010ceb6f40c7dd4aef455f45f8 | src/main/java/com/faforever/client/util/JavaFxUtil.java | 0 | 1 | [
" engine.setUserDataDirectory(preferencesService.getCacheDirectory().toFile());\n",
" try {\n",
" engine.setUserStyleSheetLocation(new ClassPathResource(ThemeUtil.themeFile(theme, \"style-webview.css\")).getURL().toString());\n",
" } catch (IOException e) {\n",
" throw new RuntimeExceptio... | [
" public static String toRgbCode(Color color) {\n",
" return String.format(\"#%02X%02X%02X\",\n",
" (int) (color.getRed() * 255),\n",
" (int) (color.getGreen() * 255),\n",
" (int) (color.getBlue() * 255));\n"
] | [] | [
" public static <T> void bindOnApplicationThread(Property<T> property, Callable<T> function, ObservableValue<?>... dependencies) {\n",
" Runnable updateFunction = () -> Platform.runLater(() -> {\n",
" try {\n",
" property.setValue(function.call());\n",
" } catch (Exception e) {\n",
" ... | [
" }\n",
"}\n"
] | [
" public static <T> void bindOnApplicationThread(Property<T> property, Callable<T> function, ObservableValue<?>... dependencies) {\n",
" Runnable updateFunction = () -> Platform.runLater(() -> {\n",
" try {\n",
" property.setValue(function.call());\n",
" } catch (Exception e) {\n",
" ... | false | 235119813434864c | null | needs new code | {
"test_file": false,
"benchmark_size": false,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | ad4255e53b65377f4914fcf0bc86804d0eaffd67 | c93c2c9744293c1892dc3d9bbf34c7e3db956166 | 0d03fecc1dca61010ceb6f40c7dd4aef455f45f8 | src/test/java/com/faforever/client/test/AbstractPlainJavaFxTest.java | 0 | 2 | [
"import javafx.fxml.FXMLLoader;\n",
"import javafx.scene.Scene;\n",
"import javafx.scene.layout.Pane;\n",
"import javafx.stage.Stage;\n",
"import org.junit.Assert;\n",
"import org.mockito.Mock;\n",
"import org.mockito.MockitoAnnotations;\n",
"import org.slf4j.Logger;\n",
"import org.slf4j.LoggerFact... | [
"import java.util.concurrent.TimeUnit;\n"
] | [] | [] | [
"\n",
"public class AbstractPlainJavaFxTest extends ApplicationTest {\n",
"\n",
" private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());\n",
" private static final long TIMEOUT = 5000;\n",
" private static final TimeUnit TIMEOUT_UNIT = TimeUnit.MILLISECONDS;... | [
"import java.util.concurrent.TimeUnit;\n"
] | false | 36bc6ee9ff9e0a2a | [
"A1"
] | side A | {
"test_file": true,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | ad4255e53b65377f4914fcf0bc86804d0eaffd67 | c93c2c9744293c1892dc3d9bbf34c7e3db956166 | 0d03fecc1dca61010ceb6f40c7dd4aef455f45f8 | src/test/java/com/faforever/client/test/AbstractPlainJavaFxTest.java | 1 | 2 | [
"\n",
" public AbstractPlainJavaFxTest() {\n",
" root = new Pane();\n",
" }\n",
"\n",
" @Override\n",
" public void start(Stage stage) throws Exception {\n",
" this.stage = stage;\n",
" MockitoAnnotations.initMocks(this);\n",
" Thread.setDefaultUncaughtExceptionHandler(AbstractPlai... | [
" private void uncaughtException(Thread t, Throwable e) {\n",
" logger.warn(\"Uncaught exception\", e.getCause());\n",
" Assert.fail(e.getMessage());\n",
" }\n",
"\n",
" protected <T> T loadController(String fileName) throws Exception {\n",
" ResourceBundleMessageSource messageSource = new R... | [
" private void uncaughtException(Thread t, Throwable e) {\n",
" logger.warn(\"Uncaught exception\", e);\n",
" Assert.fail(e.getMessage());\n",
" }\n",
"\n",
" protected <T> T loadController(String fileName) throws IOException {\n",
" ResourceBundleMessageSource messageSource = new ResourceBu... | [] | [
" protected Scene getScene() {\n",
" return scene;\n",
" }\n",
"\n",
" protected Stage getStage() {\n",
" return stage;\n",
" }\n",
"\n",
" private static void uncaughtException(Thread t, Throwable e) {\n",
" Assert.fail(e.getMessage());\n",
" }\n",
"\n",
" protected static <... | [] | false | a0e7273e41fc62f7 | [] | side B | {
"test_file": true,
"benchmark_size": false,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 1bd24726c2972651879c21c63e04b8aeff76c873 | 6a6cd46cbe2d6efc67d9e9cb5727d64d45d073cd | be9c7eb6bad2345b7aab827bc29a52552f5cbb31 | src/main/java/com/faforever/client/config/PreferencesConfig.java | 0 | 1 | [
" public VaultPrefs vault() {\n",
" return preferences().getVault();\n",
" }\n",
"\n",
" @Bean\n",
" public LiveReplaySearchPrefs liveReplaySearchPrefs() {\n",
" return preferences().getVault().getLiveReplaySearch();\n",
" }\n",
"\n",
" @Bean\n",
" public UserPrefs user() {\n",
" ... | [
" public IceAdapterPrefs iceAdapterPrefs() {return preferences().getIceAdapter();}\n"
] | [] | [
" public ReplayHistoryPrefs replayHistory() {return preferences().getReplayHistory();}\n"
] | [
"\n",
" private ObjectMapper configureObjectMapper(ObjectMapper objectMapper) {\n",
" ObjectMapper configuredObjectMapper = objectMapper.copy().setSerializationInclusion(Include.NON_EMPTY)\n",
" .enable(SerializationFeature.INDENT_OUTPUT)\n",
" .disable(DeserializationFeature.FAIL_ON_UNKNO... | [
" public IceAdapterPrefs iceAdapterPrefs() {return preferences().getIceAdapter();}\n",
"\n",
" @Bean\n",
" public ReplayHistoryPrefs replayHistory() {return preferences().getReplayHistory();}\n"
] | false | 3b002cf6d71e3cf1 | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 1bd24726c2972651879c21c63e04b8aeff76c873 | 6a6cd46cbe2d6efc67d9e9cb5727d64d45d073cd | be9c7eb6bad2345b7aab827bc29a52552f5cbb31 | src/main/java/com/faforever/client/game/GameRunner.java | 0 | 1 | [
" if (matchmakerFuture != null) {\n",
" matchmakerFuture.cancel(true);\n",
" }\n",
" }\n",
"\n",
" public boolean isRunning() {\n",
" return running.get();\n",
" }\n",
"\n",
" private boolean waitingForMatchMakerGame() {\n",
" return matchmakerFuture != null && !matchmakerFu... | [] | [
" private CompletableFuture<Integer> startIceAdapter(int uid) {\n",
" return iceAdapter.start(uid)\n",
" .thenCompose(icePort -> coturnService.getSelectedCoturns(uid)\n",
" .collectList()\n",
" ... | [
" private CompletableFuture<Integer> startIceAdapter(int uid) {\n",
" return coturnService.getIceSession(uid)\n",
" .toFuture()\n",
" .thenCompose(session -> iceAdapter.start(uid, session.forceRelay()).thenApply(result -> {\n",
" ice... | [
" private Mono<League> getDivisionInfo(String leaderboard) {\n",
" return leaderboardService.getActiveLeagueEntryForPlayer(playerService.getCurrentPlayer(), leaderboard)\n",
" .map(LeagueEntry::subdivision)\n",
" .map(subdivision -> {\n",
" ... | [] | false | 7c806e622ca31044 | [] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 1bd24726c2972651879c21c63e04b8aeff76c873 | 6a6cd46cbe2d6efc67d9e9cb5727d64d45d073cd | be9c7eb6bad2345b7aab827bc29a52552f5cbb31 | src/test/java/com/faforever/client/game/GameRunnerTest.java | 0 | 4 | [
" private LastGamePrefs lastGamePrefs;\n",
" @Spy\n",
" private NotificationPrefs notificationPrefs;\n",
"\n",
" @Mock\n",
" private EnterPasswordController enterPasswordController;\n",
"\n",
" private final TestPublisher<NoticeInfo> testNoticePublisher = TestPublisher.create();\n",
"\n",
" ... | [] | [
" lenient().when(coturnService.getSelectedCoturns(anyInt())).thenReturn(Flux.empty());\n"
] | [
" lenient().when(coturnService.getIceSession(anyInt()))\n",
" .thenReturn(Mono.just(new IceSession(\"someSessionId\", false, List.of())));\n"
] | [
" lenient().when(preferencesService.hasValidGamePath()).thenReturn(true);\n",
" lenient().when(fafServerAccessor.connectionStateProperty()).thenReturn(new SimpleObjectProperty<>());\n",
" lenient().when(replayServer.start(anyInt())).thenReturn(completedFuture(LOCAL_REPLAY_PORT));\n"
] | [] | false | cbe6241202e1d715 | [] | side A | {
"test_file": true,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 1bd24726c2972651879c21c63e04b8aeff76c873 | 6a6cd46cbe2d6efc67d9e9cb5727d64d45d073cd | be9c7eb6bad2345b7aab827bc29a52552f5cbb31 | src/test/java/com/faforever/client/game/GameRunnerTest.java | 1 | 4 | [
" lenient().when(preferencesService.hasValidGamePath()).thenReturn(true);\n",
" lenient().when(fafServerAccessor.connectionStateProperty()).thenReturn(new SimpleObjectProperty<>());\n",
" lenient().when(replayServer.start(anyInt())).thenReturn(completedFuture(LOCAL_REPLAY_PORT));\n"
] | [
" lenient().when(gpgNetServer.start(anyInt(), any(LobbyInitMode.class))).thenReturn(completedFuture(GPG_PORT));\n"
] | [
" lenient().when(iceAdapter.start(anyInt())).thenReturn(completedFuture(GPG_PORT));\n"
] | [
" lenient().when(iceAdapter.start(anyInt(), anyBoolean())).thenReturn(completedFuture(GPG_PORT));\n"
] | [
" lenient().when(playerService.getCurrentPlayer()).thenReturn(junitPlayer);\n",
" lenient().when(process.pid()).thenReturn(10L);\n",
" lenient().when(iceAdapterService.getNewest()).thenReturn(Mono.empty());\n",
"\n",
" lenient().doAnswer(invocation -> {\n",
" try {\n",
" ((Runnab... | [
" lenient().when(gpgNetServer.start(anyInt(), any(LobbyInitMode.class))).thenReturn(completedFuture(GPG_PORT));\n"
] | false | 51eebea2e4760e09 | [
"A1"
] | side A | {
"test_file": true,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 1bd24726c2972651879c21c63e04b8aeff76c873 | 6a6cd46cbe2d6efc67d9e9cb5727d64d45d073cd | be9c7eb6bad2345b7aab827bc29a52552f5cbb31 | src/test/java/com/faforever/client/game/GameRunnerTest.java | 3 | 4 | [
" public void testStartOnlineGlobalGame() throws Exception {\n",
" GameLaunchResponse gameLaunchResponse = GameLaunchMessageBuilder.create().defaultValues().get();\n",
" mockStartGameProcess(gameLaunchResponse);\n",
"\n",
" CompletableFuture<Process> exitFuture = new CompletableFuture<>();\n",
"... | [
" verify(gpgNetServer).start(uid, LobbyInitMode.NORMAL);\n"
] | [
" verify(iceAdapter).start(uid);\n",
" verify(coturnService).getSelectedCoturns(uid);\n",
" verify(iceAdapter).setIceServers(anyCollection());\n"
] | [
" verify(iceAdapter).start(uid, false);\n",
" verify(coturnService).getIceSession(uid);\n",
" verify(iceAdapter).setIceServers(anyCollection());\n"
] | [
" assertTrue(instance.isRunning());\n",
" assertEquals(uid, instance.getRunningGame().getId());\n",
" assertEquals(10L, instance.getRunningProcessId());\n",
" assertNotNull(instance.getRunningGame());\n",
"\n",
" assertNull(gameParameters.league());\n",
"\n",
" exitFuture.complete(pr... | [
" verify(gpgNetServer).start(uid, LobbyInitMode.NORMAL);\n"
] | false | 0b6b10f486b33cab | [
"A1"
] | side A | {
"test_file": true,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 4b617b812cfad2c4314622bbc5bddb2d6271a3cb | 5ce4670c2686e69536fdfffe6390ad3756e0cfcd | 2f537b10c451517e9fe6614584a59bc07c726511 | src/test/java/com/faforever/client/game/GameServiceTest.java | 0 | 1 | [
"import com.faforever.client.replay.ReplayServer;\n",
"import com.faforever.client.reporting.ReportingService;\n",
"import com.faforever.client.test.AbstractPlainJavaFxTest;\n",
"import com.faforever.client.ui.preferences.event.GameDirectoryChooseEvent;\n",
"import com.google.common.eventbus.EventBus;\n",
... | [] | [
"import java.util.Collections;\n"
] | [
"import java.nio.file.Path;\n",
"import java.nio.file.Paths;\n",
"import java.util.Collections;\n"
] | [
"import java.util.Optional;\n",
"import java.util.Set;\n",
"import java.util.concurrent.CompletableFuture;\n",
"import java.util.concurrent.CountDownLatch;\n",
"import java.util.concurrent.ExecutorService;\n",
"import java.util.concurrent.TimeUnit;\n",
"import java.util.function.Consumer;\n",
"import ... | [
"import java.nio.file.Path;\n",
"import java.nio.file.Paths;\n",
"import java.util.Collections;\n"
] | false | d584e33bab639ac1 | [
"B1",
"B2",
"B3"
] | side B | {
"test_file": true,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 9b192e063c3253c7a2a3255c3aa60f2cb01adc59 | 400441fe4b635d547a74cc7d118da0d14d99f020 | 0048b9a3d1aeb891c0122b7b1b0f95826ed06d22 | src/main/java/com/faforever/client/legacy/LobbyServerAccessorImpl.java | 1 | 8 | [
"import com.faforever.client.legacy.domain.PlayerInfo;\n",
"import com.faforever.client.legacy.domain.Ranked1v1SearchExpansionMessage;\n",
"import com.faforever.client.legacy.domain.RequestModsMessage;\n",
"import com.faforever.client.legacy.domain.ServerCommand;\n",
"import com.faforever.client.legacy.doma... | [] | [
"import com.faforever.client.preferences.LoginPrefs;\n"
] | [
"import com.faforever.client.login.LoginFailedException;\n",
"import com.faforever.client.preferences.LoginPrefs;\n"
] | [
"import com.faforever.client.preferences.PreferencesService;\n",
"import com.faforever.client.rankedmatch.OnRankedMatchNotificationListener;\n",
"import com.faforever.client.rankedmatch.RankedMatchNotification;\n",
"import com.faforever.client.rankedmatch.SearchRanked1v1Message;\n",
"import com.faforever.cl... | [
"import com.faforever.client.login.LoginFailedException;\n"
] | false | 1b18cdb141fcc8bf | [
"B1"
] | mix of lines | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 9b192e063c3253c7a2a3255c3aa60f2cb01adc59 | 400441fe4b635d547a74cc7d118da0d14d99f020 | 0048b9a3d1aeb891c0122b7b1b0f95826ed06d22 | src/main/java/com/faforever/client/legacy/LobbyServerAccessorImpl.java | 3 | 8 | [
"\n",
" try (Socket fafServerSocket = new Socket(lobbyHost, lobbyPort);\n",
" OutputStream outputStream = fafServerSocket.getOutputStream()) {\n",
" this.fafServerSocket = fafServerSocket;\n",
"\n",
" fafServerSocket.setKeepAlive(true);\n",
"\n",
" ... | [
" if (isCancelled()) {\n",
" logger.debug(\"Connection to FAF server has been closed\");\n"
] | [
" if (isCancelled()) {\n",
" logger.debug(\"Login has been cancelled\");\n"
] | [
" if (isCancelled() && loginCallback != null) {\n",
" logger.debug(\"Login has been cancelled\");\n",
" } else if (isCancelled()) {\n",
" logger.debug(\"Log out\");\n"
] | [
" } else {\n",
" logger.warn(\"Lost connection to FAF server, trying to reconnect in \" + RECONNECT_DELAY / 1000 + \"s\", e);\n",
" if (onFafDisconnectedListener != null) {\n",
" Platform.runLater(onFafDisconnectedListener::onFafDisconnected);\n",
" ... | [
" if (isCancelled()) {\n",
" logger.debug(\"Connection to FAF server has been closed\");\n"
] | false | 4b8482929dd171a0 | [
"A1",
"A2"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 9b192e063c3253c7a2a3255c3aa60f2cb01adc59 | 400441fe4b635d547a74cc7d118da0d14d99f020 | 0048b9a3d1aeb891c0122b7b1b0f95826ed06d22 | src/main/java/com/faforever/client/legacy/LobbyServerAccessorImpl.java | 5 | 8 | [
" }\n",
"\n"
] | [
" @Override\n",
" public void addOnUpdatedAchievementsInfoListener(Consumer<UpdatedAchievementsInfo> listener) {\n",
" onUpdatedAchievementsListeners.add(listener);\n"
] | [
" private void writeToServer(Object object) {\n",
" serverWriter.write(object);\n",
" }\n",
"\n",
" protected ServerWriter createServerWriter(OutputStream outputStream) throws IOException {\n",
" ServerWriter serverWriter = new ServerWriter(outputStream);\n",
" serverWriter.registerMessageSe... | [
" private void writeToServer(Object object) {\n",
" serverWriter.write(object);\n",
" }\n",
"\n",
" protected ServerWriter createServerWriter(OutputStream outputStream) throws IOException {\n",
" ServerWriter serverWriter = new ServerWriter(outputStream);\n",
" serverWriter.registerMessageSe... | [
" }\n",
"\n",
" @Override\n",
" public void addOnGameTypeInfoListener(OnGameTypeInfoListener listener) {\n",
" onGameTypeInfoListeners.add(listener);\n",
" }\n",
"\n",
" @Override\n",
" public void addOnGameInfoListener(OnGameInfoListener listener) {\n",
" onGameInfoListeners.add(liste... | [
" @Override\n",
" public void addOnUpdatedAchievementsInfoListener(Consumer<UpdatedAchievementsInfo> listener) {\n",
" onUpdatedAchievementsListeners.add(listener);\n"
] | false | 9e5fdd468a001deb | [
"A1",
"A2",
"A3"
] | side A | {
"test_file": false,
"benchmark_size": false,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 9b192e063c3253c7a2a3255c3aa60f2cb01adc59 | 400441fe4b635d547a74cc7d118da0d14d99f020 | 0048b9a3d1aeb891c0122b7b1b0f95826ed06d22 | src/main/java/com/faforever/client/login/LoginController.java | 1 | 3 | [
" private void login(String username, String password, boolean autoLogin) {\n",
" onLoginProgress();\n",
"\n",
" userService.login(username, password, autoLogin)\n",
" .thenAccept(aVoid -> onLoginSucceeded())\n",
" .exceptionally(throwable -> {\n",
" onLoginFailed(throwable... | [
" Platform.runLater(() -> mainController.display(stage));\n"
] | [
" mainController.display(stage);\n"
] | [
" stage.hide();\n",
" mainController.display();\n"
] | [
" }\n",
"\n",
" private void onLoginFailed(Throwable e) {\n"
] | [
" Platform.runLater(() -> mainController.display(stage));\n"
] | false | 4fbb5f2723246e89 | [
"A1"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 9b192e063c3253c7a2a3255c3aa60f2cb01adc59 | 400441fe4b635d547a74cc7d118da0d14d99f020 | 0048b9a3d1aeb891c0122b7b1b0f95826ed06d22 | src/main/java/com/faforever/client/user/UserService.java | 0 | 1 | [
"package com.faforever.client.user;\n",
"\n",
"import java.util.concurrent.CompletableFuture;\n",
"\n",
"public interface UserService {\n",
"\n",
" CompletableFuture<Void> login(String username, String password, boolean autoLogin);\n",
"\n",
" String getUsername();\n",
"\n",
" String getPassw... | [] | [] | [
" void logOut();\n"
] | [
"}\n"
] | [
" void logOut();\n"
] | false | 04971b6d4afaa32b | [
"B1"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 68379bcbfe9e1eb93a564c8fd5dc23c07556d451 | 00f592cfe6f3657358b65b2c58735769771d077f | 400441fe4b635d547a74cc7d118da0d14d99f020 | src/main/java/com/faforever/client/chat/AbstractChatTabController.java | 0 | 1 | [
" ChatService chatService;\n",
" @Autowired\n",
" HostService hostService;\n",
" @Autowired\n",
" PreferencesService preferencesService;\n",
" @Autowired\n",
" PlayerService playerService;\n",
" @Autowired\n",
" AudioController audioController;\n",
" @Autowired\n",
" TimeService timeS... | [
" ChatController chatController;\n"
] | [] | [
" NotificationService notificationService;\n",
" @Autowired\n",
" ReportingService reportingService;\n",
"\n"
] | [
" private boolean isChatReady;\n",
" private WebEngine engine;\n",
" private double lastMouseX;\n",
" private double lastMouseY;\n",
" private final EventHandler<MouseEvent> moveHandler = (MouseEvent event) -> {\n",
" lastMouseX = event.getScreenX();\n",
" lastMouseY = event.getScreenY();\n",... | [
" ChatController chatController;\n",
" @Autowired\n",
" NotificationService notificationService;\n",
" @Autowired\n",
" ReportingService reportingService;\n",
"\n"
] | false | 4aa6630dd49e33a6 | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 68379bcbfe9e1eb93a564c8fd5dc23c07556d451 | 00f592cfe6f3657358b65b2c58735769771d077f | 400441fe4b635d547a74cc7d118da0d14d99f020 | src/main/java/com/faforever/client/preferences/Preferences.java | 0 | 1 | [
"import javafx.beans.property.StringProperty;\n",
"import javafx.collections.ObservableList;\n",
"\n",
"import static javafx.collections.FXCollections.observableArrayList;\n",
"\n",
"public class Preferences {\n",
"\n",
" private final WindowPrefs mainWindow;\n",
" private final ForgedAlliancePref... | [
" private final BooleanProperty tilePaneSelected;\n",
" private Ranked1v1Prefs ranked1v1;\n"
] | [
" private Ranked1v1Prefs ranked1v1;\n"
] | [
" private final Ranked1v1Prefs ranked1v1;\n"
] | [
"\n",
" public Preferences() {\n",
" chat = new ChatPrefs();\n",
" login = new LoginPrefs();\n",
" mainWindow = new WindowPrefs();\n",
" forgedAlliance = new ForgedAlliancePrefs();\n",
" theme = new SimpleStringProperty(\"default\");\n",
" lastGameType = new SimpleStringProperty(Gam... | [
" private final BooleanProperty tilePaneSelected;\n",
" private Ranked1v1Prefs ranked1v1;\n"
] | false | b473a6a4c8a55200 | [
"A1",
"A2"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 68379bcbfe9e1eb93a564c8fd5dc23c07556d451 | 00f592cfe6f3657358b65b2c58735769771d077f | 400441fe4b635d547a74cc7d118da0d14d99f020 | src/main/java/com/faforever/client/preferences/PreferencesService.java | 0 | 1 | [
"\n",
" /**\n",
" * @see #storeInBackground()\n",
" */\n",
" private final Timer timer;\n",
" private final Collection<PreferenceUpdateListener> updateListeners;\n",
" @Autowired\n",
" I18n i18n;\n",
" @Autowired\n",
" NotificationService notificationService;\n",
" private Preference... | [
" .registerTypeHierarchyAdapter(Property.class, new PropertyTypeAdapter())\n",
" .registerTypeHierarchyAdapter(Path.class, new PathTypeAdapter())\n",
" .registerTypeHierarchyAdapter(Color.class, new ColorTypeAdapter())\n",
" .registerTypeAdapter(Faction.class, new FactionTypeAdapte... | [
" .registerTypeHierarchyAdapter(Property.class, new PropertyTypeAdapter())\n",
" .registerTypeHierarchyAdapter(Path.class, new PathTypeAdapter())\n",
" .registerTypeAdapter(Faction.class, new FactionTypeAdapter())\n"
] | [
" .registerTypeHierarchyAdapter(Property.class, PropertyTypeAdapter.INSTANCE)\n",
" .registerTypeHierarchyAdapter(Path.class, PathTypeAdapter.INSTANCE)\n",
" .registerTypeAdapter(Faction.class, FactionTypeAdapter.INSTANCE)\n"
] | [
" .create();\n",
" }\n",
"\n",
" public Path getPreferencesDirectory() {\n",
" switch (OperatingSystem.current()) {\n",
" case WINDOWS:\n",
" return Paths.get(System.getenv(\"APPDATA\")).resolve(APP_DATA_SUB_FOLDER);\n",
"\n",
" default:\n",
" return Paths.get(S... | [
" .registerTypeHierarchyAdapter(Property.class, PropertyTypeAdapter.INSTANCE)\n",
" .registerTypeHierarchyAdapter(Path.class, PathTypeAdapter.INSTANCE)\n",
" .registerTypeHierarchyAdapter(Color.class, new ColorTypeAdapter())\n",
" .registerTypeAdapter(Faction.class, FactionTypeAdap... | false | 93901663bce16afb | [
"B1",
"B2",
"A3",
"B3"
] | mix of lines | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 68379bcbfe9e1eb93a564c8fd5dc23c07556d451 | 00f592cfe6f3657358b65b2c58735769771d077f | 400441fe4b635d547a74cc7d118da0d14d99f020 | src/test/java/com/faforever/client/chat/AbstractChatTabControllerTest.java | 1 | 4 | [
"\n",
"public class AbstractChatTabControllerTest extends AbstractPlainJavaFxTest {\n",
"\n",
" private static final long TIMEOUT = 5000;\n",
" @Rule\n",
" public TemporaryFolder tempDir = new TemporaryFolder();\n",
"\n",
" @Mock\n",
" private ChatService chatService;\n",
" @Mock\n",
" pr... | [
" PlayerCardTooltipController playerCardTooltipController;\n",
"\n"
] | [
" PlayerInfoTooltipController playerInfoTooltipController;\n",
"\n"
] | [
" private PlayerInfoTooltipController playerInfoTooltipController;\n"
] | [
" @Mock\n",
" private HostService hostService;\n",
" @Mock\n",
" private UrlPreviewResolver urlPreviewResolver;\n",
" @Mock\n",
" private TimeService timeService;\n",
" @Mock\n",
" private AudioController audioController;\n",
" @Mock\n",
" private ImageUploadService imageUploadService;\n... | [
" PlayerCardTooltipController playerCardTooltipController;\n",
"\n"
] | false | ec01ef5016a38aab | [
"A1",
"A2"
] | side A | {
"test_file": true,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 68379bcbfe9e1eb93a564c8fd5dc23c07556d451 | 00f592cfe6f3657358b65b2c58735769771d077f | 400441fe4b635d547a74cc7d118da0d14d99f020 | src/test/java/com/faforever/client/chat/AbstractChatTabControllerTest.java | 2 | 4 | [
" instance.setReceiver(receiver);\n",
"\n",
" CompletableFuture<String> future = new CompletableFuture<>();\n",
" future.completeExceptionally(new Exception(\"junit fake exception\"));\n",
" when(chatService.sendActionInBackground(eq(receiver), any())).thenReturn(future);\n",
"\n",
" inst... | [
" WaitForAsyncUtils.waitForAsyncFx(TIMEOUT, () -> instance.playerInfo(playerName));\n"
] | [
" WaitForAsyncUtils.waitForAsyncFx(100, () -> instance.playerInfo(playerName));\n"
] | [
" WaitForAsyncUtils.waitForAsyncFx(5000, () -> instance.playerInfo(playerName));\n"
] | [
"\n",
" verify(playerService).getPlayerForUsername(playerName);\n",
" verify(playerCardTooltipController).setPlayer(eq(playerInfoBean));\n",
" }\n",
"\n",
" @Test\n",
" public void testHidePlayerInfoDoesNotThrowExceptionWhenNoTooltipDisplayed() throws Exception {\n",
" instance.hidePlayerI... | [
" WaitForAsyncUtils.waitForAsyncFx(TIMEOUT, () -> instance.playerInfo(playerName));\n"
] | false | 7bcc1463f8e23ca4 | [
"A1"
] | side A | {
"test_file": true,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 400441fe4b635d547a74cc7d118da0d14d99f020 | a4be3ce2d3e1c7bf16bb28fa867cfdf2faf2e801 | 0d03fecc1dca61010ceb6f40c7dd4aef455f45f8 | src/main/java/com/faforever/client/game/GameTileController.java | 0 | 1 | [
" private GameInfoBean gameInfoBean;\n",
"\n",
" @FXML\n",
" void initialize() {\n",
" modsLabel.managedProperty().bind(modsLabel.visibleProperty());\n",
" gameTypeLabel.managedProperty().bind(gameTypeLabel.visibleProperty());\n",
" modsLabel.managedProperty().bind(modsLabel.visibleProperty(... | [
" gameMapLabel.setText(gameInfoBean.getTechnicalName());\n",
" gameInfoBean.technicalNameProperty().addListener(((observable3, oldValue3, newValue3) -> {\n",
" Platform.runLater(() -> {\n",
" gameMapLabel.setText(gameInfoBean.getTechnicalName());\n",
" numberOfPlayersLabel.setText(\... | [
" gameMapLabel.setText(gameInfoBean.getTechnicalName());\n",
" gameInfoBean.technicalNameProperty().addListener(((observable3, oldValue3, newValue3) -> {\n",
" gameMapLabel.setText(gameInfoBean.getTechnicalName());\n",
" numberOfPlayersLabel.setText(\n",
" i18n.get(\"game.players.fo... | [
" JavaFxUtil.bindOnApplicationThread(gameMapLabel.textProperty(), gameInfoBean::getTechnicalName, gameInfoBean.technicalNameProperty());\n",
" JavaFxUtil.bindOnApplicationThread(numberOfPlayersLabel.textProperty(), () -> i18n.get(\"game.players.format\", gameInfoBean.getNumPlayers(), gameInfoBean.getMaxPlay... | [
"\n",
" numberOfPlayersLabel.setText(i18n.get(\"game.players.format\", gameInfoBean.getNumPlayers(), gameInfoBean.getMaxPlayers()));\n",
" gameInfoBean.numPlayersProperty().addListener(((observable3, oldValue3, newValue3) -> {\n",
" Platform.runLater(() -> numberOfPlayersLabel.setText(i18n.get(\"ga... | [
" JavaFxUtil.bindOnApplicationThread(gameMapLabel.textProperty(), gameInfoBean::getTechnicalName, gameInfoBean.technicalNameProperty());\n",
" JavaFxUtil.bindOnApplicationThread(numberOfPlayersLabel.textProperty(), () -> i18n.get(\"game.players.format\", gameInfoBean.getNumPlayers(), gameInfoBean.getMaxPlay... | false | d763843ecb2735e0 | [
"B1",
"B2",
"B3",
"B4",
"B5"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | d9eee6c8671d7d4144bb26744c635f6d1835ffdd | 91182ac9fce4986e7ccccec3c35e66407db75af5 | 2586b2eb640dd11bd57532d62aa7245440404ca7 | src/main/java/com/faforever/client/game/GameInfoBean.java | 8 | 27 | [
" }\n",
"\n"
] | [] | [
" public IntegerProperty uidProperty() {\n",
" return uid;\n",
" }\n",
"\n"
] | [
" public int getUid() {\n",
" return uid.get();\n",
" }\n",
"\n"
] | [
" public void setUid(int uid) {\n",
" this.uid.set(uid);\n",
" }\n",
"\n",
" public IntegerProperty uidProperty() {\n",
" return uid;\n"
] | [] | false | ac4d197ec85c07d3 | [] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | d9eee6c8671d7d4144bb26744c635f6d1835ffdd | 91182ac9fce4986e7ccccec3c35e66407db75af5 | 2586b2eb640dd11bd57532d62aa7245440404ca7 | src/main/java/com/faforever/client/game/GameInfoBean.java | 13 | 27 | [
" public void setMaxPlayers(int maxPlayers) {\n",
" this.maxPlayers.set(maxPlayers);\n",
" }\n",
"\n",
" public IntegerProperty maxPlayersProperty() {\n",
" return maxPlayers;\n"
] | [
" }\n",
"\n",
" public int getMinRating() {\n",
" return minRating.get();\n"
] | [
" public int getMinRating() {\n",
" return minRating.get();\n"
] | [] | [
" }\n",
"\n"
] | [] | false | 7bca9eeb8eda8ffe | [] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | d9eee6c8671d7d4144bb26744c635f6d1835ffdd | 91182ac9fce4986e7ccccec3c35e66407db75af5 | 2586b2eb640dd11bd57532d62aa7245440404ca7 | src/main/java/com/faforever/client/game/GameInfoBean.java | 23 | 27 | [
" public void setOptions(ObservableList<Boolean> options) {\n",
" this.options.set(options);\n",
" }\n",
"\n",
" public ListProperty<Boolean> optionsProperty() {\n",
" return options;\n"
] | [
" }\n",
"\n",
" public ObservableMap<String, String> getSimMods() {\n",
" return simMods.get();\n"
] | [
" public ObservableMap<String, String> getSimMods() {\n",
" return simMods.get();\n"
] | [] | [
" }\n",
"\n"
] | [] | false | 2a739e66eced365d | [] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | d9eee6c8671d7d4144bb26744c635f6d1835ffdd | 91182ac9fce4986e7ccccec3c35e66407db75af5 | 2586b2eb640dd11bd57532d62aa7245440404ca7 | src/main/java/com/faforever/client/game/GameServiceImpl.java | 1 | 3 | [
" public ObservableList<GameInfoBean> getGameInfoBeans() {\n",
" return FXCollections.unmodifiableObservableList(gameInfoBeans);\n",
" }\n",
"\n",
" @Override\n",
" public GameTypeBean getGameTypeBeanFromString(String gameTypeBeanName) {\n",
" return gameTypeBeans.get(gameTypeBeanName);\n",
... | [
" @Override\n",
" public void onGameTypeInfo(GameTypeInfo gameTypeInfo) {\n",
" if (!gameTypeInfo.host || !gameTypeInfo.live || gameTypeBeans.containsKey(gameTypeInfo.name)) {\n",
" return;\n",
" }\n",
"\n",
" gameTypeBeans.put(gameTypeInfo.name, new GameTypeBean(gameTypeInfo));\n",
" ... | [] | [] | [
" @Override\n"
] | [] | false | 955d987b3dcbb3c4 | [] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | d9eee6c8671d7d4144bb26744c635f6d1835ffdd | 91182ac9fce4986e7ccccec3c35e66407db75af5 | 2586b2eb640dd11bd57532d62aa7245440404ca7 | src/main/java/com/faforever/client/legacy/proxy/ProxyImpl.java | 4 | 7 | [
" if (!Objects.equals(peer.getInetSocketAddress(), senderInetSocketAddress)) {\n",
" logger.debug(\"Updating peer address from '{}' to '{}'\", peer.getInetSocketAddress(), senderInetSocketAddress);\n",
" peer.setInetSocketAddress(senderInetSocketAddress);\n",
"\n",
" oldPee... | [
" if (Arrays.equals(peer.connectionTag, tag)) {\n"
] | [
" private void reconnectByIntermediary(InetSocketAddress originSocketAddress, byte[] tag) throws IOException {\n"
] | [
" if (Arrays.equals(peer.getConnectionTag(), tag)) {\n"
] | [
" logger.debug(\"Ignoring reconnect request since the connection tag matches the current connection\");\n",
" return;\n",
" }\n",
"\n",
" String oldPeerAddress = null;\n",
" String newPeerAddress = null;\n",
"\n",
" for (Map.Entry<String, Peer> entry : peersByAddress.entrySet()) ... | [
" if (Arrays.equals(peer.getConnectionTag(), tag)) {\n"
] | false | 3789b84a95a8a3ee | [
"B1"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 2837336bc087540f07c84ea1434826a9d6fa193f | 933c60d2ac88681a4b8637764690eccaa1ce9f83 | effc3097458fb1534e61192c4798bec6a3c8e19a | src/test/java/com/faforever/client/user/UserServiceImplTest.java | 0 | 1 | [
"package com.faforever.client.user;\n",
"\n",
"import com.faforever.client.legacy.LobbyServerAccessor;\n",
"import com.faforever.client.preferences.Preferences;\n",
"import com.faforever.client.preferences.PreferencesService;\n",
"import com.faforever.client.util.Callback;\n",
"import org.junit.Before;\... | [
"import static org.junit.Assert.assertEquals;\n",
"import static org.junit.Assert.assertNull;\n"
] | [
"import static com.faforever.client.test.AbstractPlainJavaTest.assertEquals;\n",
"import static com.faforever.client.test.AbstractPlainJavaTest.assertNull;\n"
] | [
"import static com.faforever.client.test.AbstractPlainJavaTest.assertEquals;\n",
"import static com.faforever.client.test.AbstractPlainJavaTest.assertNull;\n",
"import static org.mockito.Matchers.any;\n"
] | [
"import static org.mockito.Mockito.mock;\n",
"import static org.mockito.Mockito.verify;\n",
"import static org.mockito.Mockito.when;\n",
"\n",
"public class UserServiceImplTest {\n",
"\n",
" private UserServiceImpl userService;\n",
"\n",
" @Before\n",
" public void setUp() throws Exception {\n"... | [
"import static org.junit.Assert.assertEquals;\n",
"import static org.junit.Assert.assertNull;\n",
"import static org.mockito.Matchers.any;\n"
] | false | 659b56fe0a18d3e6 | [
"A1",
"A2",
"B3"
] | mix of lines | {
"test_file": true,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 83fca846190259f69f8b474bd314315d68a66a6d | 94b6906bc8b47807cd6df0358dfe5b324f443620 | 155b10d049513ed4c2fa0ab2706364f31b0a2517 | src/main/java/com/faforever/client/config/UiConfig.java | 0 | 1 | [
"import com.faforever.client.fx.DialogFactory;\n",
"import com.faforever.client.fx.DialogFactoryImpl;\n",
"import com.faforever.client.fx.SceneFactory;\n",
"import com.faforever.client.fx.SceneFactoryImpl;\n",
"import com.faforever.client.fxml.FxmlLoader;\n",
"import com.faforever.client.fxml.FxmlLoaderIm... | [
"import com.faforever.client.map.CommentCardController;\n",
"import com.faforever.client.map.MapPreviewLargeController;\n"
] | [] | [
"import com.faforever.client.map.MapVaultController;\n"
] | [
"import com.faforever.client.mod.ModVaultController;\n",
"import com.faforever.client.news.NewsController;\n",
"import com.faforever.client.news.NewsListItemController;\n",
"import com.faforever.client.notification.ImmediateNotificationController;\n",
"import com.faforever.client.notification.PersistentNoti... | [
"import com.faforever.client.map.MapVaultController;\n",
"import com.faforever.client.map.CommentCardController;\n",
"import com.faforever.client.map.MapPreviewLargeController;\n"
] | false | c3c1a2ef58d9d512 | [
"B1",
"A1",
"A2"
] | B then A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 7ac8d3b65c8c081dc7c2f93fc420f018e43e5c6e | cb8f12b7c08edf195cc70dd0f2fa1c79482d0e4d | ba736a886ed487ad1b4132200ecfa52c2caa172f | src/main/java/com/faforever/client/game/GameServiceImpl.java | 0 | 1 | [
" lobbyServerAccessor.notifyGameTerminated();\n",
" return null;\n",
" }\n",
" });\n",
" }\n",
"\n",
" @Override\n",
" public void cancelLadderSearch() {\n",
" logger.warn(\"Cancelling ladder search has not yet been implemented\");\n",
" }\n",
"\n",
" @Override\n"... | [
" @Override\n",
" public void error(Throwable e) {\n",
" callback.error(e);\n",
" }\n",
" };\n",
"\n",
" updateGameIfNecessary(gameInfoBean.getFeaturedMod(), new Callback<Void>() {\n",
" @Override\n",
" public void success(Void result) {\n",
" downloadM... | [
" @Override\n",
" public void error(Throwable e) {\n",
" callback.error(e);\n",
" }\n",
" };\n",
"\n",
" updateGameIfNecessary(gameInfoBean.getFeaturedMod(), new Callback<Void>() {\n",
" @Override\n",
" public void success(Void result) {\n",
" downloadM... | [
" CompletableFuture<Void> future = new CompletableFuture<>();\n",
" updateGameIfNecessary(gameInfoBean.getFeaturedMod(), null, simModVersions, simModUIds)\n",
" .thenRun(() -> downloadMapIfNecessary(gameInfoBean.getTechnicalName())\n",
" .thenRun(() -> lobbyServerAccessor.requestJoinGa... | [
" }\n",
"\n",
" private CompletionStage<Void> downloadMapIfNecessary(String mapName) {\n",
" CompletableFuture<Void> future = new CompletableFuture<>();\n",
"\n",
" if (mapService.isAvailable(mapName)) {\n",
" future.complete(null);\n",
" } else {\n",
" return mapService.downloa... | [
" CompletableFuture<Void> future = new CompletableFuture<>();\n",
" updateGameIfNecessary(gameInfoBean.getFeaturedMod(), null, simModVersions, simModUIds)\n",
" .thenRun(() -> downloadMapIfNecessary(gameInfoBean.getMapTechnicalName())\n",
" .thenRun(() -> lobbyServerAccessor.requestJoi... | false | 508cbcbad37f186c | null | needs new code | {
"test_file": false,
"benchmark_size": false,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 7ac8d3b65c8c081dc7c2f93fc420f018e43e5c6e | cb8f12b7c08edf195cc70dd0f2fa1c79482d0e4d | ba736a886ed487ad1b4132200ecfa52c2caa172f | src/main/java/com/faforever/client/game/GamesController.java | 0 | 1 | [
"\n",
" private void populateContainer(Node root) {\n",
" gameViewContainer.getChildren().setAll(root);\n",
" AnchorPane.setBottomAnchor(root, 0d);\n",
" AnchorPane.setLeftAnchor(root, 0d);\n",
" AnchorPane.setRightAnchor(root, 0d);\n",
" AnchorPane.setTopAnchor(root, 0d);\n",
" }\n",... | [
" hosterLabel.textProperty().bind(gameInfoBean.hostProperty());\n",
" gameModeLabel.textProperty().bind(gameInfoBean.featuredModProperty());\n",
" mapLabel.textProperty().bind(gameInfoBean.mapTechnicalNameProperty());\n"
] | [
" hosterLabel.textProperty().bind(gameInfoBean.hostProperty());\n",
" gameModeLabel.textProperty().bind(gameInfoBean.featuredModProperty());\n",
" mapLabel.textProperty().bind(gameInfoBean.technicalNameProperty());\n"
] | [
" hostLabel.textProperty().bind(gameInfoBean.hostProperty());\n",
" mapLabel.textProperty().bind(gameInfoBean.technicalNameProperty());\n",
"\n",
" gameInfoBean.featuredModProperty().addListener((observable, oldValue, newValue) -> {\n",
" updateGameType(newValue);\n",
" });\n",
" upd... | [
" createTeams(gameInfoBean.getTeams());\n",
" }\n",
"\n",
" private void updateGameType(String newValue) {\n",
" GameTypeBean gameType = gameService.getGameTypeByString(newValue);\n",
" String fullName = gameType != null ? gameType.getFullName() : null;\n",
" gameTypeLabel.setText(StringUt... | [
" hostLabel.textProperty().bind(gameInfoBean.hostProperty());\n",
" mapLabel.textProperty().bind(gameInfoBean.mapTechnicalNameProperty());\n",
"\n",
" gameInfoBean.featuredModProperty().addListener((observable, oldValue, newValue) -> {\n",
" updateGameType(newValue);\n",
" });\n",
" ... | false | 4bd80f997c02d512 | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 7ac8d3b65c8c081dc7c2f93fc420f018e43e5c6e | cb8f12b7c08edf195cc70dd0f2fa1c79482d0e4d | ba736a886ed487ad1b4132200ecfa52c2caa172f | src/main/java/com/faforever/client/replay/ReplayServiceImpl.java | 0 | 2 | [
"package com.faforever.client.replay;\n",
"\n"
] | [
"import com.faforever.client.game.FeaturedMod;\n",
"import com.faforever.client.game.GameInfoBean;\n"
] | [
"import com.faforever.client.game.FeaturedMod;\n"
] | [] | [
"import com.faforever.client.game.GameService;\n",
"import com.faforever.client.game.GameType;\n",
"import com.faforever.client.i18n.I18n;\n",
"import com.faforever.client.notification.Action;\n",
"import com.faforever.client.notification.NotificationService;\n",
"import com.faforever.client.notification.... | [
"import com.faforever.client.game.FeaturedMod;\n",
"import com.faforever.client.game.GameInfoBean;\n"
] | false | cdecf97780c47e1c | [
"A1",
"A2"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 7ac8d3b65c8c081dc7c2f93fc420f018e43e5c6e | cb8f12b7c08edf195cc70dd0f2fa1c79482d0e4d | ba736a886ed487ad1b4132200ecfa52c2caa172f | src/main/java/com/faforever/client/replay/ReplayServiceImpl.java | 1 | 2 | [
"import org.apache.http.client.utils.URIBuilder;\n",
"import org.slf4j.Logger;\n",
"import org.slf4j.LoggerFactory;\n",
"import org.springframework.beans.factory.InitializingBean;\n",
"import org.springframework.beans.factory.annotation.Autowired;\n",
"import org.springframework.core.env.Environment;\n",
... | [
"import java.net.URLConnection;\n",
"import java.net.URLStreamHandler;\n",
"import java.net.URLStreamHandlerFactory;\n",
"import java.nio.charset.StandardCharsets;\n"
] | [
"import java.nio.charset.StandardCharsets;\n"
] | [] | [
"import java.nio.file.DirectoryStream;\n",
"import java.nio.file.Files;\n",
"import java.nio.file.Path;\n",
"import java.nio.file.StandardCopyOption;\n",
"import java.util.ArrayList;\n",
"import java.util.Collection;\n",
"import java.util.Collections;\n",
"import java.util.List;\n",
"import java.uti... | [
"import java.net.URLConnection;\n",
"import java.net.URLStreamHandler;\n",
"import java.net.URLStreamHandlerFactory;\n",
"import java.nio.charset.StandardCharsets;\n"
] | false | 48d3cb2902538a50 | [
"A1",
"A2",
"A3",
"A4"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 7ac8d3b65c8c081dc7c2f93fc420f018e43e5c6e | cb8f12b7c08edf195cc70dd0f2fa1c79482d0e4d | ba736a886ed487ad1b4132200ecfa52c2caa172f | src/test/java/com/faforever/client/game/GameServiceImplTest.java | 0 | 1 | [
" instance.lobbyServerAccessor = mock(LobbyServerAccessor.class);\n",
" instance.mapService = mock(MapService.class);\n",
" instance.forgedAllianceService = mock(ForgedAllianceService.class);\n",
" instance.proxy = mock(Proxy.class);\n",
" instance.gameUpdateService = mock(GameUpdateService.c... | [
" when(gameInfoBean.getMapTechnicalName()).thenReturn(\"map\");\n"
] | [
" when(gameInfoBean.getTechnicalName()).thenReturn(\"map\");\n"
] | [
" ObservableMap<String, String> simMods = FXCollections.observableHashMap();\n",
" simMods.put(\"123-456-789\", \"Fake mod name\");\n",
"\n",
" when(gameInfoBean.getSimMods()).thenReturn(simMods);\n",
" when(gameInfoBean.getTechnicalName()).thenReturn(\"map\");\n"
] | [
"\n",
" when(instance.mapService.isAvailable(\"map\")).thenReturn(true);\n",
"\n",
" doAnswer(invocation -> {\n",
" callback.success(null);\n",
" return null;\n",
" }).when(instance.lobbyServerAccessor).requestJoinGame(eq(gameInfoBean), eq(null));\n",
"\n",
" when(instance.game... | [
" ObservableMap<String, String> simMods = FXCollections.observableHashMap();\n",
" simMods.put(\"123-456-789\", \"Fake mod name\");\n",
"\n",
" when(gameInfoBean.getSimMods()).thenReturn(simMods);\n",
" when(gameInfoBean.getMapTechnicalName()).thenReturn(\"map\");\n"
] | false | 0c09760be0749900 | [
"B1",
"B2",
"B3",
"B4",
"A1"
] | mix of lines | {
"test_file": true,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | f87d6b05ad11fa02e8a3c18266ddc766f1361369 | 91be979fad63f503a37095108dcf963f3968567a | f4da475c9559ab92d804f90a33994c20608a9b31 | src/main/java/com/faforever/client/game/EnterPasswordController.java | 0 | 2 | [
"package com.faforever.client.game;\n",
"\n",
"import javafx.event.ActionEvent;\n",
"import javafx.fxml.FXML;\n",
"import javafx.scene.Node;\n",
"import javafx.scene.control.TextField;\n",
"import javafx.scene.input.MouseEvent;\n",
"\n",
"public class EnterPasswordController {\n",
"\n",
" publi... | [
" void onPasswordEntered(String password, GameInfoBean gameInfoBean, MouseEvent event);\n"
] | [
" void onPasswordEntered(String password);\n"
] | [
" void onPasswordEntered(GameInfoBean gameInfoBean, String password);\n"
] | [
" }\n",
"\n",
" private OnPasswordEnteredListener listener;\n",
"\n",
" @FXML\n",
" Node enterPasswordRoot;\n",
"\n",
" @FXML\n",
" TextField passwordTextField;\n",
"\n",
" private GameInfoBean gameInfoBean;\n",
"\n",
" public Node getRoot() {\n",
" return enterPasswordRoot;\n",... | [
" void onPasswordEntered(String password, GameInfoBean gameInfoBean, MouseEvent event);\n"
] | false | 763cfd4b96a462f3 | [
"A1"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | f87d6b05ad11fa02e8a3c18266ddc766f1361369 | 91be979fad63f503a37095108dcf963f3968567a | f4da475c9559ab92d804f90a33994c20608a9b31 | src/main/java/com/faforever/client/game/EnterPasswordController.java | 1 | 2 | [
" TextField passwordTextField;\n",
"\n",
" private GameInfoBean gameInfoBean;\n",
"\n",
" public Node getRoot() {\n",
" return enterPasswordRoot;\n",
" }\n",
"\n",
" public void setOnPasswordEnteredListener(OnPasswordEnteredListener listener) {\n",
" if (this.listener != null) {\n",
"... | [
" listener.onPasswordEntered(passwordTextField.getText(), gameInfoBean, event);\n"
] | [
" listener.onPasswordEntered(passwordTextField.getText());\n"
] | [
" listener.onPasswordEntered(gameInfoBean, passwordTextField.getText());\n",
" }\n",
"\n",
" public void setGameInfoBean(GameInfoBean gameInfoBean) {\n",
" this.gameInfoBean = gameInfoBean;\n"
] | [
" }\n",
"\n",
"}\n"
] | [
" listener.onPasswordEntered(passwordTextField.getText(), gameInfoBean, event);\n"
] | false | f71804cf6d917444 | [
"A1"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | f87d6b05ad11fa02e8a3c18266ddc766f1361369 | 91be979fad63f503a37095108dcf963f3968567a | f4da475c9559ab92d804f90a33994c20608a9b31 | src/main/java/com/faforever/client/game/GamesController.java | 2 | 5 | [
" hosterLabel.setText(gameInfoBean.getHost());\n",
" gameModeLabel.setText(gameInfoBean.getFeaturedMod());\n",
" // gameModeDescriptionLabel.setText(mapService.getMapInfoBeanFromString(gameInfoBean.getMapName()).getDescription());\n",
" }\n",
"\n",
" @FXML\n",
" void onShowPrivateGames(Action... | [
" public FilteredList<GameInfoBean> returnFilteredList(){\n",
" return filteredItems;\n",
" }\n"
] | [
" private void joinSelectedGame(String password) {\n",
" // FIXME check if game path is set\n",
" GameInfoBean gameInfoBean = gamesTable.getSelectionModel().getSelectedItem();\n"
] | [
" private void joinGame(GameInfoBean gameInfoBean, String password) {\n",
" // FIXME check if game path is set\n"
] | [
"\n",
" public void joinSelectedGame(String password, GameInfoBean gameInfoBean, MouseEvent event) {\n",
" // FIXME check if game path is set\n",
" if (gameInfoBean.getAccess() == GameAccess.PASSWORD && password == null) {\n"
] | [
" public FilteredList<GameInfoBean> returnFilteredList(){\n",
" return filteredItems;\n",
" }\n"
] | false | 61a117c5724392c6 | [
"A1",
"A2",
"A3"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | f87d6b05ad11fa02e8a3c18266ddc766f1361369 | 91be979fad63f503a37095108dcf963f3968567a | f4da475c9559ab92d804f90a33994c20608a9b31 | src/main/java/com/faforever/client/game/GamesController.java | 3 | 5 | [
"\n",
" public void joinSelectedGame(String password, GameInfoBean gameInfoBean, MouseEvent event) {\n",
" // FIXME check if game path is set\n",
" if (gameInfoBean.getAccess() == GameAccess.PASSWORD && password == null) {\n"
] | [
" double lastMouseX = event.getScreenX();\n",
" double lastMouseY = event.getScreenY();\n"
] | [] | [
" enterPasswordController.setGameInfoBean(gameInfoBean);\n"
] | [
" passwordPopup.show(gamesRoot.getScene().getWindow(), lastMouseX, lastMouseY);\n",
" } else {\n",
" gameService.joinGame(gameInfoBean, password, new Callback<Void>() {\n",
" @Override\n",
" public void success(Void result) {\n",
" // Cool.\n",
" }\n",
"\n",
... | [
" double lastMouseX = event.getScreenX();\n",
" double lastMouseY = event.getScreenY();\n"
] | false | f04aebe4b472efea | [
"A1",
"A2"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | f87d6b05ad11fa02e8a3c18266ddc766f1361369 | 91be979fad63f503a37095108dcf963f3968567a | f4da475c9559ab92d804f90a33994c20608a9b31 | src/main/java/com/faforever/client/game/GamesController.java | 4 | 5 | [
" if (!GameState.OPEN.equals(gameInfo.state)) {\n",
" gameInfoBeans.remove(gameInfo.uid);\n",
" return;\n",
" }\n",
"\n",
" if (!gameInfoBeans.containsKey(gameInfo.uid)) {\n",
" gameInfoBeans.put(gameInfo.uid, new GameInfoBean(gameInfo));\n",
" } else {\n",
"... | [
"\n"
] | [
" public void onTableClicked(MouseEvent event) {\n",
" if (event.getButton() == MouseButton.PRIMARY && event.getClickCount() == 2) {\n",
" lastMouseX = event.getScreenX();\n",
" lastMouseY = event.getScreenY();\n",
" joinSelectedGame(null);\n",
" }\n",
" }\n",
"\n"
] | [] | [
" public void onCreateGameButtonClicked(ActionEvent actionEvent) {\n",
" Button button = (Button) actionEvent.getSource();\n",
"\n",
" Bounds screenBounds = createGameButton.localToScreen(createGameButton.getBoundsInLocal());\n",
" createGamePopup.show(button.getScene().getWindow(), screenBounds.g... | [
"\n"
] | false | 487b6e78c9d2b41f | [
"A1"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 2a5f4455cd7e9c395eb8057675a97f991e36de34 | dd52fe123b7c3ff53b1cff44ef4f444091a8b560 | 9b2c69a93e03f8e46c5b98c5feb39572649942b7 | src/main/java/com/faforever/client/network/PortCheckServiceImpl.java | 0 | 5 | [
"package com.faforever.client.network;\n",
"\n",
"import com.faforever.client.i18n.I18n;\n"
] | [] | [] | [
"import com.faforever.client.legacy.relay.RelayClientMessage;\n",
"import com.faforever.client.legacy.relay.RelayClientMessageSerializer;\n",
"import com.faforever.client.legacy.relay.RelayServerAction;\n",
"import com.faforever.client.legacy.writer.ServerWriter;\n"
] | [
"import com.faforever.client.notification.Action;\n",
"import com.faforever.client.notification.NotificationService;\n",
"import com.faforever.client.notification.PersistentNotification;\n",
"import com.faforever.client.notification.Severity;\n",
"import com.faforever.client.preferences.PreferencesService;\... | [
"import com.faforever.client.legacy.relay.RelayClientMessage;\n",
"import com.faforever.client.legacy.relay.RelayClientMessageSerializer;\n",
"import com.faforever.client.legacy.relay.RelayServerAction;\n",
"import com.faforever.client.legacy.writer.ServerWriter;\n"
] | false | 9745ced9a0654874 | [
"B1",
"B2",
"B3",
"B4"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 2a5f4455cd7e9c395eb8057675a97f991e36de34 | dd52fe123b7c3ff53b1cff44ef4f444091a8b560 | 9b2c69a93e03f8e46c5b98c5feb39572649942b7 | src/main/java/com/faforever/client/network/PortCheckServiceImpl.java | 1 | 5 | [
"import com.faforever.client.notification.Action;\n",
"import com.faforever.client.notification.NotificationService;\n",
"import com.faforever.client.notification.PersistentNotification;\n",
"import com.faforever.client.notification.Severity;\n",
"import com.faforever.client.preferences.PreferencesService;\... | [] | [] | [
"import com.sun.corba.se.spi.activation.Server;\n"
] | [
"import javafx.application.HostServices;\n",
"import javafx.concurrent.Task;\n",
"import org.jetbrains.annotations.NotNull;\n",
"import org.slf4j.Logger;\n",
"import org.slf4j.LoggerFactory;\n",
"import org.springframework.beans.factory.annotation.Autowired;\n",
"import org.springframework.core.env.Envi... | [
"import com.sun.corba.se.spi.activation.Server;\n"
] | false | 1b90970bb959e32c | [
"B1"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 2a5f4455cd7e9c395eb8057675a97f991e36de34 | dd52fe123b7c3ff53b1cff44ef4f444091a8b560 | 9b2c69a93e03f8e46c5b98c5feb39572649942b7 | src/main/java/com/faforever/client/network/PortCheckServiceImpl.java | 2 | 5 | [
"import java.io.DataOutputStream;\n",
"import java.io.IOException;\n",
"import java.lang.invoke.MethodHandles;\n",
"import java.lang.reflect.Array;\n",
"import java.net.ConnectException;\n",
"import java.net.DatagramPacket;\n",
"import java.net.DatagramSocket;\n",
"import java.net.Socket;\n",
"impor... | [] | [
"public class PortCheckServiceImpl implements PortCheckService {\n"
] | [
"/**\n",
" * Opens the game port and connects to the FAF relay server in order the see whether data on the game port is received.\n",
" */\n"
] | [
"public class PortCheckServiceImpl implements PortCheckService, PortMapperEventListener {\n",
"\n",
" private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());\n",
"\n",
" private static final String PORT_UNREACHABLE_NOTIFICATION_ID = \"portUnreachable\";\n",
" ... | [
"/**\n",
" * Opens the game port and connects to the FAF relay server in order the see whether data on the game port is received.\n",
" */\n"
] | false | 84b4f3789cbc039d | [
"B1",
"B2",
"B3"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 2a5f4455cd7e9c395eb8057675a97f991e36de34 | dd52fe123b7c3ff53b1cff44ef4f444091a8b560 | 9b2c69a93e03f8e46c5b98c5feb39572649942b7 | src/main/java/com/faforever/client/network/PortCheckServiceImpl.java | 3 | 5 | [
"\n",
" Thread.sleep(mappedPort.getLifetime() / 2 * 1000);\n",
" }\n",
" } finally {\n",
" portMapper.unmapPort(mappedPort);\n",
" }\n",
"\n",
" return null;\n",
" }\n",
" });\n",
" }\n",
" }\n",
"\n",
" @Overri... | [
" String remoteHost = environment.getProperty(\"portCheck.host\");\n",
" Integer remotePort = environment.getProperty(\"portCheck.port\", Integer.class);\n"
] | [
" }, callback);\n"
] | [
" String remoteHost = environment.getProperty(\"relay.host\");\n",
" Integer remotePort = environment.getProperty(\"relay.port\", Integer.class);\n"
] | [
"\n",
" logger.info(\"Checking reachability of UDP port {} using port checker service at {}:{}\", port, remoteHost, remotePort);\n",
"\n",
" sendDelayedPackageRequest(remoteHost, remotePort, port);\n",
"\n",
" try (DatagramSocket datagramSocket = new DatagramSocket(port)) {\n",
" datagramS... | [
" String remoteHost = environment.getProperty(\"relay.host\");\n",
" Integer remotePort = environment.getProperty(\"relay.port\", Integer.class);\n"
] | false | 67f47721f81b861f | [
"B1",
"B2"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
FAForever/downlords-faf-client | 2a5f4455cd7e9c395eb8057675a97f991e36de34 | dd52fe123b7c3ff53b1cff44ef4f444091a8b560 | 9b2c69a93e03f8e46c5b98c5feb39572649942b7 | src/main/java/com/faforever/client/network/PortCheckServiceImpl.java | 4 | 5 | [
" new Timer().schedule(new TimerTask() {\n",
" @Override\n",
" public void run() {\n",
" try {\n",
" try (Socket socket = new Socket(remoteHost, remotePort);\n",
" ServerWriter serverWriter = createServerWriter(socket)) {\n",
" serverWriter.write(new... | [] | [
" }, 1000);\n"
] | [
" }\n",
"\n",
"\n",
" private ServerWriter createServerWriter(Socket fafSocket) throws IOException {\n",
" ServerWriter serverWriter = new ServerWriter(fafSocket.getOutputStream());\n",
" serverWriter.registerObjectWriter(new RelayClientMessageSerializer(), RelayClientMessage.class);\n",
" re... | [
" }\n",
"}\n"
] | [
" }\n",
"\n",
"\n",
" private ServerWriter createServerWriter(Socket fafSocket) throws IOException {\n",
" ServerWriter serverWriter = new ServerWriter(fafSocket.getOutputStream());\n",
" serverWriter.registerObjectWriter(new RelayClientMessageSerializer(), RelayClientMessage.class);\n",
" re... | false | c2156ff36ced4ff1 | [
"B1",
"B2",
"B3",
"B4",
"B5",
"B6",
"B7"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | MIT |
besu-eth/besu | 18e18994af327f40d4030c8e1b148462bd546f12 | e9558d3a3890ee77705c5996f704b41326924dc7 | 80c8a8f12b03f573bad37fd497bc1bec313d18d3 | ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fastsync/worldstate/FastWorldStateDownloaderTest.java | 6 | 25 | [
" for (final RespondingEthPeer peer : peers) {\n",
" peer.respond(responder);\n",
" }\n",
" giveOtherThreadsAGo();\n",
" }\n",
"\n",
" // Now allow the persistence service to run which should exit immediately\n",
" serviceExecutor.runPendingFutures();\n",
"\n",
" ... | [
" final ForestWorldStateKeyValueStorage remoteStorage =\n"
] | [
" final WorldStateStorage remoteStorage =\n",
" new WorldStateKeyValueStorage(new InMemoryKeyValueStorage());\n"
] | [
" final WorldStateStorage remoteStorage =\n"
] | [
" new ForestWorldStateKeyValueStorage(new InMemoryKeyValueStorage());\n",
" final WorldStateArchive remoteWorldStateArchive =\n",
" new ForestWorldStateArchive(\n"
] | [
" final ForestWorldStateKeyValueStorage remoteStorage =\n"
] | false | d440e7431bf643bf | [
"A1"
] | side A | {
"test_file": true,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 18e18994af327f40d4030c8e1b148462bd546f12 | e9558d3a3890ee77705c5996f704b41326924dc7 | 80c8a8f12b03f573bad37fd497bc1bec313d18d3 | ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fastsync/worldstate/FastWorldStateDownloaderTest.java | 18 | 25 | [
" new ForestWorldStateKeyValueStorage(new InMemoryKeyValueStorage());\n",
" final WorldStateArchive remoteWorldStateArchive =\n",
" new ForestWorldStateArchive(\n"
] | [
" new WorldStateStorageCoordinator(remoteStorage),\n",
" createPreimageStorage(),\n",
" EvmConfiguration.DEFAULT);\n"
] | [
" new DefaultWorldStateArchive(\n",
" remoteStorage, createPreimageStorage(), EvmConfiguration.DEFAULT);\n"
] | [
" remoteStorage, createPreimageStorage(), EvmConfiguration.DEFAULT);\n"
] | [
" final MutableWorldState remoteWorldState = remoteWorldStateArchive.getMutable();\n",
"\n",
" // Generate accounts and save corresponding state root\n",
" List<Account> accounts = dataGen.createRandomAccounts(remoteWorldState, 10);\n",
" final Hash stateRoot = remoteWorldState.rootHash();\n",
... | [
" new WorldStateStorageCoordinator(remoteStorage),\n",
" createPreimageStorage(),\n",
" EvmConfiguration.DEFAULT);\n"
] | false | cbfb9c6f7d52e305 | [
"A1",
"A2",
"A3"
] | side A | {
"test_file": true,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 18e18994af327f40d4030c8e1b148462bd546f12 | e9558d3a3890ee77705c5996f704b41326924dc7 | 80c8a8f12b03f573bad37fd497bc1bec313d18d3 | ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fastsync/worldstate/FastWorldStateDownloaderTest.java | 24 | 25 | [
" new ForestWorldStateKeyValueStorage(new InMemoryKeyValueStorage());\n",
" final WorldStateArchive localWorldStateArchive =\n",
" new ForestWorldStateArchive(\n"
] | [
" new WorldStateStorageCoordinator(localStorage),\n",
" createPreimageStorage(),\n",
" EvmConfiguration.DEFAULT);\n"
] | [
" new DefaultWorldStateArchive(\n",
" localStorage, createPreimageStorage(), EvmConfiguration.DEFAULT);\n"
] | [
" localStorage, createPreimageStorage(), EvmConfiguration.DEFAULT);\n"
] | [
" final SynchronizerConfiguration syncConfig =\n",
" SynchronizerConfiguration.builder()\n",
" .worldStateHashCountPerRequest(hashesPerRequest)\n",
" .worldStateRequestParallelism(maxOutstandingRequests)\n",
" .build();\n",
" final WorldStateDownloader downloa... | [
" new WorldStateStorageCoordinator(localStorage),\n",
" createPreimageStorage(),\n",
" EvmConfiguration.DEFAULT);\n"
] | false | b85e51e8fdf3d66c | [
"A1",
"A2",
"A3"
] | side A | {
"test_file": true,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 18e18994af327f40d4030c8e1b148462bd546f12 | e9558d3a3890ee77705c5996f704b41326924dc7 | 80c8a8f12b03f573bad37fd497bc1bec313d18d3 | ethereum/evmtool/src/main/java/org/hyperledger/besu/evmtool/BlockchainModule.java | 1 | 5 | [
"import org.hyperledger.besu.ethereum.storage.keyvalue.WorldStatePreimageKeyValueStorage;\n"
] | [] | [
"import org.hyperledger.besu.ethereum.worldstate.DefaultMutableWorldState;\n"
] | [
"import org.hyperledger.besu.ethereum.trie.forest.storage.ForestWorldStateKeyValueStorage;\n",
"import org.hyperledger.besu.ethereum.trie.forest.worldview.ForestMutableWorldState;\n"
] | [
"import org.hyperledger.besu.ethereum.worldstate.WorldStatePreimageStorage;\n",
"import org.hyperledger.besu.ethereum.worldstate.WorldStateStorageCoordinator;\n",
"import org.hyperledger.besu.evm.internal.EvmConfiguration;\n",
"import org.hyperledger.besu.evm.worldstate.WorldUpdater;\n",
"import org.hyperle... | [
"import org.hyperledger.besu.ethereum.trie.forest.storage.ForestWorldStateKeyValueStorage;\n",
"import org.hyperledger.besu.ethereum.trie.forest.worldview.ForestMutableWorldState;\n"
] | false | 6814db48c9589778 | [
"B1",
"B2"
] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 18e18994af327f40d4030c8e1b148462bd546f12 | e9558d3a3890ee77705c5996f704b41326924dc7 | 80c8a8f12b03f573bad37fd497bc1bec313d18d3 | ethereum/referencetests/src/main/java/org/hyperledger/besu/ethereum/referencetests/DefaultReferenceTestWorldState.java | 0 | 2 | [
"/*\n",
" * Copyright Hyperledger Besu Contributors.\n",
" *\n",
" * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with\n",
" * the License. You may obtain a copy of the License at\n",
" *\n",
" * http://www.apache.org/licenses/LICENSE-2... | [
"import org.hyperledger.besu.ethereum.forest.storage.ForestWorldStateKeyValueStorage;\n",
"import org.hyperledger.besu.ethereum.forest.worldview.ForestMutableWorldState;\n"
] | [
"import org.hyperledger.besu.ethereum.storage.keyvalue.WorldStateKeyValueStorage;\n"
] | [] | [
"import org.hyperledger.besu.ethereum.storage.keyvalue.WorldStatePreimageKeyValueStorage;\n"
] | [] | false | bf9555f99eafba03 | [] | side B | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 29aeba095d2e4374c81f27fefa074f14090c7c4a | 01388832b3ff57f92e258e256593f27e09403c77 | 5abc125f9fe4b6145d26d929f6718dc59ab5d725 | consensus/merge/src/main/java/org/hyperledger/besu/consensus/merge/blockcreation/MergeCoordinator.java | 0 | 2 | [
" .validateAndProcessBlock(\n",
" protocolContext,\n",
" block,\n",
" HeaderValidationMode.FULL,\n",
" HeaderValidationMode.NONE,\n",
" blockAccessList,\n",
" inclusionListTransactions,\n",
" ... | [
" final Block block,\n",
" final Optional<BlockAccessList> blockAccessList,\n",
" final Set<Transaction> inclusionListTransactions) {\n"
] | [
" final Block block, final Optional<BlockAccessList> blockAccessList) {\n"
] | [
" final Block block, final Optional<BlockAccessList> blockAccessList) {\n",
" return rememberBlock(block, blockAccessList, Runnable::run);\n",
" }\n",
"\n",
" @Override\n",
" public BlockProcessingResult rememberBlock(\n",
" final Block block,\n",
" final Optional<BlockAccessList>... | [
" LOG.atDebug().setMessage(\"Remember block {}\").addArgument(block::toLogString).log();\n",
" final var chain = protocolContext.getBlockchain();\n"
] | [
" final Block block,\n",
" final Optional<BlockAccessList> blockAccessList,\n",
" final Set<Transaction> inclusionListTransactions,\n",
" final Executor blockWriter) {\n"
] | false | bec4405455dac830 | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 29aeba095d2e4374c81f27fefa074f14090c7c4a | 01388832b3ff57f92e258e256593f27e09403c77 | 5abc125f9fe4b6145d26d929f6718dc59ab5d725 | ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineNewPayloadV1.java | 0 | 1 | [
" .stateRoot(blockParam.getStateRoot())\n",
" .transactionsRoot(BodyValidation.transactionsRoot(blockParam.getTransactions()))\n",
" .receiptsRoot(blockParam.getReceiptsRoot())\n",
" .logsBloom(blockParam.getLogsBloom())\n",
" .difficulty(Difficulty.ZERO)\n",
" .n... | [
" protected BlockProcessingResult rememberBlock(final Block block, final NPRP requestParameters) {\n",
" return mergeCoordinator.rememberBlock(block, Optional.empty());\n"
] | [
" protected BlockProcessingResult rememberBlock(final Block block, final EP executionPayload) {\n",
" return mergeCoordinator.rememberBlock(block, Optional.empty());\n"
] | [
" protected BlockProcessingResult rememberBlock(final Block block, final EP executionPayload) {\n",
" return mergeCoordinator.rememberBlock(block, Optional.empty(), writeAfterReply(block));\n",
" }\n",
"\n",
" /**\n",
" * Stores a valid block once the reply is sent. The calls that need the block a... | [
" }\n",
"\n",
" protected void appendNewPayloadToSync(final Block block, final EP executionPayload) {\n",
" mergeCoordinator.appendNewPayloadToSync(block, Optional.empty());\n",
" }\n",
"\n",
" private void logImportedBlockInfo(\n",
" final Block block, final long timeInNs, final Optional<... | [
" protected BlockProcessingResult rememberBlock(final Block block, final NPRP requestParameters) {\n",
" return mergeCoordinator.rememberBlock(block, Optional.empty(), writeAfterReply(block));\n",
" }\n",
"\n",
" /**\n",
" * Stores a valid block once the reply is sent. The calls that need the bloc... | false | f8968b0c70fb421c | [
"A1",
"B2",
"B3",
"B4",
"B5",
"B6",
"B7",
"B8",
"B9",
"B10",
"B11",
"B12",
"B13",
"B14",
"B15",
"B16",
"B17",
"B18",
"B19",
"B20",
"B21"
] | mix of lines | {
"test_file": false,
"benchmark_size": false,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 29aeba095d2e4374c81f27fefa074f14090c7c4a | 01388832b3ff57f92e258e256593f27e09403c77 | 5abc125f9fe4b6145d26d929f6718dc59ab5d725 | ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineNewPayloadV5.java | 0 | 1 | [
" return result.isValid() ? validateParametersV5(requestParameters) : result;\n",
" }\n",
"\n",
" private ValidationResult<RpcErrorType> validateParametersV5(\n",
" final NewPayloadRequestParametersV3<? extends EP> requestParameters) {\n",
" final ExecutionPayloadV4 executionPayloadV4 = reque... | [
" block, Optional.of(requestParameters.payloadParameter().getBlockAccessList()));\n"
] | [
" block, Optional.of(executionPayload.getBlockAccessList()));\n"
] | [
" block, Optional.of(executionPayload.getBlockAccessList()), writeAfterReply(block));\n"
] | [
" }\n",
"\n",
" @Override\n",
" protected void appendNewPayloadToSync(final Block block, final EP executionPayload) {\n",
" mergeCoordinator.appendNewPayloadToSync(\n",
" block, Optional.of(executionPayload.getBlockAccessList()));\n",
" }\n",
"\n",
" @Override\n",
" protected JsonR... | [
" block,\n",
" Optional.of(requestParameters.payloadParameter().getBlockAccessList()),\n",
" writeAfterReply(block));\n"
] | false | 137d0ab17c193150 | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 29aeba095d2e4374c81f27fefa074f14090c7c4a | 01388832b3ff57f92e258e256593f27e09403c77 | 5abc125f9fe4b6145d26d929f6718dc59ab5d725 | ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineNewPayloadWithWitnessV5.java | 0 | 1 | [
" *\n",
" * SPDX-License-Identifier: Apache-2.0\n",
" */\n",
"package org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.engine;\n",
"\n",
"import static org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.ExecutionEngineJsonRpcMethod.EngineStatus.VALID;\n",
"\n",
"import org.hyperledge... | [] | [
"import org.hyperledger.besu.ethereum.api.jsonrpc.internal.results.PayloadPostExecutionValidationResultV1;\n"
] | [
"import org.hyperledger.besu.ethereum.api.jsonrpc.internal.results.PayloadPostExecutionValidationResultV1;\n",
"import org.hyperledger.besu.ethereum.core.Block;\n"
] | [
"import org.hyperledger.besu.ethereum.core.BlockHeader;\n",
"import org.hyperledger.besu.ethereum.mainnet.block.access.list.BlockAccessList;\n",
"import org.hyperledger.besu.ethereum.trie.pathbased.bonsai.storage.BonsaiExecutionWitnessBuilder;\n",
"\n",
"import java.util.Map;\n",
"import java.util.Optiona... | [
"import org.hyperledger.besu.ethereum.core.Block;\n"
] | false | ef91167d2bc95a0e | [
"B2"
] | mix of lines | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 29aeba095d2e4374c81f27fefa074f14090c7c4a | 01388832b3ff57f92e258e256593f27e09403c77 | 5abc125f9fe4b6145d26d929f6718dc59ab5d725 | ethereum/core/src/main/java/org/hyperledger/besu/ethereum/MainnetBlockValidator.java | 0 | 1 | [
" OptionalLong.of(cumulativeBlockGasUsed))) {\n",
" result = new BlockProcessingResult(\"failed to validate output of imported block\");\n",
" handleFailedBlockProcessing(\n",
" block, blockAccessList, result, shouldRecordBadBlock, context);\n",
" return re... | [
" result\n",
" .getYield()\n",
" .map(BlockProcessingOutputs::getInclusionListValidationResult)\n",
" .orElseGet(InclusionListValidationResult::valid))),\n"
] | [
" accessedAncestors)),\n"
] | [
" worldState instanceof PathBasedWorldState pathBasedWorldState\n",
" ? pathBasedWorldState.takeTrieLogWrite()\n",
" : () -> {})),\n"
] | [
" result.getNbParallelizedTransactions());\n",
" }\n",
" } catch (MerkleTrieException ex) {\n",
" LOG.debug(\n",
" \"Merkle trie exception while processing block {}: message={}, address={}, location={}, hash={}\",\n",
" block.toLogString(),\n",
" ex.get... | [
" result\n",
" .getYield()\n",
" .map(BlockProcessingOutputs::getInclusionListValidationResult)\n",
" .orElseGet(InclusionListValidationResult::valid),\n",
" worldState instanceof PathBasedWorldState p... | false | 0bd767b4de910189 | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 59625dd4865565533be24b0d5a7e48b7cbc29457 | 5e1f384c2f011345b6ab5f07304d171898716bb4 | 8df6bcadddc817fd8099c1849fe25b0ca7f66e3c | ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/AbstractEngineNewPayload.java | 2 | 4 | [
" protocolSchedule.get(), blockParam.getTimestamp(), blockParam.getBlockNumber())\n",
" .validateParameter(maybeDeposits)) {\n",
" return new JsonRpcErrorResponse(\n",
" reqId, new JsonRpcError(INVALID_PARAMS, \"Invalid deposit request\"));\n",
" }\n",
"\n",
" final... | [
" final Optional<ExecutionWitness> maybeExecutionWitness =\n",
" Optional.ofNullable(blockParam.getExecutionWitness())\n",
" .map(ExecutionWitnessParameter::toExecutionWitness);\n",
" if (!getExecutionWitnessValidator(\n",
" protocolSchedule.get(), blockParam.getTimestamp(... | [] | [
" Optional<List<Request>> maybeRequests =\n",
" RequestUtil.combine(maybeDeposits, maybeWithdrawalRequests);\n"
] | [
"\n",
" if (mergeContext.get().isSyncing()) {\n",
" LOG.debug(\"We are syncing\");\n",
" return respondWith(reqId, blockParam, null, SYNCING);\n",
" }\n",
"\n",
" final List<Transaction> transactions;\n",
" try {\n",
" transactions =\n",
" blockParam.getTransact... | [
"\n",
" final Optional<ExecutionWitness> maybeExecutionWitness =\n",
" Optional.ofNullable(blockParam.getExecutionWitness())\n",
" .map(ExecutionWitnessParameter::toExecutionWitness);\n",
" if (!getExecutionWitnessValidator(\n",
" protocolSchedule.get(), blockParam.getTi... | false | 4c62d0d6b63c31c3 | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 59625dd4865565533be24b0d5a7e48b7cbc29457 | 5e1f384c2f011345b6ab5f07304d171898716bb4 | 8df6bcadddc817fd8099c1849fe25b0ca7f66e3c | ethereum/core/src/main/java/org/hyperledger/besu/ethereum/core/BlockHeaderBuilder.java | 0 | 5 | [
" .ommersHash(header.getOmmersHash())\n",
" .coinbase(header.getCoinbase())\n",
" .stateRoot(header.getStateRoot())\n",
" .transactionsRoot(header.getTransactionsRoot())\n",
" .receiptsRoot(header.getReceiptsRoot())\n",
" .logsBloom(header.getLogsBloom())\n",
" ... | [
" .depositsRoot(header.getDepositsRoot().orElse(null))\n",
" .exitsRoot(header.getExitsRoot().orElse(null))\n",
" .executionWitness(header.getExecutionWitness().orElse(null));\n"
] | [
" .depositsRoot(header.getDepositsRoot().orElse(null))\n",
" .exitsRoot(header.getExitsRoot().orElse(null));\n"
] | [
" .requestsRoot(header.getRequestsRoot().orElse(null));\n"
] | [
" }\n",
"\n",
" public static BlockHeaderBuilder fromBuilder(final BlockHeaderBuilder fromBuilder) {\n",
" final BlockHeaderBuilder toBuilder =\n",
" create()\n",
" .parentHash(fromBuilder.parentHash)\n",
" .ommersHash(fromBuilder.ommersHash)\n",
" .coinbas... | [
" .requestsRoot(header.getRequestsRoot().orElse(null))\n",
" .executionWitness(header.getExecutionWitness().orElse(null));\n"
] | false | 152fb211c2371278 | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 59625dd4865565533be24b0d5a7e48b7cbc29457 | 5e1f384c2f011345b6ab5f07304d171898716bb4 | 8df6bcadddc817fd8099c1849fe25b0ca7f66e3c | ethereum/core/src/main/java/org/hyperledger/besu/ethereum/core/SealableBlockHeader.java | 0 | 1 | [
" protected SealableBlockHeader(\n",
" final Hash parentHash,\n",
" final Hash ommersHash,\n",
" final Address coinbase,\n",
" final Hash stateRoot,\n",
" final Hash transactionsRoot,\n",
" final Hash receiptsRoot,\n",
" final LogsBloomFilter logsBloom,\n",
" ... | [
" final Hash depositsRoot,\n",
" final Hash exitsRoot,\n",
" final ExecutionWitness executionWitness) {\n"
] | [
" final Hash depositsRoot,\n",
" final Hash exitsRoot) {\n"
] | [
" final Hash requestsRoot) {\n"
] | [
" super(\n",
" parentHash,\n",
" coinbase,\n",
" difficulty,\n",
" number,\n",
" gasLimit,\n",
" timestamp,\n",
" baseFee,\n",
" mixHashOrPrevRandao,\n",
" parentBeaconBlockRoot);\n",
" this.ommersHash = ommersHash;\n",
" ... | [
" final Hash requestsRoot,\n",
" final ExecutionWitness executionWitness) {\n"
] | false | 492594efe20671df | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 59625dd4865565533be24b0d5a7e48b7cbc29457 | 5e1f384c2f011345b6ab5f07304d171898716bb4 | 8df6bcadddc817fd8099c1849fe25b0ca7f66e3c | ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/ProtocolSpec.java | 0 | 4 | [
" private final AbstractBlockProcessor.TransactionReceiptFactory transactionReceiptFactory;\n",
"\n",
" private final DifficultyCalculator difficultyCalculator;\n",
"\n",
" private final Wei blockReward;\n",
"\n",
" private final MiningBeneficiaryCalculator miningBeneficiaryCalculator;\n",
"\n",
... | [
" private final DepositsValidator depositsValidator;\n",
" private final ValidatorExitsValidator exitsValidator;\n",
" private final ExecutionWitnessValidator executionWitnessValidator;\n",
" private final Optional<HistoricalBlockHashProcessor> historicalBlockHashProcessor;\n"
] | [
" private final DepositsValidator depositsValidator;\n",
" private final ValidatorExitsValidator exitsValidator;\n",
"\n"
] | [
" private final RequestsValidatorCoordinator requestsValidatorCoordinator;\n",
" private final Optional<RequestProcessorCoordinator> requestProcessorCoordinator;\n",
" private final BlockHashProcessor blockHashProcessor;\n"
] | [
" private final boolean isPoS;\n",
" private final boolean isReplayProtectionSupported;\n",
"\n",
" /**\n",
" * Creates a new protocol specification instance.\n",
" *\n",
" * @param name the protocol specification name\n",
" * @param evm the EVM supporting the appropriate operations for thi... | [
" private final RequestsValidatorCoordinator requestsValidatorCoordinator;\n",
" private final Optional<RequestProcessorCoordinator> requestProcessorCoordinator;\n",
" private final BlockHashProcessor blockHashProcessor;\n",
"\n",
" private final ExecutionWitnessValidator executionWitnessValidator;\n",
... | false | 0317cd816632c78e | null | needs new code | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 59625dd4865565533be24b0d5a7e48b7cbc29457 | 5e1f384c2f011345b6ab5f07304d171898716bb4 | 8df6bcadddc817fd8099c1849fe25b0ca7f66e3c | ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/backwardsync/ChainForTestCreator.java | 1 | 3 | [
" fakeHeader.getHash(),\n",
" blockHeader.getOmmersHash(),\n",
" blockHeader.getCoinbase(),\n",
" blockHeader.getStateRoot(),\n",
" blockHeader.getTransactionsRoot(),\n",
" blockHeader.getReceiptsRoot(),\n",
" blockHeader.getLogsBloom(),\n",
" bl... | [
" blockHeader.getDepositsRoot().orElse(null),\n",
" blockHeader.getExitsRoot().orElse(null),\n",
" blockHeader.getExecutionWitness().orElse(null),\n"
] | [
" blockHeader.getDepositsRoot().orElse(null),\n",
" blockHeader.getExitsRoot().orElse(null),\n"
] | [
" blockHeader.getRequestsRoot().orElse(null),\n"
] | [
" new MainnetBlockHeaderFunctions());\n",
" }\n",
"\n",
" public static List<Block> prepareChain(final int elements, final long height) {\n",
" List<Block> blockList = new ArrayList<>(elements);\n",
"\n",
" blockList.add(createEmptyBlock(height));\n",
"\n",
" for (int i = 1; i < el... | [
" blockHeader.getRequestsRoot().orElse(null),\n",
" blockHeader.getExecutionWitness().orElse(null),\n"
] | false | 153f5d96d2db6997 | null | needs new code | {
"test_file": true,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | dd7ac8b1c5d2047c3fe70f7a933dfadb0eacf3d3 | 5023444c9dfe9b8f1ce1f3c13e6c6d146bb84a23 | 94099d18f5e4901b8e66c8d7e88662aedbd3cd3b | ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/AbstractEngineNewPayload.java | 1 | 3 | [
"import static org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.engine.RequestValidatorProvider.getConsolidationRequestValidator;\n",
"import static org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.engine.RequestValidatorProvider.getDepositRequestValidator;\n",
"import static org.hyperledger... | [
"import org.hyperledger.besu.ethereum.api.jsonrpc.internal.parameters.ExecutionWitnessParameter;\n"
] | [] | [] | [
"import org.hyperledger.besu.ethereum.api.jsonrpc.internal.parameters.JsonRpcParameter.JsonRpcParameterException;\n",
"import org.hyperledger.besu.ethereum.api.jsonrpc.internal.parameters.WithdrawalParameter;\n",
"import org.hyperledger.besu.ethereum.api.jsonrpc.internal.parameters.WithdrawalRequestParameter;\n... | [
"import org.hyperledger.besu.ethereum.api.jsonrpc.internal.parameters.ExecutionWitnessParameter;\n"
] | false | 7b25f2f5f4f200b1 | [
"A1"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | dd7ac8b1c5d2047c3fe70f7a933dfadb0eacf3d3 | 5023444c9dfe9b8f1ce1f3c13e6c6d146bb84a23 | 94099d18f5e4901b8e66c8d7e88662aedbd3cd3b | ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineNewPayloadV2Test.java | 3 | 7 | [
" null));\n",
"\n",
" final JsonRpcError jsonRpcError = fromErrorResp(resp);\n",
" assertThat(jsonRpcError.getCode()).isEqualTo(INVALID_PARAMS.getCode());\n",
" verify(engineCallListener, times(1)).executionEngineCalled();\n",
" }\n",
"\n",
" @Test\n",
" public void should... | [
" resp(\n",
" mockEnginePayload(\n",
" blockHeader, Collections.emptyList(), List.of(), null, null, null, null));\n"
] | [
" var resp = resp(mockEnginePayload(blockHeader, Collections.emptyList(), List.of(), null, null));\n"
] | [
" resp(mockEnginePayload(blockHeader, Collections.emptyList(), List.of(), null, null, null));\n"
] | [
" final JsonRpcError jsonRpcError = fromErrorResp(resp);\n",
" assertThat(jsonRpcError.getCode()).isEqualTo(INVALID_BLOB_GAS_USED_PARAMS.getCode());\n",
" assertThat(jsonRpcError.getData()).isEqualTo(\"Missing blob gas used field\");\n",
" verify(engineCallListener, times(1)).executionEngineCalled... | [
" resp(\n",
" mockEnginePayload(\n",
" blockHeader, Collections.emptyList(), List.of(), null, null, null, null));\n"
] | false | f74f76ff9264d3e1 | [
"A1",
"A2",
"A3"
] | side A | {
"test_file": true,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | dd7ac8b1c5d2047c3fe70f7a933dfadb0eacf3d3 | 5023444c9dfe9b8f1ce1f3c13e6c6d146bb84a23 | 94099d18f5e4901b8e66c8d7e88662aedbd3cd3b | ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineNewPayloadV4Test.java | 0 | 8 | [
" @Test\n",
" public void shouldReturnValidIfDepositRequestsIsNull_WhenDepositRequestsProhibited() {\n",
" final List<DepositRequestParameter> depositRequests = null;\n",
" mockProhibitedRequestsValidator();\n",
"\n",
" BlockHeader mockHeader =\n",
" setupValidPayload(\n",
" ... | [
" mockHeader, Collections.emptyList(), null, depositRequests, null, null, null));\n"
] | [
" resp(mockEnginePayload(mockHeader, Collections.emptyList(), null, depositRequests, null));\n"
] | [
" mockHeader, Collections.emptyList(), null, depositRequests, null, null));\n"
] | [
"\n",
" assertValidResponse(mockHeader, resp);\n",
" }\n",
"\n",
" @Test\n",
" public void shouldReturnInvalidIfDepositRequestsIsNull_WhenDepositRequestsAllowed() {\n",
" final List<DepositRequestParameter> depositRequests = null;\n",
" mockAllowedDepositRequestsRequestValidator();\n",
"... | [
" mockHeader, Collections.emptyList(), null, depositRequests, null, null, null));\n"
] | false | b5433e13e534fa68 | [
"A1"
] | side A | {
"test_file": true,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | dd7ac8b1c5d2047c3fe70f7a933dfadb0eacf3d3 | 5023444c9dfe9b8f1ce1f3c13e6c6d146bb84a23 | 94099d18f5e4901b8e66c8d7e88662aedbd3cd3b | ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineNewPayloadV4Test.java | 3 | 8 | [
"\n",
" assertValidResponse(mockHeader, resp);\n",
" }\n",
"\n",
" @Test\n",
" public void shouldReturnInvalidIfDepositRequestsIsNotNull_WhenDepositRequestsProhibited() {\n",
" final List<DepositRequestParameter> depositRequests = List.of();\n",
" lenient()\n",
" .when(protocolSpe... | [
" null,\n"
] | [] | [] | [
" null));\n",
"\n",
" final JsonRpcError jsonRpcError = fromErrorResp(resp);\n",
" assertThat(jsonRpcError.getCode()).isEqualTo(INVALID_PARAMS.getCode());\n",
" verify(engineCallListener, times(1)).executionEngineCalled();\n",
" }\n",
"\n",
" @Test\n",
" public void should... | [
" null,\n"
] | false | 5c7cc7c9f1a6d75d | [
"A1"
] | side A | {
"test_file": true,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | dd7ac8b1c5d2047c3fe70f7a933dfadb0eacf3d3 | 5023444c9dfe9b8f1ce1f3c13e6c6d146bb84a23 | 94099d18f5e4901b8e66c8d7e88662aedbd3cd3b | ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/MainnetTransactionProcessor.java | 3 | 4 | [
" final Wei coinbaseWeiDelta =\n",
" coinbaseCalculator.price(usedGas, transactionGasPrice, blockHeader.getBaseFee());\n",
"\n",
" operationTracer.traceBeforeRewardTransaction(worldUpdater, transaction, coinbaseWeiDelta);\n",
"\n",
" final var coinbase = evmWorldUpdater.getOrCreate... | [
" clearEmptyAccountStrategy.process(worldState);\n"
] | [
" if (clearEmptyAccounts) {\n",
" worldState.clearAccountsThatAreEmpty();\n",
" }\n"
] | [
" if (clearEmptyAccounts) {\n",
" evmWorldUpdater.clearAccountsThatAreEmpty();\n",
" }\n"
] | [
"\n",
" if (initialFrame.getState() == MessageFrame.State.COMPLETED_SUCCESS) {\n",
" return TransactionProcessingResult.successful(\n",
" initialFrame.getLogs(),\n",
" gasUsedByTransaction,\n",
" refundedGas,\n",
" initialFrame.getOutputData(),\n",... | [
" clearEmptyAccountStrategy.process(worldState);\n"
] | false | 563ad9172e46a546 | [
"A1"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 5b585d45c2b2090256ce9f3e046afab997b4a6f4 | c9f11b5dba236c9968c4e60ff6c631294d584fff | fbe36365e58328d4b5582fd30aa0f40493d99390 | besu/src/main/java/org/hyperledger/besu/cli/options/storage/DataStorageOptions.java | 3 | 5 | [
" return dataStorageOptions;\n",
" }\n",
"\n",
" @Override\n",
" public DataStorageConfiguration toDomainObject() {\n",
" final ImmutableDataStorageConfiguration.Builder builder =\n",
" ImmutableDataStorageConfiguration.builder()\n",
" .dataStorageFormat(dataStorageFormat)\n... | [
" .pathBasedExtraStorageConfiguration(pathBasedExtraStorageOptions.toDomainObject())\n",
" .verkleSubStorageConfiguration(verkleSubStorageOptions.toDomainObject());\n"
] | [
" .diffBasedSubStorageConfiguration(diffBasedSubStorageOptions.toDomainObject());\n"
] | [
" .pathBasedExtraStorageConfiguration(pathBasedExtraStorageOptions.toDomainObject());\n"
] | [
" return builder.build();\n",
" }\n",
"\n",
" @Override\n",
" public List<String> getCLIOptions() {\n",
" final List<String> cliOptions = CommandLineUtils.getCLIOptions(this, new DataStorageOptions());\n",
" cliOptions.addAll(pathBasedExtraStorageOptions.getCLIOptions());\n"
] | [
" .pathBasedExtraStorageConfiguration(pathBasedExtraStorageOptions.toDomainObject())\n",
" .verkleSubStorageConfiguration(verkleSubStorageOptions.toDomainObject());\n"
] | false | 35f2934012b62122 | [
"A1",
"A2"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
besu-eth/besu | 5b585d45c2b2090256ce9f3e046afab997b4a6f4 | c9f11b5dba236c9968c4e60ff6c631294d584fff | fbe36365e58328d4b5582fd30aa0f40493d99390 | besu/src/main/java/org/hyperledger/besu/cli/subcommands/storage/TrieLogHelper.java | 0 | 1 | [
" * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on\n",
" * an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the\n",
" * specific language governing permissions and limitations und... | [
"import org.hyperledger.besu.ethereum.trie.pathbased.bonsai.trielog.BonsaiTrieLogFactoryImpl;\n"
] | [
"import org.hyperledger.besu.ethereum.trie.diffbased.bonsai.trielog.TrieLogFactoryImpl;\n",
"import org.hyperledger.besu.ethereum.trie.diffbased.common.storage.DiffBasedWorldStateKeyValueStorage;\n",
"import org.hyperledger.besu.ethereum.trie.diffbased.common.trielog.TrieLogLayer;\n"
] | [
"import org.hyperledger.besu.ethereum.trie.pathbased.bonsai.trielog.TrieLogFactoryImpl;\n"
] | [
"import org.hyperledger.besu.ethereum.trie.pathbased.common.storage.PathBasedWorldStateKeyValueStorage;\n",
"import org.hyperledger.besu.ethereum.trie.pathbased.common.trielog.TrieLogLayer;\n",
"import org.hyperledger.besu.ethereum.worldstate.DataStorageConfiguration;\n",
"import org.hyperledger.besu.ethereum... | [
"import org.hyperledger.besu.ethereum.trie.pathbased.bonsai.trielog.BonsaiTrieLogFactoryImpl;\n"
] | false | 32cd3072ad17393d | [
"A1"
] | side A | {
"test_file": false,
"benchmark_size": true,
"sides_differ_only_in_spacing": false
} | Apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.