@Test(expected = NullPointerException.class) public void testGetLabelNullAbbreviations() { GraphExportStyles.getLabel(null, "com.my.any.Clazz"); }
@SuppressWarnings("squid:S4248") public static String getLabel(List<Abbreviation> abbreviations, String name) { checkNotNull(abbreviations, "abbreviations"); if (name == null) { return null; } String result = name; for (Abbreviation abbreviation : abbreviations) { result = abbreviation.abbreviate(result); } result = result.replaceAll("_ROOT$", ""); return result; }
GraphExportStyles { @SuppressWarnings("squid:S4248") public static String getLabel(List<Abbreviation> abbreviations, String name) { checkNotNull(abbreviations, "abbreviations"); if (name == null) { return null; } String result = name; for (Abbreviation abbreviation : abbreviations) { result = abbreviation.abbreviate(result); } result = result.replaceAll("_ROOT$", ""); return result; } }
GraphExportStyles { @SuppressWarnings("squid:S4248") public static String getLabel(List<Abbreviation> abbreviations, String name) { checkNotNull(abbreviations, "abbreviations"); if (name == null) { return null; } String result = name; for (Abbreviation abbreviation : abbreviations) { result = abbreviation.abbreviate(result); } result = result.replaceAll("_ROOT$", ""); return result; } private  GraphExportStyles(); }
GraphExportStyles { @SuppressWarnings("squid:S4248") public static String getLabel(List<Abbreviation> abbreviations, String name) { checkNotNull(abbreviations, "abbreviations"); if (name == null) { return null; } String result = name; for (Abbreviation abbreviation : abbreviations) { result = abbreviation.abbreviate(result); } result = result.replaceAll("_ROOT$", ""); return result; } private  GraphExportStyles(); static EdgeStyle getEdgeStyle(Dependency rel); @SuppressWarnings("squid:S4248") // wants to move the RegExes into constants; would not help readability here. static String getId(String classname); @SuppressWarnings("squid:S4248") // wants to move the RegExes into constants; would not help readability here. static String getLabel(List<Abbreviation> abbreviations, String name); }
GraphExportStyles { @SuppressWarnings("squid:S4248") public static String getLabel(List<Abbreviation> abbreviations, String name) { checkNotNull(abbreviations, "abbreviations"); if (name == null) { return null; } String result = name; for (Abbreviation abbreviation : abbreviations) { result = abbreviation.abbreviate(result); } result = result.replaceAll("_ROOT$", ""); return result; } private  GraphExportStyles(); static EdgeStyle getEdgeStyle(Dependency rel); @SuppressWarnings("squid:S4248") // wants to move the RegExes into constants; would not help readability here. static String getId(String classname); @SuppressWarnings("squid:S4248") // wants to move the RegExes into constants; would not help readability here. static String getLabel(List<Abbreviation> abbreviations, String name);  }