NamCyan/codebert-base-technical-debt-code-tesoro
Text Classification • 0.1B • Updated • 7
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 sequencelengths 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
] |
This repository contains the data of Improving the detection of technical debt in Java source code with an enriched dataset.