auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void onNewUser(User user) { TextInputLayout emailLayout = findViewById(R.id.email_layout); List<AuthUI.IdpConfig> providerConfig = getFlowParams().providerInfo; <START> int emailIndex = providerConfig.indexOf(new AuthUI.IdpConfig.EmailBuilder().build()); <END> if (providerConfig.get(emailIndex).getParams() .getBoolean(ExtraConstants.EXTRA_ALLOW_NEW_EMAILS, true)) { RegisterEmailFragment fragment = RegisterEmailFragment.newInstance( getFlowParams(), user); FragmentTransaction ft = getSupportFragmentManager().beginTransaction() .replace(R.id.fragment_register_email, fragment, RegisterEmailFragment.TAG); if (emailLayout != null) ft.addSharedElement(emailLayout, "email_field"); ft.disallowAddToBackStack().commit(); } else { emailLayout.setError(getString(R.string.fui_error_email_does_not_exist)); } }</code><technical_language>This is indexOf a new object bit is pretty ugly. assign provider index in a constant somewhere</technical_language>

Target:
public void onNewUser(User user) { TextInputLayout emailLayout = findViewById(R.id.email_layout); AuthUI.IdpConfig emailConfig = ProviderUtils.getConfigFromIdps( getFlowParams().providerInfo, EmailAuthProvider.PROVIDER_ID); if (emailConfig.getParams().getBoolean(ExtraConstants.EXTRA_ALLOW_NEW_EMAILS, true)) { RegisterEmailFragment fragment = RegisterEmailFragment.newInstance( getFlowParams(), user); FragmentTransaction ft = getSupportFragmentManager().beginTransaction() .replace(R.id.fragment_register_email, fragment, RegisterEmailFragment.TAG); if (emailLayout != null) { String emailFieldName = getString(R.string.fui_email_field_name); ViewCompat.setTransitionName(emailLayout, emailFieldName); ft.addSharedElement(emailLayout, emailFieldName); } ft.disallowAddToBackStack().commit(); } else { emailLayout.setError(getString(R.string.fui_error_email_does_not_exist)); } }
Source:
<code>public void setUp() throws Exception { attrs = mock(AttributeSet.class); context = mock(Context.class); array = mock(TypedArray.class); <START> when(array.getFloat(R.styleable.fui_SpacedEditText_fui_spacingProportion, 1)).thenReturn <END> (spacingPropotion); when(context.obtainStyledAttributes(attrs, R.styleable.fui_SpacedEditText)).thenReturn(array); spacedEditText = new SpacedEditText(RuntimeEnvironment.application, attrs); spacedEditText.initAttrs(context, attrs); }</code><technical_language>idea this a double fui</technical_language>

Target:
public void setUp() throws Exception { attrs = mock(AttributeSet.class); context = mock(Context.class); array = mock(TypedArray.class); when(array.getFloat(R.styleable.SpacedEditText_spacingProportion, 1)) .thenReturn(spacingProportion); when(context.obtainStyledAttributes(attrs, R.styleable.SpacedEditText)).thenReturn(array); spacedEditText = new SpacedEditText(RuntimeEnvironment.application, attrs); spacedEditText.initAttrs(context, attrs); }
Source:
<code>public BufferedImage getImage() { if (!open.get()) { return null; } <START> return image; <END> }</code><technical_language>problem image. is a local variable is returned caller, in parallel a container for image data. Situation consider - user e.g. draw image some panel, in parallel image is updated a data camera. side effect - of image is image is new one. This is is synchronization operation image data</technical_language>

Target:
public BufferedImage getImage() { if (!open.get()) { return null; } try { byte[] buffer = readNextFrame(); BufferedImage image = buildImage(buffer); return image; } catch (IOException e) { e.printStackTrace(); } return null; }
Source:
<code>public void checkout(File baseDir, Revision revision, SubprocessExecutionContext execCtx) { <START> throw new RuntimeException("Checkout not implemented"); <END> }</code><technical_language>specific reason this throws implemented exception? delegating updateTo other scms enough</technical_language>

Target:
public void checkout(File baseDir, Revision revision, SubprocessExecutionContext execCtx) { InMemoryStreamConsumer output = ProcessOutputStreamConsumer.inMemoryConsumer(); this.updateTo(output, revision, baseDir, execCtx); }
Source:
<code>public void testAllDomainsHaveSpaceForNewDisksFailure() { setUpGeneralValidations(); setUpDiskValidations(); <START> List disksList = getNonEmptyDiskList(); <END> doReturn(disksList).when(cmd).getDisksList(); doReturn(new ValidationResult(VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN)).when(multipleStorageDomainsValidator) .allDomainsHaveSpaceForNewDisks(disksList); assertFalse(cmd.canDoAction()); verify(multipleStorageDomainsValidator).allDomainsHaveSpaceForNewDisks(disksList); assertTrue(cmd.getReturnValue() .getCanDoActionMessages() .contains(VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN.name())); }</code><technical_language>Generics</technical_language>

Target:
public void testAllDomainsHaveSpaceForNewDisksFailure() { setUpGeneralValidations(); setUpDiskValidations(); List<DiskImage> disksList = getNonEmptyDiskList(); doReturn(disksList).when(cmd).getDisksList(); doReturn(new ValidationResult(VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN)).when(multipleStorageDomainsValidator) .allDomainsHaveSpaceForNewDisks(disksList); CanDoActionTestUtils.runAndAssertCanDoActionFailure(cmd, VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN); verify(multipleStorageDomainsValidator).allDomainsHaveSpaceForNewDisks(disksList); }
Source:
<code>public void testMergeInOneCommand() { LogConfig.logOnLevel(Level.ALL); batcher.setMergeValueChanges(true); List<CommandAndHandler> list = new ArrayList<CommandAndHandler>(); ValueChangedCommand command = new ValueChangedCommand(); command.setAttributeId("0"); command.setOldValue(0); command.setNewValue(1); <START> ((ArrayList<CommandAndHandler>) list).add(new CommandAndHandler(command)); <END> ValueChangedCommand command1 = new ValueChangedCommand(); command1.setAttributeId("0"); command1.setOldValue(1); command1.setNewValue(2); ((ArrayList<CommandAndHandler>) list).add(new CommandAndHandler(command1)); ValueChangedCommand command2 = new ValueChangedCommand(); command2.setAttributeId("0"); command2.setOldValue(2); command2.setNewValue(3); ((ArrayList<CommandAndHandler>) list).add(new CommandAndHandler(command2)); for (CommandAndHandler commandAndHandler : list) { batcher.batch(commandAndHandler); } try { List<CommandAndHandler> nextBatch = batcher.getWaitingBatches().getVal(); Assert.assertEquals(1, nextBatch.size()); Assert.assertEquals(ValueChangedCommand.class, nextBatch.get(0).getCommand().getClass()); ValueChangedCommand cmd = (ValueChangedCommand) nextBatch.get(0).getCommand(); Assert.assertEquals(0, cmd.getOldValue()); Assert.assertEquals(3, cmd.getNewValue()); Assert.assertTrue(batcher.isEmpty()); } catch (InterruptedException e) { e.printStackTrace(); Assert.fail(e.getMessage()); } }</code><technical_language>Typecasting is required</technical_language>

Target:
public void testMergeInOneCommand() { LogConfig.logOnLevel(Level.ALL); batcher.setMergeValueChanges(true); List<CommandAndHandler> list = new ArrayList<CommandAndHandler>(); ValueChangedCommand command = new ValueChangedCommand(); command.setAttributeId("0"); command.setOldValue(0); command.setNewValue(1); list.add(new CommandAndHandler(command)); ValueChangedCommand command1 = new ValueChangedCommand(); command1.setAttributeId("0"); command1.setOldValue(1); command1.setNewValue(2); list.add(new CommandAndHandler(command1)); ValueChangedCommand command2 = new ValueChangedCommand(); command2.setAttributeId("0"); command2.setOldValue(2); command2.setNewValue(3); list.add(new CommandAndHandler(command2)); for (CommandAndHandler commandAndHandler : list) { batcher.batch(commandAndHandler); } try { List<CommandAndHandler> nextBatch = batcher.getWaitingBatches().getVal(); Assert.assertEquals(1, nextBatch.size()); Assert.assertEquals(ValueChangedCommand.class, nextBatch.get(0).getCommand().getClass()); ValueChangedCommand cmd = (ValueChangedCommand) nextBatch.get(0).getCommand(); Assert.assertEquals(0, cmd.getOldValue()); Assert.assertEquals(3, cmd.getNewValue()); Assert.assertTrue(batcher.isEmpty()); } catch (InterruptedException e) { e.printStackTrace(); Assert.fail(e.getMessage()); } }
Source:
<code>public void setException(Throwable t) { if (t != null) { if (t instanceof ReadTimeoutException) { error = "READ_TIMEOUT"; exceptionType = t.getClass().getSimpleName(); } else if (t instanceof OriginConnectException) { OriginConnectException oce = (OriginConnectException) t; if (oce.getErrorType() != null) { error = oce.getErrorType().toString(); } else { error = "ORIGIN_CONNECT_ERROR"; } final Throwable cause = t.getCause(); if (cause != null) { exceptionType = t.getCause().getClass().getSimpleName(); } else { exceptionType = t.getClass().getSimpleName(); } } else if (t instanceof OutboundException) { OutboundException obe = (OutboundException) t; error = obe.getOutboundErrorType().toString(); exceptionType = OutboundException.class.getSimpleName(); } else { error = t.getMessage(); exceptionType = t.getClass().getSimpleName(); } if (t.getCause() != null) { <START> cause = t.getCause().toString(); <END> } } }</code><technical_language>This Throwables.getStackTraceAsString, correctly expands suppressed exceptions stacks</technical_language>

Target:
public void setException(Throwable t) { if (t != null) { if (t instanceof ReadTimeoutException) { error = "READ_TIMEOUT"; exceptionType = t.getClass().getSimpleName(); } else if (t instanceof OriginConnectException) { OriginConnectException oce = (OriginConnectException) t; if (oce.getErrorType() != null) { error = oce.getErrorType().toString(); } else { error = "ORIGIN_CONNECT_ERROR"; } final Throwable cause = t.getCause(); if (cause != null) { exceptionType = t.getCause().getClass().getSimpleName(); } else { exceptionType = t.getClass().getSimpleName(); } } else if (t instanceof OutboundException) { OutboundException obe = (OutboundException) t; error = obe.getOutboundErrorType().toString(); exceptionType = OutboundException.class.getSimpleName(); } else if (t instanceof SSLHandshakeException) { error = t.getMessage(); exceptionType = t.getClass().getSimpleName(); cause = t.getCause().getMessage(); } else { error = t.getMessage(); exceptionType = t.getClass().getSimpleName(); cause = Throwables.getStackTraceAsString(t); } } }
Source:
<code>public void testSendSerialDataOtherProtocolsTimeout() throws Exception { PowerMockito.doReturn(XBeeProtocol.ZIGBEE).when(xbeeDevice, "getXBeeProtocol"); PowerMockito.doThrow(new XBeeException(XBeeException.CONNECTION_TIMEOUT)).when(xbeeDevice, "sendXBeePacket", transmitPacket); try { xbeeDevice.sendSerialData(XBEE_16BIT_ADDRESS, SEND_DATA_BYTES); fail("TransmitRequest frame shouldn't have been sent successfully."); } catch (InvalidOperatingModeException e) { fail("This exception shouldn't be thrown now."); } catch (XBeeException e) { assertEquals(XBeeException.CONNECTION_TIMEOUT, e.getErrorCode()); } try { <START> xbeeDevice.sendSerialData(XBEE_16BIT_ADDRESS, SEND_DATA_BYTES); <END> fail("TransmitRequest frame shouldn't have been sent successfully."); } catch (InvalidOperatingModeException e) { fail("This exception shouldn't be thrown now."); } catch (XBeeException e) { assertEquals(XBeeException.CONNECTION_TIMEOUT, e.getErrorCode()); } try { xbeeDevice.sendSerialData(mockedDevice, SEND_DATA_BYTES); fail("TransmitRequest frame shouldn't have been sent successfully."); } catch (InvalidOperatingModeException e) { fail("This exception shouldn't be thrown now."); } catch (XBeeException e) { assertEquals(XBeeException.CONNECTION_TIMEOUT, e.getErrorCode()); } }</code><technical_language>I XBEE_64BIT_ADDRESS</technical_language>

Target:
public void testSendSerialDataOtherProtocolsTimeout() throws Exception { PowerMockito.doReturn(XBeeProtocol.ZIGBEE).when(xbeeDevice, "getXBeeProtocol"); PowerMockito.doThrow(new XBeeException(XBeeException.CONNECTION_TIMEOUT)).when(xbeeDevice, "sendXBeePacket", transmitPacket); try { xbeeDevice.sendSerialData(XBEE_16BIT_ADDRESS, SEND_DATA_BYTES); fail("TransmitRequest frame shouldn't have been sent successfully."); } catch (InvalidOperatingModeException e) { fail("This exception shouldn't be thrown now."); } catch (XBeeException e) { assertEquals(XBeeException.CONNECTION_TIMEOUT, e.getErrorCode()); } try { xbeeDevice.sendSerialData(XBEE_64BIT_ADDRESS, SEND_DATA_BYTES); fail("TransmitRequest frame shouldn't have been sent successfully."); } catch (InvalidOperatingModeException e) { fail("This exception shouldn't be thrown now."); } catch (XBeeException e) { assertEquals(XBeeException.CONNECTION_TIMEOUT, e.getErrorCode()); } try { xbeeDevice.sendSerialData(mockedDevice, SEND_DATA_BYTES); fail("TransmitRequest frame shouldn't have been sent successfully."); } catch (InvalidOperatingModeException e) { fail("This exception shouldn't be thrown now."); } catch (XBeeException e) { assertEquals(XBeeException.CONNECTION_TIMEOUT, e.getErrorCode()); } }
Source:
<code>protected void testAccessControl() throws Exception { ______TS("must be logged in"); verifyInaccessibleWithoutLogin(); ______TS("non-existent course"); InstructorAttributes instructor1OfCourse1 = typicalBundle.instructors.get("instructor1OfCourse1"); CourseAttributes courseAttributes = logic.getCourse(instructor1OfCourse1.getCourseId()); <START> String[] submissionParams = new String[] { <END> Const.ParamsNames.COURSE_ID, "not-exist", }; loginAsInstructor(instructor1OfCourse1.getGoogleId()); verifyCannotAccess(submissionParams); ______TS("only instructors of the same course can access"); submissionParams = new String[] { Const.ParamsNames.COURSE_ID, courseAttributes.getId(), }; verifyOnlyInstructorsOfTheSameCourseCanAccess(submissionParams); }</code><technical_language>if a student unregistered user calls this endpoint</technical_language>

Target:
protected void testAccessControl() throws Exception { ______TS("non-existent course"); InstructorAttributes instructor1OfCourse1 = typicalBundle.instructors.get("instructor1OfCourse1"); CourseAttributes courseAttributes = logic.getCourse(instructor1OfCourse1.getCourseId()); String[] submissionParams = new String[] { Const.ParamsNames.COURSE_ID, "not-exist", }; loginAsInstructor(instructor1OfCourse1.getGoogleId()); verifyCannotAccess(submissionParams); ______TS("Inaccessible without being an instructor or student"); submissionParams = new String[] { Const.ParamsNames.COURSE_ID, courseAttributes.getId(), }; verifyInaccessibleWithoutLogin(submissionParams); verifyInaccessibleForUnregisteredUsers(submissionParams); verifyInaccessibleForAdmin(submissionParams); ______TS("instructors of the same course can access"); verifyInaccessibleForInstructorsOfOtherCourses(submissionParams); verifyAccessibleForInstructorsOfTheSameCourse(submissionParams); verifyAccessibleForAdminToMasqueradeAsInstructor(submissionParams); ______TS("students of the same course can access"); verifyAccessibleForStudentsOfTheSameCourse(submissionParams); }
Source:
<code>public void setupGlobalStoreFromDefaultConfig() { <START> SmartStoreLogger.d(TAG, "Setting up global store using config sound in res/raw/globalstore.json"); <END> setupStoreFromConfig(getGlobalSmartStore(), R.raw.globalstore); }</code><technical_language>Minor typo: guessing meant _found in_</technical_language>

Target:
public void setupGlobalStoreFromDefaultConfig() { SmartStoreLogger.d(TAG, "Setting up global store using config found in res/raw/globalstore.json"); setupStoreFromConfig(getGlobalSmartStore(), R.raw.globalstore); }
Source:
<code>private Element createServerElement(Document doc, ClusteringServiceConfiguration clusteringServiceConfiguration) { if (!(clusteringServiceConfiguration.getConnectionSource() instanceof ConnectionSource.ServerList)) { throw new IllegalArgumentException("When connection URL is null, source of connection MUST be of type ConnectionSource.ServerList.class"); } ConnectionSource.ServerList servers = (ConnectionSource.ServerList)clusteringServiceConfiguration.getConnectionSource(); if (!servers.getServers().iterator().hasNext()) { throw new IllegalArgumentException("Empty server lists"); } Element rootElement = doc.createElement(TC_CLUSTERED_NAMESPACE_PREFIX + COLON + CLUSTER_ELEMENT_NAME); rootElement.setAttributeNS(XMLConstants.XMLNS_ATTRIBUTE_NS_URI, "xmlns:" + TC_CLUSTERED_NAMESPACE_PREFIX, NAMESPACE.toString()); Element connElement = doc.createElement(TC_CLUSTERED_NAMESPACE_PREFIX + COLON + CLUSTER_CONNECTION_ELEMENT_NAME); connElement.setAttribute(CLUSTER_TIER_MANAGER_ATTRIBUTE_NAME, clusteringServiceConfiguration.getConnectionSource() .getClusterTierManager()); servers.getServers().forEach(server -> { Element serverElement = doc.createElement(TC_CLUSTERED_NAMESPACE_PREFIX + COLON + SERVER_ELEMENT_NAME); serverElement.setAttribute(HOST_ATTRIBUTE_NAME, server.getHostName()); if (server.getPort() < 0) { <START> throw new IllegalArgumentException("Port for server:" + server.getHostName() + " must not be negative"); <END> } if (server.getPort() > 0) { serverElement.setAttribute(PORT_ATTRIBUTE_NAME, Integer.toString(server.getPort())); } connElement.appendChild(serverElement); }); rootElement.appendChild(connElement); return rootElement; }</code><technical_language>schema validate this for it</technical_language>

Target:
private Element createServerElement(Document doc, ClusteringServiceConfiguration clusteringServiceConfiguration) { if (!(clusteringServiceConfiguration.getConnectionSource() instanceof ConnectionSource.ServerList)) { throw new IllegalArgumentException("When connection URL is null, source of connection MUST be of type ConnectionSource.ServerList.class"); } ConnectionSource.ServerList servers = (ConnectionSource.ServerList)clusteringServiceConfiguration.getConnectionSource(); Element rootElement = doc.createElement(TC_CLUSTERED_NAMESPACE_PREFIX + COLON + CLUSTER_ELEMENT_NAME); rootElement.setAttributeNS(XMLConstants.XMLNS_ATTRIBUTE_NS_URI, "xmlns:" + TC_CLUSTERED_NAMESPACE_PREFIX, NAMESPACE.toString()); Element connElement = doc.createElement(TC_CLUSTERED_NAMESPACE_PREFIX + COLON + CLUSTER_CONNECTION_ELEMENT_NAME); connElement.setAttribute(CLUSTER_TIER_MANAGER_ATTRIBUTE_NAME, clusteringServiceConfiguration.getConnectionSource() .getClusterTierManager()); servers.getServers().forEach(server -> { Element serverElement = doc.createElement(TC_CLUSTERED_NAMESPACE_PREFIX + COLON + SERVER_ELEMENT_NAME); serverElement.setAttribute(HOST_ATTRIBUTE_NAME, server.getHostName()); if (server.getPort() > 0) { serverElement.setAttribute(PORT_ATTRIBUTE_NAME, Integer.toString(server.getPort())); } connElement.appendChild(serverElement); }); rootElement.appendChild(connElement); return rootElement; }
Source:
<code>public Boolean fenceOff(VirtualMachine vm, Host host) { if (host.getHypervisorType() != HypervisorType.KVM && host.getHypervisorType() != HypervisorType.LXC) { s_logger.warn("Don't know how to fence non kvm hosts " + host.getHypervisorType()); return null; } List<HostVO> hosts = _resourceMgr.listAllHostsInCluster(host.getClusterId()); FenceCommand fence = new FenceCommand(vm, host); int i = 0; for (HostVO h : hosts) { if (h.getHypervisorType() == HypervisorType.KVM || h.getHypervisorType() == HypervisorType.LXC) { if (h.getStatus() != Status.Up) { continue; } i++; if (h.getId() == host.getId()) { continue; } FenceAnswer answer; try { answer = (FenceAnswer)_agentMgr.send(h.getId(), fence); <START> } catch (AgentUnavailableException | OperationCancelledException | OperationTimedoutException e) { <END> s_logger.info("Moving on to the next host because " + h.toString() + " is unavailable"); continue; } if (answer != null && answer.getResult()) { return true; } } } _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_HOST, host.getDataCenterId(), host.getPodId(), "Unable to fence off host: " + host.getId(), "Fencing off host " + host.getId() + " did not succeed after asking " + i + " hosts. " + "Check Agent logs for more information."); s_logger.error("Unable to fence off " + vm.toString() + " on " + host.toString()); return false; }</code><technical_language>For cancelled exception move next host</technical_language>

Target:
public Boolean fenceOff(VirtualMachine vm, Host host) { if (host.getHypervisorType() != HypervisorType.KVM && host.getHypervisorType() != HypervisorType.LXC) { s_logger.warn("Don't know how to fence non kvm hosts " + host.getHypervisorType()); return null; } List<HostVO> hosts = _resourceMgr.listAllHostsInCluster(host.getClusterId()); FenceCommand fence = new FenceCommand(vm, host); int i = 0; for (HostVO h : hosts) { if (h.getHypervisorType() == HypervisorType.KVM || h.getHypervisorType() == HypervisorType.LXC) { if (h.getStatus() != Status.Up) { continue; } i++; if (h.getId() == host.getId()) { continue; } FenceAnswer answer; try { answer = (FenceAnswer)_agentMgr.send(h.getId(), fence); } catch (OperationCancelledException e) { if (s_logger.isDebugEnabled()) { s_logger.debug("cancelling because " + h.toString() + " is unavailable(operation cancelled)"); } break; } catch (AgentUnavailableException | OperationTimedoutException e) { s_logger.info("Moving on to the next host because " + h.toString() + " is unavailable"); continue; } if (answer != null && answer.getResult()) { return true; } } } _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_HOST, host.getDataCenterId(), host.getPodId(), "Unable to fence off host: " + host.getId(), "Fencing off host " + host.getId() + " did not succeed after asking " + i + " hosts. " + "Check Agent logs for more information."); s_logger.error("Unable to fence off " + vm.toString() + " on " + host.toString()); return false; }
Source:
<code>private void checkExposureCompensation(Parameters parameters) { assertEquals(parameters.getExposureCompensation(), 0); int max = parameters.getMaxExposureCompensation(); int min = parameters.getMinExposureCompensation(); float step = parameters.getExposureCompensationStep(); if (max == 0 && min == 0) { <START> assertEquals(0, step, 0.000001); <END> return; } assertTrue(step > 0); assertTrue(max >= 0); assertTrue(min <= 0); }</code><technical_language>Please change 0f 0.000001f. assertEquals(double, double, double) called</technical_language>

Target:
private void checkExposureCompensation(Parameters parameters) { assertEquals(parameters.getExposureCompensation(), 0); int max = parameters.getMaxExposureCompensation(); int min = parameters.getMinExposureCompensation(); float step = parameters.getExposureCompensationStep(); if (max == 0 && min == 0) { assertEquals(0f, step, 0.000001f); return; } assertTrue(step > 0); assertTrue(max >= 0); assertTrue(min <= 0); }
Source:
<code>public int generateParameters(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException { <START> boolean isPy = method.getName().equals("DEMO"); <END> int param; String[] expectedTypes = methodParameterTypes; ClassInspector classInspector = getClassFactory().getClassInspector(); for (param = 0; param < methodParms.length; param++) { if(isPy){ mb.dup(); } generateOneParameter( acb, mb, param ); String argumentType = getParameterTypeName( methodParms[param] ); String parameterType = expectedTypes[param]; if (!parameterType.equals(argumentType)) { if (ClassInspector.primitiveType(parameterType)) { mb.cast(parameterType); } else { if (routineInfo != null) { if(isPy){ mb.setArrayElement(param); } continue; } if (SanityManager.DEBUG) { SanityManager.ASSERT(classInspector.assignableTo(argumentType, parameterType), "Argument type " + argumentType + " is not assignable to parameter " + parameterType); } mb.upCast(parameterType); } } if(isPy){ mb.setArrayElement(param); } } return methodParms.length; }</code><technical_language>Instead of hard-coding wrapper method name, "DEMO" in place used, a class static final member (constant String), defined in of classes</technical_language>

Target:
public int generateParameters(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException { boolean isPy = method.getName().equals(StaticMethodCallNode.PYPROCEDURE_WRAPPER_METHOD_NAME) && javaClassName.equals(StaticMethodCallNode.PYPROCEDURE_WRAPPER_CLASS_NAME); int param; String[] expectedTypes = methodParameterTypes; ClassInspector classInspector = getClassFactory().getClassInspector(); for (param = 0; param < methodParms.length; param++) { if(isPy){ mb.dup(); } generateOneParameter( acb, mb, param ); String argumentType = getParameterTypeName( methodParms[param] ); String parameterType = expectedTypes[param]; if (!parameterType.equals(argumentType)) { if (ClassInspector.primitiveType(parameterType)) { mb.cast(parameterType); } else { if (routineInfo != null) { if(isPy){ mb.setArrayElement(param); } continue; } if (SanityManager.DEBUG) { SanityManager.ASSERT(classInspector.assignableTo(argumentType, parameterType), "Argument type " + argumentType + " is not assignable to parameter " + parameterType); } mb.upCast(parameterType); } } if(isPy){ mb.setArrayElement(param); } } return methodParms.length; }
Source:
<code>public ConsistentHash readConsistentHash() { switch (topology.getPhase()) { <START> case NO_REBALANCE: <END> return topology.getCurrentCH(); case TRANSITORY: return topology.getPendingCH(); case CONFLICT_RESOLUTION: case READ_OLD_WRITE_ALL: return topology.getCurrentCH(); case READ_ALL_WRITE_ALL: return joinInfo.getConsistentHashFactory().union(topology.getCurrentCH(), topology.getPendingCH()); case READ_NEW_WRITE_ALL: return topology.getPendingCH(); default: throw new IllegalStateException(); } }</code><technical_language>replace this AvailabilityStrategy.readConsistentHash</technical_language>

Target:
public ConsistentHash readConsistentHash() { return AvailabilityStrategy.readConsistentHash(topology, joinInfo.getConsistentHashFactory()); }
Source:
<code>public Account createAccount(CreateAccountRequest request) { Assert.notNull(request, "Request cannot be null."); final Account account = request.getAccount(); String href = getAccounts().getHref(); boolean first_param = true; if (request.isRegistrationWorkflowOptionSpecified()) { href += "?registrationWorkflowEnabled=" + request.isRegistrationWorkflowEnabled(); first_param = false; } if (request.isPasswordFormatSpecified()) { if (first_param){ href += "?passwordFormat=" + request.getPasswordFormat(); } else { href += "&passwordFormat=" + request.getPasswordFormat(); <START> } <END> } if (request.isAccountOptionsSpecified()) { return getDataStore().create(href, account, request.getAccountOptions()); } return getDataStore().create(href, account); }</code><technical_language>char querySeparator = '?'; if (request.isRegistrationWorkflowOptionSpecified()) { href += querySeparator + "registrationWorkflowEnabled=" + request.isRegistrationWorkflowEnabled(); querySeparator = '&'; } if (request.isPasswordFormatSpecified()) { href += querySeparator + "passwordFormat=" + request.getPasswordFormat(); }</technical_language>

Target:
public Account createAccount(CreateAccountRequest request) { Assert.notNull(request, "Request cannot be null."); final Account account = request.getAccount(); String href = getAccounts().getHref(); char querySeparator = '?'; if (request.isRegistrationWorkflowOptionSpecified()) { href += querySeparator + "registrationWorkflowEnabled=" + request.isRegistrationWorkflowEnabled(); querySeparator = '&'; } if (request.isPasswordFormatSpecified()) { href += querySeparator + "passwordFormat=" + request.getPasswordFormat(); } if (request.isAccountOptionsSpecified()) { return getDataStore().create(href, account, request.getAccountOptions()); } return getDataStore().create(href, account); }
Source:
<code>public GeoserverXMLResourceProvider(final String configFileDirectory, final String configFileName, final ResourceStore resourceStore) throws ConfigurationException { this.configFileName = configFileName; <START> if(configFileDirectory!=null) { <END> if (configFileDirectory.startsWith("/") || configFileDirectory.contains(":\\") || configFileDirectory.startsWith("\\\\")) { log.info("Provided configuration directory as absolute path '" + configFileDirectory + "'"); this.configDirectory = Files.asResource(new File(configFileDirectory)); } else { log.info("Provided configuration directory in the resource store. "); this.configDirectory = resourceStore.get(configFileDirectory); } } else { this.configDirectory = resourceStore.get(DEFAULT_CONFIGURATION_DIR_NAME); } log.info("Will look for geowebcache.xml in '" + configDirectory + "'"); }</code><technical_language>Need whitespace operators</technical_language>

Target:
public GeoserverXMLResourceProvider(final String configFileDirectory, final String configFileName, final ResourceStore resourceStore) throws ConfigurationException { this.configFileName = configFileName; if(configFileDirectory != null) { if ((new File(configFileDirectory)).isAbsolute()) { log.info("Provided configuration directory as absolute path '" + configFileDirectory + "'"); this.configDirectory = Files.asResource(new File(configFileDirectory)); } else { log.info("Provided configuration directory in the resource store. "); this.configDirectory = resourceStore.get(configFileDirectory); } } else { this.configDirectory = resourceStore.get(DEFAULT_CONFIGURATION_DIR_NAME); } log.info("Will look for geowebcache.xml in '" + configDirectory + "'"); }
Source:
<code>@Override public void onSubscribe(Subscription subscription) { this.s = subscription; <START> try (CurrentTraceContext.Scope inScope = this.tracing.currentTraceContext().maybeScope(this.spanTraceContext)) { <END> this.subscriber.onSubscribe(this); } }</code><technical_language>if this change is efficiency, inject CurrentTraceContext object directly. of this code needs Span object. cc @dmexe a beautiful, if unrelated, change in reactor <LINK_0></technical_language>

Target:
@Override public void onSubscribe(Subscription subscription) { this.s = subscription; try (CurrentTraceContext.Scope inScope = this.currentTraceContext.maybeScope(this.spanTraceContext)) { this.subscriber.onSubscribe(this); } }
Source:
<code>public final ImportResponse doExecute(TransactionContext context) { context.log().info("Importing components from source file '%s'.", this.attachment.getFileName()); try { InternalAttachmentRegistry iar = (InternalAttachmentRegistry) context.service(AttachmentRegistry.class); File attachment = iar.getAttachment(this.attachment.getAttachmentId()); ImportDefectAcceptor defectsAcceptor = new ImportDefectAcceptor(this.attachment.getFileName()); doValidate(context, attachment, defectsAcceptor, context.service(IProgressMonitor.class)); final List<ImportDefect> defects = defectsAcceptor.getDefects(); <START> if (!CompareUtils.isEmpty(defects)) { <END> return ImportResponse.defects(defects); } else { final Set<ComponentURI> visitedComponents = Sets.newHashSet(); doImport(context, attachment, visitedComponents::add, context.service(IProgressMonitor.class)); return ImportResponse.success(visitedComponents); } } catch (ApiException e) { throw e; } catch (Exception e) { String error = "Unexpected error happened during the import of the source file: " + attachment.getFileName(); context.log().error(error, e); return ImportResponse.error(error); } finally { context.log().info("Finished importing components from source file '%s'.", this.attachment.getFileName()); } }</code><technical_language>Informational warning messages here..</technical_language>

Target:
public final ImportResponse doExecute(TransactionContext context) { context.log().info("Importing components from source file '{}'.", this.attachment.getFileName()); try { InternalAttachmentRegistry iar = (InternalAttachmentRegistry) context.service(AttachmentRegistry.class); File attachment = iar.getAttachment(this.attachment.getAttachmentId()); ImportDefectAcceptor defectsAcceptor = new ImportDefectAcceptor(this.attachment.getFileName()); doValidate(context, attachment, defectsAcceptor, context.service(IProgressMonitor.class)); final ImportResponse validationResponse = ImportResponse.defects(defectsAcceptor.getDefects()); if (!validationResponse.getErrors().isEmpty()) { return validationResponse; } else { final Set<ComponentURI> visitedComponents = Sets.newHashSet(); doImport(context, attachment, visitedComponents::add, context.service(IProgressMonitor.class)); context.log().info("Finished importing components from source file '{}'.", this.attachment.getFileName()); return ImportResponse.success(visitedComponents, validationResponse.getDefects()); } } catch (ApiException e) { throw e; } catch (OperationLockException e) { throw new LockedException(e.getMessage()); } catch (Exception e) { String error = "Unexpected error happened during the import of the source file: " + attachment.getFileName(); context.log().error(error, e); return ImportResponse.error(error); } }
Source:
<code>public FateMetrics(final ServerContext context, final long minimumRefreshDelay) { super("Fate", "Fate Metrics", "fate"); zooReaderWriter = context.getZooReaderWriter(); fateRootPath = context.getZooKeeperRoot() + Constants.ZFATE; try { zooStore = new ZooStore<>(fateRootPath, zooReaderWriter); } catch (KeeperException ex) { throw new IllegalStateException( "FATE Metrics - Failed to create zoo store - metrics unavailable", ex); } catch (InterruptedException ex) { Thread.currentThread().interrupt(); throw new IllegalStateException( "FATE Metrics - Interrupt received while initializing zoo store"); } this.minimumRefreshDelay = Math.max(DEFAULT_MIN_REFRESH_DELAY, minimumRefreshDelay); <START> metricsValuesLock.lock(); <END> try { metricValues = updateFromZookeeper(); } finally { metricsValuesLock.unlock(); } MetricsRegistry registry = super.getRegistry(); currentFateOps = registry.newGauge("currentFateOps", "Current number of FATE Ops", 0L); zkChildFateOpsTotal = registry.newGauge("totalFateOps", "Total FATE Ops", 0L); zkConnectionErrorsTotal = registry.newGauge("totalZkConnErrors", "Total ZK Connection Errors", 0L); for (ReadOnlyTStore.TStatus t : ReadOnlyTStore.TStatus.values()) { MutableGaugeLong g = registry.newGauge(FATE_TX_STATE_METRIC_PREFIX + t.name().toUpperCase(), "Transaction count for " + t.name() + " transactions", 0L); fateTypeCounts.put(t.name(), g); } }</code><technical_language>Locking in constructor needed if this escapes constructor avoided</technical_language>

Target:
public FateMetrics(final ServerContext context, final long minimumRefreshDelay) { super("Fate", "Fate Metrics", "fate"); zooReaderWriter = context.getZooReaderWriter(); fateRootPath = context.getZooKeeperRoot() + Constants.ZFATE; try { zooStore = new ZooStore<>(fateRootPath, zooReaderWriter); } catch (KeeperException ex) { throw new IllegalStateException( "FATE Metrics - Failed to create zoo store - metrics unavailable", ex); } catch (InterruptedException ex) { Thread.currentThread().interrupt(); throw new IllegalStateException( "FATE Metrics - Interrupt received while initializing zoo store"); } this.minimumRefreshDelay = Math.max(DEFAULT_MIN_REFRESH_DELAY, minimumRefreshDelay); metricValues = updateFromZookeeper(); MetricsRegistry registry = super.getRegistry(); currentFateOps = registry.newGauge("currentFateOps", "Current number of FATE Ops", 0L); zkChildFateOpsTotal = registry.newGauge("totalFateOps", "Total FATE Ops", 0L); zkConnectionErrorsTotal = registry.newGauge("totalZkConnErrors", "Total ZK Connection Errors", 0L); for (ReadOnlyTStore.TStatus t : ReadOnlyTStore.TStatus.values()) { MutableGaugeLong g = registry.newGauge(FATE_TX_STATE_METRIC_PREFIX + t.name().toUpperCase(), "Transaction count for " + t.name() + " transactions", 0L); fateTypeCounts.put(t.name(), g); } }
Source:
<code>public GamesTilesContainerController(UiService uiService, PreferencesService preferencesService) { this.uiService = uiService; this.preferencesService = preferencesService; selectedGame = new SimpleObjectProperty<>(); sortingListener = (observable, oldValue, newValue) -> { if (newValue == null) { return; } preferencesService.getPreferences().setGameTileSortingOrder(newValue); preferencesService.storeInBackground(); appliedComparator = newValue.getComparator(); sortNodes(); }; gameListChangeListener = change -> { JavaFxUtil.assertApplicationThread(); while (change.next()) { change.getRemoved().forEach(gameInfoBean -> { Node card = uidToGameCard.remove(gameInfoBean.getId()); if (card != null) { Tooltip.uninstall(card, tooltip); } <START> boolean remove = tiledFlowPane.getChildren().remove(card); <END> if (!remove) { log.error("Tried to remove game tile that did not exist."); } }); change.getAddedSubList().forEach(GamesTilesContainerController.this::addGameCard); sortNodes(); } }; }</code><technical_language>lines card!=null block else block throw error in log. (We times occurs I guess)</technical_language>

Target:
public GamesTilesContainerController(UiService uiService, PreferencesService preferencesService) { this.uiService = uiService; this.preferencesService = preferencesService; selectedGame = new SimpleObjectProperty<>(); sortingListener = (observable, oldValue, newValue) -> { if (newValue == null) { return; } preferencesService.getPreferences().setGameTileSortingOrder(newValue); preferencesService.storeInBackground(); appliedComparator = newValue.getComparator(); sortNodes(); }; gameListChangeListener = change -> { JavaFxUtil.assertApplicationThread(); while (change.next()) { change.getRemoved().forEach(gameInfoBean -> { Node card = uidToGameCard.remove(gameInfoBean.getId()); if (card != null) { Tooltip.uninstall(card, tooltip); boolean remove = tiledFlowPane.getChildren().remove(card); if (!remove) { log.error("Tried to remove game tile that did not exist in UI."); } } else { log.error("Tried to remove game tile that did not exist."); } }); change.getAddedSubList().forEach(GamesTilesContainerController.this::addGameCard); sortNodes(); } }; }
Source:
<code>static String hostname(String hostname) { if (Strings.isNullOrEmpty(hostname)) { <START> hostname = "localhost"; <END> } else if (hostname.contains(":") && !hostname.startsWith("[")) { hostname = "[" + hostname + "]"; } return hostname; }</code><technical_language>a local variable for return instead of modifying argument</technical_language>

Target:
static String hostname(String hostname) { if (Strings.isNullOrEmpty(hostname)) { return "localhost"; } else if (hostname.contains(":") && !hostname.startsWith("[")) { return "[" + hostname + "]"; } return hostname; }
Source:
<code>public void readTuplesAndExecute(Communicator<HeronTuples.HeronTupleSet> inQueue) { TopologyContextImpl topologyContext = helper.getTopologyContext(); Duration instanceExecuteBatchTime = systemConfig.getInstanceExecuteBatchTime(); while (!inQueue.isEmpty()) { HeronTuples.HeronTupleSet tuples = inQueue.poll(); if (tuples.hasControl()) { throw new RuntimeException("Bolt cannot get acks/fails from other components"); } TopologyAPI.StreamId stream = tuples.getData().getStream(); int nValues = topologyContext.getComponentOutputFields( stream.getComponentName(), stream.getId()).size(); <START> long startOfCycle = System.nanoTime(); <END> long currentTime = startOfCycle; for (HeronTuples.HeronDataTuple dataTuple : tuples.getData().getTuplesList()) { List<Object> values = new ArrayList<>(nValues); for (int i = 0; i < nValues; i++) { values.add(serializer.deserialize(dataTuple.getValues(i).toByteArray())); } TupleImpl t = new TupleImpl(topologyContext, stream, dataTuple.getKey(), dataTuple.getRootsList(), values, currentTime, false); bolt.execute(t); long startTime = currentTime; currentTime = System.nanoTime(); long executeLatency = currentTime - startTime; topologyContext.invokeHookBoltExecute(t, Duration.ofNanos(executeLatency)); boltMetrics.executeTuple(stream.getId(), stream.getComponentName(), executeLatency); } if (currentTime - startOfCycle - instanceExecuteBatchTime.toNanos() > 0) { break; } } }</code><technical_language>long currentTime = System.nanoTime() startOfCycle unchanged? line 225 226, a timeout check. If move startOfCycle initializetion here, semantics is changed</technical_language>

Target:
public void readTuplesAndExecute(Communicator<HeronTuples.HeronTupleSet> inQueue) { TopologyContextImpl topologyContext = helper.getTopologyContext(); Duration instanceExecuteBatchTime = systemConfig.getInstanceExecuteBatchTime(); long startOfCycle = System.nanoTime(); while (!inQueue.isEmpty()) { HeronTuples.HeronTupleSet tuples = inQueue.poll(); if (tuples.hasControl()) { throw new RuntimeException("Bolt cannot get acks/fails from other components"); } TopologyAPI.StreamId stream = tuples.getData().getStream(); int nValues = topologyContext.getComponentOutputFields( stream.getComponentName(), stream.getId()).size(); for (HeronTuples.HeronDataTuple dataTuple : tuples.getData().getTuplesList()) { long startExecuteTuple = System.nanoTime(); List<Object> values = new ArrayList<>(nValues); for (int i = 0; i < nValues; i++) { values.add(serializer.deserialize(dataTuple.getValues(i).toByteArray())); } TupleImpl t = new TupleImpl(topologyContext, stream, dataTuple.getKey(), dataTuple.getRootsList(), values, startExecuteTuple, false); bolt.execute(t); long endExecuteTuple = System.nanoTime(); long executeLatency = endExecuteTuple - startExecuteTuple; topologyContext.invokeHookBoltExecute(t, Duration.ofNanos(executeLatency)); boltMetrics.executeTuple(stream.getId(), stream.getComponentName(), executeLatency); } long currentTime = System.nanoTime(); if (currentTime - startOfCycle - instanceExecuteBatchTime.toNanos() > 0) { break; } } }
Source:
<code>public void delete(ID id) { <START> long count = datastore.entityCount(ServiceProviderEntity.class, Filter.where("_id").is(id.value)); <END> if (count == 0) { throw new NotFoundException("Cant delete Unknown Service Provider."); } datastore.deleteById(ServiceProviderEntity.class, id.value); }</code><technical_language>No, no. Remove this logic (that checks provider exists)</technical_language>

Target:
public void delete(ID id) { datastore.deleteById(ServiceProviderEntity.class, id.value); }
Source:
<code>public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof IconWithOsDefault)) <START> return false; <END> IconWithOsDefault other = (IconWithOsDefault) obj; return Objects.equals(icon, other.icon) && Objects.equals(osDefaultIcon, other.osDefaultIcon) && Objects.equals(smallIconId, other.smallIconId) && Objects.equals(validationResult, other.validationResult); }</code><technical_language>missing { }</technical_language>

Target:
public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof IconWithOsDefault)) { return false; } IconWithOsDefault other = (IconWithOsDefault) obj; return Objects.equals(icon, other.icon) && Objects.equals(osDefaultIcon, other.osDefaultIcon) && Objects.equals(smallIconId, other.smallIconId) && Objects.equals(validationResult, other.validationResult); }
Source:
<code>int getItemHeightInPixels () { checkWidget(); int itemCount = GTK.gtk_tree_model_iter_n_children (modelHandle, 0); long column = GTK.gtk_tree_view_get_column (handle, 0); if (itemCount == 0) { int w = new int [1], h = new int [1]; GTK.gtk_tree_view_column_cell_get_size (column, null, null, null, w, h); int height = h [0]; if (GTK.GTK3) { long textRenderer = getTextRenderer (column); GTK.gtk_cell_renderer_get_preferred_height_for_width (textRenderer, handle, 0, h, null); height += h [0]; } return height; } else { int height = 0; long iter = OS.g_malloc (GTK.GtkTreeIter_sizeof ()); GTK.gtk_tree_model_get_iter_first (modelHandle, iter); GTK.gtk_tree_view_column_cell_set_cell_data (column, modelHandle, iter, false, false); int w = new int [1], h = new int [1]; GTK.gtk_tree_view_column_cell_get_size (column, null, null, null, w, h); if (GTK.GTK3) { long textRenderer = getTextRenderer (column); int ypad = new int[1]; <START> GTK.gtk_cell_renderer_get_padding(textRenderer, null, ypad); <END> height = h [0] + ypad [0]; } else { height = h [0]; } OS.g_free (iter); return height; } }</code><technical_language>Please add a check here: if (textRenderer != 0) GTK.gtk_cell_renderer_get_padding(textRenderer, null, ypad); line save space. a check call GTK a null renderer</technical_language>

Target:
int getItemHeightInPixels () { checkWidget(); int itemCount = GTK.gtk_tree_model_iter_n_children (modelHandle, 0); long column = GTK.gtk_tree_view_get_column (handle, 0); if (itemCount == 0) { int w = new int [1], h = new int [1]; GTK.gtk_tree_view_column_cell_get_size (column, null, null, null, w, h); int height = h [0]; if (GTK.GTK3) { long textRenderer = getTextRenderer (column); if (textRenderer != 0) GTK.gtk_cell_renderer_get_preferred_height_for_width (textRenderer, handle, 0, h, null); height += h [0]; } return height; } else { int height = 0; long iter = OS.g_malloc (GTK.GtkTreeIter_sizeof ()); GTK.gtk_tree_model_get_iter_first (modelHandle, iter); GTK.gtk_tree_view_column_cell_set_cell_data (column, modelHandle, iter, false, false); int w = new int [1], h = new int [1]; GTK.gtk_tree_view_column_cell_get_size (column, null, null, null, w, h); if (GTK.GTK3) { long textRenderer = getTextRenderer (column); int ypad = new int[1]; if (textRenderer != 0) GTK.gtk_cell_renderer_get_padding(textRenderer, null, ypad); height = h [0] + ypad [0]; } else { height = h [0]; } OS.g_free (iter); return height; } }
Source:
<code>public void adapt(MessageChannel streamListenerResult, MessageChannel boundElement) { BridgeHandler handler = new BridgeHandler(); handler.setOutputChannel(boundElement); <START> ((SubscribableChannel) streamListenerResult).subscribe(handler); <END> }</code><technical_language>do lifecycle methods need invoked handler</technical_language>

Target:
public void adapt(MessageChannel streamListenerResult, MessageChannel boundElement) { BridgeHandler handler = new BridgeHandler(); handler.setOutputChannel(boundElement); handler.afterPropertiesSet(); ((SubscribableChannel) streamListenerResult).subscribe(handler); }
Source:
<code>protected void calculateNextCheckpointWindow() { if (PROCESSING_MODE != ProcessingMode.EXACTLY_ONCE) { <START> nextCheckpointWindowCount = (int)Math.ceil((double)(DAG_CHECKPOINT_WINDOW_COUNT - dagCheckpointOffsetCount)/CHECKPOINT_WINDOW_COUNT) * CHECKPOINT_WINDOW_COUNT; <END> } else { nextCheckpointWindowCount = 1; } }</code><technical_language>Converting a floating point in order get ceiling of result of a division of integers is a recommended practice converting a large integer a floating point lose precision. In this case, happen talking a small integer, changing to: nextCheckpointWindowCount = ((DAG_CHECKPOINT_WINDOW_COUNT - dagCheckpointOffsetCount + CHECKPOINT_WINDOW_COUNT - 1) / CHECKPOINT_WINDOW_COUNT) * CHECKPOINT_WINDOW_COUNT; avoid casting</technical_language>

Target:
protected void calculateNextCheckpointWindow() { if (PROCESSING_MODE != ProcessingMode.EXACTLY_ONCE) { nextCheckpointWindowCount = ((DAG_CHECKPOINT_WINDOW_COUNT - dagCheckpointOffsetCount + CHECKPOINT_WINDOW_COUNT - 1)/CHECKPOINT_WINDOW_COUNT) * CHECKPOINT_WINDOW_COUNT; } else { nextCheckpointWindowCount = 1; } }
Source:
<code>private void rejectMalformedAccumulator(String missing) { <START> throw new UserError( <END> "The accumulator annotation " + accumulator + " must " + missing + ". " + "The accumulator type annotation must have exactly one argument, of type String[] with the name " + "\"value\" and an empty default. See the documentation in " + "the manual for creating an accumulation checker."); }</code><technical_language>A UserError is a user passed wrong arguments Checker Framework. corrected changing run-time invocation. A bug in source code of a checker thrown a BugInCF., if source code written other main Checker Framework developers</technical_language>

Target:
private void rejectMalformedAccumulator(String missing) { throw new BugInCF("The accumulator annotation " + accumulator + " must " + missing + "."); }
Source:
<code>private Multimap<String, String> newMultimap(Multimap<String, String> map) { <START> Multimap<String, String> multimap = HashMultimap.create(); if (map != null) multimap.putAll(map); return multimap; <END> }</code><technical_language>suggestion return (map != null) ? HashMultimap.create(map) : HashMultimap.create();</technical_language>

Target:
private Multimap<String, String> newMultimap(Multimap<String, String> map) { return (map != null) ? HashMultimap.create(map) : HashMultimap.create(); }