id stringlengths 36 36 | text stringlengths 1 1.25M |
|---|---|
2eb4069e-397c-41d1-a311-242191608589 | public void setDaysInYear(int daysInYear) {this.daysInYear = daysInYear;} |
2db3b9eb-1033-426f-85d1-d9283b1790c2 | public Date getDueDate() {return dueDate;} |
70a616e0-92fb-4db4-aadb-5ddce15c4075 | public void setDueDate(Date dueDate) {this.dueDate = dueDate;} |
de2289ae-da26-40c3-a54e-8a84efa9bcdf | public double getInterestPayAmt() {return interestPayAmt;} |
7e60e695-def2-4e98-bee9-2c891eb99368 | public void setInterestPayAmt(double interestAmnt) {this.interestPayAmt = interestAmnt;} |
ab43904a-ef77-4439-9df6-882ee029d477 | public int getNumPayments() {return numPayments;} |
dffb5738-b5be-42fb-9a2a-60ee934945f6 | public void setNumPayments(int numPayments) {this.numPayments = numPayments;} |
6e68ccbd-ba7f-48e2-9e49-a4c55a1f7d32 | public Date getOrigDate() {return origDate;} |
f3a9b71f-0fbb-431e-9b22-b4acd1fd7e78 | public void setOrigDate(Date origDate) {this.origDate = origDate;} |
70820707-3f59-45e5-ac61-515821de40c1 | public double getPaymentAmt() {return paymentAmt;} |
ba094bc5-b025-4968-932a-2055e6b645b5 | public void setPaymentAmt(double paymentAmt) {this.paymentAmt = paymentAmt;} |
b2d6eb30-402c-43c3-9855-95891bb7644b | public int getPayFrequency() {return payFrequency;} |
9d3be194-2901-41cf-b824-33c00bdac749 | public void setPayFrequency(int payFrequency) {this.payFrequency = payFrequency;} |
cb0544a8-d050-4514-b4ca-443fa57637bc | public double getPeriodInterest() {return periodInterest;} |
e0e7f4a4-7064-4d5d-b078-da01d300a9c5 | public abstract void setPeriodInterest(); |
b864542c-f08c-4684-a799-42a26e1e115d | public int getPrincipal() {return principal;} |
339c4e33-2cab-4b81-9b9c-accb4518da85 | public void setPrincipal(int principal) {this.principal = principal;} |
90fbf17a-7782-4424-a32e-8865975f6907 | public double getPrincipalPayAmt() {return principalPayAmt;} |
ddc007d5-d91a-4f75-aa00-5a78d497cf60 | public void setPrincipalPayAmt(double principalPayAmt) {this.principalPayAmt = principalPayAmt;} |
e2869010-88a5-4e8c-913d-298f007c97c7 | public Date getSemiMonthlyFirstDate() {return semiMonthlyFirstDate;} |
2fd3d063-fb16-4f1e-9c2d-a5850034b30a | public void setSemiMonthlyFirstDate(Date semiMonthlyFirstDate) {this.semiMonthlyFirstDate = semiMonthlyFirstDate;} |
0c9beb18-bade-41b8-98f0-cee685f5d5e9 | public Date getSemiMonthlySecondDate() {return semiMonthlySecondDate;} |
87ab856c-55db-461f-a7bb-269b48f00e6f | public void setSemiMonthlySecondDate(Date semiMonthlySecondDate) {this.semiMonthlySecondDate = semiMonthlySecondDate;} |
a7b2382d-1714-4faa-8f29-a396eb118e93 | public PDLoan (int principal, int payFreq, double apr, double periodInt, int payDwnPeriod,
double payDwnAmt, Date origDate) {
super (principal, payFreq, apr, periodInt, origDate);
this.payDwnPeriod = payDwnPeriod;
this.payDwnAmt = payDwnAmt;
} |
638c548f-ea9b-40d1-907f-e68c774c2387 | public int getPayDwnPeriod() {
return payDwnPeriod;
} |
aacd7df3-5e23-4d90-859d-ff1b2a928dc7 | public void setPayDwnPeriod(int payDwnPeriod) {
this.payDwnPeriod = payDwnPeriod;
} |
2549fd0c-a460-4d1a-aff4-1c97f969fdce | public double getPayDwnAmt() {
return payDwnAmt;
} |
e16680d5-92d1-40ba-80b6-c1f0dab6b645 | public void setPayDwnAmt(double payDwnAmt) {
this.payDwnAmt = payDwnAmt;
} |
4acb54fd-67dc-4693-a732-a6104b3a47e3 | @Override
public void setPeriodInterest() {
switch (payFrequency) {
case 7:
periodInterest = 15.0;
break;
case 14:
case 15:
periodInterest = 30.0;
break;
case 30:
period... |
28a7ca54-478b-48a9-b9e3-38eaf0f301ee | public void setPeriodInterest(double interest) {
periodInterest = interest;
} |
75538959-b702-4dab-a012-15f183d88b62 | public LoanCalculator() throws ParseException {
df = DateFormat.getDateInstance(DateFormat.SHORT);
String curDateStr = df.format(new Date());
curDate = df.parse(curDateStr);
installLoan = new InstallmentLoan(300, PayFrequency.BI_WEEKLY.getLoanPeriod(),
9, 690.0, 23.014,... |
188ce027-ddd6-42b9-83f0-5993d7b7cc05 | public void calculateInstallPmt() {
switch (installLoan.getPayFrequency()) {
case 7:
case 14:
case 15:
installLoan.setPaymentAmt((FinanceLib.pmt(installLoan.getPeriodInterest() / 100,
installLoan.getTermLength() * 2, (double) installLo... |
14da6577-44bf-4d0b-a627-a14274827d99 | public double calculateInstallIntPmt(int paymentNum) {
double payment = 0.0;
switch (installLoan.getPayFrequency()) {
case 7:
case 14:
case 15:
payment = Finance.ipmt(installLoan.getPeriodInterest() / 100,
paymentNum, installLo... |
606b2c51-ce35-48b0-b2a9-d689cc9c837b | private double calculatePdlPayment(int renCount, double balance) {
double payment = 0.0;
double principal, payDwnAmt, perInt;
int payDwnPer;
principal = pdLoan.getPrincipal();
payDwnAmt = pdLoan.getPayDwnAmt();
payDwnPer = pdLoan.getPayDwnPeriod();
perInt = pdLoa... |
fd1628c1-077f-4aaf-9b92-a2d8f2c16a0b | private double calculatePdlBalance(int renCount) {
double balance = 0.0;
double principal, payDwnAmt;
int payDwnPer;
principal = pdLoan.getPrincipal();
payDwnAmt = pdLoan.getPayDwnAmt();
payDwnPer = pdLoan.getPayDwnPeriod();
if (renCount < payDwnPer) {
... |
ee133c0c-8c5a-48ac-a039-c0f2fb8c3c52 | public ArrayList<Double> calculatePdlPayoffAmt() {
ArrayList<Double> payOffAmts = new ArrayList<Double>();
double totalPayments = 0.0;
double balance = pdLoan.getPrincipal();
int renCount = 0;
while (balance > 0) {
++renCount;
totalPayments += calculateP... |
bad45814-f731-4c25-81b3-4546fcdbb11f | public double proRatePmt(int numDays, Loan loan) {
double amount = 0.0;
loan.getPeriodInterest();
return amount;
} |
f87e2c5d-65c6-4db7-8a24-6bbf83f33e90 | public double getInstallAPR() {
return installLoan.getApr();
} |
7143527f-0c75-4f55-9f85-65953a024b6d | public void setInstallAPR(double apr) {
installLoan.setApr(apr);
installLoan.setPeriodInterest();
} |
07fd824a-8a1c-4d68-acda-a6a1dc45006a | public Date getCurDate() {
return curDate;
} |
11fd6f92-2e55-47bc-b1f3-a04064c58cd7 | public Date getOrigDate() {
return installLoan.getOrigDate();
} |
a2de1197-61cc-4709-8007-62159bdd5d2d | public void setOrigDate(Date d) {
installLoan.setOrigDate(d);
} |
aaab67c9-82d1-4db2-8650-b0815ec514d2 | public double getInstallPaymentAmt() {
return installLoan.getPaymentAmt();
} |
a2ec66cd-c71e-434a-82b0-3e6a65106bbb | public int getInstallPayFreq() {
return installLoan.getPayFrequency();
} |
449d7878-a131-4e58-bdcf-71c923feafb5 | public int getPdlPayFreq() {
return pdLoan.getPayFrequency();
} |
d7a0052f-192f-4369-9e99-92372b801311 | public void setPayFreq(int payFreq) {
installLoan.setPayFrequency(payFreq);
pdLoan.setPayFrequency(payFreq);
installLoan.setPeriodInterest();
} |
e2bc6187-7ba4-48be-979c-c4af5bb959b3 | public void setPdlPayDwnAmt(double paydown) {
pdLoan.setPayDwnAmt(paydown);
} |
3f8a6fd6-8b68-4888-b369-0d2ab71bb1b6 | public double getPdlPeriodInt() {
return pdLoan.getPeriodInterest();
} |
41bb658b-182c-41e6-adea-6b058b686483 | public void setPdlPeriodInt(double interest) {
pdLoan.setPeriodInterest(interest);
} |
6c958487-e90c-4850-bc01-3e5600555f04 | public void setPdlPayDwnNum(int renNum) {
pdLoan.setPayDwnPeriod(renNum);
} |
e4aac6eb-040c-40f9-be74-b53d214234a3 | public int getInstallPrincipal() {
return installLoan.getPrincipal();
} |
72326964-7e9b-4ba7-8afe-d90d7fa086e6 | public void setPrincipal(int principal) {
installLoan.setPrincipal(principal);
pdLoan.setPrincipal(principal);
} |
8dbdf616-2539-40bb-a5b9-e2001334ef12 | public InstallmentLoan getInstallLoan() {
return installLoan;
} |
6b063338-c53b-44e4-8df1-da4af515405c | public Date getInstallFirstDueDate() {
return installLoan.getDueDate();
} |
3982cc05-3bae-419d-906e-ca3f9bbadca0 | public Date getPdlFirstDueDate() {
return pdLoan.getDueDate();
} |
51656997-b54e-4255-92e9-09116cd20db0 | public PDLoan getPdlLoan() {
return pdLoan;
} |
7bca62f4-d445-4423-977f-0d7782e1513d | public void setFirstDueDate(Date d) {
installLoan.setDueDate(d);
pdLoan.setDueDate(curDate);
} |
64706dea-f72f-48af-9d34-2671091049dd | public Date getSemiMonthFirstDate() {
return installLoan.getSemiMonthlyFirstDate();
} |
f523b4f9-c620-41a0-a7f1-db5369acd3d7 | public void setSemiFirstDate(Date d) {
installLoan.setSemiMonthlyFirstDate(d);
} |
a26128bc-b529-44ce-ae0c-7a29ebe08d9f | public Date getSemiMonthSecDate() {
return installLoan.getSemiMonthlySecondDate();
} |
9b24bb9d-f805-48be-8a25-6b85db19d2d7 | public void setSemiSecDate(Date d) {
installLoan.setSemiMonthlySecondDate(d);
} |
e2f1e1a5-1125-45a0-a8ff-d1bd8828705a | public int getTermLength() {
return installLoan.getTermLength();
} |
a750dc62-f049-4afe-8299-962eff813c2b | public void setTermLength(int term) {
installLoan.setTermLength(term);
} |
54f40d55-fcdb-4b5b-bf13-62ba27dbd672 | public Date getNextPaydate(Loan loan) {
Calendar nextDateCal = Calendar.getInstance();
Date dueDate = new Date(getInstallFirstDueDate().getTime());
nextDateCal.setTime(dueDate);
if (loan.getPayFrequency() == PayFrequency.MONTHLY.getLoanPeriod()) {
nextDateCal.add(Calendar.D... |
d038ea73-a40b-484b-a70a-8ed4e22e6b45 | private int findMonthlyPaydate(Calendar cal) {
int days = 0; // hold last day of the month
switch (cal.getActualMaximum(Calendar.DAY_OF_MONTH)) {
case 28:
days = 28;
break;
case 29:
days = 29;
break;
cas... |
ace8f46a-42e5-4843-8582-f8b806632d4c | private Date findSemiMonthlyPaydate(Calendar curPaydate) {
if (curPaydate.getTime().equals(getInstallFirstDueDate())) {
return new Date(curPaydate.getTimeInMillis());
} else {
return new Date();
}
} |
dd96cc5c-eb07-4968-b0de-f50d06ec347e | @Override
public void start(String... arguments) throws Exception {
Configuration configuration = configurationGenerator.generateConfiguration(arguments);
if (null != configurationCallback) {
configurationCallback.setting(configuration);
}
List<Transaction> transactions =... |
6aac22cc-91a8-4827-b546-43a4b8123d2f | public void setRunner(Runner runner) {
this.runner = runner;
} |
0076059a-fb21-4646-947e-10cd54c09c9f | public void setResultAnalyser(ResultAnalyser resultAnalyser) {
this.resultAnalyser = resultAnalyser;
} |
cf70071d-74b1-4db3-acac-74eeeb8bf7f1 | public void setConfigurationCallback(ConfigurationCallback configurationCallback) {
this.configurationCallback = configurationCallback;
} |
eb8c69dc-eb92-4916-aabc-db9ed333bbc1 | public void setConfigurationGenerator(ConfigurationGenerator configurationGenerator) {
this.configurationGenerator = configurationGenerator;
} |
02c90843-2e91-4c67-8a23-7e77afa1dd13 | void start(String... arguments) throws Exception; |
b67d0165-1a0c-4290-a061-7440023b7a01 | void setting(Configuration configuration); |
7d97b2d9-e6c4-4cc6-a5bd-7eeeb536ac94 | private BasicUtils() {
} |
ac2f92bb-d959-4096-afea-359033abe007 | public static String formatDate(long date, String format) {
return formatDate(new Date(date), format);
} |
3f136259-954e-4e40-8f0a-256e32f5583e | public static String formatDate(Date date, String format) {
SimpleDateFormat dateFormat = new SimpleDateFormat(format);
return dateFormat.format(date);
} |
1a0e4d68-d51b-4857-8281-c321c0dbd219 | public static String defaultFormatDate(long date) {
return formatDate(date, DEFAULT_DATE_PATTERN);
} |
3c0b52ef-e46c-454b-bb48-ba5983a1e6f7 | public static String defaultFormatDate(Date date) {
return formatDate(date, DEFAULT_DATE_PATTERN);
} |
8ccd3117-5abb-475c-b7c9-60c4e03adace | public static <T> T newInstance(Class<T> clazz) {
try {
return clazz.newInstance();
} catch (Exception e) {
logger.error(e.getMessage(), e);
}
return null;
} |
39aa0cb2-0b38-4a27-9fae-90f062e0c8d4 | public Integer getConcurrent() {
return concurrent;
} |
d64b794c-aad4-4fc4-9f29-a65e27bb8aa6 | public void setConcurrent(Integer concurrent) {
this.concurrent = concurrent;
} |
fc95ca0f-3bfc-4106-b247-aa7254f548a5 | public Long getDuration() {
return duration;
} |
b018aabf-8a8c-4578-aa4c-a5dab11efc5e | public void setDuration(Long duration) {
this.duration = duration;
} |
81f6c6ba-a97d-40c8-8b42-052addd97336 | public Integer getTimeout() {
return timeout;
} |
b222fc68-c826-4157-a636-c5b6874616b5 | public void setTimeout(Integer timeout) {
this.timeout = timeout;
} |
21d29c42-b39a-4df9-ad8c-23603e46069a | public Integer getIndex() {
return index;
} |
2f9dc962-d3b5-4190-af26-90f341ada58a | public void setIndex(Integer index) {
this.index = index;
} |
9ec41837-9f4f-4035-acdd-7804fa15bd95 | public Class<Action> getAction() {
return action;
} |
6121efef-ce0c-4d45-a618-dde2d0e3ab01 | public void setAction(Class<Action> action) {
this.action = action;
} |
eed424a1-d8bc-4e64-b275-f94f61e8e4c1 | public Map<String, Object> getParameters() {
return parameters;
} |
be0961fc-56e2-4fcd-8598-900a7654b23c | public void setParameters(Map<String, Object> parameters) {
this.parameters = parameters;
} |
8050e3f4-8b36-45a4-a209-5f5ee0400c0d | void analysis(Configuration configuration, List<Transaction> transactions); |
0b110843-e63f-45c3-a83a-9a26130e5753 | @Override
public void analysis(Configuration configuration, List<Transaction> transactions) {
Collections.sort(transactions, new Comparator<Transaction>() {
@Override
public int compare(Transaction o1, Transaction o2) {
return (int) (o1.getCost() - o2.getCost());
... |
afcbbe32-0b17-41fb-ba62-566854333a30 | @Override
public int compare(Transaction o1, Transaction o2) {
return (int) (o1.getCost() - o2.getCost());
} |
4a4d62e3-3acf-41f3-b6ab-51650908000d | private void putRunningEntry(Map<String, Integer> runningMapper, long runningTime) {
String formatDate = BasicUtils.defaultFormatDate(runningTime);
Integer count = runningMapper.get(formatDate);
if (count == null) {
count = 1;
} else {
count++;
}
r... |
32b0c12e-0f54-45f0-be3d-d0ecf18ed6e5 | Configuration generateConfiguration(String[] commands) throws ClassNotFoundException; |
e620145f-98f6-4569-87e0-6b2ebeb1f7d0 | @Override
@SuppressWarnings("unchecked")
public Configuration generateConfiguration(String[] commands) throws ClassNotFoundException {
Configuration configuration = new Configuration();
for (int i = 0; i < commands.length; i++) {
String command = commands[i];
if ("-c".equ... |
c52d3250-555b-4015-80a8-3ac070b2e10a | void begin(); |
d1f9b3e1-a92e-4c1d-83eb-5bf374d80d2b | void end(); |
5e264fc3-3db9-425c-ac9e-7efb8d829b38 | void begin(String name); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.