Match #1: /jabref-code/jabref/src/java/net/sf/jabref/msbib/MSBibEntry.java: line 1176-1192 /java/156697-156744-1: line 3-19 //This code replaces all non-valid Xml Utf8 from a String. < public String stripNonValidXMLCharacters(String in) { < StringBuffer out = new StringBuffer(); // Used to hold the output. < char current; // Used to reference the current character. < < if (in == null || ("".equals(in))) return ""; // vacancy test. < for (int i = 0; i < in.length(); i++) { < current = in.charAt(i); // NOTE: No IndexOutOfBoundsException caught here; it should not happen. < if ((current == 0x9) || < (current == 0xA) || < (current == 0xD) || < ((current >= 0x20) && (current <= 0xD7FF)) || < ((current >= 0xE000) && (current <= 0xFFFD)) || < ((current >= 0x10000) && (current <= 0x10FFFF))) < out.append(current); < } < return out.toString(); < } --- >public String stripNonValidXMLCharacters(String in) { > StringBuffer out = new StringBuffer(); // Used to hold the output. > char current; // Used to reference the current character. > > if (in == null || ("".equals(in))) return ""; // vacancy test. > for (int i = 0; i < in.length(); i++) { > current = in.charAt(i); > if ((current == 0x9) || > (current == 0xA) || > (current == 0xD) || > ((current >= 0x20) && (current <= 0xD7FF)) || > ((current >= 0xE000) && (current <= 0xFFFD)) || > ((current >= 0x10000) && (current <= 0x10FFFF))) > out.append(current); > } > return out.toString(); >} Match #2: /jabref-code/jabref/src/java/net/sf/jabref/mods/MODSEntry.java: line 318-334 /java/156697-156744-1: line 3-19 //This code replaces all non-valid Xml Utf8 from a String. < public String stripNonValidXMLCharacters(String in) { < StringBuffer out = new StringBuffer(); // Used to hold the output. < char current; // Used to reference the current character. < < if (in == null || ("".equals(in))) return ""; // vacancy test. < for (int i = 0; i < in.length(); i++) { < current = in.charAt(i); // NOTE: No IndexOutOfBoundsException caught here; it should not happen. < if ((current == 0x9) || < (current == 0xA) || < (current == 0xD) || < ((current >= 0x20) && (current <= 0xD7FF)) || < ((current >= 0xE000) && (current <= 0xFFFD)) || < ((current >= 0x10000) && (current <= 0x10FFFF))) < out.append(current); < } < return out.toString(); < } --- >public String stripNonValidXMLCharacters(String in) { > StringBuffer out = new StringBuffer(); // Used to hold the output. > char current; // Used to reference the current character. > > if (in == null || ("".equals(in))) return ""; // vacancy test. > for (int i = 0; i < in.length(); i++) { > current = in.charAt(i); > if ((current == 0x9) || > (current == 0xA) || > (current == 0xD) || > ((current >= 0x20) && (current <= 0xD7FF)) || > ((current >= 0xE000) && (current <= 0xFFFD)) || > ((current >= 0x10000) && (current <= 0x10FFFF))) > out.append(current); > } > return out.toString(); >} Match #3: /jabref-code/jabref/src/java/net/sf/jabref/imports/ZipFileChooser.java: line 246-249 /java/7033502-7033549-1: line 3-6 // You need to get a handle to the TableColumnModel, and from there you are able to set the individual column widths. < TableColumnModel cm = table.getColumnModel(); < cm.getColumn(0).setPreferredWidth(200); < cm.getColumn(1).setPreferredWidth(150); < cm.getColumn(2).setPreferredWidth(100); --- >TableColumnModel tcm = myTable.getColumnModel(); >tcm.getColumn(0).setPreferredWidth(100); //Name >tcm.getColumn(1).setPreferredWidth(40); //Title >tcm.getColumn(2).setPreferredWidth(400); //Surname Match #4: /jabref-code/jabref/src/java/net/sf/jabref/oo/StyleSelectDialog.java: line 166-169 /java/7033502-7033549-1: line 3-6 // You need to get a handle to the TableColumnModel, and from there you are able to set the individual column widths. < TableColumnModel cm = table.getColumnModel(); < cm.getColumn(0).setPreferredWidth(100); < cm.getColumn(1).setPreferredWidth(200); < cm.getColumn(2).setPreferredWidth(80); --- >TableColumnModel tcm = myTable.getColumnModel(); >tcm.getColumn(0).setPreferredWidth(100); //Name >tcm.getColumn(1).setPreferredWidth(40); //Title >tcm.getColumn(2).setPreferredWidth(400); //Surname Match #5: /jabref-code/jabref/src/java/net/sf/jabref/imports/CsaImporter.java: line 263-267 /java/8923571-8923671-1: line 3-5 //Then invoking matcher.find(); would return the groups. < if (fm.find()) { < < // save the field name (long and short) < String fabbr = fm.group(1); < String fname = fm.group(2); --- >if (matcher.find()) { > String selector = matcher.group(1); > String definition = matcher.group(2); Match #6: /jabref-code/jabref/src/java/net/sf/jabref/imports/MedlineFetcher.java: line 105-109 /java/10171683-10171762-1: line 3-5 //Read each line once. < String inLine; < while ((inLine = in.readLine()) != null) { < < // get the count < Matcher idMatcher = idPattern.matcher(inLine); --- >String parseMe; >while((parseMe = bufferedReader.readLine()) != null) { > Matcher regexMatcher = regex.matcher(parseMe); Match #7: /jabref-code/jabref/src/java/net/sf/jabref/Util.java: line 3147-3151 /java/5283444-5283753-1: line 3-6 //Convert array of strings into a string in Java. < StringBuilder sb = new StringBuilder(); < for (String keyword: keywords) { < sb.append(keyword); < sb.append(", "); < } --- >StringBuilder builder = new StringBuilder(); >for(String s : arr) { > builder.append(s); >} Match #8: /jabref-code/jpfcodegen/src/net/sf/jabref/plugin/util/CodeGenerator.java: line 152-155 /java/5283444-5283753-1: line 3-6 //Convert array of strings into a string in Java. < StringBuilder path = new StringBuilder(); < for (String part : parts) { < path.append(part).append("/"); < } --- >StringBuilder builder = new StringBuilder(); >for(String s : arr) { > builder.append(s); >} Match #9: /jabref-code/jabref/src/java/net/sf/jabref/util/ErrorConsole.java: line 84-87 /java/5283444-5283753-1: line 3-6 //Convert array of strings into a string in Java. < StringBuilder sb = new StringBuilder(); < for(String line: logOutput) { < sb.append(line); < } --- >StringBuilder builder = new StringBuilder(); >for(String s : arr) { > builder.append(s); >}