file_name
stringlengths 6
93
| file_path
stringlengths 57
282
| content
stringlengths 652
3.07M
| file_size
int64 695
3.15M
| language
stringclasses 1
value | extension
stringclasses 1
value | repo_name
stringlengths 7
89
| repo_stars
int64 8
31.8k
| repo_forks
int64 0
9.36k
| repo_open_issues
int64 0
1.54k
| repo_created_at
stringlengths 20
20
| repo_pushed_at
stringlengths 20
20
| sha
stringlengths 64
64
| near_dups_stkv2_idx
sequencelengths 0
0
| input_ids
sequencelengths 301
890k
| attention_mask
sequencelengths 1
1
| n_tok
int64 301
890k
| longline
bool 2
classes | alpha
float64 0.92
89.3
| encoded
bool 2
classes | autogen
bool 1
class |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
PublicSourceDirProviderTest.java | /FileExtraction/Java_unseen/f-droid_fdroidclient/app/src/androidTest/java/org/fdroid/fdroid/nearby/PublicSourceDirProviderTest.java | package org.fdroid.fdroid.nearby;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.database.Cursor;
import android.net.Uri;
import android.provider.MediaStore;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
import org.apache.commons.io.FileUtils;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;
@RunWith(AndroidJUnit4.class)
public class PublicSourceDirProviderTest {
public static final String TAG = "DataApkProviderTest";
Context context;
List<PackageInfo> packageInfoList;
@Before
public void setUp() {
context = InstrumentationRegistry.getInstrumentation().getTargetContext();
packageInfoList = null;
}
/**
* Test whether reading installed APKs via our custom {@link android.content.ContentProvider}
* works. This skips system apps just to make the test easier to manage. It also only
* copies max 3 apps so it doesn't take a long time to run.
*/
@Test
public void testCopyFromGetUri() throws IOException {
int copyTotal = 3;
PackageManager pm = context.getPackageManager();
List<PackageInfo> packageInfoList = pm.getInstalledPackages(0);
for (PackageInfo packageInfo : packageInfoList) {
File apk = new File(packageInfo.applicationInfo.publicSourceDir);
if (apk.getCanonicalPath().startsWith("/system")) {
continue;
}
Uri uri = PublicSourceDirProvider.getUri(context, packageInfo.packageName);
InputStream is = null;
File f = null;
is = context.getContentResolver().openInputStream(uri);
f = File.createTempFile("received", ".apk");
FileUtils.copyInputStreamToFile(is, f);
assertTrue("dest file " + f + " should exist", f.exists());
assertEquals(f + " should equal " + apk, apk.length(), f.length());
f.delete();
copyTotal--;
if (copyTotal < 0) {
break;
}
}
}
/**
* Test whether querying the custom {@link android.content.ContentProvider}
* for installed APKs returns the right kind of data.
*/
@Test
public void testQuery() throws IOException {
PackageManager pm = context.getPackageManager();
List<PackageInfo> packageInfoList = pm.getInstalledPackages(0);
for (PackageInfo packageInfo : packageInfoList) {
File apk = new File(packageInfo.applicationInfo.publicSourceDir);
if (apk.getCanonicalPath().startsWith("/system")) {
continue;
}
Uri uri = PublicSourceDirProvider.getUri(context, packageInfo.packageName);
Cursor cursor = context.getContentResolver().query(uri, null, null, null, null);
assertNotNull(cursor);
cursor.moveToFirst();
while (!cursor.isAfterLast()) {
assertNotNull(cursor.getString(cursor.getColumnIndex(MediaStore.MediaColumns.DISPLAY_NAME)));
cursor.moveToNext();
}
cursor.close();
}
}
}
| 3,502 | Java | .java | f-droid/fdroidclient | 1,489 | 144 | 1 | 2014-07-23T17:46:02Z | 2024-05-08T10:26:36Z | 7c190b702c9e5273b9b1feb489b4a33796250b1d43e6e1968ff6733518b3bfa4 | [] | [
1337,
1105,
51,
3016,
1647,
51,
3016,
1647,
51,
20114,
1186,
64,
222,
222,
485,
924,
1105,
51,
3946,
51,
3285,
51,
4993,
64,
222,
485,
924,
1105,
51,
3946,
51,
3285,
51,
14765,
64,
222,
485,
924,
1105,
51,
3946,
51,
3285,
51,
6553,
64,
222,
222,
485,
2616,
51,
1304,
51,
1237,
64,
222,
485,
2616,
51,
1304,
51,
4921,
51,
4057,
1139,
64,
222,
485,
2616,
51,
1304,
51,
4921,
51,
42759,
64,
222,
485,
2616,
51,
4617,
51,
7424,
64,
222,
485,
2616,
51,
1317,
51,
5729,
64,
222,
485,
2616,
51,
6390,
51,
5003,
2796,
64,
222,
222,
485,
10484,
51,
881,
51,
426,
51,
3946,
51,
33732,
51,
9213,
25065,
57,
64,
222,
485,
10484,
51,
881,
51,
5146,
51,
745,
51,
36011,
5389,
64,
222,
222,
485,
1105,
51,
2121,
51,
8381,
51,
735,
51,
39463,
64,
222,
485,
1105,
51,
3946,
51,
5670,
64,
222,
485,
1105,
51,
3946,
51,
1024,
64,
222,
485,
1105,
51,
3946,
51,
10349,
51,
23071,
64,
222,
222,
485,
1401,
51,
735,
51,
991,
64,
222,
485,
1401,
51,
735,
51,
6860,
64,
222,
485,
1401,
51,
735,
51,
6989,
64,
222,
485,
1401,
51,
1058,
51,
739,
64,
222,
222,
69,
23071,
45,
9213,
25065,
57,
51,
842,
46,
222,
942,
462,
5062,
2044,
2995,
2588,
1024,
320,
303,
581,
924,
1175,
910,
19318,
299,
332,
768,
70,
3198,
2588,
1024,
884,
465,
7063,
1637,
64,
303,
1701,
65,
4057,
1139,
67,
2670,
25846,
64,
465,
496,
5670,
303,
581,
782,
14544,
365,
320,
310,
1637,
299,
31970,
387,
5389,
51,
390,
36011,
941,
26028,
1237,
492,
310,
2670,
25846,
299,
762,
64,
303,
339,
465,
1041,
294,
338,
2128,
4962,
9198,
6733,
418,
8890,
120,
4745,
3027,
3137,
3105,
1222,
2616,
51,
1304,
51,
1795,
2588,
130,
294,
338,
4864,
51,
244,
1369,
7130,
120,
2684,
11568,
2277,
391,
1949,
341,
913,
12103,
391,
11857,
51,
244,
2048,
2353,
1773,
294,
338,
8685,
1788,
244,
56,
11568,
1278,
580,
4183,
1348,
4843,
331,
1964,
1153,
391,
1441,
51,
294,
588,
303,
496,
1024,
303,
581,
782,
913,
4014,
1811,
953,
5729,
365,
2589,
6300,
320,
310,
648,
1948,
4767,
299,
244,
56,
64,
310,
9718,
1590,
15705,
299,
1637,
51,
390,
42759,
492,
310,
1701,
65,
4057,
1139,
67,
2670,
25846,
299,
15705,
51,
390,
23309,
15992,
45,
53,
312,
310,
456,
327,
4057,
1139,
2670,
1139,
518,
2670,
25846,
46,
320,
343,
2050,
28765,
299,
556,
2050,
45,
1337,
1139,
51,
3180,
1139,
51,
942,
2044,
2995,
312,
343,
434,
327,
25215,
51,
47905,
1233,
941,
13907,
4229,
2964,
2152,
320,
419,
4056,
64,
343,
339,
343,
14433,
8219,
299,
5062,
2044,
2995,
2588,
51,
390,
5729,
45,
1834,
49,
2670,
1139,
51,
28475,
312,
343,
18994,
458,
299,
762,
64,
343,
2050,
315,
299,
762,
64,
343,
458,
299,
1637,
51,
16618,
7266,
941,
1693,
6989,
45,
3469,
312,
343,
315,
299,
2050,
51,
1315,
44274,
459,
15642,
411,
4956,
25215,
742,
343,
36423,
51,
3014,
6989,
22944,
45,
316,
49,
315,
312,
343,
9396,
459,
3332,
822,
332,
494,
315,
494,
332,
1414,
2325,
411,
315,
51,
4678,
1052,
343,
3803,
45,
107,
494,
332,
1414,
5058,
332,
494,
28765,
49,
28765,
51,
1340,
1046,
315,
51,
1340,
1052,
343,
315,
51,
2577,
492,
1083,
1948,
4767,
10606,
343,
434,
327,
3014,
4767,
350,
244,
53,
46,
320,
419,
1644,
64,
343,
339,
310,
339,
303,
339,
465,
1041,
294,
338,
2128,
4962,
38627,
341,
3137,
3105,
1222,
2616,
51,
1304,
51,
1795,
2588,
130,
294,
338,
456,
6733,
418,
8890,
120,
3235,
341,
2109,
6207,
451,
727,
51,
294,
588,
303,
496,
1024,
303,
581,
782,
913,
1643,
365,
2589,
6300,
320,
310,
9718,
1590,
15705,
299,
1637,
51,
390,
42759,
492,
310,
1701,
65,
4057,
1139,
67,
2670,
25846,
299,
15705,
51,
390,
23309,
15992,
45,
53,
312,
310,
456,
327,
4057,
1139,
2670,
1139,
518,
2670,
25846,
46,
320,
343,
2050,
28765,
299,
556,
2050,
45,
1337,
1139,
51,
3180,
1139,
51,
942,
2044,
2995,
312,
343,
434,
327,
25215,
51,
47905,
1233,
941,
13907,
4229,
2964,
2152,
320,
419,
4056,
64,
343,
339,
343,
14433,
8219,
299,
5062,
2044,
2995,
2588,
51,
390,
5729,
45,
1834,
49,
2670,
1139,
51,
28475,
312,
343,
22697,
6226,
299,
1637,
51,
16618,
7266,
941,
1234,
45,
3469,
49,
762,
49,
762,
49,
762,
49,
762,
312,
343,
17141,
45,
7033,
312,
1083,
6226,
51,
23061,
3485,
492,
343,
2236,
1445,
7033,
51,
316,
5131,
3283,
1177,
320,
419,
17141,
45,
7033,
51,
7080,
45,
7033,
51,
41423,
45,
5003,
2796,
51,
5003,
7633,
51,
20747,
100,
2491,
4254,
419,
6226,
51,
23061,
3364,
492,
343,
339,
343,
6226,
51,
2698,
492,
310,
339,
303,
339,
222,
130,
222
] | [
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
]
] | 798 | true | 65.505425 | true | true |
ConvertCommands.java | /FileExtraction/Java_unseen/PatoTheBest_MiniGames/Games/HungerGames/src/main/java/me/patothebest/hungergames/commands/ConvertCommands.java | package me.patothebest.hungergames.commands;
import me.patothebest.gamecore.PluginConfig;
import me.patothebest.gamecore.arena.ArenaManager;
import me.patothebest.gamecore.chat.CommandPagination;
import me.patothebest.gamecore.command.ChildOf;
import me.patothebest.gamecore.command.Command;
import me.patothebest.gamecore.command.CommandContext;
import me.patothebest.gamecore.command.CommandException;
import me.patothebest.gamecore.command.CommandPermissions;
import me.patothebest.gamecore.command.CommandsManager;
import me.patothebest.gamecore.command.LangDescription;
import me.patothebest.gamecore.command.NestedCommand;
import me.patothebest.gamecore.commands.setup.SetupCommand;
import me.patothebest.gamecore.lang.CoreLang;
import me.patothebest.gamecore.modules.ParentCommandModule;
import me.patothebest.gamecore.permission.Permission;
import me.patothebest.gamecore.util.CommandUtils;
import me.patothebest.gamecore.util.Utils;
import me.patothebest.gamecore.vector.ArenaLocation;
import me.patothebest.gamecore.world.ArenaWorld;
import me.patothebest.hungergames.arena.Arena;
import me.patothebest.hungergames.arena.ArenaType;
import me.patothebest.hungergames.arena.GameTeam;
import org.bukkit.DyeColor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import javax.inject.Inject;
import java.io.File;
import java.util.List;
public class ConvertCommands {
private final ArenaManager arenaManager;
@Inject private ConvertCommands(ArenaManager arenaManager) {
this.arenaManager = arenaManager;
}
@ChildOf(SetupCommand.class)
public static class Parent implements ParentCommandModule {
private final CommandsManager<CommandSender> commandsManager;
@Inject
private Parent(CommandsManager<CommandSender> commandsManager) {
this.commandsManager = commandsManager;
}
@Command(
aliases = "convert",
desc = "Command for converting",
langDescription = @LangDescription(
langClass = CoreLang.class,
element = ""
)
)
@CommandPermissions(permission = Permission.SETUP)
@NestedCommand(
value = ConvertCommands.class,
defaultToBody = true
)
public void convert(CommandContext args, CommandSender sender) throws CommandException {
new CommandPagination(commandsManager, args).display(sender);
}
}
@Command(
aliases = {"toteam"},
usage = "<arena>",
min = 1,
max = 1,
desc = "convert an arena to team",
langDescription = @LangDescription(
langClass = CoreLang.class,
element = ""
)
)
public List<String> convertArena(CommandContext args, CommandSender sender) throws CommandException {
Player player = CommandUtils.getPlayer(sender);
if (args.getSuggestionContext() != null) {
if (args.getSuggestionContext().getIndex() == 0) {
return CommandUtils.complete(args.getString(0), arenaManager);
}
return null;
}
Arena arena = CommandUtils.getEnabledArena(args, 0, arenaManager);
Utils.unZip(new File(ArenaWorld.WORLD_DIRECTORY, arena.getName() + ".zip").getPath(), new File(PluginConfig.WORLD_PREFIX + arena.getName() + "-Team" + File.separatorChar).getPath());
new File(PluginConfig.WORLD_PREFIX + arena.getName() + "-Team" + File.separatorChar + "uid.dat").delete();
Arena newArena = (Arena) arenaManager.createArena(arena.getName() + "-Team");
newArena.setArenaGroup(ArenaType.TEAM);
newArena.setArea(arena.getArea().clone().setArena(newArena));
newArena.setLobbyLocation(new ArenaLocation(newArena, arena.getLobbyLocation()));
newArena.setMaxPlayers(arena.getMaxPlayers()*2);
newArena.setMinPlayers(arena.getMinPlayers());
newArena.setPermissionGroup(arena.getPermissionGroup());
newArena.setSpectatorLocation(new ArenaLocation(newArena, arena.getSpectatorLocation()));
newArena.save();
newArena.initializePhase();
int i = 0;
int i2 = 1;
boolean appendTeam = arena.getSpawns().size() > DyeColor.values().length;
for (ArenaLocation arenaLocation : arena.getSpawns()) {
if(i == DyeColor.values().length) {
i = 0;
i2++;
}
DyeColor color = DyeColor.values()[i];
GameTeam team = newArena.createTeam(Utils.capitalizeFirstLetter(color.name()) + (appendTeam ? "#" + i2 : ""), color);
team.setSpawn(new ArenaLocation(newArena, arenaLocation));
i++;
}
newArena.enableArena();
return null;
}
}
| 4,894 | Java | .java | PatoTheBest/MiniGames | 13 | 2 | 1 | 2020-08-07T03:43:56Z | 2022-01-23T23:52:46Z | f1bab20e704e320afb7592be3a83cef991a7f6a3576492f3f960bb8ab21dd2d1 | [] | [
1337,
616,
51,
7225,
385,
311,
8888,
51,
25672,
892,
17793,
51,
7626,
64,
222,
222,
485,
616,
51,
7225,
385,
311,
8888,
51,
3642,
1284,
51,
4168,
1081,
64,
222,
485,
616,
51,
7225,
385,
311,
8888,
51,
3642,
1284,
51,
22702,
51,
19559,
1590,
64,
222,
485,
616,
51,
7225,
385,
311,
8888,
51,
3642,
1284,
51,
6184,
51,
2037,
20616,
64,
222,
485,
616,
51,
7225,
385,
311,
8888,
51,
3642,
1284,
51,
2514,
51,
2950,
1436,
64,
222,
485,
616,
51,
7225,
385,
311,
8888,
51,
3642,
1284,
51,
2514,
51,
2037,
64,
222,
485,
616,
51,
7225,
385,
311,
8888,
51,
3642,
1284,
51,
2514,
51,
2037,
1237,
64,
222,
485,
616,
51,
7225,
385,
311,
8888,
51,
3642,
1284,
51,
2514,
51,
2037,
1002,
64,
222,
485,
616,
51,
7225,
385,
311,
8888,
51,
3642,
1284,
51,
2514,
51,
2037,
10967,
64,
222,
485,
616,
51,
7225,
385,
311,
8888,
51,
3642,
1284,
51,
2514,
51,
9769,
1590,
64,
222,
485,
616,
51,
7225,
385,
311,
8888,
51,
3642,
1284,
51,
2514,
51,
12807,
3250,
64,
222,
485,
616,
51,
7225,
385,
311,
8888,
51,
3642,
1284,
51,
2514,
51,
14109,
2037,
64,
222,
485,
616,
51,
7225,
385,
311,
8888,
51,
3642,
1284,
51,
7626,
51,
5536,
51,
6438,
2037,
64,
222,
485,
616,
51,
7225,
385,
311,
8888,
51,
3642,
1284,
51,
1600,
51,
2869,
12807,
64,
222,
485,
616,
51,
7225,
385,
311,
8888,
51,
3642,
1284,
51,
3490,
51,
4449,
2037,
2478,
64,
222,
485,
616,
51,
7225,
385,
311,
8888,
51,
3642,
1284,
51,
9207,
51,
7052,
64,
222,
485,
616,
51,
7225,
385,
311,
8888,
51,
3642,
1284,
51,
1058,
51,
2037,
2769,
64,
222,
485,
616,
51,
7225,
385,
311,
8888,
51,
3642,
1284,
51,
1058,
51,
2769,
64,
222,
485,
616,
51,
7225,
385,
311,
8888,
51,
3642,
1284,
51,
2423,
51,
19559,
2941,
64,
222,
485,
616,
51,
7225,
385,
311,
8888,
51,
3642,
1284,
51,
5879,
51,
19559,
6719,
64,
222,
485,
616,
51,
7225,
385,
311,
8888,
51,
25672,
892,
17793,
51,
22702,
51,
19559,
64,
222,
485,
616,
51,
7225,
385,
311,
8888,
51,
25672,
892,
17793,
51,
22702,
51,
19559,
638,
64,
222,
485,
616,
51,
7225,
385,
311,
8888,
51,
25672,
892,
17793,
51,
22702,
51,
3783,
8249,
64,
222,
485,
1105,
51,
20402,
51,
73,
7857,
1530,
64,
222,
485,
1105,
51,
20402,
51,
2514,
51,
2037,
10455,
64,
222,
485,
1105,
51,
20402,
51,
2244,
51,
3516,
64,
222,
222,
485,
3698,
51,
10287,
51,
8836,
64,
222,
485,
1401,
51,
735,
51,
991,
64,
222,
485,
1401,
51,
1058,
51,
739,
64,
222,
222,
942,
462,
8145,
9769,
320,
465,
964,
1175,
418,
17482,
1590,
35414,
1590,
64,
465,
496,
8836,
964,
8145,
9769,
45,
19559,
1590,
35414,
1590,
46,
320,
310,
477,
51,
22702,
1590,
299,
35414,
1590,
64,
303,
339,
465,
496,
2950,
1436,
45,
6438,
2037,
51,
842,
46,
303,
581,
924,
462,
15060,
4584,
15060,
2037,
2478,
320,
603,
964,
1175,
24194,
1590,
65,
2037,
10455,
67,
6364,
1590,
64,
603,
496,
8836,
310,
964,
15060,
45,
9769,
1590,
65,
2037,
10455,
67,
6364,
1590,
46,
320,
343,
477,
51,
7626,
1590,
299,
6364,
1590,
64,
310,
339,
603,
496,
2037,
45,
419,
20654,
299,
332,
5975,
411,
419,
5615,
299,
332,
2037,
456,
24667,
411,
419,
7285,
3250,
299,
496,
12807,
3250,
45,
733,
7285,
1359,
299,
7357,
12807,
51,
842,
49,
733,
2016,
299,
3347,
419,
848,
310,
848,
310,
496,
2037,
10967,
45,
9207,
299,
11125,
51,
32426,
46,
310,
496,
14109,
2037,
45,
419,
804,
299,
8145,
9769,
51,
842,
49,
419,
1263,
724,
3069,
299,
878,
310,
848,
310,
581,
782,
4511,
45,
2037,
1237,
2194,
49,
5730,
10455,
7056,
46,
2589,
5730,
1002,
320,
343,
556,
5730,
20616,
45,
7626,
1590,
49,
2194,
566,
2784,
45,
8272,
312,
310,
339,
303,
339,
465,
496,
2037,
45,
343,
20654,
299,
3479,
121,
1721,
424,
3933,
343,
6898,
299,
3791,
22702,
9603,
343,
1865,
299,
244,
54,
49,
343,
1788,
299,
244,
54,
49,
343,
5615,
299,
332,
5975,
619,
35414,
391,
6507,
411,
343,
7285,
3250,
299,
496,
12807,
3250,
45,
547,
7285,
1359,
299,
7357,
12807,
51,
842,
49,
547,
2016,
299,
3347,
343,
848,
303,
848,
303,
581,
1701,
65,
671,
67,
4511,
19559,
45,
2037,
1237,
2194,
49,
5730,
10455,
7056,
46,
2589,
5730,
1002,
320,
310,
9306,
4376,
299,
5730,
2769,
51,
32872,
45,
8272,
312,
603,
434,
327,
1150,
51,
390,
28778,
1237,
365,
882,
762,
46,
320,
343,
434,
327,
1150,
51,
390,
28778,
1237,
941,
27799,
365,
630,
244,
53,
46,
320,
419,
461,
5730,
2769,
51,
5916,
45,
1150,
51,
7080,
45,
53,
490,
35414,
1590,
312,
343,
339,
1083,
461,
762,
64,
310,
339,
603,
418,
17482,
35414,
299,
5730,
2769,
51,
390,
4006,
19559,
45,
1150,
49,
244,
53,
49,
35414,
1590,
312,
310,
13245,
51,
330,
13593,
45,
909,
2050,
45,
19559,
6719,
51,
28573,
100,
20675,
49,
35414,
51,
5175,
365,
494,
4956,
3992,
1912,
17676,
1046,
556,
2050,
45,
4168,
1081,
51,
28573,
100,
9857,
494,
35414,
51,
5175,
365,
494,
4840,
8249,
39,
494,
2050,
51,
12640,
2674,
566,
17676,
1052,
310,
556,
2050,
45,
4168,
1081,
51,
28573,
100,
9857,
494,
35414,
51,
5175,
365,
494,
4840,
8249,
39,
494,
2050,
51,
12640,
2674,
494,
332,
1909,
51,
2923,
1912,
2577,
492,
310,
418,
17482,
556,
19559,
299,
327,
19559,
46,
35414,
1590,
51,
1315,
19559,
45,
22702,
51,
5175,
365,
494,
4840,
8249,
742,
310,
556,
19559,
51,
489,
19559,
1582,
45,
19559,
638,
51,
46313,
312,
310,
556,
19559,
51,
489,
5585,
45,
22702,
51,
390,
5585,
941,
6371,
941,
489,
19559,
45,
909,
19559,
894,
310,
556,
19559,
51,
489,
37642,
2941,
45,
909,
418,
17482,
2941,
45,
909,
19559,
49,
35414,
51,
390,
37642,
2941,
5086,
310,
556,
19559,
51,
27235,
17670,
45,
22702,
51,
23742,
17670,
26629,
55,
312,
310,
556,
19559,
51,
489,
2944,
17670,
45,
22702,
51,
37457,
17670,
1052,
310,
556,
19559,
51,
489,
7052,
1582,
45,
22702,
51,
390,
7052,
1582,
1052,
310,
556,
19559,
51,
489,
23610,
738,
2941,
45,
909,
418,
17482,
2941,
45,
909,
19559,
49,
35414,
51,
18721,
939,
738,
2941,
5086,
310,
556,
19559,
51,
2882,
492,
310,
556,
19559,
51,
8796,
12238,
492,
603,
648,
613,
299,
244,
53,
64,
310,
648,
613,
55,
299,
244,
54,
64,
310,
1922,
5507,
8249,
299,
35414,
51,
390,
2184,
38008,
941,
911,
365,
868,
493,
7857,
1530,
51,
2857,
941,
1340,
64,
310,
456,
327,
19559,
2941,
35414,
2941,
518,
35414,
51,
390,
2184,
38008,
1177,
320,
343,
434,
45,
110,
630,
493,
7857,
1530,
51,
2857,
941,
1340,
46,
320,
419,
613,
299,
244,
53,
64,
419,
613,
55,
3348,
343,
339,
1083,
493,
7857,
1530,
1989,
299,
493,
7857,
1530,
51,
2857,
8577,
110,
988,
1083,
6067,
8249,
6507,
299,
556,
19559,
51,
1315,
8249,
45,
2769,
51,
34467,
3485,
17658,
45,
1507,
51,
444,
1177,
494,
327,
1713,
8249,
1037,
244,
41314,
494,
613,
55,
518,
33688,
1989,
312,
343,
6507,
51,
489,
16354,
45,
909,
418,
17482,
2941,
45,
909,
19559,
49,
35414,
2941,
894,
343,
613,
3348,
310,
339,
603,
556,
19559,
51,
4909,
19559,
492,
310,
461,
762,
64,
303,
339,
499,
222,
130,
222
] | [
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
]
] | 1,231 | true | 66.81651 | true | true |
ProfileTemplateVoCollection.java | /FileExtraction/Java_unseen/IMS-MAXIMS_openMAXIMS/Source Library/openmaxims_workspace/ValueObjects/src/ims/scheduling/vo/ProfileTemplateVoCollection.java | //#############################################################################
//# #
//# Copyright (C) <2015> <IMS MAXIMS> #
//# #
//# This program is free software: you can redistribute it and/or modify #
//# it under the terms of the GNU Affero General Public License as #
//# published by the Free Software Foundation, either version 3 of the #
//# License, or (at your option) any later version. #
//# #
//# This program is distributed in the hope that it will be useful, #
//# but WITHOUT ANY WARRANTY; without even the implied warranty of #
//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
//# GNU Affero General Public License for more details. #
//# #
//# You should have received a copy of the GNU Affero General Public License #
//# along with this program. If not, see <http://www.gnu.org/licenses/>. #
//# #
//# IMS MAXIMS provides absolutely NO GUARANTEE OF THE CLINICAL SAFTEY of #
//# this program. Users of this software do so entirely at their own risk. #
//# IMS MAXIMS only ensures the Clinical Safety of unaltered run-time #
//# software that it builds, deploys and maintains. #
//# #
//#############################################################################
//#EOH
// This code was generated by Barbara Worwood using IMS Development Environment (version 1.80 build 5589.25814)
// Copyright (C) 1995-2015 IMS MAXIMS. All rights reserved.
// WARNING: DO NOT MODIFY the content of this file
package ims.scheduling.vo;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Iterator;
import ims.framework.enumerations.SortOrder;
/**
* Linked to Scheduling.ProfileTemplate business object (ID: 1055100017).
*/
public class ProfileTemplateVoCollection extends ims.vo.ValueObjectCollection implements ims.vo.ImsCloneable, Iterable<ProfileTemplateVo>
{
private static final long serialVersionUID = 1L;
private ArrayList<ProfileTemplateVo> col = new ArrayList<ProfileTemplateVo>();
public String getBoClassName()
{
return "ims.scheduling.domain.objects.ProfileTemplate";
}
public boolean add(ProfileTemplateVo value)
{
if(value == null)
return false;
if(this.col.indexOf(value) < 0)
{
return this.col.add(value);
}
return false;
}
public boolean add(int index, ProfileTemplateVo value)
{
if(value == null)
return false;
if(this.col.indexOf(value) < 0)
{
this.col.add(index, value);
return true;
}
return false;
}
public void clear()
{
this.col.clear();
}
public void remove(int index)
{
this.col.remove(index);
}
public int size()
{
return this.col.size();
}
public int indexOf(ProfileTemplateVo instance)
{
return col.indexOf(instance);
}
public ProfileTemplateVo get(int index)
{
return this.col.get(index);
}
public boolean set(int index, ProfileTemplateVo value)
{
if(value == null)
return false;
this.col.set(index, value);
return true;
}
public void remove(ProfileTemplateVo instance)
{
if(instance != null)
{
int index = indexOf(instance);
if(index >= 0)
remove(index);
}
}
public boolean contains(ProfileTemplateVo instance)
{
return indexOf(instance) >= 0;
}
public Object clone()
{
ProfileTemplateVoCollection clone = new ProfileTemplateVoCollection();
for(int x = 0; x < this.col.size(); x++)
{
if(this.col.get(x) != null)
clone.col.add((ProfileTemplateVo)this.col.get(x).clone());
else
clone.col.add(null);
}
return clone;
}
public boolean isValidated()
{
for(int x = 0; x < col.size(); x++)
if(!this.col.get(x).isValidated())
return false;
return true;
}
public String[] validate()
{
return validate(null);
}
public String[] validate(String[] existingErrors)
{
if(col.size() == 0)
return null;
java.util.ArrayList<String> listOfErrors = new java.util.ArrayList<String>();
if(existingErrors != null)
{
for(int x = 0; x < existingErrors.length; x++)
{
listOfErrors.add(existingErrors[x]);
}
}
for(int x = 0; x < col.size(); x++)
{
String[] listOfOtherErrors = this.col.get(x).validate();
if(listOfOtherErrors != null)
{
for(int y = 0; y < listOfOtherErrors.length; y++)
{
listOfErrors.add(listOfOtherErrors[y]);
}
}
}
int errorCount = listOfErrors.size();
if(errorCount == 0)
return null;
String[] result = new String[errorCount];
for(int x = 0; x < errorCount; x++)
result[x] = (String)listOfErrors.get(x);
return result;
}
public ProfileTemplateVoCollection sort()
{
return sort(SortOrder.ASCENDING);
}
public ProfileTemplateVoCollection sort(boolean caseInsensitive)
{
return sort(SortOrder.ASCENDING, caseInsensitive);
}
public ProfileTemplateVoCollection sort(SortOrder order)
{
return sort(new ProfileTemplateVoComparator(order));
}
public ProfileTemplateVoCollection sort(SortOrder order, boolean caseInsensitive)
{
return sort(new ProfileTemplateVoComparator(order, caseInsensitive));
}
@SuppressWarnings("unchecked")
public ProfileTemplateVoCollection sort(Comparator comparator)
{
Collections.sort(col, comparator);
return this;
}
public ims.scheduling.vo.ProfileTemplateRefVoCollection toRefVoCollection()
{
ims.scheduling.vo.ProfileTemplateRefVoCollection result = new ims.scheduling.vo.ProfileTemplateRefVoCollection();
for(int x = 0; x < this.col.size(); x++)
{
result.add(this.col.get(x));
}
return result;
}
public ProfileTemplateVo[] toArray()
{
ProfileTemplateVo[] arr = new ProfileTemplateVo[col.size()];
col.toArray(arr);
return arr;
}
public Iterator<ProfileTemplateVo> iterator()
{
return col.iterator();
}
@Override
protected ArrayList getTypedCollection()
{
return col;
}
private class ProfileTemplateVoComparator implements Comparator
{
private int direction = 1;
private boolean caseInsensitive = true;
public ProfileTemplateVoComparator()
{
this(SortOrder.ASCENDING);
}
public ProfileTemplateVoComparator(SortOrder order)
{
if (order == SortOrder.DESCENDING)
{
direction = -1;
}
}
public ProfileTemplateVoComparator(SortOrder order, boolean caseInsensitive)
{
if (order == SortOrder.DESCENDING)
{
direction = -1;
}
this.caseInsensitive = caseInsensitive;
}
public int compare(Object obj1, Object obj2)
{
ProfileTemplateVo voObj1 = (ProfileTemplateVo)obj1;
ProfileTemplateVo voObj2 = (ProfileTemplateVo)obj2;
return direction*(voObj1.compareTo(voObj2, this.caseInsensitive));
}
public boolean equals(Object obj)
{
return false;
}
}
public ims.scheduling.vo.beans.ProfileTemplateVoBean[] getBeanCollection()
{
return getBeanCollectionArray();
}
public ims.scheduling.vo.beans.ProfileTemplateVoBean[] getBeanCollectionArray()
{
ims.scheduling.vo.beans.ProfileTemplateVoBean[] result = new ims.scheduling.vo.beans.ProfileTemplateVoBean[col.size()];
for(int i = 0; i < col.size(); i++)
{
ProfileTemplateVo vo = ((ProfileTemplateVo)col.get(i));
result[i] = (ims.scheduling.vo.beans.ProfileTemplateVoBean)vo.getBean();
}
return result;
}
public static ProfileTemplateVoCollection buildFromBeanCollection(java.util.Collection beans)
{
ProfileTemplateVoCollection coll = new ProfileTemplateVoCollection();
if(beans == null)
return coll;
java.util.Iterator iter = beans.iterator();
while (iter.hasNext())
{
coll.add(((ims.scheduling.vo.beans.ProfileTemplateVoBean)iter.next()).buildVo());
}
return coll;
}
public static ProfileTemplateVoCollection buildFromBeanCollection(ims.scheduling.vo.beans.ProfileTemplateVoBean[] beans)
{
ProfileTemplateVoCollection coll = new ProfileTemplateVoCollection();
if(beans == null)
return coll;
for(int x = 0; x < beans.length; x++)
{
coll.add(beans[x].buildVo());
}
return coll;
}
}
| 8,717 | Java | .java | IMS-MAXIMS/openMAXIMS | 61 | 50 | 23 | 2014-06-12T12:04:02Z | 2020-07-31T09:34:49Z | 9efb9224423e964eff8e9a7f68a5d3e09fff8ce3d072b5ab076708bc26a6b322 | [] | [
325,
19989,
8689,
222,
16802,
42053,
607,
222,
16802,
244,
2657,
327,
72,
46,
350,
55,
53,
54,
58,
67,
244,
350,
2348,
88,
7490,
2348,
88,
67,
22768,
607,
222,
16802,
42053,
607,
222,
16802,
244,
1369,
3477,
458,
3760,
2951,
63,
863,
902,
14081,
580,
480,
52,
290,
5370,
281,
607,
222,
16802,
244,
580,
1549,
341,
5974,
451,
341,
6994,
30994,
6153,
5062,
1196,
641,
2281,
607,
222,
16802,
244,
9582,
829,
341,
7834,
3870,
7120,
49,
3173,
1522,
244,
56,
451,
341,
981,
607,
222,
16802,
244,
1196,
49,
575,
327,
288,
1390,
2489,
46,
1364,
6146,
1522,
51,
10094,
607,
244,
222,
16802,
42053,
607,
222,
16802,
244,
1369,
3477,
458,
2744,
347,
341,
9850,
708,
580,
1118,
545,
6386,
49,
2052,
607,
222,
16802,
244,
1294,
4213,
2979,
9345,
64,
2895,
4462,
341,
4506,
14319,
451,
2281,
607,
222,
16802,
244,
7934,
575,
8114,
4800,
418,
7848,
7763,
51,
244,
2819,
341,
1485,
607,
222,
16802,
244,
6994,
30994,
6153,
5062,
1196,
456,
1851,
4261,
51,
7223,
607,
222,
16802,
42053,
607,
222,
16802,
244,
2469,
1414,
1178,
6589,
331,
1948,
451,
341,
6994,
30994,
6153,
5062,
1196,
607,
222,
16802,
244,
7979,
642,
477,
3477,
51,
244,
1691,
666,
49,
2337,
350,
544,
574,
1516,
51,
10627,
51,
1107,
52,
4205,
28699,
283,
607,
222,
16802,
42053,
607,
222,
16802,
244,
457,
2758,
7490,
2348,
88,
7388,
39501,
4452,
26147,
802,
946,
1731,
74,
2258,
2906,
5052,
540,
12634,
377,
5999,
1731,
94,
451,
283,
607,
222,
16802,
244,
477,
3477,
51,
244,
14213,
451,
477,
2951,
764,
1278,
22793,
840,
3641,
4387,
19916,
51,
244,
607,
222,
16802,
244,
457,
2758,
7490,
2348,
88,
1773,
26085,
341,
409,
1823,
1599,
377,
21778,
451,
725,
17776,
337,
1441,
50,
1021,
370,
607,
222,
16802,
244,
2951,
708,
580,
13968,
49,
428,
44513,
480,
48573,
51,
10094,
607,
222,
16802,
42053,
607,
222,
325,
19989,
8689,
222,
16802,
10207,
77,
222,
325,
1369,
1361,
1616,
4741,
829,
11489,
39305,
643,
290,
21100,
1493,
457,
2758,
15606,
10584,
327,
1687,
244,
54,
51,
61,
53,
1984,
244,
58,
58,
61,
62,
51,
55,
58,
61,
54,
57,
46,
222,
325,
2657,
327,
72,
46,
244,
54,
62,
62,
58,
50,
55,
53,
54,
58,
457,
2758,
7490,
2348,
88,
51,
3381,
4760,
5225,
51,
222,
325,
18226,
63,
4103,
2387,
24110,
341,
1813,
451,
477,
822,
222,
222,
1337,
3987,
120,
51,
42976,
51,
2103,
64,
222,
222,
485,
1401,
51,
1058,
51,
7119,
64,
222,
485,
1401,
51,
1058,
51,
4293,
64,
222,
485,
1401,
51,
1058,
51,
18676,
64,
222,
485,
1401,
51,
1058,
51,
5740,
64,
222,
485,
3987,
120,
51,
2863,
51,
3880,
284,
1014,
51,
45115,
64,
222,
222,
1350,
222,
338,
18218,
391,
377,
16501,
51,
4302,
3455,
12609,
1319,
327,
798,
63,
244,
54,
53,
58,
58,
54,
53,
53,
53,
54,
60,
566,
222,
588,
222,
942,
462,
12839,
3455,
12536,
2272,
2041,
3987,
120,
51,
2103,
51,
43984,
2272,
4584,
3987,
120,
51,
2103,
51,
78,
893,
11533,
463,
49,
19208,
65,
4302,
3455,
12536,
67,
222,
128,
222,
221,
2072,
924,
1175,
1964,
19896,
299,
244,
54,
81,
64,
499,
221,
2072,
5068,
65,
4302,
3455,
12536,
67,
956,
299,
556,
5068,
65,
4302,
3455,
12536,
2938,
222,
221,
942,
910,
640,
5558,
8478,
365,
222,
221,
128,
376,
221,
620,
332,
16178,
51,
42976,
51,
4136,
51,
5754,
51,
4302,
3455,
884,
222,
221,
130,
222,
221,
942,
1922,
1035,
45,
4302,
3455,
12536,
804,
46,
222,
221,
128,
376,
221,
344,
45,
872,
630,
762,
46,
374,
221,
620,
920,
64,
376,
221,
344,
45,
597,
51,
770,
51,
7149,
45,
872,
46,
350,
244,
53,
46,
376,
221,
128,
374,
221,
620,
477,
51,
770,
51,
688,
45,
872,
312,
376,
221,
130,
376,
221,
620,
920,
64,
222,
221,
130,
222,
221,
942,
1922,
1035,
45,
429,
1671,
49,
12839,
3455,
12536,
804,
46,
222,
221,
128,
376,
221,
344,
45,
872,
630,
762,
46,
374,
221,
620,
920,
64,
376,
221,
344,
45,
597,
51,
770,
51,
7149,
45,
872,
46,
350,
244,
53,
46,
376,
221,
128,
374,
221,
597,
51,
770,
51,
688,
45,
1076,
49,
804,
312,
374,
221,
620,
878,
64,
376,
221,
130,
376,
221,
620,
920,
64,
222,
221,
130,
222,
221,
942,
782,
4250,
365,
222,
221,
128,
376,
221,
597,
51,
770,
51,
3830,
492,
222,
221,
130,
222,
221,
942,
782,
3365,
45,
429,
1671,
46,
222,
221,
128,
376,
221,
597,
51,
770,
51,
2564,
45,
1076,
312,
222,
221,
130,
222,
221,
942,
648,
1354,
365,
222,
221,
128,
376,
221,
620,
477,
51,
770,
51,
911,
492,
222,
221,
130,
222,
221,
942,
648,
40597,
45,
4302,
3455,
12536,
1998,
46,
222,
221,
128,
376,
221,
620,
956,
51,
7149,
45,
2403,
312,
222,
221,
130,
222,
221,
942,
12839,
3455,
12536,
640,
45,
429,
1671,
46,
222,
221,
128,
376,
221,
620,
477,
51,
770,
51,
390,
45,
1076,
312,
222,
221,
130,
222,
221,
942,
1922,
758,
45,
429,
1671,
49,
12839,
3455,
12536,
804,
46,
222,
221,
128,
376,
221,
344,
45,
872,
630,
762,
46,
374,
221,
620,
920,
64,
376,
221,
597,
51,
770,
51,
489,
45,
1076,
49,
804,
312,
376,
221,
620,
878,
64,
222,
221,
130,
222,
221,
942,
782,
3365,
45,
4302,
3455,
12536,
1998,
46,
222,
221,
128,
376,
221,
344,
45,
2403,
882,
762,
46,
376,
221,
128,
374,
221,
429,
1671,
299,
40597,
45,
2403,
312,
374,
221,
344,
45,
1076,
2394,
244,
53,
46,
621,
221,
2564,
45,
1076,
312,
376,
221,
130,
222,
221,
130,
222,
221,
942,
1922,
4326,
45,
4302,
3455,
12536,
1998,
46,
222,
221,
128,
376,
221,
620,
40597,
45,
2403,
46,
2394,
244,
53,
64,
222,
221,
130,
222,
221,
942,
2210,
7905,
365,
222,
221,
128,
376,
221,
4302,
3455,
12536,
2272,
7905,
299,
556,
12839,
3455,
12536,
2272,
492,
4102,
221,
999,
45,
429,
837,
299,
244,
53,
64,
837,
350,
477,
51,
770,
51,
911,
492,
837,
2002,
376,
221,
128,
374,
221,
344,
45,
597,
51,
770,
51,
390,
45,
125,
46,
882,
762,
46,
621,
221,
6371,
51,
770,
51,
688,
1181,
4302,
3455,
12536,
46,
597,
51,
770,
51,
390,
45,
125,
566,
6371,
1052,
374,
221,
728,
621,
221,
6371,
51,
770,
51,
688,
45,
1710,
312,
376,
221,
130,
4102,
221,
620,
7905,
64,
222,
221,
130,
222,
221,
942,
1922,
20424,
751,
365,
222,
221,
128,
376,
221,
999,
45,
429,
837,
299,
244,
53,
64,
837,
350,
956,
51,
911,
492,
837,
2002,
374,
221,
344,
3848,
597,
51,
770,
51,
390,
45,
125,
566,
13431,
751,
1177,
621,
221,
620,
920,
64,
376,
221,
620,
878,
64,
222,
221,
130,
222,
221,
942,
910,
1197,
6051,
365,
222,
221,
128,
376,
221,
620,
6051,
45,
1710,
312,
222,
221,
130,
222,
221,
942,
910,
1197,
6051,
45,
671,
1197,
4917,
7362,
46,
222,
221,
128,
376,
221,
344,
45,
770,
51,
911,
365,
630,
244,
53,
46,
374,
221,
620,
762,
64,
376,
221,
1874,
51,
1058,
51,
7119,
65,
671,
67,
23052,
7362,
299,
556,
1401,
51,
1058,
51,
7119,
65,
671,
2938,
376,
221,
344,
45,
12736,
7362,
882,
762,
46,
376,
221,
128,
374,
221,
999,
45,
429,
837,
299,
244,
53,
64,
837,
350,
4917,
7362,
51,
1340,
64,
837,
2002,
374,
221,
128,
621,
221,
34756,
7362,
51,
688,
45,
12736,
7362,
96,
125,
2004,
374,
221,
130,
376,
221,
130,
376,
221,
999,
45,
429,
837,
299,
244,
53,
64,
837,
350,
956,
51,
911,
492,
837,
2002,
376,
221,
128,
374,
221,
671,
1197,
23052,
8394,
7362,
299,
477,
51,
770,
51,
390,
45,
125,
566,
4647,
492,
374,
221,
344,
45,
34756,
8394,
7362,
882,
762,
46,
374,
221,
128,
621,
221,
999,
45,
429,
553,
299,
244,
53,
64,
553,
350,
23052,
8394,
7362,
51,
1340,
64,
553,
2002,
621,
221,
128,
596,
221,
34756,
7362,
51,
688,
45,
34756,
8394,
7362,
96,
126,
2004,
621,
221,
130,
374,
221,
130,
376,
221,
130,
4102,
221,
429,
1067,
1552,
299,
23052,
7362,
51,
911,
492,
376,
221,
344,
45,
750,
1552,
630,
244,
53,
46,
374,
221,
620,
762,
64,
376,
221,
671,
1197,
1074,
299,
556,
910,
96,
750,
1552,
988,
376,
221,
999,
45,
429,
837,
299,
244,
53,
64,
837,
350,
1067,
1552,
64,
837,
2002,
374,
221,
1285,
96,
125,
98,
299,
327,
671,
46,
34756,
7362,
51,
390,
45,
125,
312,
376,
221,
620,
1074,
64,
222,
221,
130,
222,
221,
942,
12839,
3455,
12536,
2272,
3873,
365,
222,
221,
128,
376,
221,
620,
3873,
45,
45115,
51,
17563,
38898,
312,
222,
221,
130,
222,
221,
942,
12839,
3455,
12536,
2272,
3873,
45,
4412,
1152,
6916,
10477,
46,
222,
221,
128,
376,
221,
620,
3873,
45,
45115,
51,
17563,
38898,
49,
1152,
6916,
10477,
312,
222,
221,
130,
222,
221,
942,
12839,
3455,
12536,
2272,
3873,
45,
45115,
2554,
46,
222,
221,
128,
376,
221,
620,
3873,
45,
909,
12839,
3455,
12536,
18676,
45,
1191,
894,
222,
221,
130,
222,
221,
942,
12839,
3455,
12536,
2272,
3873,
45,
45115,
2554,
49,
1922,
1152,
6916,
10477,
46,
222,
221,
128,
376,
221,
620,
3873,
45,
909,
12839,
3455,
12536,
18676,
45,
1191,
49,
1152,
6916,
10477,
894,
222,
221,
130,
222,
221,
69,
14030,
459,
18362,
678,
222,
221,
942,
12839,
3455,
12536,
2272,
3873,
45,
18676,
35614,
46,
222,
221,
128,
376,
221,
4293,
51,
3349,
45,
770,
49,
35614,
312,
376,
221,
620,
477,
64,
222,
221,
130,
222,
221,
942,
3987,
120,
51,
42976,
51,
2103,
51,
4302,
3455,
2099,
12536,
2272,
391,
2099,
12536,
2272,
365,
222,
221,
128,
376,
221,
16178,
51,
42976,
51,
2103,
51,
4302,
3455,
2099,
12536,
2272,
1074,
299,
556,
3987,
120,
51,
42976,
51,
2103,
51,
4302,
3455,
2099,
12536,
2272,
492,
376,
221,
999,
45,
429,
837,
299,
244,
53,
64,
837,
350,
477,
51,
770,
51,
911,
492,
837,
2002,
376,
221,
128,
374,
221,
1285,
51,
688,
45,
597,
51,
770,
51,
390,
45,
125,
894,
376,
221,
130,
376,
221,
620,
1074,
64,
222,
221,
130,
222,
221,
942,
12839,
3455,
12536,
1197,
391,
1280,
365,
222,
221,
128,
376,
221,
4302,
3455,
12536,
1197,
5941,
299,
556,
12839,
3455,
12536,
96,
770,
51,
911,
22061,
376,
221,
770,
51,
14315,
45,
865,
312,
376,
221,
620,
5941,
64,
222,
221,
130,
222,
221,
942,
14730,
65,
4302,
3455,
12536,
67,
10033,
365,
222,
221,
128,
376,
221,
620,
956,
51,
5174,
492,
222,
221,
130,
222,
221,
69,
1806,
222,
221,
5332,
5068,
640,
11848,
2272,
365,
222,
221,
128,
376,
221,
620,
956,
64,
222,
221,
130,
222,
221,
2072,
462,
12839,
3455,
12536,
18676,
4584,
34839,
222,
221,
128,
376,
221,
2072,
648,
6999,
299,
244,
54,
64,
376,
221,
2072,
1922,
1152,
6916,
10477,
299,
878,
64,
376,
221,
942,
12839,
3455,
12536,
18676,
365,
376,
221,
128,
374,
221,
597,
45,
45115,
51,
17563,
38898,
312,
376,
221,
130,
376,
221,
942,
12839,
3455,
12536,
18676,
45,
45115,
2554,
46,
376,
221,
128,
374,
221,
344,
327,
1191,
630,
11899,
2888,
51,
12360,
38898,
46,
374,
221,
128,
621,
221,
7366,
299,
449,
54,
64,
374,
221,
130,
376,
221,
130,
376,
221,
942,
12839,
3455,
12536,
18676,
45,
45115,
2554,
49,
1922,
1152,
6916,
10477,
46,
376,
221,
128,
374,
221,
344,
327,
1191,
630,
11899,
2888,
51,
12360,
38898,
46,
374,
221,
128,
621,
221,
7366,
299,
449,
54,
64,
374,
221,
130,
374,
221,
597,
51,
1749,
6916,
10477,
299,
1152,
6916,
10477,
64,
376,
221,
130,
376,
221,
942,
648,
8910,
45,
976,
2847,
54,
49,
2210,
2847,
55,
46,
376,
221,
128,
374,
221,
4302,
3455,
12536,
9180,
3287,
54,
299,
327,
4302,
3455,
12536,
46,
2085,
54,
64,
374,
221,
4302,
3455,
12536,
9180,
3287,
55,
299,
327,
4302,
3455,
12536,
46,
2085,
55,
64,
374,
221,
620,
6999,
8170,
2103,
3287,
54,
51,
23879,
45,
2103,
3287,
55,
49,
477,
51,
1749,
6916,
10477,
894,
376,
221,
130,
376,
221,
942,
1922,
12432,
45,
976,
2847,
46,
376,
221,
128,
374,
221,
620,
920,
64,
376,
221,
130,
222,
221,
130,
222,
221,
942,
3987,
120,
51,
42976,
51,
2103,
51,
9580,
51,
4302,
3455,
12536,
5358,
1197,
640,
5358,
2272,
365,
222,
221,
128,
376,
221,
620,
640,
5358,
2272,
1280,
492,
222,
221,
130,
222,
221,
942,
3987,
120,
51,
42976,
51,
2103,
51,
9580,
51,
4302,
3455,
12536,
5358,
1197,
640,
5358,
2272,
1280,
365,
222,
221,
128,
376,
221,
16178,
51,
42976,
51,
2103,
51,
9580,
51,
4302,
3455,
12536,
5358,
1197,
1074,
299,
556,
3987,
120,
51,
42976,
51,
2103,
51,
9580,
51,
4302,
3455,
12536,
5358,
96,
770,
51,
911,
22061,
376,
221,
999,
45,
429,
613,
299,
244,
53,
64,
613,
350,
956,
51,
911,
492,
613,
2002,
376,
221,
128,
374,
221,
4302,
3455,
12536,
9180,
299,
1849,
4302,
3455,
12536,
46,
770,
51,
390,
45,
110,
894,
374,
221,
1285,
96,
110,
98,
299,
327,
16178,
51,
42976,
51,
2103,
51,
9580,
51,
4302,
3455,
12536,
5358,
46,
2103,
51,
39497,
492,
376,
221,
130,
376,
221,
620,
1074,
64,
222,
221,
130,
222,
221,
942,
924,
12839,
3455,
12536,
2272,
1984,
1811,
5358,
2272,
45,
1874,
51,
1058,
51,
2272,
545,
711,
46,
222,
221,
128,
376,
221,
4302,
3455,
12536,
2272,
11082,
299,
556,
12839,
3455,
12536,
2272,
492,
376,
221,
344,
45,
9580,
630,
762,
46,
374,
221,
620,
11082,
64,
376,
221,
1874,
51,
1058,
51,
5740,
3881,
299,
545,
711,
51,
5174,
492,
376,
221,
5544,
327,
1751,
51,
16408,
1177,
376,
221,
128,
374,
221,
4938,
51,
688,
7738,
16178,
51,
42976,
51,
2103,
51,
9580,
51,
4302,
3455,
12536,
5358,
46,
1751,
51,
1995,
4269,
1848,
12536,
1052,
376,
221,
130,
376,
221,
620,
11082,
64,
222,
221,
130,
222,
221,
942,
924,
12839,
3455,
12536,
2272,
1984,
1811,
5358,
2272,
45,
16178,
51,
42976,
51,
2103,
51,
9580,
51,
4302,
3455,
12536,
5358,
1197,
545,
711,
46,
222,
221,
128,
376,
221,
4302,
3455,
12536,
2272,
11082,
299,
556,
12839,
3455,
12536,
2272,
492,
376,
221,
344,
45,
9580,
630,
762,
46,
374,
221,
620,
11082,
64,
376,
221,
999,
45,
429,
837,
299,
244,
53,
64,
837,
350,
545,
711,
51,
1340,
64,
837,
2002,
376,
221,
128,
374,
221,
4938,
51,
688,
45,
9580,
96,
125,
1015,
1848,
12536,
1052,
376,
221,
130,
376,
221,
620,
11082,
64,
222,
221,
130,
222,
130,
222
] | [
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
]
] | 2,454 | true | 63.65469 | true | true |
ValueSubPanel.java | /FileExtraction/Java_unseen/sldeditor_sldeditor/modules/application/src/main/java/com/sldeditor/ui/attribute/ValueSubPanel.java | /*
* SLD Editor - The Open Source Java SLD Editor
*
* Copyright (C) 2016, SCISYS UK Limited
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.sldeditor.ui.attribute;
import java.awt.BorderLayout;
import javax.swing.JPanel;
import javax.swing.JTextField;
import org.geotools.filter.LiteralExpressionImpl;
import org.opengis.filter.expression.Expression;
/**
* Panel that allows the user to configure values for an SLD attribute.
*
* @author Robert Ward (SCISYS)
*/
public class ValueSubPanel extends JPanel {
/** The Constant VALUE_PANEL. */
private static final String VALUE_PANEL = "Value";
/** The Constant serialVersionUID. */
private static final long serialVersionUID = 1L;
/** The value text field. */
private JTextField valueTextField;
/**
* Gets the panel name.
*
* @return the panel name
*/
public static String getPanelName() {
return VALUE_PANEL;
}
/**
* Instantiates a new value panel.
*
* @param addValueField the add value field
*/
public ValueSubPanel(boolean addValueField) {
setLayout(new BorderLayout(0, 0));
if (addValueField) {
valueTextField = new JTextField();
add(valueTextField, BorderLayout.CENTER);
}
}
/**
* Populate expression.
*
* @param expression the expression
*/
public void populateExpression(Expression expression) {
if (valueTextField != null) {
valueTextField.setText(expression.toString());
}
}
/**
* Sets the panel enabled.
*
* @param enabled the new panel enabled
*/
public void setPanelEnabled(boolean enabled) {
if (valueTextField != null) {
valueTextField.setEnabled(enabled);
}
}
/**
* Gets the expression.
*
* @return the expression
*/
public Expression getExpression() {
Expression expression = null;
if (valueTextField != null) {
expression = new LiteralExpressionImpl(valueTextField.getText());
}
return expression;
}
}
| 2,744 | Java | .java | sldeditor/sldeditor | 147 | 32 | 26 | 2016-05-17T11:48:36Z | 2022-05-20T20:53:18Z | ff40e095adc178fea4c517fe8d5de7ad735e7463a9de4ebd3800e1264e8e21d8 | [] | [
1127,
222,
338,
377,
7131,
11419,
449,
906,
3944,
6391,
4957,
377,
7131,
11419,
222,
338,
222,
338,
2657,
327,
72,
46,
244,
55,
53,
54,
59,
49,
9997,
1309,
16947,
36657,
30980,
222,
338,
222,
338,
1369,
3477,
458,
3760,
2951,
63,
863,
902,
14081,
580,
480,
52,
290,
5370,
222,
338,
580,
1549,
341,
5974,
451,
341,
6994,
6153,
5062,
1196,
641,
9582,
829,
222,
338,
341,
7834,
3870,
7120,
49,
3173,
1522,
244,
56,
451,
341,
1196,
49,
575,
222,
338,
327,
288,
1390,
2489,
46,
1364,
6146,
1522,
51,
222,
338,
222,
338,
1369,
3477,
458,
2744,
347,
341,
9850,
708,
580,
1118,
545,
6386,
49,
222,
338,
1294,
4213,
2979,
9345,
64,
2895,
4462,
341,
4506,
14319,
451,
222,
338,
7934,
575,
8114,
4800,
418,
7848,
7763,
51,
244,
2819,
341,
222,
338,
6994,
6153,
5062,
1196,
456,
1851,
4261,
51,
222,
338,
222,
338,
2469,
1414,
1178,
6589,
331,
1948,
451,
341,
6994,
6153,
5062,
1196,
222,
338,
7979,
642,
477,
3477,
51,
244,
1691,
666,
49,
2337,
350,
544,
574,
1516,
51,
10627,
51,
1107,
52,
4205,
28699,
222,
588,
222,
222,
1337,
785,
51,
2021,
1001,
1534,
51,
1726,
51,
4902,
64,
222,
222,
485,
1401,
51,
8236,
51,
7263,
2362,
64,
222,
485,
3698,
51,
5934,
51,
32273,
64,
222,
485,
3698,
51,
5934,
51,
31845,
64,
222,
485,
1105,
51,
319,
385,
7570,
51,
2049,
51,
8216,
3503,
3499,
64,
222,
485,
1105,
51,
13064,
316,
51,
2049,
51,
7681,
51,
3503,
64,
222,
222,
1350,
222,
338,
19920,
708,
6990,
341,
1275,
391,
8496,
2102,
456,
619,
377,
7131,
3895,
51,
222,
338,
222,
338,
496,
2133,
39177,
643,
723,
327,
2134,
1309,
16947,
46,
222,
588,
222,
942,
462,
3867,
1736,
3686,
2041,
22299,
320,
465,
1041,
906,
15027,
23101,
100,
45663,
51,
588,
303,
964,
924,
1175,
910,
23101,
100,
45663,
299,
332,
899,
884,
465,
1041,
906,
15027,
19896,
51,
588,
303,
964,
924,
1175,
1964,
19896,
299,
244,
54,
81,
64,
465,
1041,
906,
804,
1367,
1620,
51,
588,
303,
964,
40760,
804,
10213,
64,
465,
1041,
294,
338,
7132,
341,
7992,
655,
51,
294,
338,
294,
338,
496,
620,
341,
7992,
655,
294,
588,
303,
581,
924,
910,
640,
3686,
577,
365,
320,
310,
461,
23101,
100,
45663,
64,
303,
339,
465,
1041,
294,
338,
42030,
1218,
331,
556,
804,
7992,
51,
294,
338,
294,
338,
496,
772,
1035,
899,
1195,
341,
1035,
804,
1620,
294,
588,
303,
581,
3867,
1736,
3686,
45,
4412,
1035,
899,
1195,
46,
320,
310,
758,
2362,
45,
909,
38816,
45,
53,
49,
244,
53,
894,
603,
434,
327,
688,
899,
1195,
46,
320,
343,
804,
10213,
299,
556,
40760,
492,
343,
1035,
45,
872,
10213,
49,
38816,
51,
16562,
312,
310,
339,
303,
339,
465,
1041,
294,
338,
44695,
6112,
51,
294,
338,
294,
338,
496,
772,
6112,
341,
6112,
294,
588,
303,
581,
782,
18985,
3503,
45,
3503,
6112,
46,
320,
310,
434,
327,
872,
10213,
882,
762,
46,
320,
343,
804,
10213,
51,
6619,
45,
7681,
51,
3127,
1052,
310,
339,
303,
339,
465,
1041,
294,
338,
9023,
341,
7992,
5892,
51,
294,
338,
294,
338,
496,
772,
5892,
341,
556,
7992,
5892,
294,
588,
303,
581,
782,
758,
3686,
4006,
45,
4412,
5892,
46,
320,
310,
434,
327,
872,
10213,
882,
762,
46,
320,
343,
804,
10213,
51,
18822,
45,
6572,
312,
310,
339,
303,
339,
465,
1041,
294,
338,
7132,
341,
6112,
51,
294,
338,
294,
338,
496,
620,
341,
6112,
294,
588,
303,
581,
10298,
640,
3503,
365,
320,
310,
10298,
6112,
299,
762,
64,
603,
434,
327,
872,
10213,
882,
762,
46,
320,
343,
6112,
299,
556,
24820,
3503,
3499,
45,
872,
10213,
51,
10624,
1052,
310,
339,
603,
461,
6112,
64,
303,
339,
222,
130,
222
] | [
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
]
] | 635 | true | 64.686589 | true | true |
UDPTimeDate.java | /FileExtraction/Java_unseen/link-it_govway/tools/utils/src/org/openspcoop2/utils/date/UDPTimeDate.java | /*
* GovWay - A customizable API Gateway
* https://govway.org
*
* Copyright (c) 2005-2024 Link.it srl (https://link.it).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3, as published by
* the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package org.openspcoop2.utils.date;
import java.net.InetAddress;
import java.sql.Timestamp;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.apache.commons.net.time.TimeUDPClient;
import org.openspcoop2.utils.UtilsException;
/**
* Classe per la produzione di date utilizzando un server TimeUDP
*
* @author Poli Andrea (apoli@link.it)
* @author $Author$
* @version $Rev$, $Date$
*/
public class UDPTimeDate implements IDate {
private static InetAddress server = null;
private static TimeUDPClient udpClient = null;
private static int defaultTimeout = -1;
private static Map<String,Date> time = null;
private static boolean cacheEnabled = true;
private static int cacheRefresh = 100;
private static org.openspcoop2.utils.Semaphore semaphore = new org.openspcoop2.utils.Semaphore("UDPTimeDate");
private static Date getDateCached() throws Exception{
if(UDPTimeDate.cacheEnabled==false){
return UDPTimeDate.udpClient.getDate(UDPTimeDate.server);
}
else{
String key = (System.currentTimeMillis() / (UDPTimeDate.cacheRefresh)) + ""; // al massimo vengono eseguite 10 richieste al secondo.
if(UDPTimeDate.time.containsKey(key)){
//System.out.println("NOW ["+key+"] from cache");
return UDPTimeDate.time.get(key);
}else{
//synchronized(UDPTimeDate.time){
semaphore.acquire("getDateCached");
try {
if(UDPTimeDate.time.containsKey(key)){
//System.out.println("NOW ["+key+"] from cache sync");
return UDPTimeDate.time.get(key);
}else{
//System.out.println("NOW ["+key+"] no cache");
Date d = UDPTimeDate.udpClient.getDate(UDPTimeDate.server);
UDPTimeDate.time.clear();
UDPTimeDate.time.put(key, d);
return d;
}
}finally {
semaphore.release("getDateCached");
}
}
}
}
/**
* Impostazione delle proprieta' per il DateManager
*/
@Override
public void init(java.util.Properties properties) throws UtilsException{
_init(properties);
}
private static void _init(java.util.Properties properties) throws UtilsException{
if(UDPTimeDate.udpClient==null) {
_initSync(properties);
}
}
private static synchronized void _initSync(java.util.Properties properties) throws UtilsException{
if(UDPTimeDate.udpClient!=null) {
return;
}
try{
UDPTimeDate.udpClient = new TimeUDPClient();
// timeout
String timeoutS = properties.getProperty("time.timeout");
if(timeoutS!=null){
try{
UDPTimeDate.defaultTimeout = Integer.parseInt(timeoutS);
}catch(Exception e){
throw new Exception("org.openspcoop.pdd.date.property.time.timeout value non valido: "+e.getMessage(),e);
}
}
if(UDPTimeDate.defaultTimeout!=-1)
UDPTimeDate.udpClient.setDefaultTimeout(UDPTimeDate.defaultTimeout);
// ipaddress
String ipaddressS = properties.getProperty("time.server");
if(ipaddressS==null)
throw new Exception("org.openspcoop.pdd.date.property.time.server value non definito");
if(ipaddressS!=null){
try{
UDPTimeDate.server = InetAddress.getByName(ipaddressS);
}catch(Exception e){
throw new Exception("org.openspcoop.pdd.date.property.time.server value non valido: "+e.getMessage(),e);
}
}
// cache
String cacheS = properties.getProperty("time.cache.enable");
if(cacheS!=null){
try{
UDPTimeDate.cacheEnabled = Boolean.parseBoolean(cacheS);
}catch(Exception e){
throw new Exception("org.openspcoop.pdd.date.property.time.cache.enable non valido: "+e.getMessage(),e);
}
}
// intervallo cache refresh
String cacheRefreshS = properties.getProperty("time.cache.refresh");
if(cacheRefreshS!=null){
try{
int value = Integer.parseInt(cacheRefreshS);
if(value>1000)
throw new Exception("Valore deve essere minore di 1000");
UDPTimeDate.cacheRefresh = 1000 / value;
}catch(Exception e){
throw new Exception("org.openspcoop.pdd.date.property.time.cache.refresh non valido: "+e.getMessage(),e);
}
}
UDPTimeDate.udpClient.open();
UDPTimeDate.time = new ConcurrentHashMap<String,Date>();
}catch(Exception e){
UDPTimeDate.udpClient=null;
throw new UtilsException("Inizializzazione TimeUDP Client (properties) non riuscita: "+e.getMessage(),e);
}
}
/**
* Close il DataManager
*
* @throws UtilsException
*/
@Override
public void close() throws UtilsException{
try{
if(UDPTimeDate.udpClient!=null)
UDPTimeDate.udpClient.close();
}catch(Exception e){
throw new UtilsException("Chiusura TimeUDP Client non riuscita: "+e.getMessage(),e);
}
}
/**
* Ritorna la data corrente.
*
* @return Data corrente
*/
@Override
public Date getDate() throws UtilsException{
try{
if(UDPTimeDate.udpClient==null)
throw new Exception("Inizializzazione non effettuata, invocare metodo init");
//System.out.println("UDP getDate ("+UDPTimeDate.getDateCached()+")");
return UDPTimeDate.getDateCached();
}catch(Exception e){
throw new UtilsException("getDate error: "+e.getMessage(),e);
}
}
/**
* Ritorna la data corrente in millisecondi da Gennaio 1.4970.
*
* @return Data corrente
*/
@Override
public long getTimeMillis()throws UtilsException {
try{
if(UDPTimeDate.udpClient==null)
throw new Exception("Inizializzazione non effettuata, invocare metodo init");
//System.out.println("UDP getTime ("+UDPTimeDate.getDateCached().getTime()+")");
return UDPTimeDate.getDateCached().getTime();
}catch(Exception e){
throw new UtilsException("getDate error: "+e.getMessage(),e);
}
}
/**
* Ritorna la data corrente come timestamp SQL.
*
* @return Data corrente
*/
@Override
public Timestamp getTimestamp() throws UtilsException{
try{
if(UDPTimeDate.udpClient==null)
throw new Exception("Inizializzazione non effettuata, invocare metodo init");
//System.out.println("UDP getTimestamp ("+new Timestamp(UDPTimeDate.getDateCached().getTime())+")");
return new Timestamp(UDPTimeDate.getDateCached().getTime());
}catch(Exception e){
throw new UtilsException("getDate error: "+e.getMessage(),e);
}
}
/**
* Ritorna la data corrente come Calendar
*
* @return Data corrente
*/
@Override
public Calendar getCalendar() throws UtilsException{
Calendar c = new GregorianCalendar();
c.setTime(this.getDate());
return c;
}
}
| 7,225 | Java | .java | link-it/govway | 48 | 8 | 18 | 2018-06-25T07:52:40Z | 2024-05-08T13:23:36Z | 213f640814e03ff83fd70f58517098002c2266796f1da51b54417275222a901d | [] | [
1127,
222,
338,
590,
1558,
17963,
449,
418,
3137,
6776,
2347,
19405,
1676,
338,
1698,
574,
7202,
3094,
51,
1107,
222,
338,
1676,
338,
2657,
327,
104,
46,
244,
55,
53,
53,
58,
50,
55,
53,
55,
57,
6130,
51,
302,
328,
1796,
327,
662,
574,
1222,
51,
302,
566,
1676,
338,
1676,
338,
1369,
3477,
458,
3760,
2951,
63,
863,
902,
14081,
580,
480,
52,
290,
5370,
222,
338,
580,
1549,
341,
5974,
451,
341,
6994,
6153,
5062,
1196,
1522,
244,
56,
49,
641,
9582,
829,
222,
338,
341,
7834,
3870,
7120,
51,
222,
338,
222,
338,
1369,
3477,
458,
2744,
347,
341,
9850,
708,
580,
1118,
545,
6386,
49,
222,
338,
1294,
4213,
2979,
9345,
64,
2895,
4462,
341,
4506,
14319,
451,
222,
338,
7934,
575,
8114,
4800,
418,
7848,
7763,
51,
244,
2819,
341,
222,
338,
6994,
6153,
5062,
1196,
456,
1851,
4261,
51,
222,
338,
222,
338,
2469,
1414,
1178,
6589,
331,
1948,
451,
341,
6994,
6153,
5062,
1196,
222,
338,
7979,
642,
477,
3477,
51,
244,
1691,
666,
49,
2337,
350,
544,
574,
1516,
51,
10627,
51,
1107,
52,
4205,
28699,
222,
338,
222,
588,
3067,
222,
1337,
1105,
51,
1693,
438,
352,
539,
55,
51,
2324,
51,
787,
64,
222,
222,
485,
1401,
51,
1317,
51,
30922,
2455,
64,
222,
485,
1401,
51,
2622,
51,
7477,
64,
222,
485,
1401,
51,
1058,
51,
9391,
64,
222,
485,
1401,
51,
1058,
51,
1563,
64,
222,
485,
1401,
51,
1058,
51,
76,
33820,
9391,
64,
222,
485,
1401,
51,
1058,
51,
1225,
64,
222,
485,
1401,
51,
1058,
51,
8349,
51,
18705,
8263,
64,
222,
222,
485,
1105,
51,
2121,
51,
8381,
51,
1317,
51,
1021,
51,
1061,
20952,
1503,
64,
222,
485,
1105,
51,
1693,
438,
352,
539,
55,
51,
2324,
51,
2769,
1002,
64,
222,
222,
1350,
222,
338,
5970,
14931,
1313,
2343,
38250,
15807,
2090,
2361,
42165,
5917,
725,
2160,
3734,
20952,
222,
338,
222,
338,
496,
2133,
14358,
110,
4262,
25706,
327,
386,
26422,
69,
1222,
51,
302,
46,
222,
338,
496,
2133,
417,
4372,
41,
222,
338,
496,
1687,
417,
14911,
15730,
417,
1563,
41,
222,
588,
222,
942,
462,
24616,
1061,
1563,
4584,
457,
1563,
320,
499,
221,
2072,
924,
36499,
2455,
2160,
299,
762,
64,
222,
221,
2072,
924,
3734,
20952,
1503,
31963,
1503,
299,
762,
64,
222,
221,
2072,
924,
648,
1263,
4291,
299,
449,
54,
64,
222,
221,
2072,
924,
3531,
65,
671,
49,
1563,
67,
1153,
299,
762,
64,
222,
221,
2072,
924,
1922,
3337,
4006,
299,
878,
64,
222,
221,
2072,
924,
648,
3337,
9104,
299,
244,
54,
53,
53,
64,
3038,
221,
2072,
924,
1105,
51,
1693,
438,
352,
539,
55,
51,
2324,
51,
27333,
38986,
299,
556,
1105,
51,
1693,
438,
352,
539,
55,
51,
2324,
51,
27333,
459,
20952,
1061,
1563,
742,
3038,
221,
2072,
924,
2833,
640,
1563,
14526,
365,
2589,
3284,
128,
4102,
221,
344,
45,
20952,
1061,
1563,
51,
2630,
4006,
398,
1886,
1528,
374,
221,
620,
24616,
1061,
1563,
51,
19020,
1503,
51,
22080,
45,
20952,
1061,
1563,
51,
1805,
312,
376,
221,
130,
376,
221,
728,
128,
374,
221,
671,
1221,
299,
327,
1615,
51,
17217,
365,
536,
327,
20952,
1061,
1563,
51,
2630,
9104,
509,
494,
5127,
453,
763,
12777,
13644,
47144,
10004,
40112,
676,
244,
54,
53,
20806,
110,
20325,
763,
3118,
116,
51,
374,
221,
344,
45,
20952,
1061,
1563,
51,
1021,
51,
15927,
45,
697,
7717,
621,
221,
325,
1615,
51,
560,
51,
3962,
459,
30148,
3059,
48,
697,
48,
1465,
664,
3337,
742,
621,
221,
620,
24616,
1061,
1563,
51,
1021,
51,
390,
45,
697,
312,
374,
221,
130,
728,
128,
621,
221,
325,
34508,
45,
20952,
1061,
1563,
51,
1021,
1528,
621,
221,
39025,
51,
22240,
459,
22080,
14526,
742,
621,
221,
1287,
320,
596,
221,
344,
45,
20952,
1061,
1563,
51,
1021,
51,
15927,
45,
697,
7717,
1397,
221,
325,
1615,
51,
560,
51,
3962,
459,
30148,
3059,
48,
697,
48,
1465,
664,
3337,
7659,
742,
1397,
221,
620,
24616,
1061,
1563,
51,
1021,
51,
390,
45,
697,
312,
596,
221,
130,
728,
128,
1397,
221,
325,
1615,
51,
560,
51,
3962,
459,
30148,
3059,
48,
697,
48,
1465,
1307,
3337,
742,
1397,
221,
1563,
362,
299,
24616,
1061,
1563,
51,
19020,
1503,
51,
22080,
45,
20952,
1061,
1563,
51,
1805,
312,
1397,
221,
20952,
1061,
1563,
51,
1021,
51,
3830,
492,
1397,
221,
20952,
1061,
1563,
51,
1021,
51,
543,
45,
697,
49,
362,
312,
1397,
221,
620,
362,
64,
596,
221,
130,
621,
221,
130,
22220,
320,
596,
221,
39025,
51,
3794,
459,
22080,
14526,
742,
621,
221,
130,
374,
221,
130,
376,
221,
130,
222,
221,
130,
26000,
221,
1350,
376,
338,
4867,
667,
10048,
27959,
16585,
2303,
44,
1313,
6245,
2833,
1590,
376,
588,
222,
221,
69,
1806,
222,
221,
942,
782,
3238,
45,
1874,
51,
1058,
51,
3303,
4324,
46,
2589,
13245,
1002,
128,
376,
221,
100,
1683,
45,
4659,
312,
222,
221,
130,
3038,
221,
2072,
924,
782,
634,
1683,
45,
1874,
51,
1058,
51,
3303,
4324,
46,
2589,
13245,
1002,
128,
376,
221,
344,
45,
20952,
1061,
1563,
51,
19020,
1503,
398,
1710,
46,
320,
374,
221,
100,
1683,
4774,
45,
4659,
312,
376,
221,
130,
222,
221,
130,
222,
221,
2072,
924,
13436,
782,
634,
1683,
4774,
45,
1874,
51,
1058,
51,
3303,
4324,
46,
2589,
13245,
1002,
128,
376,
221,
344,
45,
20952,
1061,
1563,
51,
19020,
1503,
6917,
1710,
46,
320,
374,
221,
620,
64,
376,
221,
130,
376,
221,
1287,
128,
374,
221,
20952,
1061,
1563,
51,
19020,
1503,
299,
556,
3734,
20952,
1503,
492,
8212,
221,
325,
5882,
374,
221,
671,
5882,
88,
299,
4324,
51,
12712,
459,
1021,
51,
5470,
742,
374,
221,
344,
45,
5470,
88,
6917,
1710,
1528,
621,
221,
1287,
128,
596,
221,
20952,
1061,
1563,
51,
1555,
4291,
299,
4418,
51,
11824,
45,
5470,
88,
312,
621,
221,
130,
5639,
45,
1002,
503,
1528,
596,
221,
5267,
556,
3284,
459,
1107,
51,
1693,
438,
352,
539,
51,
117,
601,
51,
787,
51,
2449,
51,
1021,
51,
5470,
804,
3000,
2101,
116,
63,
6771,
106,
51,
7724,
1046,
106,
312,
621,
221,
130,
374,
221,
130,
374,
221,
344,
45,
20952,
1061,
1563,
51,
1555,
4291,
38,
6626,
54,
46,
621,
221,
20952,
1061,
1563,
51,
19020,
1503,
51,
27356,
4291,
45,
20952,
1061,
1563,
51,
1555,
4291,
312,
8212,
221,
325,
4762,
2485,
8671,
221,
671,
4762,
2485,
88,
299,
4324,
51,
12712,
459,
1021,
51,
1805,
742,
374,
221,
344,
45,
658,
2485,
88,
398,
1710,
46,
621,
221,
5267,
556,
3284,
459,
1107,
51,
1693,
438,
352,
539,
51,
117,
601,
51,
787,
51,
2449,
51,
1021,
51,
1805,
804,
3000,
684,
1683,
116,
742,
374,
221,
344,
45,
658,
2485,
88,
6917,
1710,
1528,
621,
221,
1287,
128,
596,
221,
20952,
1061,
1563,
51,
1805,
299,
36499,
2455,
51,
390,
9809,
45,
658,
2485,
88,
312,
621,
221,
130,
5639,
45,
1002,
503,
1528,
596,
221,
5267,
556,
3284,
459,
1107,
51,
1693,
438,
352,
539,
51,
117,
601,
51,
787,
51,
2449,
51,
1021,
51,
1805,
804,
3000,
2101,
116,
63,
6771,
106,
51,
7724,
1046,
106,
312,
621,
221,
130,
374,
221,
130,
376,
374,
221,
325,
3337,
374,
221,
671,
3337,
88,
299,
4324,
51,
12712,
459,
1021,
51,
2630,
51,
4909,
742,
374,
221,
344,
45,
2630,
88,
6917,
1710,
1528,
621,
221,
1287,
128,
596,
221,
20952,
1061,
1563,
51,
2630,
4006,
299,
5080,
51,
2228,
4718,
45,
2630,
88,
312,
621,
221,
130,
5639,
45,
1002,
503,
1528,
596,
221,
5267,
556,
3284,
459,
1107,
51,
1693,
438,
352,
539,
51,
117,
601,
51,
787,
51,
2449,
51,
1021,
51,
2630,
51,
4909,
3000,
2101,
116,
63,
6771,
106,
51,
7724,
1046,
106,
312,
621,
221,
130,
374,
221,
130,
8212,
221,
325,
7917,
335,
3337,
9736,
374,
221,
671,
3337,
9104,
88,
299,
4324,
51,
12712,
459,
1021,
51,
2630,
51,
8195,
742,
374,
221,
344,
45,
2630,
9104,
88,
6917,
1710,
1528,
621,
221,
1287,
128,
596,
221,
429,
804,
299,
4418,
51,
11824,
45,
2630,
9104,
88,
312,
596,
221,
344,
45,
872,
67,
54,
53,
53,
53,
46,
1397,
221,
5267,
556,
3284,
459,
1420,
705,
24860,
28848,
1865,
705,
2090,
244,
54,
53,
53,
53,
742,
596,
221,
20952,
1061,
1563,
51,
2630,
9104,
299,
244,
54,
53,
53,
53,
536,
804,
64,
621,
221,
130,
5639,
45,
1002,
503,
1528,
596,
221,
5267,
556,
3284,
459,
1107,
51,
1693,
438,
352,
539,
51,
117,
601,
51,
787,
51,
2449,
51,
1021,
51,
2630,
51,
8195,
3000,
2101,
116,
63,
6771,
106,
51,
7724,
1046,
106,
312,
621,
221,
130,
374,
221,
130,
8212,
221,
20952,
1061,
1563,
51,
19020,
1503,
51,
1693,
492,
8212,
221,
20952,
1061,
1563,
51,
1021,
299,
556,
22219,
8263,
65,
671,
49,
1563,
2938,
12493,
376,
221,
130,
5639,
45,
1002,
503,
1528,
374,
221,
20952,
1061,
1563,
51,
19020,
1503,
66,
1710,
64,
374,
221,
5267,
556,
13245,
1002,
459,
402,
445,
583,
41152,
3734,
20952,
5680,
327,
4659,
46,
3000,
11325,
19631,
9756,
63,
6771,
106,
51,
7724,
1046,
106,
312,
376,
221,
130,
222,
221,
130,
3038,
221,
1350,
376,
338,
11914,
6245,
2426,
1590,
376,
338,
4517,
338,
496,
5124,
13245,
1002,
376,
588,
222,
221,
69,
1806,
222,
221,
942,
782,
4248,
365,
2589,
13245,
1002,
128,
376,
221,
1287,
128,
374,
221,
344,
45,
20952,
1061,
1563,
51,
19020,
1503,
6917,
1710,
46,
621,
221,
20952,
1061,
1563,
51,
19020,
1503,
51,
2698,
492,
376,
221,
130,
5639,
45,
1002,
503,
1528,
374,
221,
5267,
556,
13245,
1002,
459,
846,
3279,
5684,
3734,
20952,
5680,
3000,
11325,
19631,
9756,
63,
6771,
106,
51,
7724,
1046,
106,
312,
376,
221,
130,
222,
221,
130,
3038,
221,
1350,
376,
338,
578,
1534,
3288,
2343,
727,
6715,
37829,
51,
376,
338,
4517,
338,
496,
620,
2426,
6715,
37829,
376,
588,
222,
221,
69,
1806,
222,
221,
942,
2833,
640,
1563,
365,
2589,
13245,
1002,
128,
376,
221,
1287,
128,
374,
221,
344,
45,
20952,
1061,
1563,
51,
19020,
1503,
398,
1710,
46,
621,
221,
5267,
556,
3284,
459,
402,
445,
583,
41152,
3000,
14073,
383,
13389,
420,
49,
4712,
561,
605,
3294,
6049,
3238,
742,
8212,
221,
325,
1615,
51,
560,
51,
3962,
459,
20952,
640,
1563,
2903,
48,
20952,
1061,
1563,
51,
22080,
14526,
19218,
678,
742,
374,
221,
620,
24616,
1061,
1563,
51,
22080,
14526,
492,
1504,
376,
221,
130,
5639,
45,
1002,
503,
1528,
374,
221,
5267,
556,
13245,
1002,
459,
22080,
1067,
63,
6771,
106,
51,
7724,
1046,
106,
312,
376,
221,
130,
222,
221,
130,
3038,
221,
1350,
376,
338,
578,
1534,
3288,
2343,
727,
6715,
37829,
347,
36965,
3109,
110,
5301,
9928,
3288,
735,
244,
54,
51,
57,
62,
60,
53,
51,
376,
338,
4517,
338,
496,
620,
2426,
6715,
37829,
376,
588,
222,
221,
69,
1806,
222,
221,
942,
1964,
45940,
10909,
365,
5124,
13245,
1002,
320,
376,
221,
1287,
128,
374,
221,
344,
45,
20952,
1061,
1563,
51,
19020,
1503,
398,
1710,
46,
621,
221,
5267,
556,
3284,
459,
402,
445,
583,
41152,
3000,
14073,
383,
13389,
420,
49,
4712,
561,
605,
3294,
6049,
3238,
742,
8212,
221,
325,
1615,
51,
560,
51,
3962,
459,
20952,
45940,
2903,
48,
20952,
1061,
1563,
51,
22080,
14526,
941,
11960,
19218,
678,
742,
374,
221,
620,
24616,
1061,
1563,
51,
22080,
14526,
941,
11960,
492,
1504,
376,
221,
130,
5639,
45,
1002,
503,
1528,
374,
221,
5267,
556,
13245,
1002,
459,
22080,
1067,
63,
6771,
106,
51,
7724,
1046,
106,
312,
376,
221,
130,
222,
221,
130,
3038,
221,
1350,
376,
338,
578,
1534,
3288,
2343,
727,
6715,
37829,
6558,
6356,
4447,
51,
376,
338,
4517,
338,
496,
620,
2426,
6715,
37829,
376,
588,
222,
221,
69,
1806,
222,
221,
942,
18367,
640,
7477,
365,
2589,
13245,
1002,
128,
376,
221,
1287,
128,
374,
221,
344,
45,
20952,
1061,
1563,
51,
19020,
1503,
398,
1710,
46,
621,
221,
5267,
556,
3284,
459,
402,
445,
583,
41152,
3000,
14073,
383,
13389,
420,
49,
4712,
561,
605,
3294,
6049,
3238,
742,
8212,
221,
325,
1615,
51,
560,
51,
3962,
459,
20952,
640,
7477,
2903,
48,
909,
18367,
45,
20952,
1061,
1563,
51,
22080,
14526,
941,
11960,
1177,
37066,
742,
374,
221,
620,
556,
18367,
45,
20952,
1061,
1563,
51,
22080,
14526,
941,
11960,
1052,
1504,
376,
221,
130,
5639,
45,
1002,
503,
1528,
374,
221,
5267,
556,
13245,
1002,
459,
22080,
1067,
63,
6771,
106,
51,
7724,
1046,
106,
312,
376,
221,
130,
15767,
221,
130,
3038,
221,
1350,
376,
338,
578,
1534,
3288,
2343,
727,
6715,
37829,
6558,
16587,
376,
338,
4517,
338,
496,
620,
2426,
6715,
37829,
376,
588,
222,
221,
69,
1806,
222,
221,
942,
16587,
640,
9391,
365,
2589,
13245,
1002,
128,
376,
221,
9391,
300,
299,
556,
590,
33820,
9391,
492,
376,
221,
104,
51,
34453,
45,
597,
51,
22080,
1052,
376,
221,
620,
300,
64,
222,
221,
130,
222,
130,
222
] | [
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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adjacency Maximization.java | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.LinkedList;
import java.util.StringTokenizer;
class Main {
public static void main (String [] args) throws Exception {
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
int testCaseCount=Integer.parseInt(br.readLine());
for (int testCase=0;testCase<testCaseCount;testCase++) {
StringTokenizer st=new StringTokenizer(br.readLine());
int P=Integer.parseInt(st.nextToken());
int Q=Integer.parseInt(st.nextToken());
LinkedList<Integer> list=new LinkedList<>();
while (P>Q*2) {
list.addFirst(1);
P--;
}
while (P>0 || Q>0) {
if (P>0) {
list.addFirst(1);
P--;
}
if (Q>0) {
list.addFirst(0);
Q--;
}
if (P>0) {
list.addFirst(1);
P--;
}
}
long ans=0;
for (Integer num : list) ans=(ans<<1)+num;
System.out.println(ans);
}
}
} | 934 | Java | .java | PuzzlesLab/UVA | 21 | 23 | 2 | 2016-03-15T17:15:27Z | 2024-04-11T15:48:13Z | 527272bac1e2ac9ef727415ec005befeb8f647ec574e871f77b118f83dd9e9aa | [] | [
485,
1401,
51,
735,
51,
35094,
64,
222,
485,
1401,
51,
735,
51,
6989,
3314,
64,
222,
485,
1401,
51,
1058,
51,
20535,
64,
222,
485,
1401,
51,
1058,
51,
671,
22411,
64,
222,
222,
842,
6697,
320,
499,
221,
942,
924,
782,
2594,
327,
671,
1627,
2194,
46,
2589,
3284,
320,
21997,
221,
35094,
3220,
66,
909,
28731,
45,
909,
40678,
45,
1615,
51,
285,
894,
376,
221,
429,
32161,
1552,
66,
3078,
51,
11824,
45,
858,
51,
29240,
1052,
376,
221,
999,
327,
429,
32161,
66,
53,
64,
42401,
65,
42401,
1552,
64,
42401,
2002,
320,
374,
221,
671,
22411,
395,
66,
909,
910,
22411,
45,
858,
51,
29240,
1052,
374,
221,
429,
466,
66,
3078,
51,
11824,
45,
289,
51,
34074,
1052,
374,
221,
429,
1931,
66,
3078,
51,
11824,
45,
289,
51,
34074,
1052,
8212,
221,
20535,
65,
3078,
67,
1168,
66,
909,
21057,
6984,
374,
221,
5544,
327,
85,
67,
86,
47,
55,
46,
320,
621,
221,
687,
51,
688,
3485,
45,
54,
312,
621,
221,
85,
10606,
374,
221,
130,
374,
221,
5544,
327,
85,
67,
53,
1293,
1931,
67,
53,
46,
320,
621,
221,
344,
327,
85,
67,
53,
46,
320,
596,
221,
687,
51,
688,
3485,
45,
54,
312,
596,
221,
85,
10606,
621,
221,
130,
621,
221,
344,
327,
86,
67,
53,
46,
320,
596,
221,
687,
51,
688,
3485,
45,
53,
312,
596,
221,
86,
10606,
621,
221,
130,
621,
221,
344,
327,
85,
67,
53,
46,
320,
596,
221,
687,
51,
688,
3485,
45,
54,
312,
596,
221,
85,
10606,
621,
221,
130,
374,
221,
130,
8212,
221,
3239,
12187,
66,
53,
64,
374,
221,
999,
327,
3078,
1952,
518,
1168,
46,
12187,
4381,
711,
3586,
54,
7308,
1538,
64,
374,
221,
1615,
51,
560,
51,
3962,
45,
711,
312,
376,
221,
130,
222,
221,
130,
222,
130
] | [
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
]
] | 309 | true | 61.349036 | true | true |
ImageGalleryUser.java | /FileExtraction/Java_unseen/lamsfoundation_lams/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/model/ImageGalleryUser.java | /****************************************************************
* Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
* =============================================================
* License Information: http://lamsfoundation.org/licensing/lams/2.0/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA
*
* http://www.gnu.org/licenses/gpl.txt
* ****************************************************************
*/
package org.lamsfoundation.lams.tool.imageGallery.model;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.log4j.Logger;
import org.lamsfoundation.lams.usermanagement.dto.UserDTO;
import org.lamsfoundation.lams.usermanagement.service.IUserDetails;
/**
* ImageGallery
*
* @author Andrey Balan
*/
@Entity
@Table(name = "tl_laimag10_user")
public class ImageGalleryUser implements Cloneable, IUserDetails {
private static Logger log = Logger.getLogger(ImageGalleryUser.class);
@Id
@Column
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long uid;
@Column(name = "user_id")
private Long userId;
@Column(name = "first_name")
private String firstName;
@Column(name = "last_name")
private String lastName;
@Column(name = "login_name")
private String loginName;
@Column(name = "session_finished")
private boolean sessionFinished;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "session_uid")
private ImageGallerySession session;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "imageGallery_uid")
private ImageGallery imageGallery;
// =============== NON Persisit value: for display use ===========
// the user access some resource item date time. Use in monitoring summary page
@Transient
private Date accessDate;
public ImageGalleryUser() {
}
public ImageGalleryUser(UserDTO user, ImageGallerySession session) {
this.userId = user.getUserID().longValue();
this.firstName = user.getFirstName();
this.lastName = user.getLastName();
this.loginName = user.getLogin();
this.session = session;
this.imageGallery = null;
this.sessionFinished = false;
}
public ImageGalleryUser(UserDTO user, ImageGallery content) {
this.userId = user.getUserID().longValue();
this.firstName = user.getFirstName();
this.lastName = user.getLastName();
this.loginName = user.getLogin();
this.session = null;
this.imageGallery = content;
this.sessionFinished = false;
}
@Override
public Object clone() {
ImageGalleryUser user = null;
try {
user = (ImageGalleryUser) super.clone();
user.setUid(null);
// never clone session
user.setSession(null);
} catch (CloneNotSupportedException e) {
ImageGalleryUser.log.error("When clone " + ImageGalleryUser.class + " failed");
}
return user;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof ImageGalleryUser)) {
return false;
}
final ImageGalleryUser user = (ImageGalleryUser) obj;
return new EqualsBuilder().append(this.uid, user.uid).append(this.firstName, user.firstName)
.append(this.lastName, user.lastName).append(this.loginName, user.loginName).isEquals();
}
@Override
public int hashCode() {
return new HashCodeBuilder().append(uid).append(firstName).append(lastName).append(loginName).toHashCode();
}
// **********************************************************
// Get/Set methods
// **********************************************************
public Long getUid() {
return uid;
}
public void setUid(Long userID) {
this.uid = userID;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userID) {
this.userId = userID;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLoginName() {
return loginName;
}
public void setLoginName(String loginName) {
this.loginName = loginName;
}
public String getLogin() {
return getLoginName();
}
public ImageGallerySession getSession() {
return session;
}
public void setSession(ImageGallerySession session) {
this.session = session;
}
public ImageGallery getImageGallery() {
return imageGallery;
}
public void setImageGallery(ImageGallery content) {
this.imageGallery = content;
}
public boolean isSessionFinished() {
return sessionFinished;
}
public void setSessionFinished(boolean sessionFinished) {
this.sessionFinished = sessionFinished;
}
public Date getAccessDate() {
return accessDate;
}
public void setAccessDate(Date accessDate) {
this.accessDate = accessDate;
}
} | 5,975 | Java | .java | lamsfoundation/lams | 37 | 23 | 0 | 2017-06-13T03:22:42Z | 2024-04-11T17:31:25Z | 52204b945847edab20a5650f96130e30c0a40d9d99cf1ff8c12996c787fb70dc | [] | [
18200,
222,
338,
2657,
327,
72,
46,
244,
55,
53,
53,
58,
517,
40221,
7120,
327,
544,
574,
113,
1480,
19076,
51,
1107,
46,
222,
338,
21422,
7567,
222,
338,
1196,
10422,
63,
1930,
574,
113,
1480,
19076,
51,
1107,
52,
425,
20314,
52,
113,
1480,
52,
55,
51,
53,
52,
222,
338,
222,
338,
1369,
3477,
458,
3760,
2951,
64,
863,
902,
14081,
580,
480,
52,
290,
5370,
222,
338,
580,
1549,
341,
5974,
451,
341,
6994,
6153,
5062,
1196,
641,
9582,
829,
222,
338,
341,
7834,
3870,
7120,
51,
222,
338,
222,
338,
1369,
3477,
458,
2744,
347,
341,
9850,
708,
580,
1118,
545,
6386,
49,
222,
338,
1294,
4213,
2979,
9345,
64,
2895,
4462,
341,
4506,
14319,
451,
222,
338,
7934,
575,
8114,
4800,
418,
7848,
7763,
51,
244,
2819,
341,
222,
338,
6994,
6153,
5062,
1196,
456,
1851,
4261,
51,
222,
338,
222,
338,
2469,
1414,
1178,
6589,
331,
1948,
451,
341,
6994,
6153,
5062,
1196,
222,
338,
7979,
642,
477,
3477,
64,
434,
666,
49,
2886,
391,
341,
7834,
3870,
222,
338,
7120,
49,
6367,
4345,
244,
58,
54,
34113,
22321,
49,
33316,
26912,
49,
25006,
49,
13083,
244,
53,
55,
54,
54,
53,
50,
54,
56,
53,
54,
222,
338,
15067,
222,
338,
222,
338,
1930,
574,
1516,
51,
10627,
51,
1107,
52,
4205,
52,
43817,
51,
2787,
222,
338,
43499,
14525,
222,
588,
222,
222,
1337,
1105,
51,
113,
1480,
19076,
51,
113,
1480,
51,
3749,
51,
915,
21021,
51,
1184,
64,
222,
222,
485,
1401,
51,
1058,
51,
1563,
64,
222,
222,
485,
3698,
51,
10782,
51,
2154,
64,
222,
485,
3698,
51,
10782,
51,
2234,
64,
222,
485,
3698,
51,
10782,
51,
8684,
638,
64,
222,
485,
3698,
51,
10782,
51,
35422,
64,
222,
485,
3698,
51,
10782,
51,
17323,
638,
64,
222,
485,
3698,
51,
10782,
51,
625,
64,
222,
485,
3698,
51,
10782,
51,
34586,
64,
222,
485,
3698,
51,
10782,
51,
35699,
64,
222,
485,
3698,
51,
10782,
51,
1617,
64,
222,
485,
3698,
51,
10782,
51,
28505,
64,
222,
222,
485,
1105,
51,
2121,
51,
8381,
51,
1600,
51,
4179,
51,
2273,
1812,
64,
222,
485,
1105,
51,
2121,
51,
8381,
51,
1600,
51,
4179,
51,
14940,
1812,
64,
222,
485,
1105,
51,
2121,
51,
769,
57,
111,
51,
3716,
64,
222,
485,
1105,
51,
113,
1480,
19076,
51,
113,
1480,
51,
514,
9343,
51,
12292,
51,
1259,
8723,
64,
222,
485,
1105,
51,
113,
1480,
19076,
51,
113,
1480,
51,
514,
9343,
51,
2140,
51,
78,
37291,
64,
222,
222,
1350,
222,
338,
4393,
21021,
222,
338,
222,
338,
496,
2133,
4262,
14854,
570,
17679,
222,
588,
222,
69,
2234,
222,
69,
1617,
45,
444,
299,
332,
5406,
100,
3104,
17802,
54,
53,
100,
514,
678,
222,
942,
462,
4393,
21021,
1259,
4584,
14427,
463,
49,
457,
37291,
320,
303,
964,
924,
7145,
1264,
299,
7145,
51,
10588,
45,
1675,
21021,
1259,
51,
842,
312,
465,
496,
625,
303,
496,
2154,
303,
496,
35422,
45,
14008,
299,
26045,
638,
51,
35882,
46,
303,
964,
6374,
12379,
64,
465,
496,
2154,
45,
444,
299,
332,
514,
100,
333,
678,
303,
964,
6374,
10546,
64,
465,
496,
2154,
45,
444,
299,
332,
2251,
100,
444,
678,
303,
964,
910,
23911,
64,
465,
496,
2154,
45,
444,
299,
332,
2153,
100,
444,
678,
303,
964,
910,
23100,
64,
465,
496,
2154,
45,
444,
299,
332,
3632,
100,
444,
678,
303,
964,
910,
6212,
577,
64,
465,
496,
2154,
45,
444,
299,
332,
2867,
100,
15017,
678,
303,
964,
1922,
3541,
14071,
64,
465,
496,
35699,
45,
5151,
299,
15562,
638,
51,
6444,
26026,
46,
303,
496,
34586,
45,
444,
299,
332,
2867,
100,
1909,
678,
303,
964,
4393,
21021,
3152,
3541,
64,
465,
496,
35699,
45,
5151,
299,
15562,
638,
51,
6444,
26026,
46,
303,
496,
34586,
45,
444,
299,
332,
915,
21021,
100,
1909,
678,
303,
964,
4393,
21021,
1802,
21021,
64,
465,
453,
299,
18480,
11893,
17370,
316,
302,
804,
63,
456,
2540,
813,
299,
18420,
465,
453,
341,
1275,
2872,
1649,
2885,
1641,
2361,
1153,
51,
4443,
347,
20312,
8848,
1957,
303,
496,
28505,
303,
964,
2833,
2872,
1563,
64,
465,
581,
4393,
21021,
1259,
365,
320,
303,
339,
465,
581,
4393,
21021,
1259,
45,
1259,
8723,
1275,
49,
4393,
21021,
3152,
3541,
46,
320,
222,
221,
597,
51,
9073,
299,
1275,
51,
12226,
798,
941,
41928,
492,
222,
221,
597,
51,
18077,
299,
1275,
51,
390,
20690,
492,
222,
221,
597,
51,
20271,
299,
1275,
51,
20164,
577,
492,
222,
221,
597,
51,
3632,
577,
299,
1275,
51,
390,
5333,
492,
222,
221,
597,
51,
2867,
299,
3541,
64,
222,
221,
597,
51,
915,
21021,
299,
762,
64,
222,
221,
597,
51,
2867,
14071,
299,
920,
64,
303,
339,
465,
581,
4393,
21021,
1259,
45,
1259,
8723,
1275,
49,
4393,
21021,
1813,
46,
320,
222,
221,
597,
51,
9073,
299,
1275,
51,
12226,
798,
941,
41928,
492,
222,
221,
597,
51,
18077,
299,
1275,
51,
390,
20690,
492,
222,
221,
597,
51,
20271,
299,
1275,
51,
20164,
577,
492,
222,
221,
597,
51,
3632,
577,
299,
1275,
51,
390,
5333,
492,
222,
221,
597,
51,
2867,
299,
762,
64,
222,
221,
597,
51,
915,
21021,
299,
1813,
64,
222,
221,
597,
51,
2867,
14071,
299,
920,
64,
303,
339,
465,
496,
1806,
303,
581,
2210,
7905,
365,
320,
222,
221,
1675,
21021,
1259,
1275,
299,
762,
64,
222,
221,
1287,
320,
3281,
1275,
299,
327,
1675,
21021,
1259,
46,
2615,
51,
6371,
492,
3281,
1275,
51,
489,
18233,
45,
1710,
312,
3281,
453,
7162,
7905,
3541,
3281,
1275,
51,
489,
3152,
45,
1710,
312,
222,
221,
130,
2385,
327,
11533,
43069,
503,
46,
320,
3281,
4393,
21021,
1259,
51,
769,
51,
750,
459,
5797,
7905,
332,
494,
4393,
21021,
1259,
51,
842,
494,
332,
3818,
742,
222,
221,
130,
499,
221,
620,
1275,
64,
303,
339,
465,
496,
1806,
303,
581,
1922,
12432,
45,
976,
2847,
46,
320,
222,
221,
344,
327,
597,
630,
2847,
46,
320,
3281,
461,
878,
64,
222,
221,
130,
222,
221,
344,
11014,
2085,
5118,
4393,
21021,
1259,
509,
320,
3281,
461,
920,
64,
222,
221,
130,
499,
221,
3242,
4393,
21021,
1259,
1275,
299,
327,
1675,
21021,
1259,
46,
2847,
64,
499,
221,
620,
556,
21680,
1812,
941,
1713,
45,
597,
51,
1909,
49,
1275,
51,
1909,
566,
1713,
45,
597,
51,
18077,
49,
1275,
51,
18077,
46,
376,
221,
51,
1713,
45,
597,
51,
20271,
49,
1275,
51,
20271,
566,
1713,
45,
597,
51,
3632,
577,
49,
1275,
51,
3632,
577,
566,
316,
2273,
492,
465,
339,
465,
496,
1806,
303,
581,
648,
17759,
365,
320,
222,
221,
620,
556,
5042,
1241,
1812,
941,
1713,
45,
1909,
566,
1713,
45,
18077,
566,
1713,
45,
20271,
566,
1713,
45,
3632,
577,
566,
471,
14940,
492,
303,
339,
465,
453,
43499,
47,
303,
453,
1408,
52,
903,
4457,
303,
453,
43499,
47,
465,
581,
6374,
640,
18233,
365,
320,
222,
221,
620,
12379,
64,
303,
339,
465,
581,
782,
758,
18233,
45,
3967,
35304,
46,
320,
222,
221,
597,
51,
1909,
299,
35304,
64,
303,
339,
465,
581,
6374,
640,
10223,
365,
320,
222,
221,
620,
10546,
64,
303,
339,
465,
581,
782,
758,
10223,
45,
3967,
35304,
46,
320,
222,
221,
597,
51,
9073,
299,
35304,
64,
303,
339,
465,
581,
910,
640,
22837,
365,
320,
222,
221,
620,
23100,
64,
303,
339,
465,
581,
782,
758,
22837,
45,
671,
23100,
46,
320,
222,
221,
597,
51,
20271,
299,
23100,
64,
303,
339,
465,
581,
910,
640,
20690,
365,
320,
222,
221,
620,
23911,
64,
303,
339,
465,
581,
782,
758,
20690,
45,
671,
23911,
46,
320,
222,
221,
597,
51,
18077,
299,
23911,
64,
303,
339,
465,
581,
910,
640,
5333,
577,
365,
320,
222,
221,
620,
6212,
577,
64,
303,
339,
465,
581,
782,
758,
5333,
577,
45,
671,
6212,
577,
46,
320,
222,
221,
597,
51,
3632,
577,
299,
6212,
577,
64,
303,
339,
465,
581,
910,
640,
5333,
365,
320,
222,
221,
620,
640,
5333,
577,
492,
303,
339,
465,
581,
4393,
21021,
3152,
640,
3152,
365,
320,
222,
221,
620,
3541,
64,
303,
339,
465,
581,
782,
758,
3152,
45,
1675,
21021,
3152,
3541,
46,
320,
222,
221,
597,
51,
2867,
299,
3541,
64,
303,
339,
465,
581,
4393,
21021,
44066,
21021,
365,
320,
222,
221,
620,
1802,
21021,
64,
303,
339,
465,
581,
782,
758,
1675,
21021,
45,
1675,
21021,
1813,
46,
320,
222,
221,
597,
51,
915,
21021,
299,
1813,
64,
303,
339,
465,
581,
1922,
458,
3152,
14071,
365,
320,
222,
221,
620,
3541,
14071,
64,
303,
339,
465,
581,
782,
758,
3152,
14071,
45,
4412,
3541,
14071,
46,
320,
222,
221,
597,
51,
2867,
14071,
299,
3541,
14071,
64,
303,
339,
465,
581,
2833,
640,
2807,
1563,
365,
320,
222,
221,
620,
2872,
1563,
64,
303,
339,
465,
581,
782,
758,
2807,
1563,
45,
1563,
2872,
1563,
46,
320,
222,
221,
597,
51,
3575,
1563,
299,
2872,
1563,
64,
303,
339,
222,
222,
130
] | [
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
]
] | 1,504 | true | 66.912134 | true | true |
Test6968363.java | /FileExtraction/Java_unseen/AdoptOpenJDK_openjdk-aarch64-jdk8u/jdk/test/javax/swing/text/AbstractDocument/6968363/Test6968363.java | /*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import java.awt.Robot;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.event.DocumentListener;
import javax.swing.event.UndoableEditListener;
import javax.swing.text.AttributeSet;
import javax.swing.text.BadLocationException;
import javax.swing.text.Document;
import javax.swing.text.Element;
import javax.swing.text.PlainDocument;
import javax.swing.text.Position;
import javax.swing.text.Segment;
import static java.awt.BorderLayout.NORTH;
import static java.awt.BorderLayout.SOUTH;
import static java.awt.Toolkit.getDefaultToolkit;
import static java.awt.event.KeyEvent.VK_LEFT;
import static javax.swing.SwingUtilities.invokeAndWait;
/*
* @test
* @bug 6968363
* @summary Ensures that a custom document may not extend AbstractDocument
* @author Sergey Malenkov
* @library ../../../../../lib/testlibrary/
* @build ExtendedRobot
* @run main Test6968363
*/
public class Test6968363 implements Runnable, Thread.UncaughtExceptionHandler {
private JFrame frame;
public static void main(String[] args) throws Exception {
Runnable task = new Test6968363();
invokeAndWait(task);
ExtendedRobot robot = new ExtendedRobot();
robot.waitForIdle(100);
robot.keyPress(VK_LEFT);
robot.waitForIdle(100);
robot.keyRelease(VK_LEFT);
robot.waitForIdle(100);
invokeAndWait(task);
}
@Override
public void uncaughtException(Thread thread, Throwable throwable) {
throwable.printStackTrace();
System.exit(1);
}
@Override
public void run() {
if (this.frame == null) {
Thread.setDefaultUncaughtExceptionHandler(this);
this.frame = new JFrame(getClass().getSimpleName());
this.frame.add(NORTH, new JLabel("Copy Paste a HINDI text into the field below"));
this.frame.add(SOUTH, new JTextField(new MyDocument(), "\u0938", 10));
this.frame.pack();
this.frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
this.frame.setLocationRelativeTo(null);
this.frame.setVisible(true);
} else {
this.frame.dispose();
this.frame = null;
}
}
private static class MyDocument implements Document {
private final Document document = new PlainDocument();
@Override
public int getLength() {
return this.document.getLength();
}
@Override
public void addDocumentListener(DocumentListener listener) {
this.document.addDocumentListener(listener);
}
@Override
public void removeDocumentListener(DocumentListener listener) {
this.document.removeDocumentListener(listener);
}
@Override
public void addUndoableEditListener(UndoableEditListener listener) {
this.document.addUndoableEditListener(listener);
}
@Override
public void removeUndoableEditListener(UndoableEditListener listener) {
this.document.removeUndoableEditListener(listener);
}
@Override
public Object getProperty(Object key) {
return this.document.getProperty(key);
}
@Override
public void putProperty(Object key, Object value) {
this.document.putProperty(key, value);
}
@Override
public void remove(int offset, int length) throws BadLocationException {
this.document.remove(offset, length);
}
@Override
public void insertString(int offset, String string, AttributeSet set) throws BadLocationException {
for (int i = 0; i < string.length(); i++) {
System.out.println("i: " + i + "; ch: " + Integer.toHexString(string.charAt(i)));
}
this.document.insertString(offset, string, set);
}
@Override
public String getText(int offset, int length) throws BadLocationException {
return this.document.getText(offset, length);
}
@Override
public void getText(int offset, int length, Segment segment) throws BadLocationException {
this.document.getText(offset, length, segment);
}
@Override
public Position getStartPosition() {
return this.document.getStartPosition();
}
@Override
public Position getEndPosition() {
return this.document.getEndPosition();
}
@Override
public Position createPosition(int offset) throws BadLocationException {
return this.document.createPosition(offset);
}
@Override
public Element[] getRootElements() {
Element[] elements = this.document.getRootElements();
Element[] wrappers = new Element[elements.length];
for (int i = 0; i < elements.length; i++) {
wrappers[i] = new MyElement(elements[i]);
}
return wrappers;
}
@Override
public Element getDefaultRootElement() {
return new MyElement(this.document.getDefaultRootElement());
}
@Override
public void render(Runnable task) {
this.document.render(task);
}
private class MyElement implements Element {
private final Element element;
private MyElement(Element element) {
this.element = element;
}
@Override
public Document getDocument() {
return MyDocument.this;
}
@Override
public Element getParentElement() {
return new MyElement(this.element.getParentElement());
}
@Override
public String getName() {
return this.element.getName();
}
@Override
public AttributeSet getAttributes() {
return this.element.getAttributes();
}
@Override
public int getStartOffset() {
return this.element.getStartOffset();
}
@Override
public int getEndOffset() {
return this.element.getEndOffset();
}
@Override
public int getElementIndex(int offset) {
return this.element.getElementIndex(offset);
}
@Override
public int getElementCount() {
return this.element.getElementCount();
}
@Override
public Element getElement(int index) {
return new MyElement(this.element.getElement(index));
}
@Override
public boolean isLeaf() {
return this.element.isLeaf();
}
}
}
}
| 7,957 | Java | .java | AdoptOpenJDK/openjdk-aarch64-jdk8u | 13 | 45 | 0 | 2020-07-16T16:13:20Z | 2021-09-29T14:47:41Z | 887ca0d2077a98e71f128b21da17d530d6f4ccc82ffeffc40451f03534fd60bf | [] | [
1127,
222,
338,
2657,
327,
104,
46,
244,
55,
53,
54,
56,
49,
17980,
480,
52,
290,
2840,
25094,
51,
3381,
4760,
5225,
51,
222,
338,
4103,
2387,
23740,
1895,
35234,
8995,
2387,
11988,
1895,
8968,
10961,
30441,
51,
222,
338,
222,
338,
1369,
1361,
458,
3760,
2951,
64,
863,
902,
14081,
580,
480,
52,
290,
5370,
580,
222,
338,
1549,
341,
5974,
451,
341,
6994,
6153,
5062,
1196,
1522,
244,
55,
1773,
49,
641,
222,
338,
9582,
829,
341,
7834,
3870,
7120,
51,
222,
338,
222,
338,
1369,
1361,
458,
2744,
347,
341,
9850,
708,
580,
1118,
545,
6386,
49,
1294,
4213,
222,
338,
2979,
9345,
64,
2895,
4462,
341,
4506,
14319,
451,
7934,
575,
222,
338,
8114,
4800,
418,
7848,
7763,
51,
244,
2819,
341,
6994,
6153,
5062,
1196,
222,
338,
1522,
244,
55,
456,
1851,
4261,
327,
102,
1948,
458,
5976,
347,
341,
7621,
822,
708,
222,
338,
20854,
297,
4850,
477,
1361,
566,
222,
338,
222,
338,
2469,
1414,
1178,
6589,
331,
1948,
451,
341,
6994,
6153,
5062,
1196,
1522,
222,
338,
244,
55,
7979,
642,
477,
1409,
64,
434,
666,
49,
2886,
391,
341,
7834,
3870,
7120,
49,
222,
338,
6367,
4345,
244,
58,
54,
34113,
1277,
49,
33316,
26912,
49,
25006,
49,
13083,
244,
53,
55,
54,
54,
53,
50,
54,
56,
53,
54,
15067,
51,
222,
338,
222,
338,
5304,
7272,
17980,
49,
244,
58,
53,
53,
17980,
27004,
3094,
49,
4777,
21100,
2432,
6868,
49,
10562,
244,
62,
57,
53,
59,
58,
15067,
222,
338,
575,
7739,
19955,
51,
11116,
51,
527,
434,
863,
1868,
5408,
2490,
575,
1178,
1364,
222,
338,
10034,
51,
222,
588,
222,
485,
1401,
51,
8236,
51,
14843,
64,
222,
485,
3698,
51,
5934,
51,
79,
2163,
64,
222,
485,
3698,
51,
5934,
51,
22786,
64,
222,
485,
3698,
51,
5934,
51,
31845,
64,
222,
485,
3698,
51,
5934,
51,
1585,
51,
3112,
2239,
64,
222,
485,
3698,
51,
5934,
51,
1585,
51,
23654,
463,
3594,
2239,
64,
222,
485,
3698,
51,
5934,
51,
897,
51,
2230,
903,
64,
222,
485,
3698,
51,
5934,
51,
897,
51,
8421,
2941,
1002,
64,
222,
485,
3698,
51,
5934,
51,
897,
51,
3112,
64,
222,
485,
3698,
51,
5934,
51,
897,
51,
1325,
64,
222,
485,
3698,
51,
5934,
51,
897,
51,
18707,
3112,
64,
222,
485,
3698,
51,
5934,
51,
897,
51,
2746,
64,
222,
485,
3698,
51,
5934,
51,
897,
51,
7719,
64,
222,
222,
485,
924,
1401,
51,
8236,
51,
7263,
2362,
51,
43168,
64,
222,
485,
924,
1401,
51,
8236,
51,
7263,
2362,
51,
3644,
5938,
64,
222,
485,
924,
1401,
51,
8236,
51,
24291,
51,
13729,
24291,
64,
222,
485,
924,
1401,
51,
8236,
51,
1585,
51,
26082,
51,
13177,
100,
10779,
64,
222,
485,
924,
3698,
51,
5934,
51,
16153,
13392,
51,
7845,
2199,
6494,
64,
222,
222,
1127,
222,
338,
496,
881,
222,
338,
496,
1468,
244,
59,
62,
59,
61,
56,
59,
56,
222,
338,
496,
1386,
2445,
35152,
708,
331,
3137,
1840,
1648,
666,
12385,
7406,
3112,
222,
338,
496,
2133,
2074,
319,
126,
28886,
7015,
1558,
222,
338,
496,
5261,
23723,
15658,
1379,
52,
881,
5261,
52,
222,
338,
496,
1848,
24675,
14843,
222,
338,
496,
1967,
2594,
2128,
59,
62,
59,
61,
56,
59,
56,
222,
588,
222,
942,
462,
2128,
59,
62,
59,
61,
56,
59,
56,
4584,
18662,
49,
7806,
51,
1079,
27445,
35578,
320,
303,
964,
990,
2163,
3145,
64,
465,
581,
924,
782,
2594,
45,
671,
1197,
2194,
46,
2589,
3284,
320,
310,
18662,
2918,
299,
556,
2128,
59,
62,
59,
61,
56,
59,
56,
492,
310,
11324,
2199,
6494,
45,
2810,
312,
310,
24675,
14843,
13066,
299,
556,
24675,
14843,
492,
310,
13066,
51,
20955,
16306,
45,
54,
53,
53,
312,
310,
13066,
51,
697,
8338,
45,
13177,
100,
10779,
312,
310,
13066,
51,
20955,
16306,
45,
54,
53,
53,
312,
310,
13066,
51,
697,
5820,
45,
13177,
100,
10779,
312,
310,
13066,
51,
20955,
16306,
45,
54,
53,
53,
312,
310,
11324,
2199,
6494,
45,
2810,
312,
303,
339,
465,
496,
1806,
303,
581,
782,
725,
27445,
1002,
45,
3032,
3682,
49,
9953,
24466,
46,
320,
310,
24466,
51,
9428,
492,
310,
1189,
51,
4788,
45,
54,
312,
303,
339,
465,
496,
1806,
303,
581,
782,
1441,
365,
320,
310,
434,
327,
597,
51,
1763,
630,
762,
46,
320,
343,
7806,
51,
27356,
1079,
27445,
35578,
45,
597,
312,
343,
477,
51,
1763,
299,
556,
990,
2163,
45,
9699,
941,
26999,
1052,
343,
477,
51,
1763,
51,
688,
45,
43168,
49,
556,
23731,
459,
4014,
466,
8443,
331,
696,
540,
1740,
1367,
2012,
341,
1620,
4834,
2992,
343,
477,
51,
1763,
51,
688,
45,
3644,
5938,
49,
556,
40760,
45,
909,
4318,
3112,
1046,
2724,
122,
53,
62,
56,
61,
411,
244,
54,
53,
894,
343,
477,
51,
1763,
51,
2440,
492,
343,
477,
51,
1763,
51,
27356,
4187,
3786,
45,
79,
2163,
51,
5988,
6856,
100,
586,
100,
18758,
312,
343,
477,
51,
1763,
51,
35853,
11776,
724,
45,
1710,
312,
343,
477,
51,
1763,
51,
18215,
45,
1527,
312,
310,
339,
832,
320,
343,
477,
51,
1763,
51,
19904,
492,
343,
477,
51,
1763,
299,
762,
64,
310,
339,
303,
339,
465,
964,
924,
462,
4318,
3112,
4584,
6222,
320,
310,
964,
1175,
6222,
1840,
299,
556,
37217,
3112,
492,
603,
496,
1806,
310,
581,
648,
640,
2396,
365,
320,
343,
461,
477,
51,
2826,
51,
30031,
492,
310,
339,
603,
496,
1806,
310,
581,
782,
1035,
3112,
2239,
45,
3112,
2239,
7510,
46,
320,
343,
477,
51,
2826,
51,
688,
3112,
2239,
45,
9447,
312,
310,
339,
603,
496,
1806,
310,
581,
782,
3365,
3112,
2239,
45,
3112,
2239,
7510,
46,
320,
343,
477,
51,
2826,
51,
2564,
3112,
2239,
45,
9447,
312,
310,
339,
603,
496,
1806,
310,
581,
782,
1035,
23654,
463,
3594,
2239,
45,
23654,
463,
3594,
2239,
7510,
46,
320,
343,
477,
51,
2826,
51,
688,
23654,
463,
3594,
2239,
45,
9447,
312,
310,
339,
603,
496,
1806,
310,
581,
782,
3365,
23654,
463,
3594,
2239,
45,
23654,
463,
3594,
2239,
7510,
46,
320,
343,
477,
51,
2826,
51,
2564,
23654,
463,
3594,
2239,
45,
9447,
312,
310,
339,
603,
496,
1806,
310,
581,
2210,
46207,
45,
976,
1221,
46,
320,
343,
461,
477,
51,
2826,
51,
12712,
45,
697,
312,
310,
339,
603,
496,
1806,
310,
581,
782,
4180,
1667,
45,
976,
1221,
49,
2210,
804,
46,
320,
343,
477,
51,
2826,
51,
543,
1667,
45,
697,
49,
804,
312,
310,
339,
603,
496,
1806,
310,
581,
782,
3365,
45,
429,
3413,
49,
648,
3124,
46,
2589,
11074,
2941,
1002,
320,
343,
477,
51,
2826,
51,
2564,
45,
2897,
49,
3124,
312,
310,
339,
603,
496,
1806,
310,
581,
782,
5567,
671,
45,
429,
3413,
49,
910,
821,
49,
48575,
758,
46,
2589,
11074,
2941,
1002,
320,
343,
456,
327,
429,
613,
299,
244,
53,
64,
613,
350,
821,
51,
1340,
492,
613,
2002,
320,
419,
1189,
51,
560,
51,
3962,
459,
110,
63,
332,
494,
613,
494,
7216,
683,
63,
332,
494,
4418,
51,
471,
33075,
45,
819,
51,
15602,
45,
110,
4254,
343,
339,
343,
477,
51,
2826,
51,
3233,
671,
45,
2897,
49,
821,
49,
758,
312,
310,
339,
603,
496,
1806,
310,
581,
910,
40972,
45,
429,
3413,
49,
648,
3124,
46,
2589,
11074,
2941,
1002,
320,
343,
461,
477,
51,
2826,
51,
10624,
45,
2897,
49,
3124,
312,
310,
339,
603,
496,
1806,
310,
581,
782,
40972,
45,
429,
3413,
49,
648,
3124,
49,
17126,
8459,
46,
2589,
11074,
2941,
1002,
320,
343,
477,
51,
2826,
51,
10624,
45,
2897,
49,
3124,
49,
8459,
312,
310,
339,
603,
496,
1806,
310,
581,
11943,
640,
2148,
2746,
365,
320,
343,
461,
477,
51,
2826,
51,
31827,
2746,
492,
310,
339,
603,
496,
1806,
310,
581,
11943,
640,
2117,
2746,
365,
320,
343,
461,
477,
51,
2826,
51,
45646,
2746,
492,
310,
339,
603,
496,
1806,
310,
581,
11943,
1506,
2746,
45,
429,
3413,
46,
2589,
11074,
2941,
1002,
320,
343,
461,
477,
51,
2826,
51,
1315,
2746,
45,
2897,
312,
310,
339,
603,
496,
1806,
310,
581,
6840,
1197,
640,
4069,
7466,
365,
320,
343,
6840,
1197,
4725,
299,
477,
51,
2826,
51,
29847,
7466,
492,
343,
6840,
1197,
44520,
299,
556,
6840,
96,
7620,
51,
1340,
988,
343,
456,
327,
429,
613,
299,
244,
53,
64,
613,
350,
4725,
51,
1340,
64,
613,
2002,
320,
419,
44520,
96,
110,
98,
299,
556,
4318,
1325,
45,
7620,
96,
110,
2004,
343,
339,
343,
461,
44520,
64,
310,
339,
603,
496,
1806,
310,
581,
6840,
23916,
4069,
1325,
365,
320,
343,
461,
556,
4318,
1325,
45,
597,
51,
2826,
51,
13729,
4069,
1325,
1052,
310,
339,
603,
496,
1806,
310,
581,
782,
2922,
45,
17695,
2918,
46,
320,
343,
477,
51,
2826,
51,
3183,
45,
2810,
312,
310,
339,
603,
964,
462,
4318,
1325,
4584,
6840,
320,
343,
964,
1175,
6840,
2016,
64,
1083,
964,
4318,
1325,
45,
1325,
2016,
46,
320,
419,
477,
51,
2559,
299,
2016,
64,
343,
339,
1083,
496,
1806,
343,
581,
6222,
640,
3112,
365,
320,
419,
461,
4318,
3112,
51,
597,
64,
343,
339,
1083,
496,
1806,
343,
581,
6840,
38791,
1325,
365,
320,
419,
461,
556,
4318,
1325,
45,
597,
51,
2559,
51,
18777,
1325,
1052,
343,
339,
1083,
496,
1806,
343,
581,
910,
16389,
365,
320,
419,
461,
477,
51,
2559,
51,
5175,
492,
343,
339,
1083,
496,
1806,
343,
581,
48575,
640,
5097,
365,
320,
419,
461,
477,
51,
2559,
51,
43174,
492,
343,
339,
1083,
496,
1806,
343,
581,
648,
640,
2148,
3468,
365,
320,
419,
461,
477,
51,
2559,
51,
31827,
3468,
492,
343,
339,
1083,
496,
1806,
343,
581,
648,
640,
2117,
3468,
365,
320,
419,
461,
477,
51,
2559,
51,
45646,
3468,
492,
343,
339,
1083,
496,
1806,
343,
581,
648,
640,
1325,
1301,
45,
429,
3413,
46,
320,
419,
461,
477,
51,
2559,
51,
4661,
1301,
45,
2897,
312,
343,
339,
1083,
496,
1806,
343,
581,
648,
640,
1325,
1552,
365,
320,
419,
461,
477,
51,
2559,
51,
4661,
1552,
492,
343,
339,
1083,
496,
1806,
343,
581,
6840,
640,
1325,
45,
429,
1671,
46,
320,
419,
461,
556,
4318,
1325,
45,
597,
51,
2559,
51,
4661,
45,
1076,
894,
343,
339,
1083,
496,
1806,
343,
581,
1922,
458,
17192,
365,
320,
419,
461,
477,
51,
2559,
51,
316,
17192,
492,
343,
339,
310,
339,
303,
339,
222,
130,
222
] | [
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
]
] | 1,742 | true | 61.216539 | true | true |
ContactsDataRepositoryTest.java | /FileExtraction/Java_unseen/elan-ev_StudIPAndroidApp/app/src/test/java/de/elanev/studip/android/app/contacts/data/repository/ContactsDataRepositoryTest.java | /*
* Copyright (c) 2016 ELAN e.V.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Public License v3.0
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/gpl.html
*/
package de.elanev.studip.android.app.contacts.data.repository;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import java.util.ArrayList;
import java.util.List;
import de.elanev.studip.android.app.contacts.data.entity.ContactGroupEntity;
import de.elanev.studip.android.app.contacts.data.repository.datastore.ContactsDataStore;
import de.elanev.studip.android.app.contacts.data.repository.datastore.ContactsDataStoreFactory;
import rx.Observable;
import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.verify;
/**
* @author joern
*/
public class ContactsDataRepositoryTest {
@Mock ContactsDataStore mockContactsDataStore;
@Mock ContactsEntityDataMapper mockContactsEntityDataMapper;
@Mock ContactsDataStoreFactory mockContactsDataStoreFactory;
private ContactsDataRepository contactsDataRepository;
@Before public void setUp() throws Exception {
MockitoAnnotations.initMocks(this);
given(mockContactsDataStoreFactory.create()).willReturn(mockContactsDataStore);
contactsDataRepository = new ContactsDataRepository(mockContactsDataStoreFactory,
mockContactsEntityDataMapper);
}
@Test public void contactGroups() throws Exception {
List<ContactGroupEntity> contactGroups = new ArrayList<>(5);
contactGroups.add(new ContactGroupEntity());
contactGroups.add(new ContactGroupEntity());
given(mockContactsDataStore.contactGroupEntityList()).willReturn(
Observable.just(contactGroups));
contactsDataRepository.contactGroups();
verify(mockContactsDataStoreFactory).create();
verify(mockContactsDataStore).contactGroupEntityList();
}
} | 1,977 | Java | .java | elan-ev/StudIPAndroidApp | 12 | 5 | 21 | 2012-11-20T15:52:13Z | 2018-11-06T23:40:19Z | 36ac8a196e1751c3bf654e86132ae06b783cb7fdfd896eb880128fca17ba2dea | [] | [
1127,
222,
338,
2657,
327,
104,
46,
244,
55,
53,
54,
59,
10544,
946,
503,
51,
91,
51,
222,
338,
3381,
4760,
5225,
51,
1369,
3477,
480,
341,
22156,
12962,
222,
338,
904,
5610,
3322,
1549,
341,
5974,
451,
341,
6994,
5062,
1196,
373,
56,
51,
53,
222,
338,
1532,
20854,
15270,
477,
7507,
49,
480,
458,
3322,
840,
222,
338,
1930,
574,
1516,
51,
10627,
51,
1107,
52,
4205,
52,
43817,
51,
935,
222,
588,
222,
222,
1337,
428,
51,
361,
2617,
123,
51,
32755,
658,
51,
4048,
51,
745,
51,
19105,
51,
624,
51,
6335,
64,
222,
222,
485,
1105,
51,
3946,
51,
5670,
64,
222,
485,
1105,
51,
3946,
51,
1024,
64,
222,
485,
1105,
51,
15524,
51,
3672,
64,
222,
485,
1105,
51,
15524,
51,
17076,
13040,
64,
222,
222,
485,
1401,
51,
1058,
51,
7119,
64,
222,
485,
1401,
51,
1058,
51,
739,
64,
222,
222,
485,
428,
51,
361,
2617,
123,
51,
32755,
658,
51,
4048,
51,
745,
51,
19105,
51,
624,
51,
2244,
51,
5883,
1582,
2234,
64,
222,
485,
428,
51,
361,
2617,
123,
51,
32755,
658,
51,
4048,
51,
745,
51,
19105,
51,
624,
51,
6335,
51,
26824,
51,
18881,
26836,
64,
222,
485,
428,
51,
361,
2617,
123,
51,
32755,
658,
51,
4048,
51,
745,
51,
19105,
51,
624,
51,
6335,
51,
26824,
51,
18881,
26836,
2232,
64,
222,
485,
14288,
51,
11598,
64,
222,
222,
485,
924,
1105,
51,
15524,
51,
46774,
17076,
51,
15813,
64,
222,
485,
924,
1105,
51,
15524,
51,
17076,
51,
6970,
64,
222,
222,
1350,
222,
338,
496,
2133,
8759,
2369,
222,
588,
222,
942,
462,
12140,
120,
768,
3231,
1024,
320,
353,
496,
3672,
12140,
120,
26836,
4408,
18881,
26836,
64,
353,
496,
3672,
12140,
120,
2234,
768,
5640,
4408,
18881,
2234,
768,
5640,
64,
353,
496,
3672,
12140,
120,
26836,
2232,
4408,
18881,
26836,
2232,
64,
353,
964,
12140,
120,
768,
3231,
26890,
768,
3231,
64,
736,
496,
5670,
581,
782,
14544,
365,
2589,
3284,
320,
303,
26289,
13040,
51,
1683,
32596,
45,
597,
312,
303,
2716,
45,
3628,
18881,
26836,
2232,
51,
1315,
4269,
27278,
45,
3628,
18881,
26836,
312,
465,
26890,
768,
3231,
299,
556,
12140,
120,
768,
3231,
45,
3628,
18881,
26836,
2232,
49,
310,
4408,
18881,
2234,
768,
5640,
312,
353,
339,
736,
496,
1024,
581,
782,
7272,
7339,
365,
2589,
3284,
320,
303,
1701,
65,
5883,
1582,
2234,
67,
7272,
7339,
299,
556,
5068,
11530,
58,
312,
303,
7272,
7339,
51,
688,
45,
909,
12140,
1582,
2234,
1052,
303,
7272,
7339,
51,
688,
45,
909,
12140,
1582,
2234,
1052,
465,
2716,
45,
3628,
18881,
26836,
51,
5559,
1582,
2234,
739,
4269,
27278,
45,
310,
10525,
51,
4524,
45,
5559,
7339,
894,
465,
26890,
768,
3231,
51,
5559,
7339,
492,
465,
6152,
45,
3628,
18881,
26836,
2232,
566,
1315,
492,
303,
6152,
45,
3628,
18881,
26836,
566,
5559,
1582,
2234,
739,
492,
353,
339,
222,
222,
130
] | [
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
]
] | 489 | true | 79.312089 | true | true |
IndentingUTF8XmlOutput.java | /FileExtraction/Java_unseen/ibmruntimes_openj9-openjdk-jdk9/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/output/IndentingUTF8XmlOutput.java | /*
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.sun.xml.internal.bind.v2.runtime.output;
import com.sun.xml.internal.bind.marshaller.CharacterEscapeHandler;
import java.io.IOException;
import java.io.OutputStream;
import javax.xml.stream.XMLStreamException;
import com.sun.xml.internal.bind.v2.runtime.Name;
import org.xml.sax.SAXException;
/**
* {@link UTF8XmlOutput} with indentation.
*
* TODO: not sure if it's a good idea to move the indenting functionality to another class.
*
* Doesn't have to be final, but it helps the JVM.
*
* @author Kohsuke Kawaguchi
*/
public final class IndentingUTF8XmlOutput extends UTF8XmlOutput {
/**
* Null if the writer should perform no indentation.
*
* Otherwise this will keep the 8 copies of the string for indentation.
* (so that we can write 8 indentation at once.)
*/
private final Encoded indent8;
/**
* Length of one indentation.
*/
private final int unitLen;
private int depth = 0;
private boolean seenText = false;
/**
*
* @param indentStr
* set to null for no indentation and optimal performance.
* otherwise the string is used for indentation.
*/
public IndentingUTF8XmlOutput(OutputStream out, String indentStr, Encoded[] localNames, CharacterEscapeHandler escapeHandler) {
super(out, localNames, escapeHandler);
if(indentStr!=null) {
Encoded e = new Encoded(indentStr);
indent8 = new Encoded();
indent8.ensureSize(e.len*8);
unitLen = e.len;
for( int i=0; i<8; i++ )
System.arraycopy(e.buf, 0, indent8.buf, unitLen*i, unitLen);
} else {
this.indent8 = null;
this.unitLen = 0;
}
}
@Override
public void beginStartTag(int prefix, String localName) throws IOException {
indentStartTag();
super.beginStartTag(prefix, localName);
}
@Override
public void beginStartTag(Name name) throws IOException {
indentStartTag();
super.beginStartTag(name);
}
private void indentStartTag() throws IOException {
closeStartTag();
if(!seenText)
printIndent();
depth++;
seenText = false;
}
@Override
public void endTag(Name name) throws IOException {
indentEndTag();
super.endTag(name);
}
@Override
public void endTag(int prefix, String localName) throws IOException {
indentEndTag();
super.endTag(prefix, localName);
}
private void indentEndTag() throws IOException {
depth--;
if(!closeStartTagPending && !seenText)
printIndent();
seenText = false;
}
private void printIndent() throws IOException {
write('\n');
int i = depth%8;
write( indent8.buf, 0, i*unitLen );
i>>=3; // really i /= 8;
for( ; i>0; i-- )
indent8.write(this);
}
@Override
public void text(String value, boolean needSP) throws IOException {
seenText = true;
super.text(value, needSP);
}
@Override
public void text(Pcdata value, boolean needSP) throws IOException {
seenText = true;
super.text(value, needSP);
}
@Override
public void endDocument(boolean fragment) throws IOException, SAXException, XMLStreamException {
write('\n');
super.endDocument(fragment);
}
}
| 4,662 | Java | .java | ibmruntimes/openj9-openjdk-jdk9 | 68 | 76 | 0 | 2017-09-11T20:40:20Z | 2018-12-13T18:45:04Z | e6f33335bc74e14b53a8d48de247df9eb2178944183e5d4ce5f225853b143d6a | [] | [
1127,
222,
338,
2657,
327,
104,
46,
244,
54,
62,
62,
60,
49,
244,
55,
53,
54,
55,
49,
17980,
480,
52,
290,
2840,
25094,
51,
3381,
4760,
5225,
51,
222,
338,
4103,
2387,
23740,
1895,
35234,
8995,
2387,
11988,
1895,
8968,
10961,
30441,
51,
222,
338,
222,
338,
1369,
1361,
458,
3760,
2951,
64,
863,
902,
14081,
580,
480,
52,
290,
5370,
580,
222,
338,
1549,
341,
5974,
451,
341,
6994,
6153,
5062,
1196,
1522,
244,
55,
1773,
49,
641,
222,
338,
9582,
829,
341,
7834,
3870,
7120,
51,
244,
17980,
6759,
1218,
477,
222,
338,
8445,
822,
641,
5405,
391,
341,
332,
44978,
39,
3773,
641,
3961,
222,
338,
829,
17980,
347,
341,
7621,
822,
708,
20854,
297,
4850,
477,
1361,
51,
222,
338,
222,
338,
1369,
1361,
458,
2744,
347,
341,
9850,
708,
580,
1118,
545,
6386,
49,
1294,
4213,
222,
338,
2979,
9345,
64,
2895,
4462,
341,
4506,
14319,
451,
7934,
575,
222,
338,
8114,
4800,
418,
7848,
7763,
51,
244,
2819,
341,
6994,
6153,
5062,
1196,
222,
338,
1522,
244,
55,
456,
1851,
4261,
327,
102,
1948,
458,
5976,
347,
341,
7621,
822,
708,
222,
338,
20854,
297,
4850,
477,
1361,
566,
222,
338,
222,
338,
2469,
1414,
1178,
6589,
331,
1948,
451,
341,
6994,
6153,
5062,
1196,
1522,
222,
338,
244,
55,
7979,
642,
477,
1409,
64,
434,
666,
49,
2886,
391,
341,
7834,
3870,
7120,
49,
222,
338,
6367,
4345,
244,
58,
54,
34113,
1277,
49,
33316,
26912,
49,
25006,
49,
13083,
244,
53,
55,
54,
54,
53,
50,
54,
56,
53,
54,
15067,
51,
222,
338,
222,
338,
5304,
7272,
17980,
49,
244,
58,
53,
53,
17980,
27004,
3094,
49,
4777,
21100,
2432,
6868,
49,
10562,
244,
62,
57,
53,
59,
58,
15067,
222,
338,
575,
7739,
19955,
51,
11116,
51,
527,
434,
863,
1868,
5408,
2490,
575,
1178,
1364,
222,
338,
10034,
51,
222,
588,
222,
222,
1337,
785,
51,
9886,
51,
2608,
51,
3269,
51,
2555,
51,
123,
55,
51,
4700,
51,
2051,
64,
222,
222,
485,
785,
51,
9886,
51,
2608,
51,
3269,
51,
2555,
51,
23220,
51,
6891,
19018,
1985,
64,
222,
485,
1401,
51,
735,
51,
6860,
64,
222,
485,
1401,
51,
735,
51,
8783,
64,
222,
222,
485,
3698,
51,
2608,
51,
2255,
51,
5741,
1880,
1002,
64,
222,
222,
485,
785,
51,
9886,
51,
2608,
51,
3269,
51,
2555,
51,
123,
55,
51,
4700,
51,
577,
64,
222,
222,
485,
1105,
51,
2608,
51,
31965,
51,
42188,
1002,
64,
222,
222,
1350,
222,
338,
3105,
1222,
9360,
61,
4411,
2319,
130,
642,
33174,
51,
222,
338,
222,
338,
4314,
63,
666,
3673,
434,
580,
1200,
331,
4667,
8779,
391,
5187,
341,
10549,
318,
8923,
391,
4691,
462,
51,
222,
338,
222,
338,
12901,
115,
1348,
1178,
391,
545,
1175,
49,
1294,
580,
15783,
341,
30751,
51,
222,
338,
222,
338,
496,
2133,
36181,
3931,
36751,
1242,
831,
500,
2032,
110,
222,
588,
222,
942,
1175,
462,
20262,
323,
318,
6266,
61,
4411,
2319,
2041,
9360,
61,
4411,
2319,
320,
465,
1041,
294,
338,
9286,
434,
341,
7294,
1414,
4464,
1307,
33174,
51,
294,
338,
294,
338,
12783,
477,
1118,
5016,
341,
244,
61,
8685,
451,
341,
821,
456,
33174,
51,
294,
338,
327,
780,
708,
1019,
902,
2886,
244,
61,
33174,
840,
5065,
7475,
294,
588,
303,
964,
1175,
2445,
6215,
10549,
61,
64,
465,
1041,
294,
338,
16827,
451,
1611,
33174,
51,
294,
588,
303,
964,
1175,
648,
4220,
5752,
64,
465,
964,
648,
7736,
299,
244,
53,
64,
465,
964,
1922,
10955,
1049,
299,
920,
64,
465,
1041,
294,
338,
294,
338,
496,
772,
10549,
2026,
294,
338,
665,
758,
391,
762,
456,
1307,
33174,
480,
25050,
7919,
51,
294,
338,
665,
5897,
341,
821,
458,
1674,
456,
33174,
51,
294,
588,
303,
581,
20262,
323,
318,
6266,
61,
4411,
2319,
45,
8783,
986,
49,
910,
10549,
2026,
49,
2445,
6215,
1197,
2212,
4128,
49,
15045,
19018,
1985,
15821,
1985,
46,
320,
310,
2615,
45,
560,
49,
2212,
4128,
49,
15821,
1985,
312,
603,
434,
45,
9383,
2026,
6917,
1710,
46,
320,
343,
2445,
6215,
503,
299,
556,
2445,
6215,
45,
9383,
2026,
312,
343,
10549,
61,
299,
556,
2445,
6215,
492,
343,
10549,
61,
51,
12827,
1269,
45,
106,
51,
1688,
47,
61,
312,
343,
4220,
5752,
299,
503,
51,
1688,
64,
343,
456,
45,
648,
613,
66,
53,
64,
613,
65,
61,
64,
613,
1065,
848,
419,
1189,
51,
40816,
45,
106,
51,
1972,
49,
244,
53,
49,
10549,
61,
51,
1972,
49,
4220,
5752,
47,
110,
49,
4220,
5752,
312,
310,
339,
832,
320,
343,
477,
51,
9383,
61,
299,
762,
64,
343,
477,
51,
2260,
5752,
299,
244,
53,
64,
310,
339,
303,
339,
465,
496,
1806,
303,
581,
782,
4258,
2148,
2649,
45,
429,
5216,
49,
910,
2212,
577,
46,
2589,
6300,
320,
310,
10549,
2148,
2649,
492,
310,
2615,
51,
2425,
2148,
2649,
45,
4271,
49,
2212,
577,
312,
303,
339,
465,
496,
1806,
303,
581,
782,
4258,
2148,
2649,
45,
577,
655,
46,
2589,
6300,
320,
310,
10549,
2148,
2649,
492,
310,
2615,
51,
2425,
2148,
2649,
45,
444,
312,
303,
339,
465,
964,
782,
10549,
2148,
2649,
365,
2589,
6300,
320,
310,
4248,
2148,
2649,
492,
310,
434,
3848,
18458,
1049,
46,
343,
1489,
13489,
492,
310,
7736,
3348,
310,
10955,
1049,
299,
920,
64,
303,
339,
465,
496,
1806,
303,
581,
782,
962,
2649,
45,
577,
655,
46,
2589,
6300,
320,
310,
10549,
2117,
2649,
492,
310,
2615,
51,
435,
2649,
45,
444,
312,
303,
339,
465,
496,
1806,
303,
581,
782,
962,
2649,
45,
429,
5216,
49,
910,
2212,
577,
46,
2589,
6300,
320,
310,
10549,
2117,
2649,
492,
310,
2615,
51,
435,
2649,
45,
4271,
49,
2212,
577,
312,
303,
339,
465,
964,
782,
10549,
2117,
2649,
365,
2589,
6300,
320,
310,
7736,
10606,
310,
434,
3848,
2698,
2148,
2649,
10710,
979,
673,
18458,
1049,
46,
343,
1489,
13489,
492,
310,
10955,
1049,
299,
920,
64,
303,
339,
465,
964,
782,
1489,
13489,
365,
2589,
6300,
320,
310,
2886,
9492,
115,
912,
310,
648,
613,
299,
7736,
42,
61,
64,
603,
2886,
45,
10549,
61,
51,
1972,
49,
244,
53,
49,
613,
47,
2260,
5752,
1110,
603,
613,
2023,
66,
56,
64,
244,
453,
6411,
613,
14414,
244,
61,
64,
603,
456,
45,
2098,
613,
67,
53,
64,
613,
306,
848,
343,
10549,
61,
51,
1838,
45,
597,
312,
303,
339,
465,
496,
1806,
303,
581,
782,
1367,
45,
671,
804,
49,
1922,
1868,
2249,
46,
2589,
6300,
320,
310,
10955,
1049,
299,
878,
64,
310,
2615,
51,
897,
45,
872,
49,
1868,
2249,
312,
303,
339,
465,
496,
1806,
303,
581,
782,
1367,
45,
30322,
624,
804,
49,
1922,
1868,
2249,
46,
2589,
6300,
320,
310,
10955,
1049,
299,
878,
64,
310,
2615,
51,
897,
45,
872,
49,
1868,
2249,
312,
303,
339,
465,
496,
1806,
303,
581,
782,
962,
3112,
45,
4412,
10299,
46,
2589,
6300,
49,
45334,
1002,
49,
7408,
1880,
1002,
320,
310,
2886,
9492,
115,
912,
310,
2615,
51,
435,
3112,
45,
9883,
312,
303,
339,
222,
130,
222
] | [
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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format/Seeding.java | package dk.aau.cs.ds306e18.tournament.model.format;
import dk.aau.cs.ds306e18.tournament.model.Team;
import dk.aau.cs.ds306e18.tournament.utility.PowMath;
import java.util.ArrayList;
import java.util.List;
public class Seeding {
/** Generates a sequence of integers (from 0 to n - 1) that follows this pattern: [0, 7, 3, 4, 1, 6, 2, 5].
* n must be a power of two. */
public static List<Integer> generateFairOrder(int n) {
if (Integer.bitCount(n) != 1)
throw new IllegalArgumentException("n must be a power of two.");
List<Integer> ints = new ArrayList<>(n);
for (int i = 0; i < n; i++) {
ints.set(i, i);
}
return fairSeedList(ints);
}
/** Generates a sequence of integers (from 0 to 2^n - 1) that follows this pattern: [0, 7, 3, 4, 1, 6, 2, 5].
* The size of the list will be 2^n. */
public static List<Integer> generateFairOrderPow(int n) {
return generateFairOrder((int) Math.pow(2, n));
}
/** Returns a new list that contains the same as the given list but the elements has been reordered.
* [1, 2, 3, 4] becomes [1, 4, 2, 3]. And [1, 2, 3, 4, 5, 6, 7, 8] becomes [1, 8, 4, 5, 2, 7, 3, 6].
* @param list a list, which size is a power of two. */
public static <T> List<T> fairSeedList(List<T> list) {
if (!PowMath.isPowOf2(list.size())) throw new AssertionError("Size of list (" + list.size() + ") is not a power of two.");
if (Integer.bitCount(list.size()) != 1)
throw new IllegalArgumentException("The size of the list must be a power of two.");
list = new ArrayList<>(list);
int slice = 1;
int halfSize = list.size() / 2;
while (slice < halfSize) {
List<T> temp = new ArrayList<>(list);
list.clear();
while (temp.size() > 0) {
int lastIndex = temp.size();
list.addAll(temp.subList(0, slice));
list.addAll(temp.subList(lastIndex - slice, lastIndex));
temp.removeAll(temp.subList(lastIndex - slice, lastIndex));
temp.removeAll(temp.subList(0, slice));
}
slice *= 2;
}
return list;
}
/**
* Takes a list of elements and returns a new list with the same elements, but rearranged so by alternately picking
* the first element, and then the last element, until a new list is constructed. I.e. [1, 2, 3, 4] becomes
* [1, 4, 2, 3], and [1, 2, 3, 4, 5, 6, 7] becomes [1, 7, 2, 6, 3, 5, 4].
* @param list a list of any size
*/
public static <T> List<T> simplePairwiseSeedList(List<T> list) {
int n = list.size();
int pairs = n / 2;
int i = 0;
List<T> newList = new ArrayList<>();
while (i < pairs) {
newList.add(list.get(i));
newList.add(list.get(n - i - 1));
i++;
}
// In case list size is odd, add middle element
if (n % 2 == 1) {
newList.add(list.get(n / 2));
}
return newList;
}
}
| 3,108 | Java | .java | ds306e18/cleopetra | 9 | 3 | 14 | 2018-12-21T21:32:21Z | 2024-05-05T19:05:17Z | 18b737b45f697c493e67a17d1ea08041835fff0bb78786916de2edfbd3d26f29 | [] | [
1337,
47184,
51,
2336,
122,
51,
1766,
51,
3246,
56,
53,
59,
106,
54,
61,
51,
35357,
51,
1184,
51,
1664,
64,
222,
222,
485,
47184,
51,
2336,
122,
51,
1766,
51,
3246,
56,
53,
59,
106,
54,
61,
51,
35357,
51,
1184,
51,
8249,
64,
222,
485,
47184,
51,
2336,
122,
51,
1766,
51,
3246,
56,
53,
59,
106,
54,
61,
51,
35357,
51,
16777,
51,
23437,
5728,
64,
222,
222,
485,
1401,
51,
1058,
51,
7119,
64,
222,
485,
1401,
51,
1058,
51,
739,
64,
222,
222,
942,
462,
35052,
318,
320,
465,
1041,
32476,
331,
6645,
451,
18789,
327,
1097,
244,
53,
391,
329,
449,
244,
54,
46,
708,
11629,
477,
5275,
63,
447,
53,
49,
244,
60,
49,
244,
56,
49,
244,
57,
49,
244,
54,
49,
244,
59,
49,
244,
55,
49,
244,
58,
1015,
294,
338,
329,
2315,
545,
331,
7183,
451,
3161,
51,
588,
303,
581,
924,
1701,
65,
3078,
67,
4468,
75,
2017,
2888,
45,
429,
329,
46,
320,
310,
434,
327,
3078,
51,
2417,
1552,
45,
115,
46,
882,
244,
54,
46,
343,
1440,
556,
12134,
459,
115,
2315,
545,
331,
7183,
451,
3161,
5377,
603,
1701,
65,
3078,
67,
34669,
299,
556,
5068,
11530,
115,
312,
310,
456,
327,
429,
613,
299,
244,
53,
64,
613,
350,
329,
64,
613,
2002,
320,
343,
34669,
51,
489,
45,
110,
49,
613,
312,
310,
339,
310,
461,
19377,
921,
10636,
45,
28371,
312,
303,
339,
465,
1041,
32476,
331,
6645,
451,
18789,
327,
1097,
244,
53,
391,
244,
55,
99,
115,
449,
244,
54,
46,
708,
11629,
477,
5275,
63,
447,
53,
49,
244,
60,
49,
244,
56,
49,
244,
57,
49,
244,
54,
49,
244,
59,
49,
244,
55,
49,
244,
58,
1015,
294,
338,
906,
1354,
451,
341,
1168,
1118,
545,
244,
55,
99,
115,
51,
588,
303,
581,
924,
1701,
65,
3078,
67,
4468,
75,
2017,
2888,
23437,
45,
429,
329,
46,
320,
310,
461,
4468,
75,
2017,
2888,
1181,
429,
46,
4189,
51,
7555,
45,
55,
49,
329,
894,
303,
339,
465,
1041,
3777,
331,
556,
1168,
708,
4326,
341,
2454,
641,
341,
2716,
1168,
1294,
341,
4725,
1421,
2602,
24286,
51,
294,
338,
447,
54,
49,
244,
55,
49,
244,
56,
49,
244,
57,
98,
16675,
447,
54,
49,
244,
57,
49,
244,
55,
49,
244,
56,
1015,
4262,
447,
54,
49,
244,
55,
49,
244,
56,
49,
244,
57,
49,
244,
58,
49,
244,
59,
49,
244,
60,
49,
244,
61,
98,
16675,
447,
54,
49,
244,
61,
49,
244,
57,
49,
244,
58,
49,
244,
55,
49,
244,
60,
49,
244,
56,
49,
244,
59,
1015,
294,
338,
496,
772,
1168,
331,
1168,
49,
1532,
1354,
458,
331,
7183,
451,
3161,
51,
588,
303,
581,
924,
350,
89,
67,
1701,
65,
89,
67,
19377,
921,
10636,
45,
739,
65,
89,
67,
1168,
46,
320,
310,
434,
1445,
23437,
5728,
51,
316,
23437,
1436,
55,
45,
687,
51,
911,
5183,
1440,
556,
34845,
459,
1269,
451,
1168,
2903,
494,
1168,
51,
911,
365,
494,
7816,
458,
666,
331,
7183,
451,
3161,
5377,
603,
434,
327,
3078,
51,
2417,
1552,
45,
687,
51,
911,
1177,
882,
244,
54,
46,
343,
1440,
556,
12134,
459,
1338,
1354,
451,
341,
1168,
2315,
545,
331,
7183,
451,
3161,
5377,
603,
1168,
299,
556,
5068,
11530,
687,
312,
603,
648,
11514,
299,
244,
54,
64,
310,
648,
11243,
1269,
299,
1168,
51,
911,
365,
536,
244,
55,
64,
603,
2236,
327,
6109,
350,
11243,
1269,
46,
320,
343,
1701,
65,
89,
67,
1798,
299,
556,
5068,
11530,
687,
312,
343,
1168,
51,
3830,
492,
1083,
2236,
327,
1452,
51,
911,
365,
868,
244,
53,
46,
320,
419,
648,
2419,
1301,
299,
1798,
51,
911,
492,
419,
1168,
51,
15109,
45,
1452,
51,
1133,
739,
45,
53,
49,
11514,
894,
419,
1168,
51,
15109,
45,
1452,
51,
1133,
739,
45,
2153,
1301,
449,
11514,
49,
2419,
1301,
894,
419,
1798,
51,
28768,
45,
1452,
51,
1133,
739,
45,
2153,
1301,
449,
11514,
49,
2419,
1301,
894,
419,
1798,
51,
28768,
45,
1452,
51,
1133,
739,
45,
53,
49,
11514,
894,
343,
339,
1083,
11514,
10465,
244,
55,
64,
310,
339,
603,
461,
1168,
64,
303,
339,
465,
1041,
294,
338,
37389,
331,
1168,
451,
4725,
480,
3235,
331,
556,
1168,
642,
341,
2454,
4725,
49,
1294,
334,
32443,
105,
1278,
829,
9637,
12246,
42538,
294,
338,
341,
1950,
2016,
49,
480,
1636,
341,
2419,
2016,
49,
6234,
331,
556,
1168,
458,
23051,
51,
457,
51,
106,
51,
447,
54,
49,
244,
55,
49,
244,
56,
49,
244,
57,
98,
16675,
294,
338,
447,
54,
49,
244,
57,
49,
244,
55,
49,
244,
56,
636,
480,
447,
54,
49,
244,
55,
49,
244,
56,
49,
244,
57,
49,
244,
58,
49,
244,
59,
49,
244,
60,
98,
16675,
447,
54,
49,
244,
60,
49,
244,
55,
49,
244,
59,
49,
244,
56,
49,
244,
58,
49,
244,
57,
1015,
294,
338,
496,
772,
1168,
331,
1168,
451,
1364,
1354,
294,
588,
303,
581,
924,
350,
89,
67,
1701,
65,
89,
67,
4313,
5460,
3790,
921,
10636,
45,
739,
65,
89,
67,
1168,
46,
320,
310,
648,
329,
299,
1168,
51,
911,
492,
310,
648,
11886,
299,
329,
536,
244,
55,
64,
310,
648,
613,
299,
244,
53,
64,
603,
1701,
65,
89,
67,
556,
739,
299,
556,
5068,
6984,
603,
2236,
327,
110,
350,
11886,
46,
320,
343,
556,
739,
51,
688,
45,
687,
51,
390,
45,
110,
894,
343,
556,
739,
51,
688,
45,
687,
51,
390,
45,
115,
449,
613,
449,
244,
54,
894,
343,
613,
3348,
310,
339,
603,
453,
719,
1152,
1168,
1354,
458,
17869,
49,
1035,
11861,
2016,
310,
434,
327,
115,
925,
244,
55,
630,
244,
54,
46,
320,
343,
556,
739,
51,
688,
45,
687,
51,
390,
45,
115,
536,
244,
55,
894,
310,
339,
603,
461,
556,
739,
64,
303,
339,
222,
130,
222
] | [
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
]
] | 989 | true | 52.574003 | true | true |
TextDialog.java | /FileExtraction/Java_unseen/SecUSo_privacy-friendly-werewolf/app/src/main/java/org/secuso/privacyfriendlywerwolf/dialog/TextDialog.java | package org.secuso.privacyfriendlywerwolf.dialog;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.content.DialogInterface;
import android.os.Bundle;
import org.secuso.privacyfriendlywerwolf.R;
/**
* a generic text dialog, which shows a title and a message
*
* use the setters. constructor passing is unwanted by android.
*
* @author Tobias Kowalski <tobias.kowalski@stud.tu-darmstadt.de>
*/
public class TextDialog extends DialogFragment {
private String dialogTitle;
private String dialogText;
private float margin = 0;
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
// Use the Builder class for convenient dialog construction
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
builder.setTitle(dialogTitle)
.setMessage(dialogText)
.setPositiveButton(R.string.button_okay, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
}
});
// Create the AlertDialog object and return it
AlertDialog dialog = builder.create();
dialog.getWindow().getAttributes().verticalMargin = margin;
return dialog;
}
public void setDialogTitle(String dialogTitle) {
this.dialogTitle = dialogTitle;
}
public void setDialogText(String dialogText) {
this.dialogText = dialogText;
}
public void setMargin(float margin) {
this.margin = margin;
}
}
| 1,603 | Java | .java | SecUSo/privacy-friendly-werewolf | 25 | 10 | 19 | 2016-10-31T09:54:24Z | 2024-03-11T21:57:47Z | d36e94a1c45a019a0e2c61ebb7bcb29ebdcdf3215da763d81e731b6d2d7a4ab3 | [] | [
1337,
1105,
51,
4237,
36567,
51,
24310,
25308,
4533,
124,
24599,
51,
5962,
64,
222,
222,
485,
2616,
51,
745,
51,
40628,
64,
222,
485,
2616,
51,
745,
51,
3742,
64,
222,
485,
2616,
51,
745,
51,
3742,
5763,
64,
222,
485,
2616,
51,
1304,
51,
41956,
64,
222,
485,
2616,
51,
519,
51,
4775,
64,
222,
222,
485,
1105,
51,
4237,
36567,
51,
24310,
25308,
4533,
124,
24599,
51,
87,
64,
222,
222,
1350,
222,
338,
331,
10151,
1367,
7501,
49,
1532,
9873,
331,
1799,
480,
331,
1492,
222,
338,
222,
338,
813,
341,
758,
5749,
51,
4389,
13266,
458,
725,
32423,
829,
2616,
51,
222,
338,
222,
338,
496,
2133,
413,
926,
3247,
1242,
460,
298,
17710,
350,
471,
12895,
51,
112,
460,
298,
17710,
69,
32755,
51,
13389,
50,
105,
3932,
289,
41471,
51,
305,
67,
222,
588,
222,
942,
462,
3336,
3742,
2041,
13695,
5763,
320,
465,
964,
910,
7501,
3188,
64,
303,
964,
910,
7501,
1049,
64,
303,
964,
1916,
3307,
299,
244,
53,
64,
4054,
496,
1806,
303,
581,
13695,
16456,
3742,
45,
4775,
19902,
46,
320,
310,
453,
4443,
341,
7963,
462,
456,
27497,
7501,
22376,
310,
37468,
51,
1812,
4914,
299,
556,
37468,
51,
1812,
45,
28176,
1052,
6934,
4914,
51,
17359,
45,
5962,
3188,
46,
419,
657,
28901,
45,
5962,
1049,
46,
419,
657,
489,
17982,
1732,
45,
87,
51,
819,
51,
1654,
100,
1273,
414,
49,
556,
13695,
3058,
51,
12733,
365,
320,
547,
581,
782,
7057,
45,
41956,
7501,
49,
648,
828,
46,
320,
3704,
339,
419,
1141,
28461,
453,
2673,
341,
37468,
1319,
480,
461,
580,
310,
37468,
7501,
299,
4914,
51,
1315,
492,
310,
7501,
51,
37054,
941,
43174,
941,
10160,
10508,
299,
3307,
64,
310,
461,
7501,
64,
303,
339,
4054,
581,
782,
758,
3742,
3188,
45,
671,
7501,
3188,
46,
320,
310,
477,
51,
5962,
3188,
299,
7501,
3188,
64,
303,
339,
465,
581,
782,
758,
3742,
1049,
45,
671,
7501,
1049,
46,
320,
310,
477,
51,
5962,
1049,
299,
7501,
1049,
64,
303,
339,
465,
581,
782,
758,
10508,
45,
1832,
3307,
46,
320,
310,
477,
51,
4553,
299,
3307,
64,
303,
339,
222,
222,
130,
222
] | [
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
]
] | 363 | true | 68.184654 | true | true |
PlaylistsList.java | /FileExtraction/Java_unseen/Borewit_listFix/src/main/java/listfix/view/controls/PlaylistsList.java | package listfix.view.controls;
import listfix.model.BatchRepair;
import listfix.model.playlists.Playlist;
import listfix.view.dialogs.PlaylistsTableModel;
import listfix.view.support.ZebraJTable;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import javax.swing.*;
import javax.swing.border.BevelBorder;
import javax.swing.table.TableCellRenderer;
import javax.swing.table.TableColumn;
import javax.swing.table.TableColumnModel;
import javax.swing.table.TableModel;
import java.awt.*;
import java.awt.event.MouseEvent;
import java.util.ArrayList;
import java.util.List;
public class PlaylistsList extends JPanel
{
private BatchRepair _batch;
private static final Logger _logger = LogManager.getLogger(PlaylistsList.class);
/**
* Creates new form PlaylistsList
*/
public PlaylistsList()
{
initComponents();
}
public PlaylistsList(BatchRepair batch)
{
_batch = batch;
initComponents();
_uiLists.setShowHorizontalLines(false);
_uiLists.setShowVerticalLines(false);
_uiLists.initFillColumnForScrollPane(_uiScrollLists);
// selections
_uiLists.setColumnSelectionAllowed(false);
_uiLists.setCellSelectionEnabled(false);
_uiLists.setRowSelectionAllowed(true);
}
private ZebraJTable createTable()
{
return new ZebraJTable()
{
@Override
public String getToolTipText(MouseEvent event)
{
Point point = event.getPoint();
int rawRowIx = rowAtPoint(point);
int rawColIx = columnAtPoint(point);
if (rawRowIx >= 0 && rawColIx >= 0)
{
int rowIx = convertRowIndexToModel(rawRowIx);
int colIx = convertColumnIndexToModel(rawColIx);
if (rowIx >= 0 && rowIx < _batch.getItems().size() && (colIx == 1))
{
return _batch.getItem(rowIx).getPath();
}
}
return super.getToolTipText(event);
}
};
}
public void initPlaylistsList()
{
resizeAllColumns();
// sort playlists by filename
RowSorter<? extends TableModel> sorter = _uiLists.getRowSorter();
List<RowSorter.SortKey> keys = new ArrayList<>();
keys.add(new RowSorter.SortKey(1, SortOrder.ASCENDING));
sorter.setSortKeys(keys);
}
private void resizeAllColumns()
{
// resize columns to fit
_uiLists.autoResizeColumn(0, true);
_uiLists.autoResizeColumn(1, false, 160);
TableColumnModel cm = _uiLists.getColumnModel();
TableCellRenderer renderer = _uiLists.getDefaultRenderer(Integer.class);
Component comp = renderer.getTableCellRendererComponent(_uiLists, (_uiLists.getRowCount() + 1) * 10, false, false, 0, 0);
int width = comp.getPreferredSize().width;
TableColumn col = cm.getColumn(0);
col.setMinWidth(width);
col.setMaxWidth(width);
col.setPreferredWidth(width);
}
public ListSelectionModel getSelectionModel()
{
return _uiLists.getSelectionModel();
}
public int getSelectedModelRow()
{
return _uiLists.getSelectedRow() < 0 ? -1 : _uiLists.convertRowIndexToModel(_uiLists.getSelectedRow());
}
/**
* This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents()
{
GridBagConstraints gridBagConstraints;
jPanel5 = new JPanel();
jLabel2 = new JLabel();
_labListCount = new JLabel();
_uiScrollLists = new JScrollPane();
_uiLists = createTable();
setLayout(new BorderLayout());
jPanel5.setLayout(new GridBagLayout());
jLabel2.setText("Playlists");
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 0;
gridBagConstraints.insets = new Insets(5, 5, 5, 0);
jPanel5.add(jLabel2, gridBagConstraints);
_labListCount.setForeground(UIManager.getDefaults().getColor("controlShadow"));
_labListCount.setHorizontalAlignment(SwingConstants.RIGHT);
_labListCount.setText("0 lists");
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 0;
gridBagConstraints.anchor = GridBagConstraints.EAST;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.insets = new Insets(5, 0, 5, 5);
jPanel5.add(_labListCount, gridBagConstraints);
add(jPanel5, BorderLayout.PAGE_START);
_uiScrollLists.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
_uiLists.setAutoCreateRowSorter(true);
_uiLists.setModel(new PlaylistsTableModel(_batch));
_uiLists.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
_uiLists.setRowHeight(20);
_uiLists.getTableHeader().setReorderingAllowed(false);
_uiScrollLists.setViewportView(_uiLists);
add(_uiScrollLists, BorderLayout.CENTER);
}// </editor-fold>//GEN-END:initComponents
// Variables declaration - do not modify//GEN-BEGIN:variables
private JLabel _labListCount;
private ZebraJTable _uiLists;
private JScrollPane _uiScrollLists;
private JLabel jLabel2;
private JPanel jPanel5;
// End of variables declaration//GEN-END:variables
public void setText(String listCountTxt)
{
_labListCount.setText(listCountTxt);
}
public void playlistModified(Playlist list)
{
int uiIndex = _uiLists.getSelectedRow();
int selIx = _uiLists.getSelectedRow();
if (selIx >= 0)
{
selIx = _uiLists.convertRowIndexToModel(selIx);
try
{
((PlaylistsTableModel) _uiLists.getModel()).fireTableDataChanged();
}
catch (Exception e)
{
_logger.warn(e);
}
_uiLists.setRowSelectionInterval(uiIndex, uiIndex);
}
}
public void anchorLeft()
{
_uiScrollLists.getHorizontalScrollBar().setValue(0);
}
}
| 5,958 | Java | .java | Borewit/listFix | 9 | 0 | 27 | 2021-12-21T19:52:56Z | 2024-02-26T18:52:56Z | 55c3e386e8e2992a04675bb5d9c7cd0e7d0342247644546a81c6bd73c1ebce99 | [] | [
1337,
1168,
3315,
51,
1090,
51,
10860,
64,
222,
222,
485,
1168,
3315,
51,
1184,
51,
6554,
36788,
64,
222,
485,
1168,
3315,
51,
1184,
51,
1087,
7060,
51,
23383,
64,
222,
485,
1168,
3315,
51,
1090,
51,
41463,
51,
5202,
7060,
36983,
64,
222,
485,
1168,
3315,
51,
1090,
51,
3608,
51,
23779,
9030,
79,
1617,
64,
222,
485,
1105,
51,
2121,
51,
7506,
51,
769,
57,
111,
51,
1353,
1590,
64,
222,
485,
1105,
51,
2121,
51,
7506,
51,
769,
57,
111,
51,
3716,
64,
222,
222,
485,
3698,
51,
5934,
7737,
222,
485,
3698,
51,
5934,
51,
3489,
51,
1483,
1223,
7263,
64,
222,
485,
3698,
51,
5934,
51,
1292,
51,
21702,
6470,
64,
222,
485,
3698,
51,
5934,
51,
1292,
51,
39615,
64,
222,
485,
3698,
51,
5934,
51,
1292,
51,
39615,
1262,
64,
222,
485,
3698,
51,
5934,
51,
1292,
51,
36983,
64,
222,
485,
1401,
51,
8236,
7737,
222,
485,
1401,
51,
8236,
51,
1585,
51,
21464,
64,
222,
485,
1401,
51,
1058,
51,
7119,
64,
222,
485,
1401,
51,
1058,
51,
739,
64,
222,
222,
942,
462,
11763,
7060,
739,
2041,
22299,
222,
128,
353,
964,
15702,
36788,
634,
4476,
64,
736,
964,
924,
1175,
7145,
634,
4089,
299,
2681,
1590,
51,
10588,
45,
5202,
7060,
739,
51,
842,
312,
736,
1041,
682,
338,
9308,
556,
2252,
11763,
7060,
739,
682,
588,
353,
581,
11763,
7060,
739,
365,
353,
320,
303,
3238,
8176,
492,
353,
339,
736,
581,
11763,
7060,
739,
45,
6554,
36788,
5334,
46,
353,
320,
303,
634,
4476,
299,
5334,
64,
303,
3238,
8176,
492,
465,
634,
1726,
12982,
51,
489,
4325,
11388,
8690,
45,
1886,
312,
303,
634,
1726,
12982,
51,
489,
4325,
11916,
8690,
45,
1886,
312,
465,
634,
1726,
12982,
51,
1683,
7904,
2154,
1580,
29314,
2191,
1726,
5606,
12982,
312,
465,
453,
45791,
303,
634,
1726,
12982,
51,
489,
2154,
5385,
12764,
45,
1886,
312,
303,
634,
1726,
12982,
51,
489,
2917,
5385,
4006,
45,
1886,
312,
303,
634,
1726,
12982,
51,
489,
2368,
5385,
12764,
45,
1527,
312,
353,
339,
736,
964,
18682,
9030,
79,
1617,
1506,
1617,
365,
353,
320,
303,
461,
556,
18682,
9030,
79,
1617,
365,
303,
320,
416,
496,
1806,
416,
581,
910,
640,
20495,
1049,
45,
21464,
1708,
46,
416,
320,
310,
6460,
2282,
299,
1708,
51,
390,
1962,
492,
310,
648,
5096,
2368,
21987,
299,
2720,
1094,
1962,
45,
1513,
312,
310,
648,
5096,
889,
21987,
299,
2656,
1094,
1962,
45,
1513,
312,
310,
434,
327,
1312,
2368,
21987,
2394,
244,
53,
979,
5096,
889,
21987,
2394,
244,
53,
46,
310,
320,
633,
648,
2720,
21987,
299,
4511,
38605,
724,
1262,
45,
1312,
2368,
21987,
312,
633,
648,
956,
21987,
299,
4511,
2154,
1301,
724,
1262,
45,
1312,
889,
21987,
312,
633,
434,
327,
661,
21987,
2394,
244,
53,
979,
2720,
21987,
350,
634,
4476,
51,
39341,
941,
911,
365,
979,
327,
770,
21987,
630,
244,
54,
509,
633,
320,
343,
461,
634,
4476,
51,
12244,
45,
661,
21987,
566,
17676,
492,
633,
339,
310,
339,
310,
461,
2615,
51,
390,
20495,
1049,
45,
1585,
312,
416,
339,
303,
1487,
353,
339,
8886,
581,
782,
3238,
5202,
7060,
739,
365,
353,
320,
303,
15189,
1947,
7633,
492,
465,
453,
3873,
4677,
7060,
829,
4891,
303,
5582,
43620,
1907,
2041,
5565,
1262,
67,
3873,
284,
299,
634,
1726,
12982,
51,
30062,
43620,
492,
303,
1701,
65,
2368,
43620,
51,
5217,
971,
67,
5050,
299,
556,
5068,
6984,
303,
5050,
51,
688,
45,
909,
5582,
43620,
51,
5217,
971,
45,
54,
49,
11899,
2888,
51,
17563,
38898,
894,
303,
3873,
284,
51,
489,
5217,
5044,
45,
3519,
312,
353,
339,
736,
964,
782,
15189,
1947,
7633,
365,
353,
320,
303,
453,
15189,
6165,
391,
8240,
465,
634,
1726,
12982,
51,
2853,
14595,
2154,
45,
53,
49,
878,
312,
303,
634,
1726,
12982,
51,
2853,
14595,
2154,
45,
54,
49,
920,
49,
244,
54,
59,
53,
312,
303,
5565,
2154,
1262,
14465,
299,
634,
1726,
12982,
51,
19226,
1262,
492,
303,
5565,
2917,
6470,
13095,
299,
634,
1726,
12982,
51,
13729,
6470,
45,
3078,
51,
842,
312,
303,
5715,
940,
299,
13095,
51,
390,
21702,
6470,
1735,
2191,
1726,
12982,
49,
4648,
1726,
12982,
51,
30062,
1552,
365,
494,
244,
54,
46,
338,
244,
54,
53,
49,
920,
49,
920,
49,
244,
53,
49,
244,
53,
312,
303,
648,
1882,
299,
940,
51,
390,
35606,
941,
1660,
64,
303,
5565,
2154,
956,
299,
14465,
51,
19226,
45,
53,
312,
303,
956,
51,
489,
2944,
2627,
45,
1660,
312,
303,
956,
51,
27235,
2627,
45,
1660,
312,
303,
956,
51,
489,
17211,
2627,
45,
1660,
312,
736,
339,
8886,
581,
1701,
5385,
1262,
640,
5385,
1262,
365,
353,
320,
303,
461,
634,
1726,
12982,
51,
35524,
1262,
492,
353,
339,
8886,
581,
648,
640,
4559,
1262,
2368,
365,
353,
320,
303,
461,
634,
1726,
12982,
51,
21851,
2368,
365,
350,
244,
53,
1037,
449,
54,
518,
634,
1726,
12982,
51,
5975,
38605,
724,
1262,
2191,
1726,
12982,
51,
21851,
2368,
1052,
353,
339,
736,
1041,
682,
338,
1369,
1431,
458,
3845,
664,
4824,
341,
4389,
391,
682,
338,
7395,
341,
2252,
51,
682,
338,
18226,
63,
3291,
2387,
5370,
477,
1361,
51,
906,
1813,
451,
477,
1431,
458,
682,
338,
5198,
40662,
829,
341,
3735,
11419,
51,
682,
588,
353,
496,
14030,
459,
18362,
678,
353,
453,
350,
5739,
50,
8727,
1263,
1311,
366,
28757,
39,
5615,
366,
6540,
4420,
31146,
7155,
50,
12188,
63,
1683,
8176,
353,
964,
782,
3238,
8176,
365,
353,
320,
303,
25956,
5145,
13400,
64,
465,
36935,
58,
299,
556,
22299,
492,
303,
26133,
55,
299,
556,
23731,
492,
303,
634,
4809,
739,
1552,
299,
556,
23731,
492,
303,
634,
1726,
5606,
12982,
299,
556,
990,
29314,
492,
303,
634,
1726,
12982,
299,
1506,
1617,
492,
465,
758,
2362,
45,
909,
38816,
1052,
465,
36935,
58,
51,
20113,
45,
909,
7877,
44547,
1052,
465,
26133,
55,
51,
6619,
459,
5202,
7060,
742,
303,
5145,
13400,
299,
556,
25956,
492,
303,
5145,
13400,
51,
43450,
299,
244,
53,
64,
303,
5145,
13400,
51,
43762,
299,
244,
53,
64,
303,
5145,
13400,
51,
285,
2047,
299,
556,
719,
2047,
45,
58,
49,
244,
58,
49,
244,
58,
49,
244,
53,
312,
303,
36935,
58,
51,
688,
45,
29780,
55,
49,
5145,
13400,
312,
465,
634,
4809,
739,
1552,
51,
47080,
45,
2299,
1590,
51,
13729,
120,
941,
24849,
459,
2452,
10059,
2992,
303,
634,
4809,
739,
1552,
51,
41069,
7759,
45,
16153,
5238,
51,
6517,
312,
303,
634,
4809,
739,
1552,
51,
6619,
459,
53,
10411,
742,
303,
5145,
13400,
299,
556,
25956,
492,
303,
5145,
13400,
51,
43450,
299,
244,
54,
64,
303,
5145,
13400,
51,
43762,
299,
244,
53,
64,
303,
5145,
13400,
51,
9934,
299,
25956,
51,
45800,
64,
303,
5145,
13400,
51,
3327,
125,
299,
244,
54,
51,
53,
64,
303,
5145,
13400,
51,
285,
2047,
299,
556,
719,
2047,
45,
58,
49,
244,
53,
49,
244,
58,
49,
244,
58,
312,
303,
36935,
58,
51,
688,
2191,
4809,
739,
1552,
49,
5145,
13400,
312,
465,
1035,
45,
25373,
58,
49,
38816,
51,
12913,
100,
7393,
312,
465,
634,
1726,
5606,
12982,
51,
38618,
45,
7263,
2232,
51,
1315,
1483,
1223,
7263,
45,
1483,
1223,
7263,
51,
29683,
1363,
894,
465,
634,
1726,
12982,
51,
42856,
1940,
2368,
43620,
45,
1527,
312,
303,
634,
1726,
12982,
51,
42723,
45,
909,
11763,
7060,
36983,
2191,
4476,
894,
303,
634,
1726,
12982,
51,
42856,
14595,
2116,
45,
79,
1617,
51,
13237,
100,
632,
3382,
100,
6672,
312,
303,
634,
1726,
12982,
51,
489,
2368,
3041,
45,
55,
53,
312,
303,
634,
1726,
12982,
51,
30232,
2661,
941,
489,
454,
24606,
12764,
45,
1886,
312,
303,
634,
1726,
5606,
12982,
51,
489,
16659,
1089,
2191,
1726,
12982,
312,
465,
1035,
2191,
1726,
5606,
12982,
49,
38816,
51,
16562,
312,
353,
28843,
594,
5739,
50,
8727,
47447,
7155,
50,
3298,
63,
1683,
8176,
8886,
453,
19949,
13317,
449,
764,
666,
5370,
325,
7155,
50,
12188,
63,
9605,
353,
964,
23731,
634,
4809,
739,
1552,
64,
353,
964,
18682,
9030,
79,
1617,
634,
1726,
12982,
64,
353,
964,
990,
29314,
634,
1726,
5606,
12982,
64,
353,
964,
23731,
26133,
55,
64,
353,
964,
22299,
36935,
58,
64,
353,
453,
4733,
451,
4918,
13317,
325,
7155,
50,
3298,
63,
9605,
8886,
581,
782,
758,
1049,
45,
671,
1168,
1552,
17243,
46,
353,
320,
303,
634,
4809,
739,
1552,
51,
6619,
45,
687,
1552,
17243,
312,
353,
339,
8886,
581,
782,
22518,
9851,
45,
23383,
1168,
46,
353,
320,
303,
648,
7900,
1301,
299,
634,
1726,
12982,
51,
21851,
2368,
492,
303,
648,
15818,
21987,
299,
634,
1726,
12982,
51,
21851,
2368,
492,
303,
434,
327,
6191,
21987,
2394,
244,
53,
46,
303,
320,
416,
15818,
21987,
299,
634,
1726,
12982,
51,
5975,
38605,
724,
1262,
45,
6191,
21987,
312,
1704,
1614,
416,
320,
310,
1849,
5202,
7060,
36983,
46,
634,
1726,
12982,
51,
26959,
4269,
5734,
44105,
3663,
492,
416,
339,
416,
2385,
327,
1002,
503,
46,
416,
320,
310,
634,
4089,
51,
8453,
45,
106,
312,
416,
339,
416,
634,
1726,
12982,
51,
489,
2368,
5385,
5766,
45,
1726,
1301,
49,
7900,
1301,
312,
303,
339,
353,
339,
8886,
581,
782,
14171,
3695,
365,
353,
320,
303,
634,
1726,
5606,
12982,
51,
390,
11388,
26964,
941,
11534,
45,
53,
312,
353,
339,
222,
130,
222
] | [
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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
* This file is part of Baritone.
*
* Baritone is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Baritone is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Baritone. If not, see <https://www.gnu.org/licenses/>.
*/
package baritone.api.pathing.goals;
/**
* Invert any goal.
* <p>
* In the old chat control system, #invert just tried to pick a {@link GoalRunAway} that <i>effectively</i> inverted the
* current goal. This goal just reverses the heuristic to act as a TRUE invert. Inverting a Y level? Baritone tries to
* get away from that Y level. Inverting a GoalBlock? Baritone will try to make distance whether it's in the X, Y or Z
* directions. And of course, you can always invert a GoalXZ.
*
* @author LoganDark
*/
public class GoalInverted implements Goal {
public final Goal origin;
public GoalInverted(Goal origin) {
this.origin = origin;
}
@Override
public boolean isInGoal(int x, int y, int z) {
return false;
}
@Override
public double heuristic(int x, int y, int z) {
return -origin.heuristic(x, y, z);
}
@Override
public String toString() {
return String.format("GoalInverted{%s}", origin.toString());
}
}
| 1,701 | Java | .java | JohnShiozo/SummitPlus | 8 | 3 | 1 | 2020-09-29T19:02:31Z | 2020-11-10T11:30:54Z | 3a4b84cf25352fc4c74f3a755cc1d742783e4add5af8d282592118052082da04 | [] | [
1127,
222,
338,
1369,
822,
458,
1760,
451,
11489,
302,
677,
51,
222,
338,
222,
338,
11489,
302,
677,
458,
3760,
2951,
63,
863,
902,
14081,
580,
480,
52,
290,
5370,
222,
338,
580,
1549,
341,
5974,
451,
341,
6994,
16227,
6153,
5062,
1196,
641,
9582,
829,
222,
338,
341,
7834,
3870,
7120,
49,
3173,
1522,
244,
56,
451,
341,
1196,
49,
575,
222,
338,
327,
288,
1390,
2489,
46,
1364,
6146,
1522,
51,
222,
338,
222,
338,
11489,
302,
677,
458,
2744,
347,
341,
9850,
708,
580,
1118,
545,
6386,
49,
222,
338,
1294,
4213,
2979,
9345,
64,
2895,
4462,
341,
4506,
14319,
451,
222,
338,
7934,
575,
8114,
4800,
418,
7848,
7763,
51,
244,
2819,
341,
222,
338,
6994,
16227,
6153,
5062,
1196,
456,
1851,
4261,
51,
222,
338,
222,
338,
2469,
1414,
1178,
6589,
331,
1948,
451,
341,
6994,
16227,
6153,
5062,
1196,
222,
338,
7979,
642,
11489,
302,
677,
51,
244,
1691,
666,
49,
2337,
350,
662,
574,
1516,
51,
10627,
51,
1107,
52,
4205,
28699,
222,
588,
222,
222,
1337,
5710,
302,
677,
51,
1256,
51,
1005,
318,
51,
31986,
64,
222,
222,
1350,
222,
338,
719,
1645,
1364,
12327,
51,
222,
338,
350,
117,
67,
222,
338,
719,
341,
3627,
11217,
3518,
2684,
49,
607,
22323,
2277,
8857,
391,
8350,
331,
3105,
1222,
42093,
2544,
47027,
130,
708,
350,
110,
67,
7483,
8637,
396,
110,
67,
37622,
341,
222,
338,
1565,
12327,
51,
1369,
12327,
2277,
334,
443,
1490,
341,
957,
31064,
391,
1733,
641,
331,
7798,
29025,
51,
719,
28488,
331,
1432,
3215,
68,
11489,
302,
677,
19849,
391,
222,
338,
640,
12025,
664,
708,
1432,
3215,
51,
719,
28488,
331,
42093,
2246,
68,
11489,
302,
677,
1118,
1614,
391,
1949,
7336,
4962,
580,
1200,
347,
341,
1618,
49,
1432,
575,
2538,
222,
338,
29118,
51,
4262,
451,
8446,
49,
863,
902,
5198,
29025,
331,
42093,
39432,
51,
222,
338,
222,
338,
496,
2133,
2681,
297,
15820,
222,
588,
222,
942,
462,
42093,
402,
17470,
4584,
42093,
320,
465,
581,
1175,
42093,
7391,
64,
465,
581,
42093,
402,
17470,
45,
17350,
7391,
46,
320,
310,
477,
51,
6954,
299,
7391,
64,
303,
339,
465,
496,
1806,
303,
581,
1922,
43337,
17350,
45,
429,
837,
49,
648,
553,
49,
648,
1308,
46,
320,
310,
461,
920,
64,
303,
339,
465,
496,
1806,
303,
581,
2082,
957,
31064,
45,
429,
837,
49,
648,
553,
49,
648,
1308,
46,
320,
310,
461,
449,
6954,
51,
311,
31064,
45,
125,
49,
553,
49,
1308,
312,
303,
339,
465,
496,
1806,
303,
581,
910,
11349,
365,
320,
310,
461,
910,
51,
1664,
459,
17350,
402,
17470,
4581,
120,
6557,
7391,
51,
3127,
1052,
303,
339,
222,
130,
222
] | [
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
]
] | 450 | true | 69.782481 | true | true |
GenericCommand.java | /FileExtraction/Java_unseen/Vepnar_BetterMobs/src/main/java/vepnar/bettermobs/commandHandlers/GenericCommand.java | package vepnar.bettermobs.commandHandlers;
import org.bukkit.command.CommandSender;
import vepnar.bettermobs.Main;
public class GenericCommand implements CommandExecuteAble {
private final String NAME;
private final int MINIMAL_ARGUMENTS;
private final CompletionType COMPLETION_TYPE;
private final String[] ALIASES;
private final CommandGroup PARENT;
private final String HELP;
public GenericCommand(String name, CommandGroup parent, String help, int minimal_arguments, CompletionType completion_type, String[] aliases) {
NAME = name;
MINIMAL_ARGUMENTS = minimal_arguments;
COMPLETION_TYPE = completion_type;
ALIASES = aliases;
PARENT = parent;
HELP = help;
}
@Override
public String getHelp() {
return HELP;
}
@Override
public String getName() {
return NAME;
}
@Override
public String[] getAlias() {
return ALIASES;
}
@Override
public int getMinimalArguments() {
return MINIMAL_ARGUMENTS;
}
@Override
public CompletionType TabType() {
return COMPLETION_TYPE;
}
@Override
public String getPermission() {
return null;
}
@Override
public CommandGroup getParent() {
return PARENT;
}
@Override
public boolean execute(Main core, CommandSender sender, String[] args) {
return false;
}
}
| 1,435 | Java | .java | Vepnar/BetterMobs | 11 | 2 | 1 | 2020-04-29T09:32:52Z | 2023-08-12T11:36:45Z | 394e878537e11c64101029a2a30eb504dc61d42c094664419f0b68b3d05ebb7f | [] | [
1337,
373,
950,
43595,
51,
30611,
794,
3904,
51,
2514,
15544,
64,
222,
222,
485,
1105,
51,
20402,
51,
2514,
51,
2037,
10455,
64,
222,
485,
373,
950,
43595,
51,
30611,
794,
3904,
51,
4370,
64,
222,
222,
942,
462,
12679,
2037,
4584,
5730,
7089,
2792,
293,
320,
465,
964,
1175,
910,
8920,
64,
303,
964,
1175,
648,
14369,
24008,
100,
29899,
88,
64,
303,
964,
1175,
32825,
638,
14196,
833,
5087,
100,
2333,
64,
303,
964,
1175,
910,
1197,
418,
1816,
3221,
88,
64,
303,
964,
1175,
5730,
1582,
466,
36770,
64,
303,
964,
1175,
910,
37867,
85,
64,
465,
581,
12679,
2037,
45,
671,
655,
49,
5730,
1582,
2952,
49,
910,
3071,
49,
648,
16644,
100,
8306,
49,
32825,
638,
13362,
100,
700,
49,
910,
1197,
20654,
46,
320,
310,
8920,
299,
655,
64,
310,
14369,
24008,
100,
29899,
88,
299,
16644,
100,
8306,
64,
310,
14196,
833,
5087,
100,
2333,
299,
13362,
100,
700,
64,
310,
418,
1816,
3221,
88,
299,
20654,
64,
310,
466,
36770,
299,
2952,
64,
310,
37867,
85,
299,
3071,
64,
303,
339,
4054,
496,
1806,
303,
581,
910,
640,
9035,
365,
320,
310,
461,
37867,
85,
64,
303,
339,
465,
496,
1806,
303,
581,
910,
16389,
365,
320,
310,
461,
8920,
64,
303,
339,
465,
496,
1806,
303,
581,
910,
1197,
640,
7892,
365,
320,
310,
461,
418,
1816,
3221,
88,
64,
303,
339,
465,
496,
1806,
303,
581,
648,
640,
28775,
8560,
365,
320,
310,
461,
14369,
24008,
100,
29899,
88,
64,
303,
339,
465,
496,
1806,
303,
581,
32825,
638,
12519,
638,
365,
320,
310,
461,
14196,
833,
5087,
100,
2333,
64,
303,
339,
465,
496,
1806,
303,
581,
910,
640,
7052,
365,
320,
310,
461,
762,
64,
303,
339,
465,
496,
1806,
303,
581,
5730,
1582,
38791,
365,
320,
310,
461,
466,
36770,
64,
303,
339,
465,
496,
1806,
303,
581,
1922,
5755,
45,
4370,
5305,
49,
5730,
10455,
7056,
49,
910,
1197,
2194,
46,
320,
310,
461,
920,
64,
303,
339,
222,
130,
222
] | [
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
]
] | 336 | true | 65.226481 | true | true |
JavaClassFactory.java | /FileExtraction/Java_unseen/nextbreakpoint_nextfractal/com.nextbreakpoint.nextfractal.mandelbrot/src/main/java/com/nextbreakpoint/nextfractal/mandelbrot/dsl/javacompiler/JavaClassFactory.java | /*
* NextFractal 2.1.5
* https://github.com/nextbreakpoint/nextfractal
*
* Copyright 2015-2024 Andrea Medeghini
*
* This file is part of NextFractal.
*
* NextFractal is an application for creating fractals and other graphics artifacts.
*
* NextFractal is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* NextFractal is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with NextFractal. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.nextbreakpoint.nextfractal.mandelbrot.dsl.javacompiler;
import com.nextbreakpoint.nextfractal.mandelbrot.dsl.ClassFactory;
import java.lang.reflect.InvocationTargetException;
public class JavaClassFactory<T> implements ClassFactory<T> {
private Class<T> clazz;
public JavaClassFactory(Class<T> clazz) {
this.clazz = clazz;
}
public T create() throws InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetException {
if (clazz == null) {
return null;
}
return clazz.getDeclaredConstructor().newInstance();
}
}
| 1,473 | Java | .java | nextbreakpoint/nextfractal | 16 | 6 | 1 | 2015-04-10T09:21:42Z | 2024-05-07T17:28:46Z | c92726b8afbe54e1028eb83bd74de9ce0e663ea27d84d9f7a60e1a99f1f8826e | [] | [
1127,
222,
338,
11006,
6089,
555,
298,
244,
55,
51,
54,
51,
58,
222,
338,
1698,
574,
951,
51,
527,
52,
1995,
42298,
52,
1995,
37953,
298,
222,
338,
222,
338,
2657,
244,
55,
53,
54,
58,
50,
55,
53,
55,
57,
4262,
25706,
3130,
305,
3165,
5942,
222,
338,
222,
338,
1369,
822,
458,
1760,
451,
11006,
6089,
555,
298,
51,
222,
338,
222,
338,
11006,
6089,
555,
298,
458,
619,
3039,
456,
6913,
4953,
555,
3561,
480,
1623,
18343,
21419,
51,
222,
338,
222,
338,
11006,
6089,
555,
298,
458,
3760,
2951,
63,
863,
902,
14081,
580,
480,
52,
290,
5370,
222,
338,
580,
1549,
341,
5974,
451,
341,
6994,
6153,
5062,
1196,
641,
9582,
829,
222,
338,
341,
7834,
3870,
7120,
49,
3173,
1522,
244,
56,
451,
341,
1196,
49,
575,
222,
338,
327,
288,
1390,
2489,
46,
1364,
6146,
1522,
51,
222,
338,
222,
338,
11006,
6089,
555,
298,
458,
2744,
347,
341,
9850,
708,
580,
1118,
545,
6386,
49,
222,
338,
1294,
4213,
2979,
9345,
64,
2895,
4462,
341,
4506,
14319,
451,
222,
338,
7934,
575,
8114,
4800,
418,
7848,
7763,
51,
244,
2819,
341,
222,
338,
6994,
6153,
5062,
1196,
456,
1851,
4261,
51,
222,
338,
222,
338,
2469,
1414,
1178,
6589,
331,
1948,
451,
341,
6994,
6153,
5062,
1196,
222,
338,
7979,
642,
11006,
6089,
555,
298,
51,
244,
1691,
666,
49,
2337,
350,
544,
574,
1516,
51,
10627,
51,
1107,
52,
4205,
28699,
222,
338,
222,
588,
222,
1337,
785,
51,
1995,
42298,
51,
1995,
37953,
298,
51,
1607,
4066,
103,
5363,
51,
23342,
51,
32575,
611,
3113,
64,
222,
222,
485,
785,
51,
1995,
42298,
51,
1995,
37953,
298,
51,
1607,
4066,
103,
5363,
51,
23342,
51,
1359,
2232,
64,
222,
222,
485,
1401,
51,
1600,
51,
9069,
51,
13777,
40534,
64,
222,
222,
942,
462,
4957,
1359,
2232,
65,
89,
67,
4584,
1727,
2232,
65,
89,
67,
320,
222,
221,
2072,
1727,
65,
89,
67,
16486,
64,
499,
221,
942,
4957,
1359,
2232,
45,
1359,
65,
89,
67,
16486,
46,
320,
376,
221,
597,
51,
20946,
299,
16486,
64,
222,
221,
130,
3038,
221,
942,
413,
1506,
365,
2589,
42030,
387,
1002,
49,
8961,
27123,
49,
27721,
1885,
1002,
49,
39641,
40534,
320,
376,
221,
344,
327,
20946,
630,
762,
46,
320,
374,
221,
620,
762,
64,
376,
221,
130,
376,
221,
620,
16486,
51,
36823,
7935,
941,
20237,
492,
222,
221,
130,
222,
130,
222
] | [
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
]
] | 406 | true | 75.424304 | true | true |
GlobalContext.java | /FileExtraction/Java_unseen/IMS-MAXIMS_openMAXIMS/Source Library/openmaxims_workspace/Scheduling/src/ims/scheduling/forms/linkedappointmentssummary/GlobalContext.java | //#############################################################################
//# #
//# Copyright (C) <2015> <IMS MAXIMS> #
//# #
//# This program is free software: you can redistribute it and/or modify #
//# it under the terms of the GNU Affero General Public License as #
//# published by the Free Software Foundation, either version 3 of the #
//# License, or (at your option) any later version. #
//# #
//# This program is distributed in the hope that it will be useful, #
//# but WITHOUT ANY WARRANTY; without even the implied warranty of #
//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
//# GNU Affero General Public License for more details. #
//# #
//# You should have received a copy of the GNU Affero General Public License #
//# along with this program. If not, see <http://www.gnu.org/licenses/>. #
//# #
//# IMS MAXIMS provides absolutely NO GUARANTEE OF THE CLINICAL SAFTEY of #
//# this program. Users of this software do so entirely at their own risk. #
//# IMS MAXIMS only ensures the Clinical Safety of unaltered run-time #
//# software that it builds, deploys and maintains. #
//# #
//#############################################################################
//#EOH
// This code was generated by Barbara Worwood using IMS Development Environment (version 1.80 build 5589.25814)
// Copyright (C) 1995-2015 IMS MAXIMS. All rights reserved.
// WARNING: DO NOT MODIFY the content of this file
package ims.scheduling.forms.linkedappointmentssummary;
import java.io.Serializable;
public final class GlobalContext extends ims.framework.FormContext implements Serializable
{
private static final long serialVersionUID = 1L;
public GlobalContext(ims.framework.Context context)
{
super(context);
Core = new CoreContext(context);
}
public final class CoreContext implements Serializable
{
private static final long serialVersionUID = 1L;
private CoreContext(ims.framework.Context context)
{
this.context = context;
}
public boolean getPatientShortIsNotNull()
{
return !cx_CorePatientShort.getValueIsNull(context);
}
public ims.core.vo.PatientShort getPatientShort()
{
return (ims.core.vo.PatientShort)cx_CorePatientShort.getValue(context);
}
private ims.framework.ContextVariable cx_CorePatientShort = new ims.framework.ContextVariable("Core.PatientShort", "_cvp_Core.PatientShort");
private ims.framework.Context context;
}
public CoreContext Core;
}
| 3,147 | Java | .java | IMS-MAXIMS/openMAXIMS | 61 | 50 | 23 | 2014-06-12T12:04:02Z | 2020-07-31T09:34:49Z | 9d7b92e9aa74cc5261e1874e06154f1345e7660d69c2cdf2c10b4d97d4aecd22 | [] | [
325,
19989,
8689,
222,
16802,
42053,
607,
222,
16802,
244,
2657,
327,
72,
46,
350,
55,
53,
54,
58,
67,
244,
350,
2348,
88,
7490,
2348,
88,
67,
22768,
607,
222,
16802,
42053,
607,
222,
16802,
244,
1369,
3477,
458,
3760,
2951,
63,
863,
902,
14081,
580,
480,
52,
290,
5370,
281,
607,
222,
16802,
244,
580,
1549,
341,
5974,
451,
341,
6994,
30994,
6153,
5062,
1196,
641,
2281,
607,
222,
16802,
244,
9582,
829,
341,
7834,
3870,
7120,
49,
3173,
1522,
244,
56,
451,
341,
981,
607,
222,
16802,
244,
1196,
49,
575,
327,
288,
1390,
2489,
46,
1364,
6146,
1522,
51,
10094,
607,
244,
222,
16802,
42053,
607,
222,
16802,
244,
1369,
3477,
458,
2744,
347,
341,
9850,
708,
580,
1118,
545,
6386,
49,
2052,
607,
222,
16802,
244,
1294,
4213,
2979,
9345,
64,
2895,
4462,
341,
4506,
14319,
451,
2281,
607,
222,
16802,
244,
7934,
575,
8114,
4800,
418,
7848,
7763,
51,
244,
2819,
341,
1485,
607,
222,
16802,
244,
6994,
30994,
6153,
5062,
1196,
456,
1851,
4261,
51,
7223,
607,
222,
16802,
42053,
607,
222,
16802,
244,
2469,
1414,
1178,
6589,
331,
1948,
451,
341,
6994,
30994,
6153,
5062,
1196,
607,
222,
16802,
244,
7979,
642,
477,
3477,
51,
244,
1691,
666,
49,
2337,
350,
544,
574,
1516,
51,
10627,
51,
1107,
52,
4205,
28699,
283,
607,
222,
16802,
42053,
607,
222,
16802,
244,
457,
2758,
7490,
2348,
88,
7388,
39501,
4452,
26147,
802,
946,
1731,
74,
2258,
2906,
5052,
540,
12634,
377,
5999,
1731,
94,
451,
283,
607,
222,
16802,
244,
477,
3477,
51,
244,
14213,
451,
477,
2951,
764,
1278,
22793,
840,
3641,
4387,
19916,
51,
244,
607,
222,
16802,
244,
457,
2758,
7490,
2348,
88,
1773,
26085,
341,
409,
1823,
1599,
377,
21778,
451,
725,
17776,
337,
1441,
50,
1021,
370,
607,
222,
16802,
244,
2951,
708,
580,
13968,
49,
428,
44513,
480,
48573,
51,
10094,
607,
222,
16802,
42053,
607,
222,
325,
19989,
8689,
222,
16802,
10207,
77,
222,
325,
1369,
1361,
1616,
4741,
829,
11489,
39305,
643,
290,
21100,
1493,
457,
2758,
15606,
10584,
327,
1687,
244,
54,
51,
61,
53,
1984,
244,
58,
58,
61,
62,
51,
55,
58,
61,
54,
57,
46,
222,
325,
2657,
327,
72,
46,
244,
54,
62,
62,
58,
50,
55,
53,
54,
58,
457,
2758,
7490,
2348,
88,
51,
3381,
4760,
5225,
51,
222,
325,
18226,
63,
4103,
2387,
24110,
341,
1813,
451,
477,
822,
222,
222,
1337,
3987,
120,
51,
42976,
51,
8543,
51,
11137,
30513,
441,
397,
1077,
64,
222,
222,
485,
1401,
51,
735,
51,
12644,
64,
222,
222,
942,
1175,
462,
6566,
1237,
2041,
3987,
120,
51,
2863,
51,
1260,
1237,
4584,
19182,
222,
128,
222,
221,
2072,
924,
1175,
1964,
19896,
299,
244,
54,
81,
64,
499,
221,
942,
6566,
1237,
45,
16178,
51,
2863,
51,
1237,
1637,
46,
222,
221,
128,
376,
221,
5282,
45,
1834,
312,
1332,
221,
2869,
299,
556,
7357,
1237,
45,
1834,
312,
222,
221,
130,
222,
221,
942,
1175,
462,
7357,
1237,
4584,
19182,
222,
221,
128,
376,
221,
2072,
924,
1175,
1964,
19896,
299,
244,
54,
81,
64,
1332,
221,
2072,
7357,
1237,
45,
16178,
51,
2863,
51,
1237,
1637,
46,
376,
221,
128,
374,
221,
597,
51,
1834,
299,
1637,
64,
1332,
221,
130,
1332,
221,
942,
1922,
640,
18754,
6881,
25183,
365,
376,
221,
128,
374,
221,
620,
673,
10009,
100,
2869,
18754,
6881,
51,
6693,
10418,
45,
1834,
312,
376,
221,
130,
376,
221,
942,
3987,
120,
51,
1284,
51,
2103,
51,
18754,
6881,
640,
18754,
6881,
365,
376,
221,
128,
374,
221,
620,
327,
16178,
51,
1284,
51,
2103,
51,
18754,
6881,
46,
10009,
100,
2869,
18754,
6881,
51,
6693,
45,
1834,
312,
376,
221,
130,
1332,
221,
2072,
3987,
120,
51,
2863,
51,
1237,
3836,
15746,
100,
2869,
18754,
6881,
299,
556,
3987,
120,
51,
2863,
51,
1237,
3836,
459,
2869,
51,
18754,
6881,
411,
7302,
4167,
117,
100,
2869,
51,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
]
] | 681 | true | 54.140955 | true | true |
End of preview. Expand
in Dataset Viewer.
README.md exists but content is empty.
Use the Edit dataset card button to edit it.
- Downloads last month
- 3