id int64 22 34.9k | original_code stringlengths 31 107k | code_wo_comment stringlengths 29 77.3k | cleancode stringlengths 25 62.1k | repo stringlengths 6 65 | label listlengths 4 4 |
|---|---|---|---|---|---|
24,576 | private void addEntriesToMainManifest(Manifest manifest) {
Attributes attrs = manifest.getMainAttributes();
// If a manifest doesn't have a version, the other attributes won't get written out. Lame.
attrs.put(Attributes.Name.MANIFEST_VERSION, new Date().toString());
for (Map.Entry<Attributes.Name, Stri... | private void addEntriesToMainManifest(Manifest manifest) {
Attributes attrs = manifest.getMainAttributes();
attrs.put(Attributes.Name.MANIFEST_VERSION, new Date().toString());
for (Map.Entry<Attributes.Name, String> entry : this.manifestEntries.entrySet()) {
attrs.put(entry.getKey(), entry.getValu... | private void addentriestomainmanifest(manifest manifest) { attributes attrs = manifest.getmainattributes(); attrs.put(attributes.name.manifest_version, new date().tostring()); for (map.entry<attributes.name, string> entry : this.manifestentries.entryset()) { attrs.put(entry.getkey(), entry.getvalue()); } } | DavidWhitlock/PortlandStateJava | [
0,
0,
1,
0
] |
32,849 | private boolean isTelLenthLegal(String tel) {
//TODO: Replace this with your own logic
return tel.length() == 11;
} | private boolean isTelLenthLegal(String tel) {
return tel.length() == 11;
} | private boolean istellenthlegal(string tel) { return tel.length() == 11; } | Asucanc/FishMail | [
0,
1,
0,
0
] |
32,850 | private boolean isEmailValid(String email) {
//TODO: Replace this with your own logic
return email.contains("@")&&email.contains(".");
} | private boolean isEmailValid(String email) {
return email.contains("@")&&email.contains(".");
} | private boolean isemailvalid(string email) { return email.contains("@")&&email.contains("."); } | Asucanc/FishMail | [
0,
1,
0,
0
] |
85 | public HistoryItemActionModulesBuilder addModuleForVoiceCall() {
if (moduleInfo.getIsBlocked()) {
return this;
}
// TODO(zachh): Support post-dial digits; consider using DialerPhoneNumber.
// Do not set PhoneAccountHandle so that regular PreCall logic will be used. The account used to
// place... | public HistoryItemActionModulesBuilder addModuleForVoiceCall() {
if (moduleInfo.getIsBlocked()) {
return this;
}
CallIntentBuilder callIntentBuilder =
new CallIntentBuilder(moduleInfo.getNormalizedNumber(), getCallInitiationType())
.setAllowAssistedDial(moduleInfo.getCa... | public historyitemactionmodulesbuilder addmoduleforvoicecall() { if (moduleinfo.getisblocked()) { return this; } callintentbuilder callintentbuilder = new callintentbuilder(moduleinfo.getnormalizednumber(), getcallinitiationtype()) .setallowassisteddial(moduleinfo.getcansupportassisteddialing()); modules.add(intentmodu... | DerpGang/packages_apps_Dialer | [
0,
1,
0,
0
] |
16,486 | public static void main(String[] args) throws IOException, ClassNotFoundException, InterruptedException {
if(args.length != 4) {
System.out.print("args should be 2 : <inputpath> <outpath> <number of centroids> <dimensions> .") ;
System.exit(-1);
}
int k = Integer.valueOf(args[2]) ;
int dim = Integer.value... | public static void main(String[] args) throws IOException, ClassNotFoundException, InterruptedException {
if(args.length != 4) {
System.out.print("args should be 2 : <inputpath> <outpath> <number of centroids> <dimensions> .") ;
System.exit(-1);
}
int k = Integer.valueOf(args[2]) ;
int dim = Integer.value... | public static void main(string[] args) throws ioexception, classnotfoundexception, interruptedexception { if(args.length != 4) { system.out.print("args should be 2 : <inputpath> <outpath> <number of centroids> <dimensions> .") ; system.exit(-1); } int k = integer.valueof(args[2]) ; int dim = integer.valueof(args[3]) ; ... | AmrHendy/K-Means | [
0,
1,
0,
0
] |
32,941 | protected long dynamicCountFromUserValue( XTCENamedObject item, String form ) {
// this can probably work on contentValues_
String paramFullPath = item.getFullPath();
for ( XTCEContainerContentEntry entry : contentList_ ) {
if ( ( entry.getEntryType() != FieldType.PARAMETER ) &&
... | protected long dynamicCountFromUserValue( XTCENamedObject item, String form ) {
String paramFullPath = item.getFullPath();
for ( XTCEContainerContentEntry entry : contentList_ ) {
if ( ( entry.getEntryType() != FieldType.PARAMETER ) &&
( entry.getEntryType() != Field... | protected long dynamiccountfromuservalue( xtcenamedobject item, string form ) { string paramfullpath = item.getfullpath(); for ( xtcecontainercontententry entry : contentlist_ ) { if ( ( entry.getentrytype() != fieldtype.parameter ) && ( entry.getentrytype() != fieldtype.argument ) ) { continue; } xtcecontainerentryval... | CesarCoelho/xtcetools | [
1,
0,
0,
0
] |
32,983 | private static void registerFluids(BlockRegistry blockRegistry) {
// TODO Adjust properties
Fluid steam = new Fluid("steam", new ResourceLocation(SteamAgeRevolution.MODID, "fluids/steam"),
new ResourceLocation(SteamAgeRevolution.MODID, "fluids/steam_flow")).setGaseous(true)
... | private static void registerFluids(BlockRegistry blockRegistry) {
Fluid steam = new Fluid("steam", new ResourceLocation(SteamAgeRevolution.MODID, "fluids/steam"),
new ResourceLocation(SteamAgeRevolution.MODID, "fluids/steam_flow")).setGaseous(true)
.setTemperature... | private static void registerfluids(blockregistry blockregistry) { fluid steam = new fluid("steam", new resourcelocation(steamagerevolution.modid, "fluids/steam"), new resourcelocation(steamagerevolution.modid, "fluids/steam_flow")).setgaseous(true) .settemperature(1000).setviscosity(200); if(!(fluidregistry.isfluidregi... | BrassGoggledCoders/SteamAgeRevolution | [
1,
1,
0,
0
] |
33,071 | @Test void testUnquotedBuiltInFunctionNames() {
// TODO: Once Oracle is an officially supported dialect, this test
// should be moved to OracleValidatorTest.java.
final Sql oracle = sql("?")
.withUnquotedCasing(Casing.TO_UPPER)
.withCaseSensitive(true);
// Built-in functions are always c... | @Test void testUnquotedBuiltInFunctionNames() {
final Sql oracle = sql("?")
.withUnquotedCasing(Casing.TO_UPPER)
.withCaseSensitive(true);
oracle.sql("select count(*), sum(deptno), floor(2.5) from dept").ok();
oracle.sql("select COUNT(*), FLOOR(2.5) from dept").ok();
oracle.s... | @test void testunquotedbuiltinfunctionnames() { final sql oracle = sql("?") .withunquotedcasing(casing.to_upper) .withcasesensitive(true); oracle.sql("select count(*), sum(deptno), floor(2.5) from dept").ok(); oracle.sql("select count(*), floor(2.5) from dept").ok(); oracle.sql("select count(*), floor(2.5) from dept").... | AndrewPochapsky/calcite | [
0,
0,
0,
1
] |
8,635 | private void tryConnectToIPv6() throws Exception {
Collection<Inet6Address> possibleInetAddresses = AddressUtil
.getPossibleInetAddressesFor((Inet6Address) address.getInetAddress());
Level level = silent ? Level.FINEST : Level.INFO;
//TODO: collection.toString() w... | private void tryConnectToIPv6() throws Exception {
Collection<Inet6Address> possibleInetAddresses = AddressUtil
.getPossibleInetAddressesFor((Inet6Address) address.getInetAddress());
Level level = silent ? Level.FINEST : Level.INFO;
if (logger.isLoggab... | private void tryconnecttoipv6() throws exception { collection<inet6address> possibleinetaddresses = addressutil .getpossibleinetaddressesfor((inet6address) address.getinetaddress()); level level = silent ? level.finest : level.info; if (logger.isloggable(level)) { logger.log(level, "trying to connect possible ipv6 addr... | HugeOrangeDev/hazelcast | [
0,
0,
1,
0
] |
33,242 | public @NotNull FramedPacket retrieve() {
if (!PacketUtils.CACHED_PACKET) {
// TODO: Using a local buffer may be possible
return PacketUtils.allocateTrimmedPacket(packet());
}
SoftReference<FramedPacket> ref;
FramedPacket cache;
if (updated == 0 ||
... | public @NotNull FramedPacket retrieve() {
if (!PacketUtils.CACHED_PACKET) {
return PacketUtils.allocateTrimmedPacket(packet());
}
SoftReference<FramedPacket> ref;
FramedPacket cache;
if (updated == 0 ||
((ref = packet) == null ||
... | public @notnull framedpacket retrieve() { if (!packetutils.cached_packet) { return packetutils.allocatetrimmedpacket(packet()); } softreference<framedpacket> ref; framedpacket cache; if (updated == 0 || ((ref = packet) == null || (cache = ref.get()) == null)) { cache = packetutils.allocatetrimmedpacket(packet()); this.... | Avinesia-Union/Minestom | [
1,
0,
0,
0
] |
25,149 | @Override
@JRubyMethod(name = "===")
public RubyBoolean op_eqq(ThreadContext context, IRubyObject obj) {
// maybe we could handle java.lang === java.lang.reflect as well ?
return context.runtime.newBoolean(obj == this || isInstance(obj));
} | @Override
@JRubyMethod(name = "===")
public RubyBoolean op_eqq(ThreadContext context, IRubyObject obj) {
return context.runtime.newBoolean(obj == this || isInstance(obj));
} | @override @jrubymethod(name = "===") public rubyboolean op_eqq(threadcontext context, irubyobject obj) { return context.runtime.newboolean(obj == this || isinstance(obj)); } | DJRickyB/jruby | [
1,
0,
0,
0
] |
25,166 | @Test
public void testCEV() {
int timeSteps = 200;// TODO why is this working with so few steps?
int priceSteps = 100;
double lowerMoneyness = 0.3; // Not working well for ITM calls
double upperMoneyness = 3.0;
double volTol = 5e-3;
boolean print = false; // set to false before pushing
TES... | @Test
public void testCEV() {
int timeSteps = 200
int priceSteps = 100;
double lowerMoneyness = 0.3;
double upperMoneyness = 3.0;
double volTol = 5e-3;
boolean print = false;
TESTER.testCEV(SOLVER, timeSteps, priceSteps, lowerMoneyness, upperMoneyness, volTol, print);
} | @test public void testcev() { int timesteps = 200 int pricesteps = 100; double lowermoneyness = 0.3; double uppermoneyness = 3.0; double voltol = 5e-3; boolean print = false; tester.testcev(solver, timesteps, pricesteps, lowermoneyness, uppermoneyness, voltol, print); } | Incapture/OG-Platform | [
1,
0,
1,
0
] |
8,849 | private static boolean performCalculationS2(int srcX, int srcY, RouteStrategy strategy) {
return performCalculationSX(srcX, srcY, 2, strategy); // TODO optimized algorhytm's.
} | private static boolean performCalculationS2(int srcX, int srcY, RouteStrategy strategy) {
return performCalculationSX(srcX, srcY, 2, strategy);
} | private static boolean performcalculations2(int srcx, int srcy, routestrategy strategy) { return performcalculationsx(srcx, srcy, 2, strategy); } | CSS-Lletya/open633 | [
1,
0,
0,
0
] |
25,271 | public void addQualifNoDip() throws IOException {
if (isValidIndCursus(QualifNonDiplomante.class, true)) {
// on transforme le commentaire pour corriger les caractères spéciaux
pojoQualif.getCursus().setComment(pojoQualif.getCursus().getComment());
//TODO: Fix this !!
// o... | public void addQualifNoDip() throws IOException {
if (isValidIndCursus(QualifNonDiplomante.class, true)) {
pojoQualif.getCursus().setComment(pojoQualif.getCursus().getComment());
if (actionEnum.getWhatAction().equals(ActionEnum.UPDATE_ACTION)) {
... | public void addqualifnodip() throws ioexception { if (isvalidindcursus(qualifnondiplomante.class, true)) { pojoqualif.getcursus().setcomment(pojoqualif.getcursus().getcomment()); if (actionenum.getwhataction().equals(actionenum.update_action)) { addonecursus(getcurrentind().getindividu(), pojoqualif.getcursus()); getcu... | EsupPortail/esup-opi | [
0,
0,
1,
0
] |
25,270 | public void addCursusPro() throws IOException {
if (isValidIndCursus(CursusPro.class, true)) {
// on transforme le commentaire pour corriger les caractères spéciaux
indCursusPojo.getCursus().setComment(indCursusPojo.getCursus().getComment());
//TODO: Fix this !!
// org.esu... | public void addCursusPro() throws IOException {
if (isValidIndCursus(CursusPro.class, true)) {
indCursusPojo.getCursus().setComment(indCursusPojo.getCursus().getComment());
if (actionEnum.getWhatAction().equals(ActionEnum.UPDATE_ACTION)) {
... | public void addcursuspro() throws ioexception { if (isvalidindcursus(cursuspro.class, true)) { indcursuspojo.getcursus().setcomment(indcursuspojo.getcursus().getcomment()); if (actionenum.getwhataction().equals(actionenum.update_action)) { addonecursus(getcurrentind().getindividu(), indcursuspojo.getcursus()); getcurre... | EsupPortail/esup-opi | [
0,
0,
1,
0
] |
17,130 | @Override
public void updateTask()
{
double distanceFromTarget = this.host.getDistanceSq(host.getAttackTarget().posX, host.getAttackTarget().boundingBox.minY, host.getAttackTarget().posZ);
boolean canSeeTarget = true; //this.host.getEntitySenses().canSee(this.attackTarget);
if (canSeeTar... | @Override
public void updateTask()
{
double distanceFromTarget = this.host.getDistanceSq(host.getAttackTarget().posX, host.getAttackTarget().boundingBox.minY, host.getAttackTarget().posZ);
boolean canSeeTarget = true;
if (canSeeTarget)
{
++this.targetTimeLost;
... | @override public void updatetask() { double distancefromtarget = this.host.getdistancesq(host.getattacktarget().posx, host.getattacktarget().boundingbox.miny, host.getattacktarget().posz); boolean canseetarget = true; if (canseetarget) { ++this.targettimelost; } else { this.targettimelost = 0; } if (distancefromtarget ... | DarkGuardsman/Artillects | [
1,
0,
0,
0
] |
17,208 | protected void runOperations(String directoryPath, UseCase useCase) throws IOException {
log.info(System.lineSeparator() +
"================================================" + System.lineSeparator() +
" ____ ____________________ ____" + System.lineSeparator() +
" / \\ / __|__ ... | protected void runOperations(String directoryPath, UseCase useCase) throws IOException {
log.info(System.lineSeparator() +
"================================================" + System.lineSeparator() +
" ____ ____________________ ____" + System.lineSeparator() +
" / \\ / __|__ ... | protected void runoperations(string directorypath, usecase usecase) throws ioexception { log.info(system.lineseparator() + "================================================" + system.lineseparator() + " ____ ____________________ ____" + system.lineseparator() + " / \\ / __|__ __| _ \\ / \\" + system.lineseparator() + "... | Arraying/astra | [
1,
0,
0,
0
] |
25,405 | public static FragmentHostManager get(View view) {
try {
return Dependency.get(FragmentService.class).getFragmentHostManager(view);
} catch (ClassCastException e) {
// TODO: Some auto handling here?
throw e;
}
} | public static FragmentHostManager get(View view) {
try {
return Dependency.get(FragmentService.class).getFragmentHostManager(view);
} catch (ClassCastException e) {
throw e;
}
} | public static fragmenthostmanager get(view view) { try { return dependency.get(fragmentservice.class).getfragmenthostmanager(view); } catch (classcastexception e) { throw e; } } | FrankKwok/Oreo | [
0,
1,
0,
0
] |
25,463 | public static void getText(Node node, StringBuilder sb) {
NodeList children = node.getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
Node child = children.item(i);
if (child.getNodeType() == Node.TEXT_NODE) {
sb.append(' '); // BUG: this is a hack
sb.append(child.getNodeValue().trim())... | public static void getText(Node node, StringBuilder sb) {
NodeList children = node.getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
Node child = children.item(i);
if (child.getNodeType() == Node.TEXT_NODE) {
sb.append(' ');
sb.append(child.getNodeValue().trim());
} else if (child.g... | public static void gettext(node node, stringbuilder sb) { nodelist children = node.getchildnodes(); for (int i = 0; i < children.getlength(); i++) { node child = children.item(i); if (child.getnodetype() == node.text_node) { sb.append(' '); sb.append(child.getnodevalue().trim()); } else if (child.getnodetype() == node.... | GoVivaceInc/SpeechPlugin | [
0,
0,
1,
0
] |
9,271 | private static String encodeComponent(String s, Charset charset) {
// TODO: Optimize me.
try {
return URLEncoder.encode(s, charset.name()).replace("+", "%20");
} catch (UnsupportedEncodingException ignored) {
throw new UnsupportedCharsetException(charset.name());
... | private static String encodeComponent(String s, Charset charset) {
try {
return URLEncoder.encode(s, charset.name()).replace("+", "%20");
} catch (UnsupportedEncodingException ignored) {
throw new UnsupportedCharsetException(charset.name());
}
} | private static string encodecomponent(string s, charset charset) { try { return urlencoder.encode(s, charset.name()).replace("+", "%20"); } catch (unsupportedencodingexception ignored) { throw new unsupportedcharsetexception(charset.name()); } } | AIPaaS/sky-walking | [
1,
0,
0,
0
] |
25,701 | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.queue_list, container, false);
//Instantiate Firebase objects
mDatabase = FirebaseDatabase.getInstance(); //ins... | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.queue_list, container, false);
mDatabase = FirebaseDatabase.getInstance();
mDepositQueueReference = mDa... | @override public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { view rootview = inflater.inflate(r.layout.queue_list, container, false); mdatabase = firebasedatabase.getinstance(); mdepositqueuereference = mdatabase.getreference("depositqueue"); queuelistview = rootview.fin... | HemlockBane/cashier-demo | [
0,
0,
0,
0
] |
25,731 | public static void symbols(PrintWriter out,
boolean emit_non_terms, boolean sym_interface)
{
terminal term;
non_terminal nt;
String class_or_interface = (sym_interface) ? "interface" : "class";
long start_time = System.currentTimeMillis();
/* top of file */
out.println();
out.println("//--------------... | public static void symbols(PrintWriter out,
boolean emit_non_terms, boolean sym_interface)
{
terminal term;
non_terminal nt;
String class_or_interface = (sym_interface) ? "interface" : "class";
long start_time = System.currentTimeMillis();
out.println();
out.println("//--------------------------------... | public static void symbols(printwriter out, boolean emit_non_terms, boolean sym_interface) { terminal term; non_terminal nt; string class_or_interface = (sym_interface) ? "interface" : "class"; long start_time = system.currenttimemillis(); out.println(); out.println("//--------------------------------------------------... | AsaiKen/phpscan | [
0,
0,
0,
0
] |
9,378 | private void transferData(RawPacket[] pkts)
{
for (int i = 0; i < pkts.length; i++)
{
RawPacket pkt = pkts[i];
pkts[i] = null;
if (pkt != null)
{
if (pkt.isInvalid())
{
/*
* Retur... | private void transferData(RawPacket[] pkts)
{
for (int i = 0; i < pkts.length; i++)
{
RawPacket pkt = pkts[i];
pkts[i] = null;
if (pkt != null)
{
if (pkt.isInvalid())
{
poolRawPack... | private void transferdata(rawpacket[] pkts) { for (int i = 0; i < pkts.length; i++) { rawpacket pkt = pkts[i]; pkts[i] = null; if (pkt != null) { if (pkt.isinvalid()) { poolrawpacket(pkt); } else { rawpacket oldpkt; synchronized (pktsyncroot) { oldpkt = this.pkt; this.pkt = pkt; } if (oldpkt != null) { poolrawpacket(ol... | GNUDimarik/libjitsi | [
1,
0,
0,
0
] |
34,098 | @Override
public void runOpMode() {
telemetry.addData("Status", "Initialized");
telemetry.update();
left_mtr = hardwareMap.dcMotor.get("left_mtr");
right_mtr = hardwareMap.dcMotor.get("right_mtr");
front_left_mtr = hardwareMap.dcMotor.get("front_left_mtr");
front_righ... | @Override
public void runOpMode() {
telemetry.addData("Status", "Initialized");
telemetry.update();
left_mtr = hardwareMap.dcMotor.get("left_mtr");
right_mtr = hardwareMap.dcMotor.get("right_mtr");
front_left_mtr = hardwareMap.dcMotor.get("front_left_mtr");
front_righ... | @override public void runopmode() { telemetry.adddata("status", "initialized"); telemetry.update(); left_mtr = hardwaremap.dcmotor.get("left_mtr"); right_mtr = hardwaremap.dcmotor.get("right_mtr"); front_left_mtr = hardwaremap.dcmotor.get("front_left_mtr"); front_right_mtr = hardwaremap.dcmotor.get("front_right_mtr"); ... | FTC16694/FtcRobotController | [
1,
1,
0,
0
] |
9,539 | private void filter() {
String text = DrugMappingStringUtilities.safeToUpperCase(searchField.getText());
if (text.length() == 0) {
rowSorter.setRowFilter(null);
}
else {
//TODO escape special characters
... | private void filter() {
String text = DrugMappingStringUtilities.safeToUpperCase(searchField.getText());
if (text.length() == 0) {
rowSorter.setRowFilter(null);
}
else {
rowSorter.setRowFilter(RowFil... | private void filter() { string text = drugmappingstringutilities.safetouppercase(searchfield.gettext()); if (text.length() == 0) { rowsorter.setrowfilter(null); } else { rowsorter.setrowfilter(rowfilter.regexfilter(text)); } if (rowsorter.getviewrowcount() == 0) { ingredientmappinglogpanel.removeall(); ingredientmappin... | EHDEN/DrugMapping | [
0,
1,
0,
0
] |
9,553 | public void move(double inches, double power) {
robotInstance.drivetrain.povDrive(power, 0);
} | public void move(double inches, double power) {
robotInstance.drivetrain.povDrive(power, 0);
} | public void move(double inches, double power) { robotinstance.drivetrain.povdrive(power, 0); } | Centennial-FTC-Robotics/Omnitech2021-22 | [
0,
1,
0,
0
] |
17,777 | public static ButtonType showAlert(AlertType type, String title, String text, boolean onTop) {
// NOTE: alert must be (re-)created everytime, otherwise the following HACK doesn't work!
Alert alert = new Alert(AlertType.NONE);
alert.setAlertType(type);
alert.setTitle(title);
alert... | public static ButtonType showAlert(AlertType type, String title, String text, boolean onTop) {
Alert alert = new Alert(AlertType.NONE);
alert.setAlertType(type);
alert.setTitle(title);
alert.setHeaderText(null);
alert.setContentText(text);
((Stage)... | public static buttontype showalert(alerttype type, string title, string text, boolean ontop) { alert alert = new alert(alerttype.none); alert.setalerttype(type); alert.settitle(title); alert.setheadertext(null); alert.setcontenttext(text); ((stage) alert.getdialogpane().getscene().getwindow()).setalwaysontop(ontop); re... | BerlinUnited/NaoTH | [
1,
0,
0,
0
] |
25,987 | @Override
public QueryProfileVariant clone() {
if (frozen) return this;
try {
QueryProfileVariant clone = (QueryProfileVariant)super.clone();
if (this.inherited != null)
clone.inherited = new ArrayList<>(this.inherited); // TODO: Deep clone is more correct, but pr... | @Override
public QueryProfileVariant clone() {
if (frozen) return this;
try {
QueryProfileVariant clone = (QueryProfileVariant)super.clone();
if (this.inherited != null)
clone.inherited = new ArrayList<>(this.inherited);
clone.values = CopyOnWriteConten... | @override public queryprofilevariant clone() { if (frozen) return this; try { queryprofilevariant clone = (queryprofilevariant)super.clone(); if (this.inherited != null) clone.inherited = new arraylist<>(this.inherited); clone.values = copyonwritecontent.deepclone(this.values); return clone; } catch (clonenotsupportede... | Anlon-Burke/vespa | [
1,
0,
0,
0
] |
9,614 | void loadUi(EmpSeries series) {
this.episodesCarouselAdapter = new EpisodesCarouselAdapter(this, series);
RecyclerView episodesCarousel = (RecyclerView) findViewById(R.id.carousel_series_items);
episodesCarousel.setAdapter(this.episodesCarouselAdapter);
LinearLayoutManager layoutManager ... | void loadUi(EmpSeries series) {
this.episodesCarouselAdapter = new EpisodesCarouselAdapter(this, series);
RecyclerView episodesCarousel = (RecyclerView) findViewById(R.id.carousel_series_items);
episodesCarousel.setAdapter(this.episodesCarouselAdapter);
LinearLayoutManager layoutManager ... | void loadui(empseries series) { this.episodescarouseladapter = new episodescarouseladapter(this, series); recyclerview episodescarousel = (recyclerview) findviewbyid(r.id.carousel_series_items); episodescarousel.setadapter(this.episodescarouseladapter); linearlayoutmanager layoutmanager = new linearlayoutmanager(this, ... | EricssonBroadcastServices/AndroidClientReferenceApp | [
0,
1,
0,
0
] |
17,865 | @Test(expected = AmazonClientException.class)
public void canBeConfiguredToOnlyRefreshCredentialsAfterFirstCallToGetCredentials() throws InterruptedException {
mockServer.setResponseFileName("sessionResponseExpired");
mockServer.setAvailableSecurityCredentials("test-credentials");
InstancePr... | @Test(expected = AmazonClientException.class)
public void canBeConfiguredToOnlyRefreshCredentialsAfterFirstCallToGetCredentials() throws InterruptedException {
mockServer.setResponseFileName("sessionResponseExpired");
mockServer.setAvailableSecurityCredentials("test-credentials");
InstancePr... | @test(expected = amazonclientexception.class) public void canbeconfiguredtoonlyrefreshcredentialsafterfirstcalltogetcredentials() throws interruptedexception { mockserver.setresponsefilename("sessionresponseexpired"); mockserver.setavailablesecuritycredentials("test-credentials"); instanceprofilecredentialsprovider cre... | IBM/ibm-cos-sdk-java | [
1,
0,
0,
0
] |
17,941 | @Override
public ExportResult<CalendarContainerResource> export(TokenAuthData authData) {
Request.Builder calendarsBuilder = getBuilder(baseUrl + CALENDARS_URL, authData);
List<CalendarModel> calendarModels = new ArrayList<>();
try (Response graphResponse = client.newCall(calendarsBuilder.bu... | @Override
public ExportResult<CalendarContainerResource> export(TokenAuthData authData) {
Request.Builder calendarsBuilder = getBuilder(baseUrl + CALENDARS_URL, authData);
List<CalendarModel> calendarModels = new ArrayList<>();
try (Response graphResponse = client.newCall(calendarsBuilder.bu... | @override public exportresult<calendarcontainerresource> export(tokenauthdata authdata) { request.builder calendarsbuilder = getbuilder(baseurl + calendars_url, authdata); list<calendarmodel> calendarmodels = new arraylist<>(); try (response graphresponse = client.newcall(calendarsbuilder.build()).execute()) { response... | 29e7e280-0d1c-4bba-98fe-f7cd3ca7500a/data-transfer-project | [
0,
0,
1,
0
] |
9,775 | public static void main(String[] args) {
File dir = new File(".");
Arrays.stream(dir.listFiles()).forEach(file -> {
try {
System.out.println(file.getCanonicalPath());
} catch (IOException e) {
throw new RuntimeException(e);
}
// Ouch, my fingers hurt! All this typing!
});
// TODO use Uncheck... | public static void main(String[] args) {
File dir = new File(".");
Arrays.stream(dir.listFiles()).forEach(file -> {
try {
System.out.println(file.getCanonicalPath());
} catch (IOException e) {
throw new RuntimeException(e);
}
});
Arrays.stream(dir.listFiles()).forEach(Unchecked.consumer(... | public static void main(string[] args) { file dir = new file("."); arrays.stream(dir.listfiles()).foreach(file -> { try { system.out.println(file.getcanonicalpath()); } catch (ioexception e) { throw new runtimeexception(e); } }); arrays.stream(dir.listfiles()).foreach(unchecked.consumer(file -> { system.out.println(fil... | AdrianaDinca/training | [
0,
0,
0,
0
] |
1,657 | public static String replaceAllIfNotInsideTag(String origStr, String findThis, String replaceWith) {
if (origStr == null) {
return null;
}
if (findThis == null) {
return origStr;
}
if (replaceWith == null) {
replaceWith = "";
}
StringBuilder result = new StringBuilder();
int index = origStr.ind... | public static String replaceAllIfNotInsideTag(String origStr, String findThis, String replaceWith) {
if (origStr == null) {
return null;
}
if (findThis == null) {
return origStr;
}
if (replaceWith == null) {
replaceWith = "";
}
StringBuilder result = new StringBuilder();
int index = origStr.ind... | public static string replaceallifnotinsidetag(string origstr, string findthis, string replacewith) { if (origstr == null) { return null; } if (findthis == null) { return origstr; } if (replacewith == null) { replacewith = ""; } stringbuilder result = new stringbuilder(); int index = origstr.indexof(findthis); while (in... | ASofterSpace/Toolbox-Java | [
1,
0,
0,
0
] |
1,659 | private static String addAfterLinesContainingEx(String origStr, String findThis, String addThat,
String eolMarker, boolean notInsideTag) {
if (origStr == null) {
return null;
}
if (findThis == null) {
return origStr;
}
if ((addThat == null) || "".equals(addThat)) {
return origStr;
}
if ((eolMar... | private static String addAfterLinesContainingEx(String origStr, String findThis, String addThat,
String eolMarker, boolean notInsideTag) {
if (origStr == null) {
return null;
}
if (findThis == null) {
return origStr;
}
if ((addThat == null) || "".equals(addThat)) {
return origStr;
}
if ((eolMar... | private static string addafterlinescontainingex(string origstr, string findthis, string addthat, string eolmarker, boolean notinsidetag) { if (origstr == null) { return null; } if (findthis == null) { return origstr; } if ((addthat == null) || "".equals(addthat)) { return origstr; } if ((eolmarker == null) || "".equals... | ASofterSpace/Toolbox-Java | [
1,
0,
0,
0
] |
9,929 | @Nullable
public String getPartitionColumn() {
return _partitionColumn;
} | @Nullable
public String getPartitionColumn() {
return _partitionColumn;
} | @nullable public string getpartitioncolumn() { return _partitioncolumn; } | HoraceChoi95/incubator-pinot | [
0,
1,
0,
0
] |
10,010 | static GeoPolygon generateGeoPolygon(final PlanetModel planetModel,
final List<GeoPoint> filteredPointList,
final List<GeoPolygon> holes,
final GeoPoint testPoint,
final boolean testPointInside) {
// We will be trying twice to find the right GeoPolygon, using alternate siding choices for the first ... | static GeoPolygon generateGeoPolygon(final PlanetModel planetModel,
final List<GeoPoint> filteredPointList,
final List<GeoPolygon> holes,
final GeoPoint testPoint,
final boolean testPointInside) {
final SidedPlane initialPlane = new SidedPlane(testPoint, filteredPointList.get(0), filter... | static geopolygon generategeopolygon(final planetmodel planetmodel, final list<geopoint> filteredpointlist, final list<geopolygon> holes, final geopoint testpoint, final boolean testpointinside) { final sidedplane initialplane = new sidedplane(testpoint, filteredpointlist.get(0), filteredpointlist.get(1)); geocomposite... | AliGhaff/testLucene | [
1,
0,
0,
0
] |
10,073 | public void setMessageContent(byte[] content, boolean strict, boolean computeContentLength, int givenLength)
throws ParseException {
// Note that that this could be a double byte character
// set - bug report by Masafumi Watanabe
computeContentLength(content);
if ((!computeCo... | public void setMessageContent(byte[] content, boolean strict, boolean computeContentLength, int givenLength)
throws ParseException {
computeContentLength(content);
if ((!computeContentLength)) {
if ((!strict && this.contentLengthHeader.getContentLength() != givenL... | public void setmessagecontent(byte[] content, boolean strict, boolean computecontentlength, int givenlength) throws parseexception { computecontentlength(content); if ((!computecontentlength)) { if ((!strict && this.contentlengthheader.getcontentlength() != givenlength) || this.contentlengthheader.getcontentlength() < ... | E-C-Group/jsip | [
0,
0,
1,
0
] |
2,275 | void doJob() {
//mRenderThread = new RenderThread(getResources(), surface, v);
//init
final TextureView tv = (TextureView) findViewById(R.id.textureView1);
SurfaceTexture surface = tv.getSurfaceTexture();
TexSurfaceRenderTarget rt = new TexSurfaceRenderTarget();
View view = getWindow().getDecorView();
rt.... | void doJob() {
final TextureView tv = (TextureView) findViewById(R.id.textureView1);
SurfaceTexture surface = tv.getSurfaceTexture();
TexSurfaceRenderTarget rt = new TexSurfaceRenderTarget();
View view = getWindow().getDecorView();
rt.init(surface);
rt.begin();
int[] buf = new int[1];
glGenTextures(... | void dojob() { final textureview tv = (textureview) findviewbyid(r.id.textureview1); surfacetexture surface = tv.getsurfacetexture(); texsurfacerendertarget rt = new texsurfacerendertarget(); view view = getwindow().getdecorview(); rt.init(surface); rt.begin(); int[] buf = new int[1]; glgentextures(1, buf, 0); int texn... | ChGen/AndroidGpuGraphicsTest | [
0,
1,
0,
0
] |
18,664 | @Test
public void shouldAddNullSubprojectIfProjectIsDefined() throws IOException {
Event event = EventBuilder.create(0, "11203800-63fd-11e8-83e2-3a587d902000").
tag("description", Variant.ofString("This is the annotation")).
tag("tags", Variant.ofVector(Vector.ofContainers(
... | @Test
public void shouldAddNullSubprojectIfProjectIsDefined() throws IOException {
Event event = EventBuilder.create(0, "11203800-63fd-11e8-83e2-3a587d902000").
tag("description", Variant.ofString("This is the annotation")).
tag("tags", Variant.ofVector(Vector.ofContainers(
... | @test public void shouldaddnullsubprojectifprojectisdefined() throws ioexception { event event = eventbuilder.create(0, "11203800-63fd-11e8-83e2-3a587d902000"). tag("description", variant.ofstring("this is the annotation")). tag("tags", variant.ofvector(vector.ofcontainers( container.builder().tag("key", variant.ofstri... | InHavk/hercules | [
1,
0,
0,
0
] |
18,794 | @Test
public void test() {
ChatDirector chatDirector = new ChatDirector(new File(
this.getClass().getClassLoader().getResource("modules/common/config.yml").getFile()));
assertTrue(chatDirector.load());
// Checking Chain metrics
... | @Test
public void test() {
ChatDirector chatDirector = new ChatDirector(new File(
this.getClass().getClassLoader().getResource("modules/common/config.yml").getFile()));
assertTrue(chatDirector.load());
assertTrue(cha... | @test public void test() { chatdirector chatdirector = new chatdirector(new file( this.getclass().getclassloader().getresource("modules/common/config.yml").getfile())); asserttrue(chatdirector.load()); asserttrue(chatdirector.getchains().size() == 5); asserttrue(chatdirector.getchains().containskey("loading-test")); as... | AtomicPulsee/ChatDirector | [
1,
0,
0,
0
] |
18,795 | @Override
public void initialize(URL location, ResourceBundle resources) {
// load the quiz
for (Question question : quiz.questions) {
questionsList.getItems().add(question.title);
}
populateView();
questionTextField.setOnKeyReleased(e -> {
questionsLi... | @Override
public void initialize(URL location, ResourceBundle resources) {
for (Question question : quiz.questions) {
questionsList.getItems().add(question.title);
}
populateView();
questionTextField.setOnKeyReleased(e -> {
questionsList.getItems().set... | @override public void initialize(url location, resourcebundle resources) { for (question question : quiz.questions) { questionslist.getitems().add(question.title); } populateview(); questiontextfield.setonkeyreleased(e -> { questionslist.getitems().set(currentquestionindex, questiontextfield.gettext()); quiz.questions.... | ExodiusStudios/quizzibles | [
1,
0,
0,
0
] |
10,647 | public void testBuildMalformedDocumentWithUnpairedSurrogate()
throws IOException {
String doc = "<doc>A\uD800A</doc>";
try {
builder.build(doc, "http://www.example.com");
fail("Allowed malformed doc");
}
catch (ParsingException success) {
ass... | public void testBuildMalformedDocumentWithUnpairedSurrogate()
throws IOException {
String doc = "<doc>A\uD800A</doc>";
try {
builder.build(doc, "http://www.example.com");
fail("Allowed malformed doc");
}
catch (ParsingException success) {
ass... | public void testbuildmalformeddocumentwithunpairedsurrogate() throws ioexception { string doc = "<doc>a\ud800a</doc>"; try { builder.build(doc, "http://www.example.com"); fail("allowed malformed doc"); } catch (parsingexception success) { assertnotnull(success.getmessage()); assertequals("http://www.example.com/", succ... | Evegen55/TIJ4_code | [
1,
0,
0,
0
] |
2,472 | @Override
protected Config getConfig() {
Config c = new Config();
c.caption = "custom tile listener";
c.serviceInterface = CustomTileListenerService.SERVICE_INTERFACE;
//TODO: Implement this in the future
//c.secureSettingName = Settings.Secure.ENABLED... | @Override
protected Config getConfig() {
Config c = new Config();
c.caption = "custom tile listener";
c.serviceInterface = CustomTileListenerService.SERVICE_INTERFACE;
c.bindPermission =
cyanogenmod.platform.Manifest.per... | @override protected config getconfig() { config c = new config(); c.caption = "custom tile listener"; c.serviceinterface = customtilelistenerservice.service_interface; c.bindpermission = cyanogenmod.platform.manifest.permission.bind_custom_tile_listener_service; c.clientlabel = r.string.custom_tile_listener_binding_lab... | Ant-OS/android_vendor_cmsdk | [
0,
1,
0,
0
] |
18,884 | @Override
public void offer(HttpContent chunk) {
if (this.channel.isClosed())
return; // TODO somehow connect the cancel back to netsession
if (chunk.content().readableBytes() > this.max) {
this.channel.abort(); // TODO somehow connect the cancel back to netsession
return;
}
ByteBuf bb = chunk.cont... | @Override
public void offer(HttpContent chunk) {
if (this.channel.isClosed())
return;
if (chunk.content().readableBytes() > this.max) {
this.channel.abort();
return;
}
ByteBuf bb = chunk.content();
bb.retain();
System.out.println("ref count a: " + bb.refCnt());
StreamMessage b = new StreamMes... | @override public void offer(httpcontent chunk) { if (this.channel.isclosed()) return; if (chunk.content().readablebytes() > this.max) { this.channel.abort(); return; } bytebuf bb = chunk.content(); bb.retain(); system.out.println("ref count a: " + bb.refcnt()); streammessage b = new streammessage("block", bb); b.setfie... | Gadreel/divconq | [
1,
1,
0,
0
] |
10,828 | private Printer escapeCharacter(char c) {
if (c == '"') {
return backslashChar(c);
}
switch (c) {
case '\\':
return backslashChar('\\');
case '\r':
return backslashChar('r');
case '\n':
return backslashChar('n');
case '\t':
return backslashChar('... | private Printer escapeCharacter(char c) {
if (c == '"') {
return backslashChar(c);
}
switch (c) {
case '\\':
return backslashChar('\\');
case '\r':
return backslashChar('r');
case '\n':
return backslashChar('n');
case '\t':
return backslashChar('... | private printer escapecharacter(char c) { if (c == '"') { return backslashchar(c); } switch (c) { case '\\': return backslashchar('\\'); case '\r': return backslashchar('r'); case '\n': return backslashchar('n'); case '\t': return backslashchar('t'); default: if (c < 32) { return this.append(string.format("\\x%02x", (i... | AyuMol758/bazel | [
0,
1,
0,
0
] |
10,844 | @Override
public void meet(Projection node) throws RuntimeException {
super.meet(node);
ProjectionElemList list = node.getProjectionElemList();
String set = null;
StringBuilder projList = new StringBuilder();
boolean first = true;
//TODO: we do not support projections... | @Override
public void meet(Projection node) throws RuntimeException {
super.meet(node);
ProjectionElemList list = node.getProjectionElemList();
String set = null;
StringBuilder projList = new StringBuilder();
boolean first = true;
for (String name : list.getTa... | @override public void meet(projection node) throws runtimeexception { super.meet(node); projectionelemlist list = node.getprojectionelemlist(); string set = null; stringbuilder projlist = new stringbuilder(); boolean first = true; for (string name : list.gettargetnames()) { set = vartoset.get(name); if (set == null) { ... | DLotts/incubator-rya | [
1,
1,
0,
0
] |
2,684 | public List<JsonMessage> processDatasets(List<String> datasetIncludeList,
List<String> datasetExcludeList,
List<String> tableExcludeList,
String dataRegionId) throws IOException, Interr... | public List<JsonMessage> processDatasets(List<String> datasetIncludeList,
List<String> datasetExcludeList,
List<String> tableExcludeList,
String dataRegionId) throws IOException, Interr... | public list<jsonmessage> processdatasets(list<string> datasetincludelist, list<string> datasetexcludelist, list<string> tableexcludelist, string dataregionid) throws ioexception, interruptedexception, nonretryableapplicationexception { list<string> tablesincludelist = new arraylist<>(); for (string dataset : datasetinc... | GoogleCloudPlatform/bq-pii-classifier | [
0,
1,
0,
0
] |
10,989 | @Override //using this override to place getAnnualReport and gameShouldEnd inside displayView while loop.
public void displayView() {
boolean keepGoing = true;
while (keepGoing == true) {
//check to see if the game should end and if so, display a message and return to Main Menu
... | @Override public void displayView() {
boolean keepGoing = true;
while (keepGoing == true) {
liveTheYear();
getAnnualReport();
if (GameControl.gameShouldEnd(0)) {
... | @override public void displayview() { boolean keepgoing = true; while (keepgoing == true) { livetheyear(); getannualreport(); if (gamecontrol.gameshouldend(0)) { this.console.println("more than 50% of your population died, therefore this game is over. repent and try again."); return; } else if (gamecontrol.gamematures(... | Hsia-Esther/CityOfAaronGroup1 | [
0,
1,
0,
0
] |
2,869 | public void updatePosLog(double x, double y, double heading) { // Reference positions by doing point# * 3 + (0 for
// x, 1 for y, 2 for heading)
posLog.add(x);
posLog.add(y);
posLog.add(heading);
} | public void updatePosLog(double x, double y, double heading) {
posLog.add(x);
posLog.add(y);
posLog.add(heading);
} | public void updateposlog(double x, double y, double heading) { poslog.add(x); poslog.add(y); poslog.add(heading); } | AutonomousCarProject/Steering | [
1,
0,
0,
0
] |
11,109 | @Override
protected void configure() {
install(new DefaultModule.Builder().placeManager(PerunPlaceManager.class).build());
// make sure app is embedded in a correct DIV
bind(RootPresenter.class).to(PerunRootPresenter.class).asEagerSingleton();
// Main Application must bind generic Presenter and custom View !!
... | @Override
protected void configure() {
install(new DefaultModule.Builder().placeManager(PerunPlaceManager.class).build());
bind(RootPresenter.class).to(PerunRootPresenter.class).asEagerSingleton();
bindPresenter(PerunCabinetPresenter.class, PerunCabinetPresenter.MyView.class, PerunCabinetView.class, PerunCab... | @override protected void configure() { install(new defaultmodule.builder().placemanager(perunplacemanager.class).build()); bind(rootpresenter.class).to(perunrootpresenter.class).aseagersingleton(); bindpresenter(peruncabinetpresenter.class, peruncabinetpresenter.myview.class, peruncabinetview.class, peruncabinetpresent... | Gaeldrin/perun-wui | [
0,
1,
0,
0
] |
3,131 | public CheckpointInfo restoreCheckpoint(ProcessKey processKey, UUID checkpointId) {
try (TemporaryPath checkpointArchive = IOUtils.tempFile("checkpoint", ".zip")) {
String checkpointName = export(processKey, checkpointId, checkpointArchive.path());
if (checkpointName == null) {
... | public CheckpointInfo restoreCheckpoint(ProcessKey processKey, UUID checkpointId) {
try (TemporaryPath checkpointArchive = IOUtils.tempFile("checkpoint", ".zip")) {
String checkpointName = export(processKey, checkpointId, checkpointArchive.path());
if (checkpointName == null) {
... | public checkpointinfo restorecheckpoint(processkey processkey, uuid checkpointid) { try (temporarypath checkpointarchive = ioutils.tempfile("checkpoint", ".zip")) { string checkpointname = export(processkey, checkpointid, checkpointarchive.path()); if (checkpointname == null) { return null; } try (temporarypath extract... | 700software/concord | [
1,
0,
0,
0
] |
19,591 | protected List createEmptyList() {
return new BackedList(this, contentList(), 0);
} | protected List createEmptyList() {
return new BackedList(this, contentList(), 0);
} | protected list createemptylist() { return new backedlist(this, contentlist(), 0); } | Gravitational-Field/Dive-In-Java | [
0,
0,
0,
0
] |
3,223 | protected void initFromRaFile() throws IOException {
// Central directory structure / central file header signature
int censig = raFile.readInt( fileOffset );
if( censig!=CENSIG ) {
throw new ZipException("expected CENSIC not found in central directory (at end of zip file)");
} else if( LOG.isLoggable(Level.... | protected void initFromRaFile() throws IOException {
int censig = raFile.readInt( fileOffset );
if( censig!=CENSIG ) {
throw new ZipException("expected CENSIC not found in central directory (at end of zip file)");
} else if( LOG.isLoggable(Level.FINE) ) {
LOG.fine( "found censigOffset=" + fileOffset );
... | protected void initfromrafile() throws ioexception { int censig = rafile.readint( fileoffset ); if( censig!=censig ) { throw new zipexception("expected censic not found in central directory (at end of zip file)"); } else if( log.isloggable(level.fine) ) { log.fine( "found censigoffset=" + fileoffset ); } short flag = r... | CATION-M/X-moe | [
1,
0,
0,
0
] |
3,224 | public short getCryptoHeaderLength() {
// TODO support 128+192 byte keys reduces the salt byte size to 8+2 or 12+2
return 18;
} | public short getCryptoHeaderLength() {
return 18;
} | public short getcryptoheaderlength() { return 18; } | CATION-M/X-moe | [
0,
1,
0,
0
] |
11,510 | @Override
public Set< Justification > computeJustifications() {
Set< Set< OWLAxiom > > justifications = null;
try {
justifications = explainAxiom( axiom_ );
}
catch ( OWLException e ) {
throw new RuntimeException( e );
}
// We represent justifi... | @Override
public Set< Justification > computeJustifications() {
Set< Set< OWLAxiom > > justifications = null;
try {
justifications = explainAxiom( axiom_ );
}
catch ( OWLException e ) {
throw new RuntimeException( e );
}
Set< Ju... | @override public set< justification > computejustifications() { set< set< owlaxiom > > justifications = null; try { justifications = explainaxiom( axiom_ ); } catch ( owlexception e ) { throw new runtimeexception( e ); } set< justification > return_justifications = new treeset< justification > (); for ( set< owlaxiom >... | Institute-Web-Science-and-Technologies/SparqlUpdater | [
1,
0,
0,
0
] |
19,708 | public boolean canKick(String name) {
if (isFounder(name)) {
return true;
}
if (getRank(name) >= whoCanKick) {
return true;
}
return false;
} | public boolean canKick(String name) {
if (isFounder(name)) {
return true;
}
if (getRank(name) >= whoCanKick) {
return true;
}
return false;
} | public boolean cankick(string name) { if (isfounder(name)) { return true; } if (getrank(name) >= whocankick) { return true; } return false; } | CoderMMK/RSPS | [
0,
0,
0,
1
] |
19,709 | public boolean canBan(String name) {
if (isFounder(name)) {
return true;
}
if (getRank(name) >= whoCanBan) {
return true;
}
return false;
} | public boolean canBan(String name) {
if (isFounder(name)) {
return true;
}
if (getRank(name) >= whoCanBan) {
return true;
}
return false;
} | public boolean canban(string name) { if (isfounder(name)) { return true; } if (getrank(name) >= whocanban) { return true; } return false; } | CoderMMK/RSPS | [
0,
0,
0,
1
] |
3,404 | public void GetLiveTvProgramsAsync(ProgramQuery query, final Response<ItemsResult> response)
{
if (query == null)
{
throw new IllegalArgumentException("query");
}
QueryStringDictionary dict = new QueryStringDictionary ();
String isoDateFormat = "o";
if (qu... | public void GetLiveTvProgramsAsync(ProgramQuery query, final Response<ItemsResult> response)
{
if (query == null)
{
throw new IllegalArgumentException("query");
}
QueryStringDictionary dict = new QueryStringDictionary ();
String isoDateFormat = "o";
if (qu... | public void getlivetvprogramsasync(programquery query, final response<itemsresult> response) { if (query == null) { throw new illegalargumentexception("query"); } querystringdictionary dict = new querystringdictionary (); string isodateformat = "o"; if (query.getmaxenddate() != null) { dict.add("maxenddate", getisostri... | AndreasGB/jellyfin-apiclient-java | [
0,
1,
0,
0
] |
19,828 | @Test
public void testPositionConstructor() {
position = new Position(rowInRange, cellInRange);
// I know tests need to be independent but not sure how else to do this
assertEquals(rowInRange, position.getRow());
assertEquals(cellInRange, position.getCell());
} | @Test
public void testPositionConstructor() {
position = new Position(rowInRange, cellInRange);
assertEquals(rowInRange, position.getRow());
assertEquals(cellInRange, position.getCell());
} | @test public void testpositionconstructor() { position = new position(rowinrange, cellinrange); assertequals(rowinrange, position.getrow()); assertequals(cellinrange, position.getcell()); } | DaniloSosa98/SE-WebCheckers | [
1,
0,
0,
0
] |
11,711 | @GET
@Path("{connectorId}/contents")
public Response getTypedContent(@PathParam("connectorId") long connectorId, @QueryParam("nodeId") String nodeId, @QueryParam("type") ConnectorNodeType type) {
Connector connector = getConnector(connectorId);
InputStream content = connector.getContent(new ConnectorNode(no... | @GET
@Path("{connectorId}/contents")
public Response getTypedContent(@PathParam("connectorId") long connectorId, @QueryParam("nodeId") String nodeId, @QueryParam("type") ConnectorNodeType type) {
Connector connector = getConnector(connectorId);
InputStream content = connector.getContent(new ConnectorNode(no... | @get @path("{connectorid}/contents") public response gettypedcontent(@pathparam("connectorid") long connectorid, @queryparam("nodeid") string nodeid, @queryparam("type") connectornodetype type) { connector connector = getconnector(connectorid); inputstream content = connector.getcontent(new connectornode(nodeid, null, ... | 1and1/camunda-bpm-platform | [
1,
0,
0,
0
] |
3,528 | private Complex getFeederLoadVA(String sourceBusId) {
Bus3Phase sourceBus = (Bus3Phase) this.net.getBus(sourceBusId);
Complex3x1 vabc_1 = sourceBus.get3PhaseVotlages();
Complex3x1 currInj3Phase = new Complex3x1();
for(Branch bra: sourceBus.getConnectedPhysicalBranchList()){
if(bra.isActive()){
Branch3Pha... | private Complex getFeederLoadVA(String sourceBusId) {
Bus3Phase sourceBus = (Bus3Phase) this.net.getBus(sourceBusId);
Complex3x1 vabc_1 = sourceBus.get3PhaseVotlages();
Complex3x1 currInj3Phase = new Complex3x1();
for(Branch bra: sourceBus.getConnectedPhysicalBranchList()){
if(bra.isActive()){
Branch3Pha... | private complex getfeederloadva(string sourcebusid) { bus3phase sourcebus = (bus3phase) this.net.getbus(sourcebusid); complex3x1 vabc_1 = sourcebus.get3phasevotlages(); complex3x1 currinj3phase = new complex3x1(); for(branch bra: sourcebus.getconnectedphysicalbranchlist()){ if(bra.isactive()){ branch3phase acline = (br... | GMLC-TDC/Use-Cases | [
1,
0,
0,
0
] |
11,856 | @Override
public <K> void executeTask(
final AdvancedCacheLoader.KeyFilter<K> filter,
final ParallelIterableMap.KeyValueAction<Object, InternalCacheEntry> action
) throws InterruptedException{
if (filter == null)
throw new IllegalArgumentException("No filter specified");
... | @Override
public <K> void executeTask(
final AdvancedCacheLoader.KeyFilter<K> filter,
final ParallelIterableMap.KeyValueAction<Object, InternalCacheEntry> action
) throws InterruptedException{
if (filter == null)
throw new IllegalArgumentException("No filter specified");
... | @override public <k> void executetask( final advancedcacheloader.keyfilter<k> filter, final paralleliterablemap.keyvalueaction<object, internalcacheentry> action ) throws interruptedexception{ if (filter == null) throw new illegalargumentexception("no filter specified"); if (action == null) throw new illegalargumentexc... | Cotton-Ben/infinispan | [
1,
0,
0,
0
] |
11,891 | @Override
public final V get(long timeout, TimeUnit unit)
throws InterruptedException, ExecutionException, TimeoutException {
Iterator<Integer> indexItr = order.iterator();
V result = initResult();
for (Future<K> future : futures) {
// TODO: the max time this can take is actually N... | @Override
public final V get(long timeout, TimeUnit unit)
throws InterruptedException, ExecutionException, TimeoutException {
Iterator<Integer> indexItr = order.iterator();
V result = initResult();
for (Future<K> future : futures) {
result = aggregate(future.get(timeout, un... | @override public final v get(long timeout, timeunit unit) throws interruptedexception, executionexception, timeoutexception { iterator<integer> indexitr = order.iterator(); v result = initresult(); for (future<k> future : futures) { result = aggregate(future.get(timeout, unit), indexitr, result); } return result; } | CyberFlameGO/appengine-java-standard | [
1,
0,
0,
0
] |
11,905 | private void processCommands(GuildMessageReceivedEvent event, GuildData guildData, String trigger, String[] args, boolean isMention) {
ICommandMain cmd = CascadeBot.INS.getCommandManager().getCommand(trigger, event.getAuthor(), guildData);
if (cmd != null) {
if (cmd.getModule().isPublicModul... | private void processCommands(GuildMessageReceivedEvent event, GuildData guildData, String trigger, String[] args, boolean isMention) {
ICommandMain cmd = CascadeBot.INS.getCommandManager().getCommand(trigger, event.getAuthor(), guildData);
if (cmd != null) {
if (cmd.getModule().isPublicModul... | private void processcommands(guildmessagereceivedevent event, guilddata guilddata, string trigger, string[] args, boolean ismention) { icommandmain cmd = cascadebot.ins.getcommandmanager().getcommand(trigger, event.getauthor(), guilddata); if (cmd != null) { if (cmd.getmodule().ispublicmodule() && !guilddata.ismoduleen... | Ikinon/CascadeBot | [
0,
1,
0,
0
] |
3,730 | @Override
public MutableList<T> clone()
{
return new FastList<T>(this);
} | @Override
public MutableList<T> clone()
{
return new FastList<T>(this);
} | @override public mutablelist<t> clone() { return new fastlist<t>(this); } | DiegoEliasCosta/gs-collections | [
1,
0,
0,
0
] |
3,764 | @PostMapping("{id}/bloqueio")
public ResponseEntity<?> bloquear(HttpServletRequest request, @PathVariable String id){
String ip = request.getRemoteAddr();
String userAgent = request.getHeader(HttpHeaders.USER_AGENT);
Optional<Proposta> possivelProposta = propostaRepository.findByNumeroCartao... | @PostMapping("{id}/bloqueio")
public ResponseEntity<?> bloquear(HttpServletRequest request, @PathVariable String id){
String ip = request.getRemoteAddr();
String userAgent = request.getHeader(HttpHeaders.USER_AGENT);
Optional<Proposta> possivelProposta = propostaRepository.findByNumeroCartao... | @postmapping("{id}/bloqueio") public responseentity<?> bloquear(httpservletrequest request, @pathvariable string id){ string ip = request.getremoteaddr(); string useragent = request.getheader(httpheaders.user_agent); optional<proposta> possivelproposta = propostarepository.findbynumerocartao(id); if(possivelproposta.is... | EDUMATT3/orange-talents-06-template-proposta | [
1,
0,
0,
0
] |
20,267 | @Override
public void onClick(View view) {
switch (view.getId()) {
case R.id.send_to_this_address_action: {
if (onSendToAddressClickListener != null) {
onSendToAddressClickListener.onClick(view);
}
break;
}
... | @Override
public void onClick(View view) {
switch (view.getId()) {
case R.id.send_to_this_address_action: {
if (onSendToAddressClickListener != null) {
onSendToAddressClickListener.onClick(view);
}
break;
}
... | @override public void onclick(view view) { switch (view.getid()) { case r.id.send_to_this_address_action: { if (onsendtoaddressclicklistener != null) { onsendtoaddressclicklistener.onclick(view); } break; } case r.id.add_custom_token_action: { if (onaddcustontokenclicklistener != null) { onaddcustontokenclicklistener.o... | HTSUPK/alpha-wallet-android | [
1,
0,
0,
0
] |
20,270 | private void processRequest(@NotNull HttpServletRequest req) throws BadRequestException {
if (!EXPECTED_CONTENT_TYPE.isSameMimeType(ContentType.parse(req.getContentType()))) {
throw new BadRequestException("Content type must be '%s'.".formatted(EXPECTED_CONTENT_TYPE.getMimeType()));
}
URI source = extractParam... | private void processRequest(@NotNull HttpServletRequest req) throws BadRequestException {
if (!EXPECTED_CONTENT_TYPE.isSameMimeType(ContentType.parse(req.getContentType()))) {
throw new BadRequestException("Content type must be '%s'.".formatted(EXPECTED_CONTENT_TYPE.getMimeType()));
}
URI source = extractParam... | private void processrequest(@notnull httpservletrequest req) throws badrequestexception { if (!expected_content_type.issamemimetype(contenttype.parse(req.getcontenttype()))) { throw new badrequestexception("content type must be '%s'.".formatted(expected_content_type.getmimetype())); } uri source = extractparameterasuri... | FelixRilling/webmention4j | [
1,
1,
0,
0
] |
20,319 | @BeforeEach
public void setUp() throws Exception {
// Hack our RouteBuilder into the context. Bean definition / ComponentScan doesn't work for RouteBuilders.
if (camelContext.getRoute(CamelCustomerRatingServiceAdapter.URI) == null) {
camelContext.addRoutes(ccrsAdapter);
}
... | @BeforeEach
public void setUp() throws Exception {
if (camelContext.getRoute(CamelCustomerRatingServiceAdapter.URI) == null) {
camelContext.addRoutes(ccrsAdapter);
}
if (camelContext.getRoute(CamelCustomerRatingServiceClient.URI) == null) {
camelContext.addRou... | @beforeeach public void setup() throws exception { if (camelcontext.getroute(camelcustomerratingserviceadapter.uri) == null) { camelcontext.addroutes(ccrsadapter); } if (camelcontext.getroute(camelcustomerratingserviceclient.uri) == null) { camelcontext.addroutes(ccrsclient); } } | BertKoor/camelCase | [
0,
0,
1,
0
] |
20,732 | public static void exportTaskgraph() {
final TFileChooser fc = new TFileChooser(EXPORT_TASKGRAPH_DIR);
final FileImportExportDecorator chooser = new FileImportExportDecorator(fc);
int result = chooser.showExportDialog(GUIEnv.getApplicationFrame());
if (result == TFileChooser.APPROVE_OPTI... | public static void exportTaskgraph() {
final TFileChooser fc = new TFileChooser(EXPORT_TASKGRAPH_DIR);
final FileImportExportDecorator chooser = new FileImportExportDecorator(fc);
int result = chooser.showExportDialog(GUIEnv.getApplicationFrame());
if (result == TFileChooser.APPROVE_OPTI... | public static void exporttaskgraph() { final tfilechooser fc = new tfilechooser(export_taskgraph_dir); final fileimportexportdecorator chooser = new fileimportexportdecorator(fc); int result = chooser.showexportdialog(guienv.getapplicationframe()); if (result == tfilechooser.approve_option) { thread thread = new thread... | CSCSI/Triana | [
0,
0,
1,
0
] |
20,999 | @Override
public KVMessage putKV(final int clientPort, final String key, final String value)
throws InvalidMessageException {
logger.info(clientPort + "> PUT for key=" + key + " value=" + value);
KVMessage res;
StatusType putStat;
// TODO: Cleanup the clientRequests after the requests are completed
client... | @Override
public KVMessage putKV(final int clientPort, final String key, final String value)
throws InvalidMessageException {
logger.info(clientPort + "> PUT for key=" + key + " value=" + value);
KVMessage res;
StatusType putStat;
clientRequests.putIfAbsent(key, new ConcurrentNode(MAX_READS));
NodeOpera... | @override public kvmessage putkv(final int clientport, final string key, final string value) throws invalidmessageexception { logger.info(clientport + "> put for key=" + key + " value=" + value); kvmessage res; statustype putstat; clientrequests.putifabsent(key, new concurrentnode(max_reads)); nodeoperation op = value.... | CAPIndustries/capDB | [
1,
1,
0,
0
] |
21,001 | public static void main(String[] args) {
try {
if (args.length != 6) {
logger.error("Error! Invalid number of arguments!");
logger.error("Usage: Server <name> <port> <ZooKeeper Port> <ECS IP> <isLoadReplica> <parentName>!");
System.exit(1);
} else {
String name = args[0];
int port = Integer.... | public static void main(String[] args) {
try {
if (args.length != 6) {
logger.error("Error! Invalid number of arguments!");
logger.error("Usage: Server <name> <port> <ZooKeeper Port> <ECS IP> <isLoadReplica> <parentName>!");
System.exit(1);
} else {
String name = args[0];
int port = Integer.... | public static void main(string[] args) { try { if (args.length != 6) { logger.error("error! invalid number of arguments!"); logger.error("usage: server <name> <port> <zookeeper port> <ecs ip> <isloadreplica> <parentname>!"); system.exit(1); } else { string name = args[0]; int port = integer.parseint(args[1]); int zkpor... | CAPIndustries/capDB | [
1,
0,
0,
0
] |
21,046 | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
// Inflate the layout for this fragment
llView = (LinearLayout)inflater.inflate(R.layout.fragment_layers, container, false);
llView.findViewById(R.id.btnAddStrokeLayer).setOnClickListener(new View... | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
llView = (LinearLayout)inflater.inflate(R.layout.fragment_layers, container, false);
llView.findViewById(R.id.btnAddStrokeLayer).setOnClickListener(new View.OnClickListener() {
@Override
... | @override public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { llview = (linearlayout)inflater.inflate(r.layout.fragment_layers, container, false); llview.findviewbyid(r.id.btnaddstrokelayer).setonclicklistener(new view.onclicklistener() { @override public void onclick(vie... | Erhannis/UnstableArt | [
1,
0,
0,
0
] |
21,397 | private mxGraphComponent createGraphComponent(mxGraph graph) {
mxGraphComponent component = new mxGraphComponent(graph);
component.setAutoExtend(true);
component.setAntiAlias(true);
component.setTextAntiAlias(true);
component.setToolTips(true);
// component.setImportEnabled(false);
component.setFoldingEnab... | private mxGraphComponent createGraphComponent(mxGraph graph) {
mxGraphComponent component = new mxGraphComponent(graph);
component.setAutoExtend(true);
component.setAntiAlias(true);
component.setTextAntiAlias(true);
component.setToolTips(true);
component.setFoldingEnabled(true);
component.setConnectable(f... | private mxgraphcomponent creategraphcomponent(mxgraph graph) { mxgraphcomponent component = new mxgraphcomponent(graph); component.setautoextend(true); component.setantialias(true); component.settextantialias(true); component.settooltips(true); component.setfoldingenabled(true); component.setconnectable(false); compone... | ICARUS-tooling/icarus2-modeling-framework | [
0,
1,
0,
0
] |
13,266 | public int getAge() {
// TODO: put safe grabbing of age here
return 0;
} | public int getAge() {
return 0;
} | public int getage() { return 0; } | 210118-java-enterprise/demos | [
0,
1,
0,
0
] |
13,267 | @InstanceName
public String getCaption() {
// todo rework when new instance name is ready
String pattern =/* AppContext.getProperty("cuba.user.namePattern");
if (StringUtils.isBlank(pattern)) {
pattern =*/ "{1} [{0}]";
/*}*/
MessageFormat fmt = new MessageFormat(p... | @InstanceName
public String getCaption() {
String pattern "{1} [{0}]";
MessageFormat fmt = new MessageFormat(pattern);
return StringUtils.trimToEmpty(fmt.format(new Object[]{
StringUtils.trimToEmpty(username),
StringUtils.trimToEmpty(name)
... | @instancename public string getcaption() { string pattern "{1} [{0}]"; messageformat fmt = new messageformat(pattern); return stringutils.trimtoempty(fmt.format(new object[]{ stringutils.trimtoempty(username), stringutils.trimtoempty(name) })); } | Haulmont/jmix-old | [
1,
0,
0,
0
] |
13,309 | private SolrQuery createQuery(String queryString, int startPage, int pageSize, boolean useDismax) {
SolrQuery query = new SolrQuery(queryString);
query.setTimeAllowed(queryTimeout);
query.setIncludeScore(true); // The relevance (of each results element) to the search terms.
query.setHighlight(false);
... | private SolrQuery createQuery(String queryString, int startPage, int pageSize, boolean useDismax) {
SolrQuery query = new SolrQuery(queryString);
query.setTimeAllowed(queryTimeout);
query.setIncludeScore(true);
query.setHighlight(false);
if (useDismax) {
query.set("defType", "dismax");
}
... | private solrquery createquery(string querystring, int startpage, int pagesize, boolean usedismax) { solrquery query = new solrquery(querystring); query.settimeallowed(querytimeout); query.setincludescore(true); query.sethighlight(false); if (usedismax) { query.set("deftype", "dismax"); } query.setstart(startpage * page... | AndrewGuthua/JournalSystem | [
1,
0,
0,
0
] |
13,361 | private String getTypeString(String _sTypeName, TypeClass _aTypeClass, boolean _bAsHeaderSourceCode){
String sTypeString = "";
switch (_aTypeClass.getValue()){
case TypeClass.BOOLEAN_value:
sTypeString = m_xLanguageSourceCodeGenerator.getbooleanTypeDescription();
... | private String getTypeString(String _sTypeName, TypeClass _aTypeClass, boolean _bAsHeaderSourceCode){
String sTypeString = "";
switch (_aTypeClass.getValue()){
case TypeClass.BOOLEAN_value:
sTypeString = m_xLanguageSourceCodeGenerator.getbooleanTypeDescription();
... | private string gettypestring(string _stypename, typeclass _atypeclass, boolean _basheadersourcecode){ string stypestring = ""; switch (_atypeclass.getvalue()){ case typeclass.boolean_value: stypestring = m_xlanguagesourcecodegenerator.getbooleantypedescription(); break; case typeclass.byte_value: stypestring = m_xlangu... | Grosskopf/openoffice | [
1,
0,
0,
0
] |
13,362 | private String getCentralVariableStemName(TypeClass _aTypeClass){
String sCentralVariableStemName = "";
int nTypeClass = _aTypeClass.getValue();
switch(nTypeClass){
case TypeClass.SEQUENCE_value:
//TODO consider mulitdimensional Arrays
... | private String getCentralVariableStemName(TypeClass _aTypeClass){
String sCentralVariableStemName = "";
int nTypeClass = _aTypeClass.getValue();
switch(nTypeClass){
case TypeClass.SEQUENCE_value:
XTypeDescription xTypeDescriptio... | private string getcentralvariablestemname(typeclass _atypeclass){ string scentralvariablestemname = ""; int ntypeclass = _atypeclass.getvalue(); switch(ntypeclass){ case typeclass.sequence_value: xtypedescription xtypedescription = introspector.getintrospector().getreferencedtype(gettypename()); if (xtypedescription !=... | Grosskopf/openoffice | [
1,
0,
0,
0
] |
13,363 | public String getVariableStemName(TypeClass _aTypeClass){
int nTypeClass = _aTypeClass.getValue();
switch(nTypeClass){
case TypeClass.BOOLEAN_value:
sVariableStemName = "b" + m_sCentralVariableStemName;
break;
case TypeClass... | public String getVariableStemName(TypeClass _aTypeClass){
int nTypeClass = _aTypeClass.getValue();
switch(nTypeClass){
case TypeClass.BOOLEAN_value:
sVariableStemName = "b" + m_sCentralVariableStemName;
break;
case TypeClass... | public string getvariablestemname(typeclass _atypeclass){ int ntypeclass = _atypeclass.getvalue(); switch(ntypeclass){ case typeclass.boolean_value: svariablestemname = "b" + m_scentralvariablestemname; break; case typeclass.double_value: case typeclass.float_value: svariablestemname = "f" + m_scentralvariablestemname;... | Grosskopf/openoffice | [
1,
0,
0,
0
] |
29,971 | public int getRuleStatusVec(int[] fillInArray) {
if (fillInArray != null && fillInArray.length>=1) {
fillInArray[0] = 0;
}
return 1;
} | public int getRuleStatusVec(int[] fillInArray) {
if (fillInArray != null && fillInArray.length>=1) {
fillInArray[0] = 0;
}
return 1;
} | public int getrulestatusvec(int[] fillinarray) { if (fillinarray != null && fillinarray.length>=1) { fillinarray[0] = 0; } return 1; } | HughP/quickdic-dictionary | [
1,
0,
0,
0
] |
30,000 | public void go() throws Exception {
BufferedReader br = new BufferedReader(new FileReader("verilog\\out.log"));
String line;
Pattern p = Pattern.compile(".+JAG RD REF=. OB=1 BLT=. GPU=. \\$(......).*");
long lineNo = 0;
int Xmin[] = new int[3];
int Xmax[] = new int[3];
int Ymin[] = new int[3];
int Ymax[... | public void go() throws Exception {
BufferedReader br = new BufferedReader(new FileReader("verilog\\out.log"));
String line;
Pattern p = Pattern.compile(".+JAG RD REF=. OB=1 BLT=. GPU=. \\$(......).*");
long lineNo = 0;
int Xmin[] = new int[3];
int Xmax[] = new int[3];
int Ymin[] = new int[3];
int Ymax[... | public void go() throws exception { bufferedreader br = new bufferedreader(new filereader("verilog\\out.log")); string line; pattern p = pattern.compile(".+jag rd ref=. ob=1 blt=. gpu=. \\$(......).*"); long lineno = 0; int xmin[] = new int[3]; int xmax[] = new int[3]; int ymin[] = new int[3]; int ymax[] = new int[3]; ... | ElectronAsh/jag_sim | [
0,
0,
0,
0
] |
21,824 | private void downloadMedia(MediaFileInfo fileInfo) {
if (fileInfo == null) {
return;
}
int mediaId = fileInfo.getId();
getDelegate(fileInfo.getType()).onDownloadMedia(fileInfo)
.thenAcceptAsync((result) -> {
// @todo: replace with StringBuilder
... | private void downloadMedia(MediaFileInfo fileInfo) {
if (fileInfo == null) {
return;
}
int mediaId = fileInfo.getId();
getDelegate(fileInfo.getType()).onDownloadMedia(fileInfo)
.thenAcceptAsync((result) -> {
if (result != null && re... | private void downloadmedia(mediafileinfo fileinfo) { if (fileinfo == null) { return; } int mediaid = fileinfo.getid(); getdelegate(fileinfo.gettype()).ondownloadmedia(fileinfo) .thenacceptasync((result) -> { if (result != null && result.issuccessful()) { logger.info("downloading of media id=" + mediaid + " succeeded.")... | COMP30022-Russia/Russia_Client | [
1,
0,
0,
0
] |
21,825 | private CompletableFuture<Void> uploadMedia(MediaFileInfo fileInfo) {
if (fileInfo == null) {
return CompletableFuture.completedFuture(null);
}
int mediaId = fileInfo.getId();
return getDelegate(fileInfo.getType()).onUploadMedia(fileInfo)
.thenAcceptAsync((result)... | private CompletableFuture<Void> uploadMedia(MediaFileInfo fileInfo) {
if (fileInfo == null) {
return CompletableFuture.completedFuture(null);
}
int mediaId = fileInfo.getId();
return getDelegate(fileInfo.getType()).onUploadMedia(fileInfo)
.thenAcceptAsync((result)... | private completablefuture<void> uploadmedia(mediafileinfo fileinfo) { if (fileinfo == null) { return completablefuture.completedfuture(null); } int mediaid = fileinfo.getid(); return getdelegate(fileinfo.gettype()).onuploadmedia(fileinfo) .thenacceptasync((result) -> { if (result != null && result.issuccessful()) { log... | COMP30022-Russia/Russia_Client | [
1,
0,
0,
0
] |
13,695 | public static Command getMecControllerCommand(PathPlannerTrajectory ppTrajectory, MecDriveTrain mecDriveTrain) {
// Create config for trajectory
/*TrajectoryConfig config =
new TrajectoryConfig(Constants.maxMecSpeed,Constants.maxMecAcceleration)
// Add kinematics to ensure max speed is actually ob... | public static Command getMecControllerCommand(PathPlannerTrajectory ppTrajectory, MecDriveTrain mecDriveTrain) {
ProfiledPIDController thetaController = new ProfiledPIDController(Constants.kpMecThetaController, 0., 0.,
new Constraints(Constants.maxMecRotationVelocity, Constants.maxMecRotationAccel));... | public static command getmeccontrollercommand(pathplannertrajectory pptrajectory, mecdrivetrain mecdrivetrain) { profiledpidcontroller thetacontroller = new profiledpidcontroller(constants.kpmecthetacontroller, 0., 0., new constraints(constants.maxmecrotationvelocity, constants.maxmecrotationaccel)); thetacontroller.en... | FRC6302/2022Bot1 | [
1,
0,
0,
0
] |
14,329 | public void importAlliancesScoring(HashMap<MatchGeneral, MatchDetailRelicJSON> scores){
File allianceFile = new File(Config.SCORING_DIR + File.separator + "alliances.txt");
if (allianceFile.exists()) {
try {
BufferedReader reader = new BufferedReader(new FileReader(allianceFi... | public void importAlliancesScoring(HashMap<MatchGeneral, MatchDetailRelicJSON> scores){
File allianceFile = new File(Config.SCORING_DIR + File.separator + "alliances.txt");
if (allianceFile.exists()) {
try {
BufferedReader reader = new BufferedReader(new FileReader(allianceFi... | public void importalliancesscoring(hashmap<matchgeneral, matchdetailrelicjson> scores){ file alliancefile = new file(config.scoring_dir + file.separator + "alliances.txt"); if (alliancefile.exists()) { try { bufferedreader reader = new bufferedreader(new filereader(alliancefile)); string line; alliances = new alliance[... | Agardner329/TOA-DataSync | [
0,
1,
0,
0
] |
14,380 | public void testEmit() throws Exception {
eh.on("ok", new EventEmitter.Listener() {
@Override
public void onEvent(Object data) {
String ss = (String) data;
if (ss == "ok")
Log.d(TAG, "pass@" + ss);
else
... | public void testEmit() throws Exception {
eh.on("ok", new EventEmitter.Listener() {
@Override
public void onEvent(Object data) {
String ss = (String) data;
if (ss == "ok")
Log.d(TAG, "pass@" + ss);
else
... | public void testemit() throws exception { eh.on("ok", new eventemitter.listener() { @override public void onevent(object data) { string ss = (string) data; if (ss == "ok") log.d(tag, "pass@" + ss); else log.d(tag, "fail@" + ss); } }); eh.on("no", new eventemitter.listener() { @override public void onevent(object data) ... | InstantWebP2P/node-android | [
0,
0,
0,
1
] |
14,566 | private void resolveDetail(CompletionItem item, CompletionData data, Tree tree) {
if (tree instanceof MethodTree) {
var method = (MethodTree) tree;
var parameters = new StringJoiner(", ");
for (var p : method.getParameters()) {
parameters.add(p.getType() + " "... | private void resolveDetail(CompletionItem item, CompletionData data, Tree tree) {
if (tree instanceof MethodTree) {
var method = (MethodTree) tree;
var parameters = new StringJoiner(", ");
for (var p : method.getParameters()) {
parameters.add(p.getType() + " "... | private void resolvedetail(completionitem item, completiondata data, tree tree) { if (tree instanceof methodtree) { var method = (methodtree) tree; var parameters = new stringjoiner(", "); for (var p : method.getparameters()) { parameters.add(p.gettype() + " " + p.getname()); } item.detail = method.getreturntype() + " ... | 80952556400/java-language-server | [
1,
0,
0,
0
] |
30,960 | public void validateFloweringTime(String scientificName, String eventDate, String reproductiveState, String country, String kingdom, String latitude, String longitude) {
HashMap<String, String> initialValues = new HashMap<String, String>();
initialValues.put("eventDate", eventDate);
initialValues.put("scientificN... | public void validateFloweringTime(String scientificName, String eventDate, String reproductiveState, String country, String kingdom, String latitude, String longitude) {
HashMap<String, String> initialValues = new HashMap<String, String>();
initialValues.put("eventDate", eventDate);
initialValues.put("scientificN... | public void validatefloweringtime(string scientificname, string eventdate, string reproductivestate, string country, string kingdom, string latitude, string longitude) { hashmap<string, string> initialvalues = new hashmap<string, string>(); initialvalues.put("eventdate", eventdate); initialvalues.put("scientificname", ... | FilteredPush/FP-KurationServices | [
1,
0,
0,
0
] |
22,911 | private void pickRawContactDelta() {
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG, "parse: " + mRawContactDeltas.size() + " rawContactDelta(s)");
}
for (int j = 0; j < mRawContactDeltas.size(); j++) {
final RawContactDelta rawContactDelta = mRawContactDeltas.get(j);
... | private void pickRawContactDelta() {
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG, "parse: " + mRawContactDeltas.size() + " rawContactDelta(s)");
}
for (int j = 0; j < mRawContactDeltas.size(); j++) {
final RawContactDelta rawContactDelta = mRawContactDeltas.get(j);
... | private void pickrawcontactdelta() { if (log.isloggable(tag, log.verbose)) { log.v(tag, "parse: " + mrawcontactdeltas.size() + " rawcontactdelta(s)"); } for (int j = 0; j < mrawcontactdeltas.size(); j++) { final rawcontactdelta rawcontactdelta = mrawcontactdeltas.get(j); if (log.isloggable(tag, log.verbose)) { log.v(ta... | BrahmaOS/brahmaos-packages-apps-Contacts | [
1,
0,
0,
0
] |
22,966 | @Override
public void interruptionOccurred(int currentIteration, int numIterations) {
// FIXME: maybe skip writing the SOM at 0 iterations (0 mod x == 0 ...)
String filename = fileProperties.namePrefix(false) + "_" + currentIteration;
try {
SOMLibMapOutputter.... | @Override
public void interruptionOccurred(int currentIteration, int numIterations) {
String filename = fileProperties.namePrefix(false) + "_" + currentIteration;
try {
SOMLibMapOutputter.writeWeightVectorFile(GrowingSOM.this, fileProperties.outputDirectory(),... | @override public void interruptionoccurred(int currentiteration, int numiterations) { string filename = fileproperties.nameprefix(false) + "_" + currentiteration; try { somlibmapoutputter.writeweightvectorfile(growingsom.this, fileproperties.outputdirectory(), filename, true, "$current_iteration=" + currentiteration, "... | ChrisPrein/TUW_SelfOrganizingSystems_WS2021 | [
0,
0,
1,
0
] |
23,001 | public void generate(ICubicWorld world, ICubePrimer cube, CubePos cubePos) {
//TODO: maybe skip some of this stuff if the cube is empty? (would need to use hints)
int radius = this.range;
this.world = world;
this.rand.setSeed(world.getSeed());
//used to randomize contribution of each coordinate to the cube se... | public void generate(ICubicWorld world, ICubePrimer cube, CubePos cubePos) {
int radius = this.range;
this.world = world;
this.rand.setSeed(world.getSeed());
long randX = this.rand.nextLong();
long randY = this.rand.nextLong();
long randZ = this.rand.nextLong();
int cubeX = cubePos.getX();
int c... | public void generate(icubicworld world, icubeprimer cube, cubepos cubepos) { int radius = this.range; this.world = world; this.rand.setseed(world.getseed()); long randx = this.rand.nextlong(); long randy = this.rand.nextlong(); long randz = this.rand.nextlong(); int cubex = cubepos.getx(); int cubey = cubepos.gety(); i... | Cyclonit/CubicChunks | [
0,
1,
0,
0
] |
31,498 | public void testGetEnteredDate() {
System.out.println("testGetEnteredDate");
// TODO add your test code below by replacing the default call to fail.
fail("The test case is empty.");
} | public void testGetEnteredDate() {
System.out.println("testGetEnteredDate");
fail("The test case is empty.");
} | public void testgetentereddate() { system.out.println("testgetentereddate"); fail("the test case is empty."); } | CBIIT/camod | [
0,
0,
0,
1
] |
31,499 | public void testSetEnteredDate() {
System.out.println("testSetEnteredDate");
// TODO add your test code below by replacing the default call to fail.
fail("The test case is empty.");
} | public void testSetEnteredDate() {
System.out.println("testSetEnteredDate");
fail("The test case is empty.");
} | public void testsetentereddate() { system.out.println("testsetentereddate"); fail("the test case is empty."); } | CBIIT/camod | [
0,
0,
0,
1
] |
31,500 | public void testGetModifiedDate() {
System.out.println("testGetModifiedDate");
// TODO add your test code below by replacing the default call to fail.
fail("The test case is empty.");
} | public void testGetModifiedDate() {
System.out.println("testGetModifiedDate");
fail("The test case is empty.");
} | public void testgetmodifieddate() { system.out.println("testgetmodifieddate"); fail("the test case is empty."); } | CBIIT/camod | [
0,
0,
0,
1
] |
31,501 | public void testSetModifiedDate() {
System.out.println("testSetModifiedDate");
// TODO add your test code below by replacing the default call to fail.
fail("The test case is empty.");
} | public void testSetModifiedDate() {
System.out.println("testSetModifiedDate");
fail("The test case is empty.");
} | public void testsetmodifieddate() { system.out.println("testsetmodifieddate"); fail("the test case is empty."); } | CBIIT/camod | [
0,
1,
0,
0
] |
31,502 | public void testGetReleaseDate() {
System.out.println("testGetReleaseDate");
// TODO add your test code below by replacing the default call to fail.
fail("The test case is empty.");
} | public void testGetReleaseDate() {
System.out.println("testGetReleaseDate");
fail("The test case is empty.");
} | public void testgetreleasedate() { system.out.println("testgetreleasedate"); fail("the test case is empty."); } | CBIIT/camod | [
0,
0,
0,
1
] |
31,503 | public void testSetReleaseDate() {
System.out.println("testSetReleaseDate");
// TODO add your test code below by replacing the default call to fail.
fail("The test case is empty.");
} | public void testSetReleaseDate() {
System.out.println("testSetReleaseDate");
fail("The test case is empty.");
} | public void testsetreleasedate() { system.out.println("testsetreleasedate"); fail("the test case is empty."); } | CBIIT/camod | [
0,
0,
0,
1
] |
31,504 | public void testGetVisibleTo() {
System.out.println("testGetVisibleTo");
// TODO add your test code below by replacing the default call to fail.
fail("The test case is empty.");
} | public void testGetVisibleTo() {
System.out.println("testGetVisibleTo");
fail("The test case is empty.");
} | public void testgetvisibleto() { system.out.println("testgetvisibleto"); fail("the test case is empty."); } | CBIIT/camod | [
0,
0,
0,
1
] |
31,505 | public void testSetVisibleTo() {
System.out.println("testSetVisibleTo");
// TODO add your test code below by replacing the default call to fail.
fail("The test case is empty.");
} | public void testSetVisibleTo() {
System.out.println("testSetVisibleTo");
fail("The test case is empty.");
} | public void testsetvisibleto() { system.out.println("testsetvisibleto"); fail("the test case is empty."); } | CBIIT/camod | [
0,
0,
0,
1
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.