File path: /jabref-2.10/src/java/net/sf/jabref/msbib/MSBibDatabase.java | File path: /jabref-2.10/src/java/net/sf/jabref/mods/MODSDatabase.java | |||
Method name: void addEntries(BibtexDatabase, Set
|
Method name: void addEntries(BibtexDatabase, Set
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | private void addEntries(BibtexDatabase database, Set<String> keySet) { | 1 | private void addEntries(BibtexDatabase database, Set<String> keySet) { | |
2 | entries = new HashSet<MSBibEntry>(); | 2 | entries = new HashSet<MODSEntry>(); | |
3 | for (String s : keySet){ | 3 | for(Iterator<String> iter = keySet.iterator(); iter.hasNext(); ) { | |
4 | BibtexEntry entry = database.getEntryById(s); | 4 | BibtexEntry entry = database.getEntryById(iter.next()); | |
5 | MSBibEntry newMods = new MSBibEntry(entry); | 5 | MODSEntry newMods = new MODSEntry(entry); | |
6 | entries.add(newMods); | 6 | entries.add(newMods); | |
7 | } | 7 | } | |
8 | } | 8 | } | |
See real code fragment | See real code fragment |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.0 |
Similarity Score | 0.400 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | for (String s : keySet) | 2 | for (Iterator<String> iter = keySet.iterator(); iter.hasNext(); ) | ||||||||||||||||
3 | BibtexEntry entry = database.getEntryById(s); |
| 3 | BibtexEntry entry = database.getEntryById(iter.next()); | |||||||||||||||
|
| 4 | MODSEntry newMods = new MODSEntry(entry); | ||||||||||||||||
4 | MSBibEntry newMods = new MSBibEntry(entry); |
| | ||||||||||||||||
5 | entries.add(newMods); |
| 5 | entries.add(newMods); |
Row | Violation |
---|---|
1 | Expression s cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement MODSEntry newMods=new MODSEntry(entry); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement MSBibEntry newMods=new MSBibEntry(entry); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Type net.sf.jabref.msbib.MSBibEntry of variable newMods does not match with type net.sf.jabref.mods.MODSEntry of variable newMods |
5 | Type java.util.Set<net.sf.jabref.msbib.MSBibEntry> of variable entries does not match with type java.util.Set<net.sf.jabref.mods.MODSEntry> of variable entries |