auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void canHandleIntermediateEmptyPage() { List<Integer> pagedList = new PagedList<Integer>(new Page<Integer>() { @Override public String nextPageLink() { return "A"; } @Override public List<Integer> items() { List<Integer> list = new ArrayList<>(); list.add(1); list.add(2); return list; } }) { private final ClientLogger logger = new ClientLogger(PagedList.class); @Override public Page<Integer> nextPage(String nextPageLink) { if (nextPageLink == "A") { return new Page<Integer>() { @Override public String nextPageLink() { return "B"; } @Override public List<Integer> items() { return new ArrayList<>(); } }; } else if (nextPageLink == "B") { return new Page<Integer>() { @Override public String nextPageLink() { return "C"; } @Override public List<Integer> items() { List<Integer> list = new ArrayList<>(); list.add(3); list.add(4); return list; } }; } else if (nextPageLink == "C") { return new Page<Integer>() { @Override public String nextPageLink() { return null; } @Override public List<Integer> items() { List<Integer> list = new ArrayList<>(); list.add(5); list.add(6); return list; } }; } logger.logAndThrow(new RuntimeException("nextPage should not be called after a page with next link as null")); <START> return null; <END> } }; ListIterator<Integer> itr = pagedList.listIterator(); int c = 1; while (itr.hasNext()) { Assert.assertEquals(c, (int) itr.next()); c++; } Assert.assertEquals(7, c); }</code><technical_language>This rule need enforced in test classes - changes reverted</technical_language>

Target:
public void canHandleIntermediateEmptyPage() { List<Integer> pagedList = new PagedList<Integer>(new Page<Integer>() { @Override public String nextPageLink() { return "A"; } @Override public List<Integer> items() { List<Integer> list = new ArrayList<>(); list.add(1); list.add(2); return list; } }) { @Override public Page<Integer> nextPage(String nextPageLink) { if (nextPageLink == "A") { return new Page<Integer>() { @Override public String nextPageLink() { return "B"; } @Override public List<Integer> items() { return new ArrayList<>(); } }; } else if (nextPageLink == "B") { return new Page<Integer>() { @Override public String nextPageLink() { return "C"; } @Override public List<Integer> items() { List<Integer> list = new ArrayList<>(); list.add(3); list.add(4); return list; } }; } else if (nextPageLink == "C") { return new Page<Integer>() { @Override public String nextPageLink() { return null; } @Override public List<Integer> items() { List<Integer> list = new ArrayList<>(); list.add(5); list.add(6); return list; } }; } throw new RuntimeException("nextPage should not be called after a page with next link as null"); } }; ListIterator<Integer> itr = pagedList.listIterator(); int c = 1; while (itr.hasNext()) { Assert.assertEquals(c, (int) itr.next()); c++; } Assert.assertEquals(7, c); }
Source:
<code><START> public RMStateDTO getInitialState(@HeaderParam("sessionid") String sessionId, <END> @HeaderParam("clientCounter") @DefaultValue("-1") String clientCounter) throws NotConnectedException { checkAccess(sessionId); long counter = Integer.valueOf(clientCounter); return RMStateCaching.getRMInitialState(counter); }</code><technical_language>RMStateDelta</technical_language>

Target:
public RMStateDelta getInitialState(@HeaderParam("sessionid") String sessionId, @HeaderParam("clientCounter") @DefaultValue("-1") String clientCounter) throws NotConnectedException { checkAccess(sessionId); long counter = Integer.valueOf(clientCounter); return RMStateCaching.getRMInitialState(counter); }
Source:
<code>public void fillToolBar(IToolBarManager toolBarManager) { toolBarManager.add(new Separator()); toolBarManager.add(new Action(Messages.AbstractReviewTaskEditorPage_Show_Review_Navigator, ReviewsImages.REVIEW) { @Override public void run() { try { PlatformUI.getWorkbench() .getActiveWorkbenchWindow() .getActivePage() <START> .showView(ReviewsUiConstants.REVIEW_EXPLORER_ID); <END> } catch (PartInitException e) { StatusHandler.log(new Status(IStatus.ERROR, ReviewsUiPlugin.PLUGIN_ID, e.getMessage(), e)); } } }); super.fillToolBar(toolBarManager); }</code><technical_language>Consider calling WorkbenchUtil.showViewInActiveWindow simpler</technical_language>

Target:
public void fillToolBar(IToolBarManager toolBarManager) { toolBarManager.add(new Separator()); toolBarManager.add(new Action(Messages.AbstractReviewTaskEditorPage_Show_Review_Navigator, ReviewsImages.REVIEW) { @Override public void run() { WorkbenchUtil.showViewInActiveWindow(ReviewsUiConstants.REVIEW_EXPLORER_ID); } }); super.fillToolBar(toolBarManager); }
Source:
<code>public void non_whitespace_tokens() { FileInput parsed = parse("if foo:\n pass"); IfStatement ifStmt = (IfStatement) parsed.statements().statements().get(0); List<Token> collect = new ArrayList<>(ifStmt.children().stream().map(t -> t.is(Kind.TOKEN) ? (Token) t : t.firstToken()).collect(Collectors.toList())); collect.add(parsed.lastToken()); <START> assertThat(TreeUtils.tokens(parsed)).containsExactly(collect.toArray(new Token[0])); <END> List<Token> nonWhitespaceTokens = TreeUtils.nonWhitespaceTokens(ifStmt); nonWhitespaceTokens.forEach(t -> { assertThat(t.type()).isNotIn(PythonTokenType.NEWLINE, PythonTokenType.INDENT, PythonTokenType.DEDENT); }); assertThat(nonWhitespaceTokens).hasSize(4); }</code><technical_language>I point of this assertion: testing nonWhitespaceTokens</technical_language>

Target:
public void non_whitespace_tokens() { FileInput parsed = parse("if foo:\n pass"); IfStatement ifStmt = (IfStatement) parsed.statements().statements().get(0); List<Token> nonWhitespaceTokens = TreeUtils.nonWhitespaceTokens(ifStmt); nonWhitespaceTokens.forEach(t -> assertThat(t.type()).isNotIn(PythonTokenType.NEWLINE, PythonTokenType.INDENT, PythonTokenType.DEDENT)); assertThat(nonWhitespaceTokens).hasSize(4); assertThat(nonWhitespaceTokens.stream().map(Token::value)).containsExactly("if", "foo", ":", "pass"); }
Source:
<code>public void test() { GetSpecificConfigurationObjectRequestData reqData = makeRequestDatareqData(); Object obj = commonMapper.map(reqData, GetSpecificConfigurationObjectRequestDataDto.class); <START> assertTrue(obj != null && obj instanceof GetSpecificConfigurationObjectRequestDataDto); <END> }</code><technical_language>check values of class, attribute obiscode mapping</technical_language>

Target:
public void test() { SpecificConfigurationObjectRequestData reqData1 = makeRequestData(); Object obj = commonMapper.map(reqData1, SpecificConfigurationObjectRequestDataDto.class); assertTrue(obj != null && obj instanceof SpecificConfigurationObjectRequestDataDto); Object reqData2 = commonMapper.map(obj, SpecificConfigurationObjectRequestData.class); assertTrue(reqData2 != null && reqData2 instanceof SpecificConfigurationObjectRequestData); assertTrue(reqData1.equals(reqData2)); }
Source:
<code>public static Bundle getBundleByMap(Map<String, Object> row){ Bundle b = new Bundle(); b.setId(row.get("id").toString()); b.setName(row.get("name").toString()); b.setPublishDate((Date)row.get("publish_date")); b.setExpireDate((Date)row.get("expire_date")); b.setOwner(UtilMethods.isSet(row.get("owner"))?row.get("owner").toString():""); b.setForcePush(UtilMethods.isSet(row.get("force_push")) && DbConnectionFactory .isDBTrue(row.get("force_push").toString())); <START> b.setFilterKey(UtilMethods.isSet(row.get("filter_key")) ? row.get("filter_key").toString() : ""); <END> return b; }</code><technical_language>rename bundle</technical_language>

Target:
public static Bundle getBundleByMap(Map<String, Object> row){ final Bundle bundle = new Bundle(); bundle.setId(row.get("id").toString()); bundle.setName(row.get("name").toString()); bundle.setPublishDate((Date)row.get("publish_date")); bundle.setExpireDate((Date)row.get("expire_date")); bundle.setOwner(UtilMethods.isSet(row.get("owner"))?row.get("owner").toString():""); bundle.setForcePush(UtilMethods.isSet(row.get("force_push")) && DbConnectionFactory .isDBTrue(row.get("force_push").toString())); bundle.setFilterKey(UtilMethods.isSet(row.get("filter_key")) ? row.get("filter_key").toString() : ""); return bundle; }
Source:
<code>public AddTruststoreAuthentication build() { <START> if (truststorePath != null && truststorePassword == null) { <END> throw new IllegalArgumentException("truststorePassword is manadatory when defining also truststore"); } return new AddTruststoreAuthentication(this); }</code><technical_language>truststorePath is optional, for example in case of PKCS11 dont truststorePath. Please leave if (truststorePassword == null) { message "truststorePassword is manadatory defining truststore"</technical_language>

Target:
public AddTruststoreAuthentication build() { if (truststorePassword == null) { throw new IllegalArgumentException("truststorePassword is manadatory when defining the truststore"); } return new AddTruststoreAuthentication(this); }
Source:
<code>public BuildingBlockObject registerBuilding(final String name, Block.Properties props, Item.Properties itemProps) { BlockItemObject<Block> blockObj = register(name, props, itemProps); return new BuildingBlockObject(blockObj, register(name + "_slab", () -> new SlabBlock(props), itemProps), register(name + "_stairs", () -> new StairsBlock(() -> blockObj.get().getDefaultState(), props), itemProps), register(name + "_wall", () -> new WallBlock(props), itemProps) <START> ); <END> }</code><technical_language>of methods final Function<? super B, ? extends BlockItem> item instead of Item.Properties add a custom BlockItem method. add a new registerBuilding call this properties</technical_language>

Target:
public BuildingBlockObject registerBuilding(final String name, Block.Properties props, Item.Properties itemProps) { BlockItemObject<Block> blockObj = register(name, props, itemProps); return new BuildingBlockObject(blockObj, register(name + "_slab", () -> new SlabBlock(props), itemProps), register(name + "_stairs", () -> new StairsBlock(() -> blockObj.get().getDefaultState(), props), itemProps) ); }
Source:
<code>public void endDocument() throws SAXException { xmlInRead--; if (xmlInRead != 0) return; Map<String, String> remoteUrls = new HashMap<String, String>(); URI baseUri; try { baseUri = new URI(baseUrl); } catch (URISyntaxException e) { throw new SAXException(e); } if (defaultRevision == null && defaultRemote != null) { Remote remote = remotes.get(defaultRemote); if (remote != null <START> && remote.revision != null) { <END> defaultRevision = remote.revision; } } for (RepoProject proj : projects) { String remote = proj.getRemote(); String revision = defaultRevision; if (remote == null) { if (defaultRemote == null) { if (filename != null) throw new SAXException(MessageFormat.format( RepoText.get().errorNoDefaultFilename, filename)); else throw new SAXException( RepoText.get().errorNoDefault); } remote = defaultRemote; } else { Remote r = remotes.get(remote); if (r != null && r.revision != null) { revision = r.revision; } } String remoteUrl = remoteUrls.get(remote); if (remoteUrl == null) { remoteUrl = baseUri.resolve(remotes.get(remote).fetch).toString(); if (!remoteUrl.endsWith("/")) remoteUrl = remoteUrl + "/"; remoteUrls.put(remote, remoteUrl); } proj.setUrl(remoteUrl + proj.getName()) .setDefaultRevision(revision); } filteredProjects.addAll(projects); removeNotInGroup(); removeOverlaps(); }</code><technical_language>optional: this condition dropped</technical_language>

Target:
public void endDocument() throws SAXException { xmlInRead--; if (xmlInRead != 0) return; Map<String, String> remoteUrls = new HashMap<String, String>(); URI baseUri; try { baseUri = new URI(baseUrl); } catch (URISyntaxException e) { throw new SAXException(e); } if (defaultRevision == null && defaultRemote != null) { Remote remote = remotes.get(defaultRemote); if (remote != null) { defaultRevision = remote.revision; } } for (RepoProject proj : projects) { String remote = proj.getRemote(); String revision = defaultRevision; if (remote == null) { if (defaultRemote == null) { if (filename != null) throw new SAXException(MessageFormat.format( RepoText.get().errorNoDefaultFilename, filename)); else throw new SAXException( RepoText.get().errorNoDefault); } remote = defaultRemote; } else { Remote r = remotes.get(remote); if (r != null && r.revision != null) { revision = r.revision; } } String remoteUrl = remoteUrls.get(remote); if (remoteUrl == null) { remoteUrl = baseUri.resolve(remotes.get(remote).fetch).toString(); if (!remoteUrl.endsWith("/")) remoteUrl = remoteUrl + "/"; remoteUrls.put(remote, remoteUrl); } proj.setUrl(remoteUrl + proj.getName()) .setDefaultRevision(revision); } filteredProjects.addAll(projects); removeNotInGroup(); removeOverlaps(); }
Source:
<code>public Response downloadDumpFile(@PathParam("topo-id") String topologyId, @PathParam("host-port") String hostPort, @PathParam("filename") String fileName, @Context HttpServletRequest request) throws IOException { <START> String host = request.getRemoteHost(); <END> String decodedHost = Utils.urlDecodeUtf8(host); String user = httpCredsHandler.getUserName(request); try { return profileHandler.downloadDumpFile(decodedHost, topologyId, hostPort, fileName, user); } catch (IOException e) { numDownloadDumpExceptions.mark(); throw e; } }</code><technical_language>right getRemoteHost. returns client sends request. needed is hostname log is. <LINK_0> Please correct if I wrong</technical_language>

Target:
public Response downloadDumpFile(@PathParam("topo-id") String topologyId, @PathParam("host-port") String hostPort, @PathParam("filename") String fileName, @Context HttpServletRequest request) throws IOException { String user = httpCredsHandler.getUserName(request); try { String host = InetAddress.getLocalHost().getCanonicalHostName(); return profileHandler.downloadDumpFile(host, topologyId, hostPort, fileName, user); } catch (IOException e) { numDownloadDumpExceptions.mark(); throw e; } }
Source:
<code>private boolean isSanitizedString(String s){ <START> if ((s.indexOf('<') >= 0) || (s.indexOf('>') >= 0) || (s.indexOf('\"') >= 0) || <END> (s.indexOf('/') >= 0) || (s.indexOf('\'') >= 0)) { return false; } else if ((s.indexOf("&lt;") >= 0) || (s.indexOf("&gt;") >= 0) || (s.indexOf("&quot;") >= 0) || (s.indexOf("&#x2f;") >= 0) || (s.indexOf("&#39;") >= 0) || (s.indexOf("&amp;") >= 0)) { return true; } return false; }</code><technical_language>In live server, cases s is null</technical_language>

Target:
private boolean isSanitizedString(String s){ if (s == null) return false; if ((s.indexOf('<') >= 0) || (s.indexOf('>') >= 0) || (s.indexOf('\"') >= 0) || (s.indexOf('/') >= 0) || (s.indexOf('\'') >= 0)) { return false; } else if ((s.indexOf("&lt;") >= 0) || (s.indexOf("&gt;") >= 0) || (s.indexOf("&quot;") >= 0) || (s.indexOf("&#x2f;") >= 0) || (s.indexOf("&#39;") >= 0) || (s.indexOf("&amp;") >= 0)) { return true; } return false; }
Source:
<code>private String getSimpleTextFor(Repository repository) { File directory = repository.getDirectory(); StringBuilder sb = new StringBuilder(); <START> sb.append(directory.getParentFile().getName()); <END> sb.append(" - "); sb.append(directory.getAbsolutePath()); return sb.toString(); }</code><technical_language>This check for repository.isBare() directory name bare repositories. RepositoryCommit.getRepositoryName() for example</technical_language>

Target:
private String getSimpleTextFor(Repository repository) { File directory; if (!repository.isBare()) directory = repository.getDirectory().getParentFile(); else directory = repository.getDirectory(); StringBuilder sb = new StringBuilder(); sb.append(directory.getName()); sb.append(" - "); sb.append(directory.getAbsolutePath()); return sb.toString(); }
Source:
<code>public void onReceive(Context context, Intent intent) { if (intent.getAction().equals(WAP_PUSH_RECEIVED_ACTION)) { String mimeType = intent.getType(); if (mimeType.equals(CONTENT_MIME_TYPE_B_EMN)) { byte[] wbxml = intent.getByteArrayExtra("data"); if (wbxml == null) { return; } String emailAddress = decode(wbxml); <START> if (emailAddress.length()>0) { <END> if (Email.DEBUG) { Log.d(Email.LOG_TAG, "CONTENT_MIME_TYPE_B_EMN " + "received for email " + emailAddress); } MailService.actionCheckMail(context, emailAddress); } } } }</code><technical_language>suggest TextUtils.isEmpty()</technical_language>

Target:
public void onReceive(Context context, Intent intent) { if (intent.getAction().equals(WAP_PUSH_RECEIVED_ACTION)) { String mimeType = intent.getType(); if (mimeType.equals(CONTENT_MIME_TYPE_B_EMN)) { byte[] wbxml = intent.getByteArrayExtra("data"); if (wbxml == null) { return; } String emailAddress = decode(wbxml); if (emailAddress!=null && !TextUtils.isEmpty(emailAddress)) { if (Email.DEBUG) { Log.d(Email.LOG_TAG, "CONTENT_MIME_TYPE_B_EMN " + "received for email " + emailAddress); } MailService.actionCheckMail(context, emailAddress); } } } }
Source:
<code>private void enforceNego(HttpServletResponse response) throws IOException { <START> for (String scheme: new HashSet<>(schemes)) { <END> response.setHeader("WWW-Authenticate", scheme); } response.sendError(HttpServletResponse.SC_UNAUTHORIZED); }</code><technical_language>schemes hash starters</technical_language>

Target:
private void enforceNego(HttpServletResponse response) throws IOException { for (String scheme: schemes) { response.setHeader("WWW-Authenticate", scheme); } response.sendError(HttpServletResponse.SC_UNAUTHORIZED); }
Source:
<code>protected WorkbenchJob doCreateRefreshJob() { WorkbenchJob job = super.doCreateRefreshJob(); job.addJobChangeListener(new JobChangeAdapter() { @Override <START> public void done(IJobChangeEvent event) { <END> maintainAllCheckIntegrity(); } }); return job; }</code><technical_language>I need check if tree disposed</technical_language>

Target:
protected WorkbenchJob doCreateRefreshJob() { WorkbenchJob job = super.doCreateRefreshJob(); job.addJobChangeListener(new JobChangeAdapter() { @Override public void done(IJobChangeEvent event) { if (getCheckboxTreeViewer().getTree().isDisposed()) { return; } maintainAllCheckIntegrity(); } }); return job; }
Source:
<code>public void testFindStorageDomainForMemoryWithSingleDomain() { <START> verifyDomainForMemory(Arrays.asList(validStorageDomain)); <END> }</code><technical_language>Please Collections.singletonList()</technical_language>

Target:
public void testFindStorageDomainForMemoryWithSingleDomain() { verifyDomainForMemory(Collections.singletonList(validStorageDomain)); }
Source:
<code>public void testLinkedResourceFiles() throws Exception { IProject[] prjs= new IProject[]{fProject}; fProject.create(new NullProgressMonitor()); fProject.open(new NullProgressMonitor()); createFolder(fProject, "folder1"); File f= File.createTempFile("extern", "h"); IPath location= Path.fromOSString(f.getAbsolutePath()); IFile file1= fProject.getFile("linked1"); IFile file2= fProject.getFile("linked2.h"); file1.createLink(location, 0, new NullProgressMonitor()); file2.createLink(location, 0, new NullProgressMonitor()); IFile[] files = ResourceLookup.findFilesForLocation(location); assertEquals(2, files.length); files= ResourceLookup.findFilesByName(new Path(location.lastSegment()), prjs, false); assertEquals(2, files.length); files= ResourceLookup.findFilesByName(new Path("linked2.h"), prjs, false); assertEquals(0, files.length); <START> f.delete(); <END> }</code><technical_language>this in finally block do f.deleteOnExit right creation (otherwise if test is failed file there)</technical_language>

Target:
public void testLinkedResourceFiles() throws Exception { IProject[] prjs= new IProject[]{fProject}; fProject.create(new NullProgressMonitor()); fProject.open(new NullProgressMonitor()); createFolder(fProject, "folder1"); File f= File.createTempFile("extern", "h"); f.deleteOnExit(); IPath location= Path.fromOSString(f.getAbsolutePath()); IFile file1= fProject.getFile("linked1"); IFile file2= fProject.getFile("linked2.h"); file1.createLink(location, 0, new NullProgressMonitor()); file2.createLink(location, 0, new NullProgressMonitor()); IFile[] files = ResourceLookup.findFilesForLocation(location); assertEquals(2, files.length); files= ResourceLookup.findFilesByName(new Path(location.lastSegment()), prjs, false); assertEquals(2, files.length); files= ResourceLookup.findFilesByName(new Path("linked2.h"), prjs, false); assertEquals(0, files.length); }
Source:
<code>public void testLoginChoosingAuthenticationService() throws Exception { <START> securedLoginServiceImpl = new SecuredLoginServiceImpl(authenticationService, sessionService, sessionAccessor, identityService, logger); <END> final Map<String, Serializable> credentials = new HashMap<String, Serializable>(); final String login = "julien"; final String password = "julien"; credentials.put(AuthenticationConstants.BASIC_USERNAME, login); credentials.put(AuthenticationConstants.BASIC_PASSWORD, password); when(authenticationService.checkUserCredentials(login, password)).thenReturn(true); final String result = securedLoginServiceImpl.loginChoosingAppropriateAuthenticationService(credentials); verify(authenticationService, times(1)).checkUserCredentials(login, password); assertThat(result).isSameAs(login); }</code><technical_language>duplicated code</technical_language>

Target:
public void testLoginChoosingAuthenticationService() throws Exception { securedLoginServiceImpl = instantiateLoginServiceWithAuthenticationService(); final Map<String, Serializable> credentials = new HashMap<String, Serializable>(); final String login = "julien"; final String password = "julien"; credentials.put(AuthenticationConstants.BASIC_USERNAME, login); credentials.put(AuthenticationConstants.BASIC_PASSWORD, password); when(authenticationService.checkUserCredentials(login, password)).thenReturn(true); final String result = securedLoginServiceImpl.loginChoosingAppropriateAuthenticationService(credentials); verify(authenticationService, times(1)).checkUserCredentials(login, password); assertThat(result).isSameAs(login); }
Source:
<code>private void gatherAllObjectsForEvents(ResIterator eventIt, List<PremisEventObject> events) { while (eventIt.hasNext()) { Resource eventResc = eventIt.nextResource(); PID eventPid = PIDs.get(eventResc.getURI()); Model eventModel = ModelFactory.createDefaultModel(); StmtIterator stmtIt = eventResc.listProperties(); eventModel.add(stmtIt); stmtIt.close(); stmtIt = eventResc.listProperties(); while (stmtIt.hasNext()) { RDFNode objNode = stmtIt.next().getObject(); if (objNode.isResource()) { StmtIterator objIt = objNode.asResource().listProperties(); if (objIt != null) { eventModel.add(objIt); } <START> objIt.close(); <END> } } stmtIt.close(); PremisEventObject event = new PremisEventObject(eventPid, repository, repository.getRepositoryObjectDataLoader()); event.storeModel(eventModel); events.add(event); } }</code><technical_language>Minor thing, calling objIt.close NPE if objIt null. pointing out is if statement right tests for null, if iterator null</technical_language>

Target:
private void gatherAllObjectsForEvents(ResIterator eventIt, List<PremisEventObject> events) { while (eventIt.hasNext()) { Resource eventResc = eventIt.nextResource(); PID eventPid = PIDs.get(eventResc.getURI()); Model eventModel = ModelFactory.createDefaultModel(); StmtIterator stmtIt = eventResc.listProperties(); eventModel.add(stmtIt); stmtIt.close(); stmtIt = eventResc.listProperties(); while (stmtIt.hasNext()) { RDFNode objNode = stmtIt.next().getObject(); if (objNode.isResource()) { StmtIterator objIt = objNode.asResource().listProperties(); if (objIt != null) { eventModel.add(objIt); objIt.close(); } } } stmtIt.close(); PremisEventObject event = new PremisEventObject(eventPid, repository, repository.getRepositoryObjectDataLoader()); event.storeModel(eventModel); events.add(event); } }
Source:
<code>void birthdate() throws Exception { <START> QueryParser queryParser = new QueryParser(FIELD_BIRTHDATE, getKbIndexAnalyzer()); <END> queryParser.setAllowLeadingWildcard(true); Query q = queryParser.parse("*"); LOG.info("Starting the search using query: {}", q.toString()); Set<Integer> matchingDocIds = new HashSet<>(5); getKbIndexSearcher().search(q, new CheckHits.SetCollector(matchingDocIds)); LOG.info("Found matching documents, retrieving...", matchingDocIds.size()); matchingDocIds.forEach((Integer docId) -> { Document doc = null; try { doc = getKbIndexReader().document(docId); } catch (IOException e) { LOG.warn("Error retrieving document with id: {}. Ignoring.", docId); return; } String freebaseURI = doc.get(LuceneRDFDocumentGenerator.FIELD_SUBJECT); String[] birthdates = doc.getValues(FIELD_BIRTHDATE); String[] labels = doc.getValues(FIELD_LABEL); String englishLabel = null; for (String label : labels) { Literal literal = NTriplesUtil.parseLiteral(label, valueFactory); if (literal.getLanguage().orElse("N/A").toLowerCase().equals("en")) { englishLabel = literal.stringValue(); break; } } if (englishLabel == null || freebaseURI == null || birthdates == null || birthdates.length == 0) return; String freebaseId = freebaseUriToFreebaseId(freebaseURI); for (String birthdate : birthdates) { String birthdateVal = extractValueFromTypedLiteralString(birthdate); writeToTrainingFiles(TRAINING_DATA_OUTPUT_FILE_EXAMPLES, freebaseId, englishLabel, birthdateVal); } }); }</code><technical_language>throw a specific exception</technical_language>

Target:
void birthdate() throws ParseException, IOException { QueryParser queryParser = new QueryParser(FIELD_BIRTHDATE, getKbIndexAnalyzer()); queryParser.setAllowLeadingWildcard(true); Query q = queryParser.parse("*"); LOG.info("Starting the search using query: {}", q.toString()); Set<Integer> matchingDocIds = new HashSet<>(); getKbIndexSearcher().search(q, new CheckHits.SetCollector(matchingDocIds)); LOG.info("Found matching documents, retrieving...", matchingDocIds.size()); matchingDocIds.forEach((Integer docId) -> { Document doc = null; try { doc = getKbIndexReader().document(docId); } catch (IOException e) { LOG.warn("Error retrieving document with id: {}. Ignoring.", docId); return; } String freebaseURI = doc.get(LuceneRDFDocumentGenerator.FIELD_SUBJECT); String[] birthdates = doc.getValues(FIELD_BIRTHDATE); String[] labels = doc.getValues(FIELD_LABEL); String englishLabel = null; for (String label : labels) { Literal literal = NTriplesUtil.parseLiteral(label, valueFactory); if (literal.getLanguage().orElse("N/A").toLowerCase().equals("en")) { englishLabel = literal.stringValue(); break; } } if (englishLabel == null || freebaseURI == null || birthdates == null || birthdates.length == 0) return; String freebaseId = freebaseUriToFreebaseId(freebaseURI); for (String birthdate : birthdates) { String birthdateVal = extractValueFromTypedLiteralString(birthdate); writeToTrainingFile(TRAINING_DATA_OUTPUT_FILE_EXAMPLES, freebaseId, englishLabel, birthdateVal); } }); }
Source:
<code>private void handleMouseEvent(MouseEvent t) { if (parentPane.getSelectedBlock().isPresent() && parentPane.getSelectedBlock().get().equals(this) <START> && t.getButton().equals(MouseButton.PRIMARY)) { <END> contextMenu.show(t); } else { parentPane.setSelectedBlock(this); } }</code><technical_language>this work touch</technical_language>

Target:
private void handleMouseEvent(MouseEvent t) { if (parentPane.getSelectedBlock().isPresent() && parentPane.getSelectedBlock().get().equals(this) && t.getButton().equals(MouseButton.PRIMARY)) { circleMenu.show(t); } else { parentPane.setSelectedBlock(this); } }
Source:
<code>private void connectAndSubscribe() throws MqttException { this.client = this.clientFactory.getClientInstance(this.getUrl(), this.getClientId()); MqttConnectOptions connectionOptions = this.clientFactory.getConnectionOptions(); Assert.state(this.getUrl() != null || connectionOptions.getServerURIs() != null, <START> "If no 'url' provided, connectionOptions.getServerURIs() must not be null"); <END> this.client.connect(connectionOptions); try { this.client.subscribe(this.getTopic()); } catch (MqttException e) { this.client.disconnect(); throw e; } if (this.client.isConnected()) { this.client.setCallback(this); this.connected = true; if (this.reconnectFuture != null) { this.cancelReconnect(); } if (logger.isDebugEnabled()) { logger.debug("Connected and subscribed to " + Arrays.asList(this.getTopic())); } } }</code><technical_language>this Assert this.clientFactory.getClientInstance ? For other side another getClientInstance method url</technical_language>

Target:
private void connectAndSubscribe() throws MqttException { MqttConnectOptions connectionOptions = this.clientFactory.getConnectionOptions(); Assert.state(this.getUrl() != null || connectionOptions.getServerURIs() != null, "If no 'url' provided, connectionOptions.getServerURIs() must not be null"); this.client = this.clientFactory.getClientInstance(this.getUrl(), this.getClientId()); this.client.connect(connectionOptions); try { this.client.subscribe(this.getTopic()); } catch (MqttException e) { this.client.disconnect(); throw e; } if (this.client.isConnected()) { this.client.setCallback(this); this.connected = true; if (this.reconnectFuture != null) { this.cancelReconnect(); } if (logger.isDebugEnabled()) { logger.debug("Connected and subscribed to " + Arrays.asList(this.getTopic())); } } }
Source:
<code>public ServletOutputStream getOutputStream() throws IOException { <START> final ServletOutputStream originalStream = this.getResponse().getOutputStream(); <END> return this.out; }</code><technical_language>variable originalStream is used</technical_language>

Target:
public ServletOutputStream getOutputStream() { return this.out; }
Source:
<code>private void logConfiguration() { LOGGER.debug("{} - configuration:", poolName); final Set<String> propertyNames = new TreeSet<>(PropertyElf.getPropertyNames(HikariConfig.class)); for (String prop : propertyNames) { try { Object value = PropertyElf.getProperty(prop, this); if ("dataSourceProperties".equals(prop)) { Properties dsProps = PropertyElf.copyProperties(dataSourceProperties); dsProps.setProperty("password", "<masked>"); value = dsProps; } value = (prop.contains("password") ? "<masked>" : value); <START> LOGGER.debug((prop + "................................................").substring(0, 32) + value); <END> } catch (Exception e) { continue; } } }</code><technical_language>this changed? this messages like? connectionTestQuery...................................null I want null a in output</technical_language>

Target:
private void logConfiguration() { LOGGER.debug("{} - configuration:", poolName); final Set<String> propertyNames = new TreeSet<>(PropertyElf.getPropertyNames(HikariConfig.class)); for (String prop : propertyNames) { try { Object value = PropertyElf.getProperty(prop, this); if ("dataSourceProperties".equals(prop)) { Properties dsProps = PropertyElf.copyProperties(dataSourceProperties); dsProps.setProperty("password", "<masked>"); value = dsProps; } if (prop.contains("password")) { value = "<masked>"; } else if (value instanceof String) { value = "\"" + value + "\""; } LOGGER.debug((prop + "................................................").substring(0, 32) + value); } catch (Exception e) { continue; } } }
Source:
<code>protected IStatus run(IProgressMonitor monitor) { <START> try { <END> SubmoduleWalk walk = SubmoduleWalk.forIndex(repo); boolean refresh = false; while (!monitor.isCanceled() && walk.next()) { for (StagingEntry entry : nodes) { boolean isSubmodule = entry.getPath().equals( walk.getPath()); entry.setSubmodule(isSubmodule); if (isSubmodule) refresh = true; } } if (refresh && !stagingView.isDisposed()) stagingView.refreshViewersPreservingExpandedElements(); } catch (IOException e) { return Activator.createErrorStatus( UIText.StagingViewContentProvider_SubmoduleError, e); } if (monitor.isCanceled()) return Status.CANCEL_STATUS; return Status.OK_STATUS; }</code><technical_language>missing lines check in method: if (monitor.isCanceled() || stagingView.isDisposed()) return Status.CANCEL_STATUS; forIndex(repo) call avoided cancelled jobs</technical_language>

Target:
protected IStatus run(IProgressMonitor monitor) { if (monitor.isCanceled() || stagingView.isDisposed()) return Status.CANCEL_STATUS; try { SubmoduleWalk walk = SubmoduleWalk.forIndex(repo); boolean refresh = false; while (!monitor.isCanceled() && walk.next()) { for (StagingEntry entry : nodes) { if (entry.getPath().equals(walk.getPath())) { entry.setSubmodule(true); refresh = true; } } } if (refresh && !stagingView.isDisposed()) stagingView.refreshViewersPreservingExpandedElements(); } catch (IOException e) { return Activator.createErrorStatus( UIText.StagingViewContentProvider_SubmoduleError, e); } if (monitor.isCanceled()) return Status.CANCEL_STATUS; return Status.OK_STATUS; }
Source:
<code>public int compare(String integer, String integer2) { <START> Double i1 = Double.valueOf(integer != null ? integer : ""); <END> Double i2 = Double.valueOf(integer2 != null ? integer2 : ""); return i1.compareTo(i2); }</code><technical_language>top of head of Double.valueOf("") is</technical_language>

Target:
public int compare(String integer, String integer2) { Double i1 = Double.valueOf(integer); Double i2 = Double.valueOf(integer2); return i1.compareTo(i2); }
Source:
<code>public boolean equals(Object otherObject){ if(otherObject == null){ <START> throw new NullPointerException(); <END> } if(!(otherObject instanceof HashResult)){ return false; } HashResult otherHash = (HashResult) otherObject; if(type != otherHash.type){ return false; } for(int i = 0; i < result.length; i++){ if(result[i] != otherHash.result[i]) return false; } return true; }</code><technical_language>need for throwing exception rest assured this != otherObject holds arrive here, a valid answer return. null case is comparable !(otherObject instanceof HashResult) case (even better: !(null instanceof HashResult) holds. effectively skip null check here). I implementation throws NPE in equals, I of it. return false; is more here, better, skip this entire check (the next check do for you)</technical_language>

Target:
public boolean equals(Object otherObject){ if(!(otherObject instanceof HashResult)){ return false; } HashResult otherHash = (HashResult) otherObject; if(type != otherHash.type){ return false; } return MessageDigest.isEqual(result, otherHash.result); }
Source:
<code>private JTest(Builder builder) { this.id = builder.id; this.testDescription = builder.jTestDescription; <START> this.requestsPerSecond = builder.requestsPerSecond; <END> this.maxLoadThreads = builder.maxLoadThreads; this.warmUpTimeInSeconds = builder.warmUpTimeInSeconds; this.terminationType = builder.terminationType; this.durationInSeconds = builder.durationInSeconds; this.iterationCount = builder.iterationCount; this.maxDurationInSeconds = builder.maxDurationInSeconds; }</code><technical_language>Load termination parameters belong Load Termination entities</technical_language>

Target:
private JTest(Builder builder) { this.id = builder.id; this.testDescription = builder.jTestDescription; this.load = builder.load; this.termination = builder.termination; }
Source:
<code><START> private static boolean hasClasses(String ...classNames) { <END> for (String className : classNames) { try { Class.forName(className, false, ScopeFactory.class.getClassLoader()); } catch (Throwable t) { return false; } } return true; }</code><technical_language>sure; is this String... classNames</technical_language>

Target:
private static boolean hasClasses(String... classNames) { for (String className : classNames) { try { Class.forName(className, false, ScopeFactory.class.getClassLoader()); } catch (ClassNotFoundException t) { return false; } } return true; }
Source:
<code>public void render(Context context, GlusterVolumeEntity volume, SafeHtmlBuilder sb) { <START> int brickCount = volume.getBricks().size(); <END> if (volume == null) { return; } int count = 0; GlusterStatus status = volume.getStatus(); ImageResource statusImage = null; String tooltip; switch (status) { case DOWN: statusImage = resources.downImage(); tooltip = constants.down(); break; case UP: count = countDownBricks(volume); if(count == 0){ statusImage = resources.upImage(); tooltip = constants.up(); }else { statusImage = resources.volumeUpWarning(); if(count < brickCount) { tooltip = constants.volumeBricksDown(); } else { tooltip = constants.allBricksDown(); } } break; default: statusImage = resources.downImage(); tooltip = constants.down(); } ImageResource alertImage = resources.alertImage(); SafeHtml statusImageHtml = SafeHtmlUtils.fromTrustedString(AbstractImagePrototype.create(statusImage).getHTML()); SafeHtml alertImageHtml = SafeHtmlUtils.fromTrustedString(AbstractImagePrototype.create(alertImage).getHTML()); if(count == brickCount) { sb.append(applicationTemplates.statusWithAlertTemplate(statusImageHtml, alertImageHtml, tooltip)); } else { sb.append(applicationTemplates.statusTemplate(statusImageHtml, tooltip)); } }</code><technical_language>this volume==null check</technical_language>

Target:
public void render(Context context, GlusterVolumeEntity volume, SafeHtmlBuilder sb) { if (volume == null) { return; } int brickCount = volume.getBricks().size(); int count = 0; GlusterStatus status = volume.getStatus(); ImageResource statusImage = null; String tooltip; switch (status) { case DOWN: statusImage = resources.downImage(); tooltip = constants.down(); break; case UP: count = countDownBricks(volume); if(count == 0){ statusImage = resources.upImage(); tooltip = constants.up(); }else { statusImage = resources.volumeUpWarning(); if(count < brickCount) { tooltip = constants.volumeBricksDown(); } else { tooltip = constants.volumeAllBricksDown(); } } break; default: statusImage = resources.downImage(); tooltip = constants.down(); } ImageResource alertImage = resources.alertImage(); SafeHtml statusImageHtml = SafeHtmlUtils.fromTrustedString(AbstractImagePrototype.create(statusImage).getHTML()); SafeHtml alertImageHtml = SafeHtmlUtils.fromTrustedString(AbstractImagePrototype.create(alertImage).getHTML()); if(count == brickCount) { sb.append(applicationTemplates.statusWithAlertTemplate(statusImageHtml, alertImageHtml, tooltip)); } else { sb.append(applicationTemplates.statusTemplate(statusImageHtml, tooltip)); } }
Source:
<code>protected VdcActionParametersBase getParametersForTask(VdcActionType actionType, <START> VdcActionParametersBase parameters) { <END> VdcActionType parentCommandType = getParentCommand(actionType); VdcActionParametersBase parentParameters = null; if (isParentCoCoChild()) { if (getTaskType() == AsyncTaskType.notSupported) { parentParameters = getParameters().getParentParameters(); } } else { if (parentHasCallback()) { if (getTaskType() == AsyncTaskType.notSupported) { parentParameters = getParameters().getParentParameters(); } } else { parentParameters = getParameters().getParentParameters(); } } if (parentCommandType == VdcActionType.Unknown || parentParameters == null) { return parameters; } parentParameters.setExecutionReason(parameters.getExecutionReason()); parentParameters.setCommandType(parentCommandType); return parentParameters; }</code><technical_language>I miss this patch, i a suggestion. In case parent a callback, command parent parameters (the child) parameters end task., passed parameters- i missing something? i missed some relevant scenario.</technical_language>

Target:
protected VdcActionParametersBase getParametersForTask(VdcActionType actionType, VdcActionParametersBase parameters) { VdcActionType parentCommandType = getParentCommand(actionType); VdcActionParametersBase parentParameters = null; if (parentHasCallback()) { if (getTaskType() == AsyncTaskType.notSupported) { parentParameters = getParameters().getParentParameters(); } } else { parentParameters = getParameters().getParentParameters(); } if (parentCommandType == VdcActionType.Unknown || parentParameters == null) { return parameters; } parentParameters.setExecutionReason(parameters.getExecutionReason()); parentParameters.setCommandType(parentCommandType); return parentParameters; }
Source:
<code>@Override public boolean equals(Object other) { if (this == other) { return true; } if (other instanceof DirectoryItem) { <START> DirectoryItem dOther = (DirectoryItem)other; <END> return dOther.getCategory().equals(category) && dOther.getItem().equals(item); } return false; }</code><technical_language>suggestion DirectoryItem dOther = (DirectoryItem) other;</technical_language>

Target:
@Override public boolean equals(Object other) { if (this == other) { return true; } else if (other instanceof DirectoryItem) { DirectoryItem dOther = (DirectoryItem) other; return dOther.getCategory().equals(category) && dOther.getItem().equals(item); } else { return false; } }
Source:
<code>public boolean updateQueryWithJson(final String json) throws ServiceException { NettyClientBase client = connection.getTajoMasterConnection(); connection.checkSessionAndGet(client); TajoMasterClientProtocolService.BlockingInterface tajoMasterService = client.getStub(); QueryRequest.Builder builder = QueryRequest.newBuilder(); builder.setSessionId(connection.sessionId); builder.setQuery(json); builder.setIsJson(true); ClientProtos.UpdateQueryResponse response = tajoMasterService.updateQuery(null, builder.build()); if (response.getResultCode() == ClientProtos.ResultCode.OK) { return true; } else { if (response.hasErrorMessage()) { <START> System.err.println("ERROR: " + response.getErrorMessage()); <END> } return false; } }</code><technical_language>move this line, nice if change LOG</technical_language>

Target:
public boolean updateQueryWithJson(final String json) throws ServiceException { NettyClientBase client = connection.getTajoMasterConnection(); connection.checkSessionAndGet(client); TajoMasterClientProtocolService.BlockingInterface tajoMasterService = client.getStub(); QueryRequest.Builder builder = QueryRequest.newBuilder(); builder.setSessionId(connection.sessionId); builder.setQuery(json); builder.setIsJson(true); ClientProtos.UpdateQueryResponse response = tajoMasterService.updateQuery(null, builder.build()); if (response.getResultCode() == ClientProtos.ResultCode.OK) { return true; } else { if (response.hasErrorMessage()) { LOG.error("ERROR: " + response.getErrorMessage()); } return false; } }
Source:
<code>void threeHitsAgainstTwoMultiHpPlanesKillsOneAndDamagesTheOther() { whenGetRandom(bridge).thenAnswer(withValues(0, 1, 2)); final CasualtyDetails details = AaCasualtySelector.getAaCasualties( givenMultiHpPlaneUnits(2), givenDamageableAaUnits(1), mock(CombatValue.class), mock(CombatValue.class), "text", givenDiceRoll(true, true, true), bridge, hitPlayer, UUID.randomUUID(), mock(Territory.class)); <START> assertThat("1 Plane is killed", details.getKilled(), hasSize(1)); <END> assertThat( "The killed plane is also damaged and the other plane takes 1 damage", details.getDamaged(), hasSize(2)); }</code><technical_language>is 1 plane killed? assertion is checking a plane is killed either. I ask question is question a maintainer reading "1 plane is killed". IMO paraphrases asserted state describing expect in state. if "Rolling a '0' random bridge is a hit" more clear assigning dice rolls variables, eg: int aaHit = 0; int aaMiss = 2 whenGetRandom(bridge).thenAnswer(withValues(aaHit, aaMiss, aaMiss));</technical_language>

Target:
void threeHitsAgainstTwoMultiHpPlanesKillsOneAndDamagesTheOther() { whenGetRandom(bridge).thenAnswer(withValues(0, 1, 2)); final CasualtyDetails details = AaCasualtySelector.getAaCasualties( planeMultiHpUnitType.create(2, hitPlayer, true), damageableAaUnitType.create(1, aaPlayer, true), mock(CombatValue.class), mock(CombatValue.class), "text", givenDiceRollWithHitSequence(true, true, true), bridge, hitPlayer, UUID.randomUUID(), mock(Territory.class)); assertThat( "3 hits against 2 planes with 2 hp each is guaranteed to kill one of them", details.getKilled(), hasSize(1)); assertThat( "3 hits against 2 planes with 2 hp each will damage both of them.", details.getDamaged(), hasSize(2)); }
Source:
<code>private void validateNumerics() { if (validationTimeout > connectionTimeout && connectionTimeout != Integer.MAX_VALUE) { validationTimeout = connectionTimeout; } if (minIdle < 0) { minIdle = maxPoolSize; } <START> if (minIdle > maxPoolSize) { <END> maxPoolSize = minIdle; } if (maxLifetime < 0) { LOGGER.error("maxLifetime cannot be negative."); throw new IllegalArgumentException("maxLifetime cannot be negative."); } else if (maxLifetime > 0 && maxLifetime < TimeUnit.SECONDS.toMillis(30)) { LOGGER.warn("maxLifetime is less than 30000ms, setting to default {}ms.", MAX_LIFETIME); maxLifetime = MAX_LIFETIME; } if (idleTimeout != 0 && idleTimeout < TimeUnit.SECONDS.toMillis(10)) { LOGGER.warn("idleTimeout is less than 10000ms, setting to default {}ms.", IDLE_TIMEOUT); idleTimeout = IDLE_TIMEOUT; } if (idleTimeout + TimeUnit.SECONDS.toMillis(1) > maxLifetime && maxLifetime > 0) { LOGGER.warn("idleTimeout is close to or greater than maxLifetime, disabling it."); maxLifetime = idleTimeout; idleTimeout = 0; } if (maxLifetime == 0 && idleTimeout == 0) { LOGGER.warn("setting idleTimeout to {}ms.", IDLE_TIMEOUT); idleTimeout = IDLE_TIMEOUT; } if (leakDetectionThreshold != 0 && leakDetectionThreshold < TimeUnit.SECONDS.toMillis(2) && !unitTest) { LOGGER.warn("leakDetectionThreshold is less than 2000ms, setting to minimum 2000ms."); leakDetectionThreshold = 2000L; } }</code><technical_language>this else if..</technical_language>

Target:
private void validateNumerics() { if (validationTimeout > connectionTimeout && connectionTimeout != Integer.MAX_VALUE) { validationTimeout = connectionTimeout; } if (minIdle < 0) { minIdle = maxPoolSize; } else if (minIdle > maxPoolSize) { maxPoolSize = minIdle; } if (maxLifetime < 0) { LOGGER.error("maxLifetime cannot be negative."); throw new IllegalArgumentException("maxLifetime cannot be negative."); } else if (maxLifetime > 0 && maxLifetime < TimeUnit.SECONDS.toMillis(30)) { LOGGER.warn("maxLifetime is less than 30000ms, setting to default {}ms.", MAX_LIFETIME); maxLifetime = MAX_LIFETIME; } if (idleTimeout != 0 && idleTimeout < TimeUnit.SECONDS.toMillis(10)) { LOGGER.warn("idleTimeout is less than 10000ms, setting to default {}ms.", IDLE_TIMEOUT); idleTimeout = IDLE_TIMEOUT; } if (idleTimeout + TimeUnit.SECONDS.toMillis(1) > maxLifetime && maxLifetime > 0) { LOGGER.warn("idleTimeout is close to or greater than maxLifetime, disabling it."); maxLifetime = idleTimeout; idleTimeout = 0; } if (maxLifetime == 0 && idleTimeout == 0) { LOGGER.warn("setting idleTimeout to {}ms.", IDLE_TIMEOUT); idleTimeout = IDLE_TIMEOUT; } if (leakDetectionThreshold != 0 && leakDetectionThreshold < TimeUnit.SECONDS.toMillis(2) && !unitTest) { LOGGER.warn("leakDetectionThreshold is less than 2000ms, setting to minimum 2000ms."); leakDetectionThreshold = 2000L; } }
Source:
<code>public String getToolTipText() <START> { <END> return LaunchConfigurationsMessages.LaunchConfigurationsDialog_5; }</code><technical_language>need a new Tooltip message for Export</technical_language>

Target:
public String getToolTipText() { return LaunchConfigurationsMessages.LaunchConfigurationsDialog_6; }
Source:
<code>public java.lang.Class<?> resolveClass(String name) { String rqpath = ServletRequestsAttr.getCurrentURL(); List<String> packageList = importPackages.get(rqpath); if (packageList == null) { packageList = basicPackage; } if (name == null || name.contains(".")) { return null; } Class<?> result = clazzes.get(name); if (result == null) { <START> for (String p : packageList) { <END> String className = p + '.' + name; Class<?> clazz = findClass(className); if (clazz != null) { if (result != null) { throw new ELException(Util.message(null, "importHandler.ambiguousImport", className, result.getName())); } result = clazz; } } if (result != null) { clazzes.put(name, result); } } return result; }</code><technical_language>packages name</technical_language>

Target:
public java.lang.Class<?> resolveClass(String name) { String rqpath = ServletRequestsAttr.getCurrentURL(); List<String> packages = importPackages.get(rqpath); if (packages == null) { packages = basicPackage; } if (name == null || name.contains(".")) { return null; } Class<?> result = clazzes.get(name); if (result == null) { for (String p : packages) { String className = p + '.' + name; Class<?> clazz = findClass(className); if (clazz != null) { if (result != null) { throw new ELException(Util.message(null, "importHandler.ambiguousImport", className, result.getName())); } result = clazz; } } if (result != null) { clazzes.put(name, result); } } return result; }