CPD Results
The following document contains the results of PMD's CPD
4.1.
Duplications
| File |
Line |
| org/paneris/bibliomania/fti/HitTextsEnumeration.java |
66
|
| org/paneris/bibliomania/fti/ScoredHitTextsEnumeration.java |
56
|
}
}
totalCountIsMinimum = a == requestedPageSize;
pageSize = a;
us = texts.elements();
} catch (DbException e) {
throw new FTIException(e);
}
}
//
// -------------
// Enumeration
// -------------
//
public boolean hasMoreElements() {
return us.hasMoreElements();
}
public Object nextElement() {
return us.nextElement();
}
//
// -----------------
// PageEnumeration
// -----------------
//
public int getPageStart() {
return pageStart;
}
public int getPageSize() {
return pageSize;
}
public int getPageEnd() {
return pageStart + pageSize - 1;
}
public int getTotalCount() {
return getPageEnd();
}
public boolean getTotalCountIsMinimum() {
return totalCountIsMinimum;
}
public Integer getPrevPageStart() {
int it = pageStart - requestedPageSize;
return it < 0 ? null : new Integer(it);
}
public Integer getNextPageStart() {
return totalCountIsMinimum ? new Integer(pageStart + requestedPageSize)
: null;
}
public int getCurrentPosition() {
throw new RuntimeException("No one else has ever called this method.");
|
| File |
Line |
| org/paneris/bibliomania/metasearch/amazon/SearchResults.java |
68
|
| org/paneris/bibliomania/metasearch/bol/SearchResults.java |
66
|
book.setPrice_unsafe(plaintext());
return book;
}
catch (ParseException e) {
// try again!
}
}
}
catch (ArrayIndexOutOfBoundsException e) {
}
catch (ParseException e) {
}
return null;
}
public static void main(String[] args) throws Exception {
BookStockingFactory dummy =
new BookStockingFactory() {
public BookStocking newStocking() {
return new BookStocking();
}
};
SearchResults r = new SearchResults(IoUtils.slurp(new File(args[0]), 1000),
dummy);
while (r.hasMoreElements())
((BookStocking)r.nextElement()).dump(System.out);
}
}
|
| File |
Line |
| org/paneris/bibliomania/ShopOrder.java |
50
|
| org/paneris/bibliomania/ShopOrderItem.java |
60
|
orderL.setStatus(db.getOrderStatusTable().getAuthorised());
}
public void setFufilleddate_unsafe(Timestamp cooked) {
// avoid nulling it if the flag is set
BibliomaniaDatabase db = (BibliomaniaDatabase)getDatabase();
if (getStatus() != db.getOrderStatusTable().getFufilled() || cooked != null) {
super.setFufilleddate_unsafe(cooked);
}
}
protected void writeLock() {
super.writeLock();
if (getDate_unsafe() == null) {
setDate_unsafe(now());
}
}
private static java.sql.Timestamp now() {
return new java.sql.Timestamp(new java.util.Date().getTime());
}
}
|
| File |
Line |
| org/paneris/bibliomania/metasearch/amazon/SearchResults.java |
67
|
| org/paneris/bibliomania/metasearch/bob/SearchResults.java |
48
|
skipTo((byte)'>');
book.setDeliveryinfo_unsafe(plaintext());
return book;
}
catch (ParseException e) {
// try again!
}
}
}
catch (ArrayIndexOutOfBoundsException e) {
}
catch (ParseException e) {
}
return null;
}
public static void main(String[] args) throws Exception {
BookStockingFactory dummy =
new BookStockingFactory() {
public BookStocking newStocking() {
return new BookStocking();
}
};
SearchResults r = new SearchResults(IoUtils.slurp(new File(args[0]), 1000),
dummy);
while (r.hasMoreElements()) {
|
| File |
Line |
| org/paneris/bibliomania/metasearch/bob/SearchResults.java |
49
|
| org/paneris/bibliomania/metasearch/bol/SearchResults.java |
66
|
book.setPrice_unsafe(plaintext());
return book;
}
catch (ParseException e) {
// try again!
}
}
}
catch (ArrayIndexOutOfBoundsException e) {
}
catch (ParseException e) {
}
return null;
}
public static void main(String[] args) throws Exception {
BookStockingFactory dummy =
new BookStockingFactory() {
public BookStocking newStocking() {
return new BookStocking();
}
};
SearchResults r = new SearchResults(IoUtils.slurp(new File(args[0]), 1000),
dummy);
while (r.hasMoreElements())
|