CPD Results
The following document contains the results of PMD's CPD
4.1.
Duplications
| File |
Line |
| yarfraw\mapping\backward\impl\Utils.java |
19
|
| yarfraw\mapping\forward\impl\Utils.java |
11
|
private Utils(){}
/**
* Gets the <code>emailOrText</code> field of the first person in the input list.
* @param persons
* @return
*/
public static String getEmailOrText(List<Person> persons){
String ret = null;
if(CollectionUtils.isNotEmpty(persons)){
Person p = persons.get(0);
ret = p == null ? null : p.getEmailOrText();
}
return ret;
}
/**
* Gets the <code>href</code> field of the first link in the input list.
* @param links
* @return
*/
public static String getHrefLink(List<Link> links){
String ret = null;
if(CollectionUtils.isNotEmpty(links)){
Link l = links.get(0);
ret = l == null ? null : l.getHref();
}
return ret;
}
}
|
| File |
Line |
| yarfraw\utils\extension\ExtensionUtils.java |
240
|
| yarfraw\utils\extension\ExtensionUtils.java |
504
|
SyndicationExtension ret = new SyndicationExtension();
try {
if(otherElements != null){
Iterator<Element> it = otherElements.iterator();
Unmarshaller u = getContext(ContextEnum.SY).createUnmarshaller();
while(it.hasNext()){
Element e = it.next();
if(e == null){
continue;
}
QName name = new QName(e.getNamespaceURI(), e.getLocalName());
if(same(name, SY_UpdateBase_QNAME)){
|
| File |
Line |
| yarfraw\mapping\backward\impl\Atom10MappingUtils.java |
234
|
| yarfraw\mapping\forward\impl\Atom10MappingUtils.java |
42
|
LinkType ret = FACTORY.createLinkType();
ret.setBase(link.getBase());
ret.setLang(link.getLang());
if(link.getOtherAttributes() != null){
ret.getOtherAttributes().putAll(link.getOtherAttributes());
}
ret.setHref(link.getHref());
ret.setHreflang(link.getHreflang());
ret.setLength(link.getLength() == null? null : new BigInteger(String.valueOf(link.getLength())));
|
| File |
Line |
| yarfraw\mapping\forward\impl\Atom10MappingUtils.java |
228
|
| yarfraw\mapping\forward\impl\Atom10MappingUtils.java |
278
|
ret.getContent().add(in.getXhtmlDiv());
}
if(in.getOtherElements() != null){
ret.getContent().addAll(in.getOtherElements());
}
if(in.getOtherAttributes() != null){
ret.getOtherAttributes().putAll(in.getOtherAttributes());
}
ret.setBase(in.getBase());
ret.setLang(in.getLang());
return ret;
}
public static IconType toIcon(Image in) {
|