src.samples.java.ex.CNC_Sample Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fb-contrib Show documentation
Show all versions of fb-contrib Show documentation
An auxiliary findbugs.sourceforge.net plugin for java bug detectors that fall outside the narrow scope of detectors to be packaged with the product itself.
package ex;
import java.util.Collections;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
public class CNC_Sample {
// tag CNC_COLLECTION_NAMING_CONFUSION
Map argList;
// tag CNC_COLLECTION_NAMING_CONFUSION
Set targetMap;
// tag CNC_COLLECTION_NAMING_CONFUSION
List bernoulliSet;
LinkedList mLinkedList = new LinkedList<>();
// tag 3xCNC_COLLECTION_NAMING_CONFUSION
public void testCNC(Map argSet, Set nameList, List nameMap) {
nameList.addAll(transferData(nameMap));
}
private Set transferData(List oldList) {
if (oldList.isEmpty()) {
return Collections.emptySet();
}
// tag CNC_COLLECTION_NAMING_CONFUSION
Set newList = new HashSet<>();
for (String s : oldList) {
newList.add(s);
}
return newList;
}
}