auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void reportTaskStatus(int id, Task.TaskStatus status, long miliseconds) throws JMSException { TextMessage message = session.createTextMessage("task:" + propertiesBean.getProperty("engine.unique.id") + ":" + id + ":" + status + ":" + miliseconds); producer.send(message, DeliveryMode.PERSISTENT, 6, 0); <START> log.debug("[{}] Task state sent to dispatcher.", id, status); <END> }</code><technical_language>Please in info level</technical_language>

Target:
public void reportTaskStatus(int id, Task.TaskStatus status, long miliseconds) throws JMSException { TextMessage message = session.createTextMessage("task:" + propertiesBean.getProperty("engine.unique.id") + ":" + id + ":" + status + ":" + miliseconds); producer.send(message, DeliveryMode.PERSISTENT, 6, 0); log.info("[{}] Task state sent to dispatcher.", id, status); }
Source:
<code>protected String getText() { return <START> "Default properties view description"; <END> }</code><technical_language>externalized</technical_language>

Target:
protected String getText() { return Messages.ImportingDefaultPropertiesViewDescriptionCommand_text; }
Source:
<code>LockResponse lock(LockRequest request) { return timeoutRetryer.attemptUntilTimeLimitOrException( request, <START> req -> Duration.ofMillis(req.getAcquireTimeoutMs()), <END> BlockEnforcingLockService::clampLockRequestToDeadline, this::performSingleLockRequest, LockResponse::wasSuccessful, LockResponse.timedOut()); }</code><technical_language>pass in req.getAcquireTimeoutMs()</technical_language>

Target:
LockResponse lock(LockRequest request) { return timeoutRetryer.attemptUntilTimeLimitOrException( ConjureLockRequests.toConjure(request), Duration.ofMillis(request.getAcquireTimeoutMs()), BlockEnforcingLockService::clampLockRequestToDeadline, this::performSingleLockRequest, response -> !response.wasSuccessful()); }
Source:
<code>public boolean evaluate( String uriHost, String uriPath, String uriQuery, String httpStatus, String contentType, String userAgent ) { Pageview pageview_inst = Pageview.getInstance(); return pageview_inst.isPageview( <START> uriHost, <END> uriPath, uriQuery, httpStatus, contentType, userAgent ); }</code><technical_language>PageviewDefinition</technical_language>

Target:
public boolean evaluate( String uriHost, String uriPath, String uriQuery, String httpStatus, String contentType, String userAgent ) { PageviewDefinition pageviewDefinitionInstance = PageviewDefinition.getInstance(); return pageviewDefinitionInstance.isPageview( uriHost, uriPath, uriQuery, httpStatus, contentType, userAgent ); }
Source:
<code>private void purgeHistory(HistoryReference ref) { if (ref == null) { return; } extension.removeFromHistoryList(ref); extension.clearLogPanelDisplayQueue(); ExtensionAlert extAlert = (ExtensionAlert) Control.getSingleton() .getExtensionLoader() .getExtension(ExtensionAlert.NAME); if (extAlert != null) { extAlert.deleteHistoryReferenceAlerts(ref); } extension.delete(ref); SiteNode node = ref.getSiteNode(); if (node == null) { return; } SiteMap map = Model.getSingleton().getSession().getSiteTree(); if (node.getHistoryReference() == ref) { ExtensionHistory extHistory = Control.getSingleton().getExtensionLoader().getExtension(ExtensionHistory.class); if (extHistory != null) { <START> extHistory.purge(map, node); <END> } } else { node.getPastHistoryReference().remove(ref); map.removeHistoryReference(ref.getHistoryId()); } }</code><technical_language>instance variable "extension" instead (the null check removed)</technical_language>

Target:
private void purgeHistory(HistoryReference ref) { if (ref == null) { return; } extension.removeFromHistoryList(ref); extension.clearLogPanelDisplayQueue(); ExtensionAlert extAlert = (ExtensionAlert) Control.getSingleton() .getExtensionLoader() .getExtension(ExtensionAlert.NAME); if (extAlert != null) { extAlert.deleteHistoryReferenceAlerts(ref); } extension.delete(ref); SiteNode node = ref.getSiteNode(); if (node == null) { return; } SiteMap map = Model.getSingleton().getSession().getSiteTree(); if (node.getHistoryReference() == ref) { extension.purge(map, node); } else { node.getPastHistoryReference().remove(ref); map.removeHistoryReference(ref.getHistoryId()); } }
Source:
<code>public NoValidCRCException(byte receivedCrc, byte expectedCrc) { <START> super(String.format("CRC not valid. Receive/expected 0x%02X/0x%02X,", receivedCrc, expectedCrc)); <END> }</code><technical_language>Is comma end of this string for a reason, is a typo</technical_language>

Target:
public NoValidCRCException(byte receivedCrc, byte expectedCrc) { super(String.format("CRC not valid. Receive/expected 0x%02X/0x%02X", receivedCrc, expectedCrc)); }
Source:
<code>public static List<String> getBrokersFromURI(URI uri) { <START> List<String> brokerList = new ArrayList<>(); <END> brokerList.add(String.format("%s:%d", uri.getHost(), uri.getPort())); return brokerList; }</code><technical_language>Collections.singletonList() instead</technical_language>

Target:
public static List<String> getBrokersFromURI(URI uri) { String brokerUrl = String.format("%s:%d", uri.getHost(), uri.getPort()); List<String> brokerList = Collections.singletonList(brokerUrl); return brokerList; }
Source:
<code>public void queryWithAFilter() throws Exception { final Path path = mockPath("file://the_project"); final Project project = mock(Project.class); when(project.getRootPath()).thenReturn(path); doReturn(true).when(ioService).exists(any()); final ProjectAssetsQuery query = new ProjectAssetsQuery(project, "helloo", 10, 20, <START> Collections.emptyList()); <END> final PageResponse<RefactoringPageRow> pageRowPageResponse = new PageResponse<>(); pageRowPageResponse.setPageRowList(new ArrayList<>()); when(refactoringQueryService.query(any(RefactoringPageRequest.class))).thenReturn(pageRowPageResponse); libraryService.getProjectAssets(query); verify(refactoringQueryService).query(pageRequestArgumentCaptor.capture()); final RefactoringPageRequest pageRequest = pageRequestArgumentCaptor.getValue(); assertEquals(FindAllLibraryAssetsQuery.NAME, pageRequest.getQueryName()); assertEquals(2, pageRequest.getQueryTerms().size()); assertQueryTermsContains(pageRequest.getQueryTerms(), "file://the_project"); assertQueryTermsContains(pageRequest.getQueryTerms(), "*helloo*"); assertEquals(10, pageRequest.getStartRowIndex()); assertEquals(20, (int) pageRequest.getPageSize()); }</code><technical_language>good add some extensions check if in query</technical_language>

Target:
public void queryWithAFilter() throws Exception { final WorkspaceProject project = spy(WorkspaceProject.class); final Branch branch = mock(Branch.class); final Path path = mockPath("file://the_project"); when(branch.getPath()).thenReturn(path); when(project.getBranch()).thenReturn(branch); doReturn(true).when(ioService).exists(any()); final ProjectAssetsQuery query = new ProjectAssetsQuery(project, "helloo", 10, 20, Arrays.asList("xml")); final PageResponse<RefactoringPageRow> pageRowPageResponse = new PageResponse<>(); pageRowPageResponse.setPageRowList(new ArrayList<>()); when(refactoringQueryService.query(any(RefactoringPageRequest.class))).thenReturn(pageRowPageResponse); libraryService.getProjectAssets(query); verify(refactoringQueryService).query(pageRequestArgumentCaptor.capture()); final RefactoringPageRequest pageRequest = pageRequestArgumentCaptor.getValue(); assertEquals(FindAllLibraryAssetsQuery.NAME, pageRequest.getQueryName()); assertEquals(3, pageRequest.getQueryTerms().size()); assertQueryTermsContains(pageRequest.getQueryTerms(), "file://the_project"); assertQueryTermsContains(pageRequest.getQueryTerms(), "*helloo*"); assertQueryTermsContains(pageRequest.getQueryTerms(), ".*(xml)"); assertEquals(10, pageRequest.getStartRowIndex()); assertEquals(20, (int) pageRequest.getPageSize()); }
Source:
<code>private void verifyBodyCloseBraceStyle(ParserRuleContext bodyCtx, String constructName) { ParseTree closeBrace = ParseTreeUtil.getLastChild(bodyCtx); Location closeBraceLocation = ListenerUtil.getParseTreeStartLocation(closeBrace); ParseTree closeBraceLeftSibling = ParseTreeUtil.getLeftSibling(closeBrace); Location closeBraceLeftSiblingLocation = ListenerUtil.getParseTreeStopLocation(closeBraceLeftSibling); <START> if (closeBraceLocation.line == closeBraceLeftSiblingLocation.line) { <END> this.printer.warn(constructName + Messages.CLOSE_BRACKET_STYLE, closeBraceLocation); } }</code><technical_language>Do want warn extra blank lines closing brace? For example: swift class MyClass { const = 42 }</technical_language>

Target:
private void verifyBodyCloseBraceStyle(ParserRuleContext bodyCtx, String constructName) { ParseTree closeBrace = ParseTreeUtil.getLastChild(bodyCtx); Token closeBraceToken = ((TerminalNodeImpl)closeBrace).getSymbol(); Location closeBraceLocation = ListenerUtil.getTokenLocation(closeBraceToken); List<Token> tokens = tokenStream.getHiddenTokensToLeft(closeBraceToken.getTokenIndex()); if (tokens != null) { Token commentToken = getLastCommentToken(tokens); if (commentToken != null) { int commentEndLine = ListenerUtil.getEndLineOfToken(commentToken); if (commentEndLine == closeBraceLocation.line) { this.printer.warn(constructName + Messages.CLOSE_BRACKET_STYLE, closeBraceLocation); return; } } } ParseTree closeBraceLeftSibling = ParseTreeUtil.getLeftSibling(closeBrace); Location closeBraceLeftSiblingLocation = ListenerUtil.getParseTreeStopLocation(closeBraceLeftSibling); if (closeBraceLocation.line == closeBraceLeftSiblingLocation.line) { if (!closeBraceLeftSibling.getText().equals("{")) { this.printer.warn(constructName + Messages.CLOSE_BRACKET_STYLE, closeBraceLocation); } else if (closeBraceLocation.column - closeBraceLeftSiblingLocation.column != 1) { this.printer.warn(Messages.EMPTY_BODY, closeBraceLeftSiblingLocation); } } }
Source:
<code>public Entry<Integer,String> execMapreduceWithStdout(Class<?> clz, String[] args) throws IOException { String host = "localhost"; String[] cmd = new String[4 + args.length]; cmd[0] = getAccumuloUtilPath(); cmd[1] = "hadoop-jar"; cmd[2] = getJarFromClass(clz); <START> cmd[3] = clz.getName(); <END> for (int i = 0, j = 4; i < args.length; i++, j++) { cmd[j] = "'" + args[i] + "'"; } log.info("Running: '{}' on {}", StringUtils.join(cmd, " "), host); return exec(host, cmd); }</code><technical_language>This is nice. do this fail in case of mis-configuration</technical_language>

Target:
public Entry<Integer,String> execMapreduceWithStdout(Class<?> clz, String[] args) throws IOException { String host = "localhost"; List<String> cmd = new ArrayList<>(); cmd.add(getAccumuloUtilPath()); cmd.add("hadoop-jar"); cmd.add(getJarFromClass(clz)); cmd.add(clz.getName()); for (String arg : args) { cmd.add("'" + arg + "'"); } log.info("Running: '{}' on {}", StringUtils.join(cmd, " "), host); return exec(host, cmd.toArray(new String[cmd.size()])); }
Source:
<code>private static void updateHTMLPageVersionTS(String id) throws DotDataException, DotSecurityException { Identifier identifier = APILocator.getIdentifierAPI().find(id); List<Contentlet> allContentletVersions = APILocator.getContentletAPI() <START> .findAllVersions(identifier, APILocator.getUserAPI().getSystemUser(), false); <END> for (Contentlet contentlet : allContentletVersions) { ContentletVersionInfo versionInfo = APILocator.getVersionableAPI() .getContentletVersionInfo(id, contentlet.getLanguageId()); if(versionInfo!=null) { versionInfo.setVersionTs(new Date()); APILocator.getVersionableAPI().saveContentletVersionInfo(versionInfo); } } }</code><technical_language>This right method - this pulls versions of a piece of content in 100's . need pull a list of ContentletVersionInfos for a piece of content</technical_language>

Target:
private static void updateHTMLPageVersionTS(String id) throws DotDataException, DotSecurityException { List<ContentletVersionInfo> infos = APILocator.getVersionableAPI().findContentletVersionInfos(id); for (ContentletVersionInfo versionInfo : infos) { if(versionInfo!=null) { versionInfo.setVersionTs(new Date()); APILocator.getVersionableAPI().saveContentletVersionInfo(versionInfo); } } }
Source:
<code><START> public PatientProgram getPatientProgramByUuid(String uuid) { <END> return (PatientProgram) sessionFactory.getCurrentSession().createCriteria(PatientProgram.class).add( Restrictions.eq("uuid", uuid)).uniqueResult(); }</code><technical_language>nice leave existing code is is related this ticket</technical_language>

Target:
public PatientProgram getPatientProgramByUuid(String uuid) { return (PatientProgram) sessionFactory.getCurrentSession().createQuery( "from PatientProgram pp where pp.uuid = :uuid").setString("uuid", uuid).uniqueResult(); }
Source:
<code>private void checkThrowingUnsupportedException(PrimitiveComparator<?> comparator, Class<?> exclude) { if (Integer.TYPE != exclude) { try { comparator.compare(0, 0); fail("An UnsupportedOperationException should have been thrown"); } catch (UnsupportedOperationException e) { } } if (Long.TYPE != exclude) { try { comparator.compare(0L, 0L); fail("An UnsupportedOperationException should have been thrown"); } catch (UnsupportedOperationException e) { } } if (Float.TYPE != exclude) { try { <START> comparator.compare(0F, 0F); <END> fail("An UnsupportedOperationException should have been thrown"); } catch (UnsupportedOperationException e) { } } if (Double.TYPE != exclude) { try { comparator.compare(0D, 0D); fail("An UnsupportedOperationException should have been thrown"); } catch (UnsupportedOperationException e) { } } if (Boolean.TYPE != exclude) { try { comparator.compare(false, false); fail("An UnsupportedOperationException should have been thrown"); } catch (UnsupportedOperationException e) { } } }</code><technical_language>(nit) 0.0f easier eye, 0F I immediately thought of 0x0F. 0D below</technical_language>

Target:
private void checkThrowingUnsupportedException(PrimitiveComparator<?> comparator, Class<?> exclude) { if (Integer.TYPE != exclude) { try { comparator.compare(0, 0); fail("An UnsupportedOperationException should have been thrown"); } catch (UnsupportedOperationException e) { } } if (Long.TYPE != exclude) { try { comparator.compare(0L, 0L); fail("An UnsupportedOperationException should have been thrown"); } catch (UnsupportedOperationException e) { } } if (Float.TYPE != exclude) { try { comparator.compare(0.0F, 0.0F); fail("An UnsupportedOperationException should have been thrown"); } catch (UnsupportedOperationException e) { } } if (Double.TYPE != exclude) { try { comparator.compare(0.0, 0.0); fail("An UnsupportedOperationException should have been thrown"); } catch (UnsupportedOperationException e) { } } if (Boolean.TYPE != exclude) { try { comparator.compare(false, false); fail("An UnsupportedOperationException should have been thrown"); } catch (UnsupportedOperationException e) { } } }
Source:
<code>private synchronized void process(final double in) { <START> if (!propEnabled && buffer.size() == propBufferSize) { <END> if (System.currentTimeMillis() - disableTime < propAutoReenableTime || propAutoReenableTime == 0) { return; } propEnabled = true; } if (propMode == MODE_AVERAGE) { buffer.addFirst(in); sum += in; if (buffer.size() > propBufferSize) { sum -= buffer.removeLast(); } opOutput.sendData(ConversionUtils.doubleToBytes(sum / buffer.size())); } else if (propMode == MODE_AVERAGE_ROUND) { buffer.addFirst(in); sum += in; if (buffer.size() > propBufferSize) { sum -= buffer.removeLast(); } opOutput.sendData(ConversionUtils.doubleToBytes(Math.round(sum / buffer.size()))); } else if (propMode == MODE_ACCUMULATE) { accu += in; if (System.currentTimeMillis() - lastUpdate > propBufferSize) { lastUpdate = System.currentTimeMillis(); opOutput.sendData(ConversionUtils.doubleToBytes(accu)); accu = 0; } } else if (propMode == MODE_MEDIAN) { buffer.addFirst(in); if (buffer.size() > propBufferSize) { buffer.removeLast(); } double[] array = new double[buffer.size()]; for (int i = 0; i < array.length; ++i) { array[i] = buffer.get(i); } opOutput.sendData(ConversionUtils.doubleToBytes(StatUtils.percentile(array, 50))); } }</code><technical_language>do need check ... && buffer.size() == propBufferSize</technical_language>

Target:
private synchronized void process(final double in) { if (!propEnabled) { if (System.currentTimeMillis() - disableTime < propAutoReenableTime || propAutoReenableTime == 0) { return; } propEnabled = true; } if (propMode == MODE_AVERAGE) { buffer.addFirst(in); sum += in; if (buffer.size() > propBufferSize) { sum -= buffer.removeLast(); } opOutput.sendData(ConversionUtils.doubleToBytes(sum / buffer.size())); } else if (propMode == MODE_AVERAGE_ROUND) { buffer.addFirst(in); sum += in; if (buffer.size() > propBufferSize) { sum -= buffer.removeLast(); } opOutput.sendData(ConversionUtils.doubleToBytes(Math.round(sum / buffer.size()))); } else if (propMode == MODE_ACCUMULATE) { accu += in; if (System.currentTimeMillis() - lastUpdate > propBufferSize) { lastUpdate = System.currentTimeMillis(); opOutput.sendData(ConversionUtils.doubleToBytes(accu)); accu = 0; } } else if (propMode == MODE_MEDIAN) { buffer.addFirst(in); if (buffer.size() > propBufferSize) { buffer.removeLast(); } double[] array = new double[buffer.size()]; for (int i = 0; i < array.length; ++i) { array[i] = buffer.get(i); } opOutput.sendData(ConversionUtils.doubleToBytes(StatUtils.percentile(array, 50))); } }
Source:
<code>private String getParameter(String parameterId) { String value = parameters.getProperty(parameterId); String decode = parameters.getProperty(KEY_DECODE); <START> if (value != null) <END> try { if (decode != null && decode.equalsIgnoreCase(VALUE_TRUE)) return decode(value, "UTF-8"); return value; } catch (Exception e) { CheatSheetPlugin.logError("Failed to decode URL: " + parameterId, e); } return value; }</code><technical_language>curly braces, please</technical_language>

Target:
private String getParameter(String parameterId) { String value = parameters.getProperty(parameterId); String decode = parameters.getProperty(KEY_DECODE); if (value != null) { try { if (decode != null && decode.equalsIgnoreCase(VALUE_TRUE)) { return decode(value, "UTF-8"); } return value; } catch (Exception e) { CheatSheetPlugin.logError("Failed to decode URL: " + parameterId, e); } } return value; }
Source:
<code>private RevCommit getCommit(Repository repository, String objectId) { RevWalk revWalk = null; try { revWalk = new RevWalk(repository); return revWalk.parseCommit(ObjectId.fromString(objectId)); <START> } catch (MissingObjectException e) { <END> return null; } catch (IncorrectObjectTypeException e) { return null; } catch (IOException e) { return null; } finally { if (revWalk != null) { revWalk.release(); } } }</code><technical_language>Catch Exception instead simplify code</technical_language>

Target:
private RevCommit getCommit(Repository repository, String objectId) { RevWalk revWalk = null; try { revWalk = new RevWalk(repository); return revWalk.parseCommit(ObjectId.fromString(objectId)); } catch (Exception e) { return null; } finally { if (revWalk != null) { revWalk.release(); } } }
Source:
<code>private void clearContentAccessCerts(Environment env) { ownerEnvContentAccessCurator.removeAllForEnvironment(env.getId()); <START> ownerEnvContentAccessCurator.refresh(); <END> }</code><technical_language>this work? I a specific refresh() method in OwnerEnvContentAccessCurator, supposing refresh(E... entities) in superclass. passing in entities, a no-op</technical_language>

Target:
private void clearContentAccessCerts(Environment env) { ownerEnvContentAccessCurator.removeAllForEnvironment(env.getId()); }
Source:
<code>protected void testExecute_noGoogleIdButEmailPresent_shouldPass() { loginAsAdmin(); InstructorAttributes instructorToDelete = typicalBundle.instructors.get("instructor1OfCourse1"); String[] onlyEmailParams = new String[] { Const.ParamsNames.COURSE_ID, instructorToDelete.courseId, Const.ParamsNames.INSTRUCTOR_EMAIL, instructorToDelete.email, <START> Const.ParamsNames.INSTRUCTOR_ID, null, <END> }; DeleteInstructorAction deleteInstructorAction = getAction(onlyEmailParams); JsonResult response = getJsonResult(deleteInstructorAction); assertEquals(HttpStatus.SC_OK, response.getStatusCode()); MessageOutput msg = (MessageOutput) response.getOutput(); assertEquals("Instructor is successfully deleted.", msg.getMessage()); assertFalse(instructorsLogic.isEmailOfInstructorOfCourse(instructorToDelete.email, instructorToDelete.courseId)); }</code><technical_language>Is this line necessary</technical_language>

Target:
protected void testExecute_noGoogleIdButEmailPresent_shouldPass() { loginAsAdmin(); InstructorAttributes instructorToDelete = typicalBundle.instructors.get("instructor1OfCourse1"); String[] onlyEmailParams = new String[] { Const.ParamsNames.COURSE_ID, instructorToDelete.courseId, Const.ParamsNames.INSTRUCTOR_EMAIL, instructorToDelete.email, }; DeleteInstructorAction deleteInstructorAction = getAction(onlyEmailParams); JsonResult response = getJsonResult(deleteInstructorAction); assertEquals(HttpStatus.SC_OK, response.getStatusCode()); MessageOutput msg = (MessageOutput) response.getOutput(); assertEquals("Instructor is successfully deleted.", msg.getMessage()); assertFalse(instructorsLogic.isEmailOfInstructorOfCourse(instructorToDelete.email, instructorToDelete.courseId)); }
Source:
<code>public GenericOAuth20Profile extractUserProfile(String body) throws HttpAction { final GenericOAuth20Profile profile = new GenericOAuth20Profile(); final JsonNode json = JsonHelper.getFirstNode(body, getFirstNodePath()); if (json != null) { for (final String attribute : getPrimaryAttributes()) { convertAndAdd(profile, attribute, JsonHelper.getElement(json, attribute)); } for (final String attribute : getSecondaryAttributes()) { convertAndAdd(profile, attribute, JsonHelper.getElement(json, attribute)); } <START> for (final Map.Entry<String, String> entry : getProfileAttributes().entrySet()) { <END> final String key = entry.getKey(); final String value = entry.getValue(); convertAndAdd(profile, key, JsonHelper.getElement(json, value)); } } return profile; }</code><technical_language>I understand profileAttributes intended for</technical_language>

Target:
public OAuth20Profile extractUserProfile(String body) throws HttpAction { final OAuth20Profile profile = new OAuth20Profile(); final JsonNode json = JsonHelper.getFirstNode(body, getFirstNodePath()); if (json != null) { for (final String attribute : getPrimaryAttributes()) { convertAndAdd(profile, attribute, JsonHelper.getElement(json, attribute)); } for (final String attribute : getSecondaryAttributes()) { convertAndAdd(profile, attribute, JsonHelper.getElement(json, attribute)); } for (final Map.Entry<String, String> entry : getProfileAttributes().entrySet()) { final String key = entry.getKey(); final String value = entry.getValue(); convertAndAdd(profile, key, JsonHelper.getElement(json, value)); } } return profile; }
Source:
<code>static TypeElement extractTypeFromAnnotation(Elements elementUtils, AutoDelegate annotation) { TypeElement type; try { Class typeClass = annotation.typeToExtend(); type = elementUtils.getTypeElement(typeClass.getCanonicalName()); } catch (MirroredTypeException mte) { DeclaredType typeMirror = (DeclaredType) mte.getTypeMirror(); type = (TypeElement) typeMirror.asElement(); } <START> return type; <END> }</code><technical_language>This return statement live try catch blocks (removing need for declaration-without-assignment line 36)</technical_language>

Target:
static TypeElement extractTypeFromAnnotation(Elements elementUtils, AutoDelegate annotation) { try { Class typeClass = annotation.typeToExtend(); return elementUtils.getTypeElement(typeClass.getCanonicalName()); } catch (MirroredTypeException mte) { DeclaredType typeMirror = (DeclaredType) mte.getTypeMirror(); return (TypeElement) typeMirror.asElement(); } }
Source:
<code>public void testTimestampNanosStringifier() { PrimitiveStringifier stringifier = PrimitiveStringifier.TIMESTAMP_NANOS_STRINGIFIER; assertEquals("1970-01-01T00:00:00.000000000", stringifier.stringify(0l)); Calendar cal = Calendar.getInstance(UTC); cal.clear(); cal.set(2053, Calendar.JULY, 10, 22, 13, 24); cal.set(Calendar.MILLISECOND, 84); <START> long micros = cal.getTimeInMillis() * 1000_000 + 1900; <END> assertEquals("2053-07-10T22:13:24.084001900", stringifier.stringify(micros)); cal.clear(); cal.set(1848, Calendar.MARCH, 15, 9, 23, 59); cal.set(Calendar.MILLISECOND, 765); micros = cal.getTimeInMillis() * 1000_000 - 1; assertEquals("1848-03-15T09:23:59.765000001", stringifier.stringify(micros)); checkThrowingUnsupportedException(stringifier, Long.TYPE); }</code><technical_language>Please rename variable nanos 1_000_000 instead of 1000_000</technical_language>

Target:
public void testTimestampNanosStringifier() { PrimitiveStringifier stringifier = PrimitiveStringifier.TIMESTAMP_NANOS_STRINGIFIER; assertEquals("1970-01-01T00:00:00.000000000", stringifier.stringify(0l)); Calendar cal = Calendar.getInstance(UTC); cal.clear(); cal.set(2053, Calendar.JULY, 10, 22, 13, 24); cal.set(Calendar.MILLISECOND, 84); long nanos = cal.getTimeInMillis() * 1_000_000 + 536; assertEquals("2053-07-10T22:13:24.084000536", stringifier.stringify(nanos)); cal.clear(); cal.set(1848, Calendar.MARCH, 15, 9, 23, 59); cal.set(Calendar.MILLISECOND, 765); nanos = cal.getTimeInMillis() * 1_000_000 - 1; assertEquals("1848-03-15T09:23:59.765000001", stringifier.stringify(nanos)); checkThrowingUnsupportedException(stringifier, Long.TYPE); }
Source:
<code>public IStatus validate(IValidationContext ctx) { final EObject target = ctx.getTarget(); Collection<IStatus> statuses = Sets.newLinkedHashSet(); if (target instanceof RepresentationDescription || target instanceof RepresentationExtensionDescription) { Collection<EPackage> availableMetamodels = getAvailableMetamodels(target); if (availableMetamodels.isEmpty()) { statuses.add(ctx.createFailureStatus(Messages.RepresentationDescriptionMetaModelsConstraint_noMetaModel)); } else { Resource vsmResource = target.eResource(); if (vsmResource != null) { URI vsmURI = vsmResource.getURI(); String projectName = vsmURI.segment(1); if <START> (isOdesignOwnedByVSP(projectName)) <END> { statuses.addAll(checkMetamodelAsVSPDependency(ctx, projectName, availableMetamodels)); } } } } final IStatus returnStatus = getCompositeStatus(ctx, statuses); return returnStatus; }</code><technical_language>"odesign" is a legacy name, in file extension for compatibily reasons, proper name designate is VMS</technical_language>

Target:
public IStatus validate(IValidationContext ctx) { final EObject target = ctx.getTarget(); if (target instanceof RepresentationDescription || target instanceof RepresentationExtensionDescription) { Collection<EPackage> availableMetamodels = getAvailableMetamodels(target); if (availableMetamodels.isEmpty()) { return ctx.createFailureStatus(Messages.RepresentationDescriptionMetaModelsConstraint_noMetaModel); } } return ctx.createSuccessStatus(); }
Source:
<code>public static String getBlobstoreHDFSPrincipal(Map conf) throws UnknownHostException { String principal = (String)conf.get(Config.BLOBSTORE_HDFS_PRINCIPAL); if (principal != null) { <START> principal = principal.replace("HOSTNAME", Utils.localHostname()); <END> } return principal; }</code><technical_language>Hadoop picks _HOST placeholder change conflicted. if reason alternative, _HOST me. I feel more safer if try parse principal replace placeholder host part in principal is a placeholder. _HOST in yarn/_HOST@EXAMPLE.COM substituted, _HOST in yarn/_HOST2@EXAMPLE.COM _HOST in _HOST/host1@EXAMPLE.COM substituted. @revans2 provide some suggestions</technical_language>

Target:
public static String getBlobstoreHDFSPrincipal(Map conf) throws UnknownHostException { String principal = (String) conf.get(Config.BLOBSTORE_HDFS_PRINCIPAL); if (principal != null) { String[] components = principal.split("[/@]"); if (components.length == 3 && components[1].equals(HOSTNAME_PATTERN)) { principal = components[0] + "/" + Utils.localHostname() + "@" + components[2]; } } return principal; }
Source:
<code><START> public static <T> T operation(String operationId, Map<String, Object> parameters) { <END> return CLIENT.operation(operationId).parameters(parameters).execute(); }</code><technical_language>here, this method return void want nuxeo-java-client this class</technical_language>

Target:
public static void operation(String operationId, Map<String, Object> parameters) { CLIENT.operation(operationId).parameters(parameters).execute(); }
Source:
<code>public void generate(final List<TradeOffer> tradeOffers) { if (tradeOffers instanceof MerchantRecipeList) { modifyMerchantRecipeList((MerchantRecipeList) tradeOffers, RANDOM); } else { final MerchantRecipeList list = new MerchantRecipeList(); <START> for (final TradeOffer offer : tradeOffers) { <END> list.add(offer); } modifyMerchantRecipeList(list, RANDOM); tradeOffers.clear(); for (final Object offer : list) { tradeOffers.add(new SpongeTradeOfferBuilder().from((TradeOffer) offer).build()); } } }</code><technical_language>is this list.addAll, pass ctor</technical_language>

Target:
public void generate(final List<TradeOffer> tradeOffers) { if (tradeOffers instanceof MerchantRecipeList) { modifyMerchantRecipeList((MerchantRecipeList) tradeOffers, RANDOM); } else { final MerchantRecipeList list = new MerchantRecipeList(); list.addAll(tradeOffers); modifyMerchantRecipeList(list, RANDOM); tradeOffers.clear(); for (final Object offer : list) { tradeOffers.add(new SpongeTradeOfferBuilder().from((TradeOffer) offer).build()); } } }
Source:
<code>public boolean addItems(Collection<T> items) { boolean result; mAlgorithm.lock(); try { <START> result = mAlgorithm.addItems(items); <END> } finally { mAlgorithm.unlock(); } return result; }</code><technical_language>result variable is needed-the block finally invoked a return</technical_language>

Target:
public boolean addItems(Collection<T> items) { mAlgorithm.lock(); try { return mAlgorithm.addItems(items); } finally { mAlgorithm.unlock(); } }
Source:
<code>public String getCustomParam(String name) { <START> if (customParams != null) { <END> return customParams.get(name); } else { return null; } }</code><technical_language>This check is useless customParams null</technical_language>

Target:
public String getCustomParam(String name) { return customParams.get(name); }
Source:
<code>public List<OskariLayer> findByDataProviderId(int dataProviderId) { LOG.debug("Find by data provider id: " + dataProviderId); final SqlSession session = factory.openSession(); <START> try { <END> final OskariLayerMapper mapper = session.getMapper(OskariLayerMapper.class); List<Map<String,Object>> result = mapper.findByDataProviderId(dataProviderId); return mapDataList(result); } catch (Exception e) { LOG.warn(e, "Exception while getting oskari layers with dataprovider id"); } finally { session.close(); } return Collections.emptyList(); }</code><technical_language>do try-with-resources get rid of finally statement: try (SqlSession session = factory.openSession()) { ... }</technical_language>

Target:
public List<OskariLayer> findByDataProviderId(int dataProviderId) { LOG.debug("Find by data provider id: " + dataProviderId); try (SqlSession session = factory.openSession()){ final OskariLayerMapper mapper = session.getMapper(OskariLayerMapper.class); List<Map<String,Object>> result = mapper.findByDataProviderId(dataProviderId); return mapDataList(result); } catch (Exception e) { LOG.warn(e, "Exception while getting oskari layers with dataprovider id"); } return Collections.emptyList(); }
Source:
<code>private boolean isUtilityClass(ASTAnyTypeDeclaration node) { if (node.getTypeKind() != TypeKind.CLASS) { return false; } boolean hasAny = false; for (ASTAnyTypeBodyDeclaration decl : node.getDeclarations()) { AccessNode accessNode = decl.getFirstChildOfType(AccessNode.class); ASTInitializer initializer = decl.getFirstChildOfType(ASTInitializer.class); if (accessNode != null && !(accessNode instanceof ASTConstructorDeclaration)) { hasAny = true; if (!accessNode.isStatic()) { return false; } } if (initializer != null && !initializer.isStatic()) { <START> return false; <END> } } return hasAny; }</code><technical_language>if class a constructor ignore it, non-static initializer aren't? criteria..</technical_language>

Target:
private boolean isUtilityClass(ASTAnyTypeDeclaration node) { if (node.getTypeKind() != TypeKind.CLASS) { return false; } boolean hasAny = false; for (ASTAnyTypeBodyDeclaration decl : node.getDeclarations()) { switch (decl.getKind()) { case FIELD: case METHOD: hasAny = true; if (!((AccessNode) decl.getDeclarationNode()).isStatic()) { return false; } break; default: break; } } return hasAny; }
Source:
<code>protected void onInitUI() { super.onInitUI(); addPanel = new FlowPanel(); addPanel.setStyleName(Gerrit.RESOURCES.css().addSshKeyPanel()); final Grid addGrid = new Grid(2, 2); nameTxtBox = new HintTextBox(); nameTxtBox.setVisibleLength(50); nameTxtBox.setHintText(Util.C.defaultBranchName()); <START> nameTxtBox.setHintStyleName(Gerrit.RESOURCES.css().inputFieldTypeHint()); <END> nameTxtBox.addKeyPressHandler(new KeyPressHandler() { @Override public void onKeyPress(KeyPressEvent event) { if (event.getCharCode() == KeyCodes.KEY_ENTER) { doAddNewBranch(); } } }); addGrid.setText(0, 0, Util.C.columnBranchName() + ":"); addGrid.setWidget(0, 1, nameTxtBox); irevTxtBox = new HintTextBox(); irevTxtBox.setVisibleLength(50); irevTxtBox.setHintText(Util.C.defaultRevisionSpec()); irevTxtBox.setHintStyleName(Gerrit.RESOURCES.css().inputFieldTypeHint()); irevTxtBox.addKeyPressHandler(new KeyPressHandler() { @Override public void onKeyPress(KeyPressEvent event) { if (event.getCharCode() == KeyCodes.KEY_ENTER) { doAddNewBranch(); } } }); addGrid.setText(1, 0, Util.C.initialRevision() + ":"); addGrid.setWidget(1, 1, irevTxtBox); addBranch = new Button(Util.C.buttonAddBranch()); addBranch.addClickHandler(new ClickHandler() { @Override public void onClick(final ClickEvent event) { doAddNewBranch(); } }); addPanel.add(addGrid); addPanel.add(addBranch); branches = new BranchesTable(); delBranch = new Button(Util.C.buttonDeleteBranch()); delBranch.addClickHandler(new ClickHandler() { @Override public void onClick(final ClickEvent event) { branches.deleteChecked(); } }); add(branches); add(delBranch); add(addPanel); }</code><technical_language>Assume it</technical_language>

Target:
protected void onInitUI() { super.onInitUI(); addPanel = new FlowPanel(); addPanel.setStyleName(Gerrit.RESOURCES.css().addSshKeyPanel()); final Grid addGrid = new Grid(2, 2); nameTxtBox = new HintTextBox(); nameTxtBox.setVisibleLength(50); nameTxtBox.setHintText(Util.C.defaultBranchName()); nameTxtBox.addKeyPressHandler(new KeyPressHandler() { @Override public void onKeyPress(KeyPressEvent event) { if (event.getCharCode() == KeyCodes.KEY_ENTER) { doAddNewBranch(); } } }); addGrid.setText(0, 0, Util.C.columnBranchName() + ":"); addGrid.setWidget(0, 1, nameTxtBox); irevTxtBox = new HintTextBox(); irevTxtBox.setVisibleLength(50); irevTxtBox.setHintText(Util.C.defaultRevisionSpec()); irevTxtBox.addKeyPressHandler(new KeyPressHandler() { @Override public void onKeyPress(KeyPressEvent event) { if (event.getCharCode() == KeyCodes.KEY_ENTER) { doAddNewBranch(); } } }); addGrid.setText(1, 0, Util.C.initialRevision() + ":"); addGrid.setWidget(1, 1, irevTxtBox); addBranch = new Button(Util.C.buttonAddBranch()); addBranch.addClickHandler(new ClickHandler() { @Override public void onClick(final ClickEvent event) { doAddNewBranch(); } }); addPanel.add(addGrid); addPanel.add(addBranch); branches = new BranchesTable(); delBranch = new Button(Util.C.buttonDeleteBranch()); delBranch.addClickHandler(new ClickHandler() { @Override public void onClick(final ClickEvent event) { branches.deleteChecked(); } }); add(branches); add(delBranch); add(addPanel); }
Source:
<code>public List<V> asImmutableCopy() { try { return ImmutableList.copyOf(this); <START> } catch (Exception e) { <END> log.warn("Error converting list to Immutable, using unmodifiable instead: "+e, e); return asUnmodifiableCopy(); } }</code><technical_language>catch NPE add Exceptions.propagateIfFatal</technical_language>

Target:
public List<V> asImmutableCopy() { try { return ImmutableList.copyOf(this); } catch (Exception e) { Exceptions.propagateIfFatal(e); log.warn("Error converting list to Immutable, using unmodifiable instead: "+e, e); return asUnmodifiableCopy(); } }
Source:
<code>public TexParserResult parse(List<Path> texFiles) { texParserResult.addFiles(texFiles); List<Path> referencedFiles = new ArrayList<>(); for (Path file : texFiles) { if (!file.toFile().exists()) { LOGGER.error(String.format("File does not exist: %s", file)); continue; } try ( InputStream inputStream = Files.newInputStream(file); <START> Reader reader = new InputStreamReader(inputStream); <END> LineNumberReader lineNumberReader = new LineNumberReader(reader)) { for (String line = lineNumberReader.readLine(); line != null; line = lineNumberReader.readLine()) { if (line.trim().isEmpty() || line.trim().charAt(0) == '%') { continue; } matchCitation(file, lineNumberReader.getLineNumber(), line); matchNestedFile(file, texFiles, referencedFiles, line); } } catch (ClosedChannelException e) { LOGGER.info("Parsing has been interrupted"); } catch (IOException | UncheckedIOException e) { LOGGER.info("Error while parsing file {}", file, e); } } if (!referencedFiles.isEmpty()) { parse(referencedFiles); } return texParserResult; }</code><technical_language>Missing encoding StandardCharsets.UTF_8</technical_language>

Target:
public TexParserResult parse(List<Path> texFiles) { texParserResult.addFiles(texFiles); List<Path> referencedFiles = new ArrayList<>(); for (Path file : texFiles) { if (!file.toFile().exists()) { LOGGER.error(String.format("File does not exist: %s", file)); continue; } try ( InputStream inputStream = Files.newInputStream(file); Reader reader = new InputStreamReader(inputStream, StandardCharsets.UTF_8); LineNumberReader lineNumberReader = new LineNumberReader(reader)) { for (String line = lineNumberReader.readLine(); line != null; line = lineNumberReader.readLine()) { if (line.trim().isEmpty() || line.trim().charAt(0) == '%') { continue; } matchCitation(file, lineNumberReader.getLineNumber(), line); matchNestedFile(file, texFiles, referencedFiles, line); } } catch (ClosedChannelException e) { LOGGER.info("Parsing has been interrupted"); } catch (IOException | UncheckedIOException e) { LOGGER.info("Error while parsing file {}", file, e); } } if (!referencedFiles.isEmpty()) { parse(referencedFiles); } return texParserResult; }
Source:
<code>default EventProcessingConfiguration eventProcessingConfiguration() { List<EventProcessingConfiguration> modules = getModules().stream() .filter(m -> m.instance() instanceof EventProcessingConfiguration) .map(m -> (EventProcessingConfiguration) m.instance()) .collect(Collectors.toList()); if (modules.size() > 1) { <START> throw new IllegalStateException("Found more than one EventProcessingConfiguration modules"); <END> } return modules.get(0); }</code><technical_language>this AxonConfigurationException</technical_language>

Target:
default EventProcessingConfiguration eventProcessingConfiguration() { List<EventProcessingConfiguration> modules = findModules(EventProcessingConfiguration.class); switch (modules.size()) { case 0: return null; case 1: return modules.get(0); default: throw new AxonConfigurationException("Found more than one EventProcessingConfiguration modules"); } }
Source:
<code>private void validateCascadedConstraints(ValidationContext<?> validationContext, ValueContext<?, Object> valueContext) { Validatable validatable = valueContext.getCurrentValidatable(); ValueContext.ValueState<Object> originalValueState = valueContext.getCurrentValueState(); for ( Cascadable cascadable : validatable.getCascadables() ) { valueContext.appendNode( cascadable ); ElementType elementType = cascadable.getElementType(); if ( isCascadeRequired( validationContext, valueContext.getCurrentBean(), valueContext.getPropertyPath(), elementType ) ) { Object value = getCascadableValue( validationContext, valueContext.getCurrentBean(), cascadable ); CascadingMetaData cascadingMetaData = cascadable.getCascadingMetaData(); if ( value != null ) { <START> CascadingMetaData effectiveCascadingMetaData = cascadingMetaData.addRuntimeContainerSupport( value.getClass(), valueExtractorManager ); <END> if ( effectiveCascadingMetaData.isCascading() ) { validateCascadedAnnotatedObjectForCurrentGroup( value, validationContext, valueContext, effectiveCascadingMetaData ); } if ( effectiveCascadingMetaData.isContainer() ) { ContainerCascadingMetaData containerCascadingMetaData = effectiveCascadingMetaData.as( ContainerCascadingMetaData.class ); if ( containerCascadingMetaData.hasContainerElementsMarkedForCascading() ) { validateCascadedContainerElementsForCurrentGroup( value, validationContext, valueContext, containerCascadingMetaData.getContainerElementTypesCascadingMetaData() ); } } } } valueContext.resetValueState( originalValueState ); } }</code><technical_language>Please put helper in parameters</technical_language>

Target:
private void validateCascadedConstraints(ValidationContext<?> validationContext, ValueContext<?, Object> valueContext) { Validatable validatable = valueContext.getCurrentValidatable(); ValueContext.ValueState<Object> originalValueState = valueContext.getCurrentValueState(); for ( Cascadable cascadable : validatable.getCascadables() ) { valueContext.appendNode( cascadable ); ElementType elementType = cascadable.getElementType(); if ( isCascadeRequired( validationContext, valueContext.getCurrentBean(), valueContext.getPropertyPath(), elementType ) ) { Object value = getCascadableValue( validationContext, valueContext.getCurrentBean(), cascadable ); CascadingMetaData cascadingMetaData = cascadable.getCascadingMetaData(); if ( value != null ) { CascadingMetaData effectiveCascadingMetaData = cascadingMetaData.addRuntimeContainerSupport( valueExtractorManager, value.getClass() ); if ( effectiveCascadingMetaData.isCascading() ) { validateCascadedAnnotatedObjectForCurrentGroup( value, validationContext, valueContext, effectiveCascadingMetaData ); } if ( effectiveCascadingMetaData.isContainer() ) { ContainerCascadingMetaData containerCascadingMetaData = effectiveCascadingMetaData.as( ContainerCascadingMetaData.class ); if ( containerCascadingMetaData.hasContainerElementsMarkedForCascading() ) { validateCascadedContainerElementsForCurrentGroup( value, validationContext, valueContext, containerCascadingMetaData.getContainerElementTypesCascadingMetaData() ); } } } } valueContext.resetValueState( originalValueState ); } }
Source:
<code>public Object convertToBackendType(String entityType, List<String> propertyPath, Object value) { <START> if ( value instanceof String && ( (String) value ).startsWith( ":" ) ) { <END> return value; } Type propertyType = getPropertyType( entityType, propertyPath ); if ( isElementCollection( propertyType ) ) { propertyType = ( (CollectionType) propertyType ).getElementType( sessionFactory ); } GridType ogmType = sessionFactory.getServiceRegistry().getService( TypeTranslator.class ).getType( propertyType ); return ogmType.convertToBackendType( value, sessionFactory ); }</code><technical_language>I prefer deal string parsing. do approach for Neo4j? a Neo4jParameter class check if this is instance for it. This connect I suggested code consistent dialects</technical_language>

Target:
public Object convertToBackendType(String entityType, List<String> propertyPath, Object value) { if ( value instanceof InfinispanRemoteQueryParameter ) { return value; } Type propertyType = getPropertyType( entityType, propertyPath ); if ( isElementCollection( propertyType ) ) { propertyType = ( (CollectionType) propertyType ).getElementType( sessionFactory ); } GridType ogmType = sessionFactory.getServiceRegistry().getService( TypeTranslator.class ).getType( propertyType ); return ogmType.convertToBackendType( value, sessionFactory ); }
Source:
<code><START> public static void addColumnMinMaxValueInfo(PropertiesConfiguration properties, String column, String minValue, <END> String maxValue) { properties.setProperty(getKeyFor(column, MIN_VALUE), escapeSpecialCharacter(minValue)); properties.setProperty(getKeyFor(column, MAX_VALUE), escapeSpecialCharacter(maxValue)); }</code><technical_language>This essentially setting min max in SegmentMetadata right? is in code pruning deserializing ColumnMetadata. I missing here</technical_language>

Target:
public static void addColumnMinMaxValueInfo(PropertiesConfiguration properties, String column, String minValue, String maxValue) { if (isValidPropertyValue(minValue)) { properties.setProperty(getKeyFor(column, MIN_VALUE), minValue); } if (isValidPropertyValue(maxValue)) { properties.setProperty(getKeyFor(column, MAX_VALUE), maxValue); } }
Source:
<code>private PeriodicResolver(final String srvName, final String domain, final Resolver resolver, final ScheduledExecutorService executorService) { endpoints = resolver.supplier(srvName, domain).get(); <START> executorService.scheduleWithFixedDelay(() -> <END> endpoints = resolver.supplier(srvName, domain).get(), 0, 1, TimeUnit.MINUTES); }</code><technical_language>a minor thing, I launch threads in static method constructor, I unit testing a bit easier, if need test/control "return a new thread fires again"</technical_language>

Target:
private PeriodicResolver(final String srvName, final String domain, final Resolver resolver, final ScheduledExecutorService executorService) { endpoints = resolver.resolve(srvName, domain); executorService.scheduleWithFixedDelay(() -> endpoints = resolver.resolve(srvName, domain), 0, 1, TimeUnit.MINUTES); }
Source:
<code>List<String> getSnapshotsInProgress() throws IOException { List<String> snapshotInProgress = Lists.newArrayList(); FileStatus[] snapshotsInProgress = CommonFSUtils.listStatus(fs, new Path(snapshotDir, SnapshotDescriptionUtils.SNAPSHOT_TMP_DIR_NAME)); if (!ArrayUtils.isEmpty(snapshotsInProgress)) { for (FileStatus snapshot : snapshotsInProgress) { try { snapshotInProgress.addAll(fileInspector.filesUnderSnapshot(snapshot.getPath())); } catch (CorruptedSnapshotException cse) { <START> LOG.debug("Corrupted in-progress snapshot file exception, ignored.", cse); <END> } } } return snapshotInProgress; }</code><technical_language>this handled better? in event of exception, entirety of in-progress snapshot excluded. Logging exception useful SnapshotDescription party message. log snapshot name table name. WARN level</technical_language>

Target:
List<String> getSnapshotsInProgress() throws IOException { List<String> snapshotInProgress = Lists.newArrayList(); FileStatus[] snapshotsInProgress = CommonFSUtils.listStatus(this.workingFs, this.workingSnapshotDir); if (!ArrayUtils.isEmpty(snapshotsInProgress)) { for (FileStatus snapshot : snapshotsInProgress) { try { snapshotInProgress.addAll(fileInspector.filesUnderSnapshot(workingFs, snapshot.getPath())); } catch (CorruptedSnapshotException cse) { LOG.info("Corrupted in-progress snapshot file exception, ignored.", cse); } } } return snapshotInProgress; }
Source:
<code>public @NonNull Map<@NonNull String, @NonNull String> getProperties() { Map<@NonNull String, @NonNull String> properties = new HashMap<>(); properties.put(NonNullUtils.checkNotNull(Messages.XmlModuleHelper_PropertyFile), <START> NonNullUtils.checkNotNull(fSourceFile.getName())); <END> properties.put(NonNullUtils.checkNotNull(Messages.XmlModuleHelper_PropertyType), NonNullUtils.checkNotNull(fType.name())); return properties; }</code><technical_language>I this return null. add external annotation</technical_language>

Target:
public @NonNull Map<@NonNull String, @NonNull String> getProperties() { Map<@NonNull String, @NonNull String> properties = new HashMap<>(); properties.put(NonNullUtils.checkNotNull(Messages.XmlModuleHelper_PropertyFile), fSourceFile.getName()); properties.put(NonNullUtils.checkNotNull(Messages.XmlModuleHelper_PropertyType), fType.name()); return properties; }
Source:
<code>public void testConvertToDataModelType() { <START> uk.ac.ebi.eva.commons.models.converters.data.DBObjectToVariantStatsConverter converter = new uk.ac.ebi.eva.commons.models.converters.data.DBObjectToVariantStatsConverter(); <END> VariantStats converted = converter.convert(mongoStats); assertEquals(stats, converted); }</code><technical_language>Full qualification needed</technical_language>

Target:
public void testConvertToDataModelType() { DBObjectToVariantStatsConverter converter = new DBObjectToVariantStatsConverter(); VariantStats converted = converter.convert(mongoStats); assertEquals(stats, converted); }