CPD Results
The following document contains the results of PMD's CPD 5.0.2.
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 (DatabaseException 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("TODO No one else has ever called this method." + |
File | Line |
---|
org/paneris/bibliomania/ShopOrder.java | 53 |
org/paneris/bibliomania/ShopOrderItem.java | 60 |
super.setStatus(cooked);
}
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/bob/SearchResults.java | 49 |
org/paneris/bibliomania/metasearch/bol/SearchResults.java | 66 |
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()) { |