auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>List<PlanMatchingState> shapeMatches(PlanNode node) { ImmutableList.Builder<PlanMatchingState> states = ImmutableList.builder(); if (anyTree) { int sourcesCount = node.getSources().size(); if (sourcesCount > 1) { states.add(new PlanMatchingState(nCopies(sourcesCount, this))); } else { states.add(new PlanMatchingState(ImmutableList.of(this))); } } <START> if (sources(node).size() == sourcePatterns.size() && matchers.stream().allMatch(it -> it.shapeMatches(node))) { <END> states.add(new PlanMatchingState(sourcePatterns)); } return states.build(); }</code><technical_language>I prefer handle GroupReferenceNode in if</technical_language>

Target:
List<PlanMatchingState> shapeMatches(PlanNode node) { ImmutableList.Builder<PlanMatchingState> states = ImmutableList.builder(); if (anyTree) { int sourcesCount = node.getSources().size(); if (sourcesCount > 1) { states.add(new PlanMatchingState(nCopies(sourcesCount, this))); } else { states.add(new PlanMatchingState(ImmutableList.of(this))); } } if (node instanceof GroupReference) { if (sourcePatterns.isEmpty() && shapeMatchesMatchers(node)) { states.add(new PlanMatchingState(ImmutableList.of())); } } else if (node.getSources().size() == sourcePatterns.size() && shapeMatchesMatchers(node)) { states.add(new PlanMatchingState(sourcePatterns)); } return states.build(); }
Source:
<code>public void register(Class<? extends Converter<?>> converterClass) { Convert type = converterClass.getAnnotation(Convert.class); <START> checkNotNull(type, "The converter type %s should have the Convert annotation", converterClass.getName()); <END> logger.debug("adding converter to {}", converterClass, type.value()); classes.add(converterClass); }</code><technical_language>IStateEx IArgumentEx</technical_language>

Target:
public void register(Class<? extends Converter<?>> converterClass) { Convert type = converterClass.getAnnotation(Convert.class); checkState(type != null, "The converter type %s should have the Convert annotation", converterClass.getName()); logger.debug("adding converter to {}", converterClass, type.value()); classes.add(converterClass); }
Source:
<code>public synchronized Object getObject() throws Exception { if (this.proxy == null) { <START> this.channelFactory.createChannels(this.type); <END> ProxyFactory factory = new ProxyFactory(this.type, this); this.proxy = factory.getProxy(); } return this.proxy; }</code><technical_language>this feels a brittle contract... call createChannels prior calling getInputs getOutputs</technical_language>

Target:
public synchronized Object getObject() throws Exception { if (this.proxy == null) { ProxyFactory factory = new ProxyFactory(this.type, this); this.proxy = factory.getProxy(); } return this.proxy; }
Source:
<code>private static boolean isSoapPayload( final InputStream is ) throws IOException { String content = CharStreams.toString( new InputStreamReader( is, Charsets.UTF_8 ) ); is.reset(); return endSoapTag.matcher( content ).find(); <START> } <END></code><technical_language>Hmmm, buffering input stream in memory twice: check if is a SOAP payload, parse payload if is error. done this extra stream processing? faultHandler.parse(in); fail, parser (directly indirectly) cover case too</technical_language>

Target:
private static boolean isSoapPayload(final InputStream is) throws IOException { int size = is.available(); char[] chars = new char[size]; byte[] bytes = new byte[size]; is.read(bytes, 0, size); for (int i = 0; i < size;) chars[i] = (char) (bytes[i++] & 0xff); is.reset(); return endSoapTag.matcher(new String(chars)).find(); }
Source:
<code>private void initCinderDependentVolume(CinderDisk newCinderVolume) { newCinderVolume.setVolumeType(VolumeType.Unassigned); <START> newCinderVolume.setvolumeFormat(VolumeFormat.UNUSED1); <END> newCinderVolume.setImageStatus(ImageStatus.LOCKED); newCinderVolume.setParentId(getDiskImage().getImageId()); newCinderVolume.setVmSnapshotId(getParameters().getVmSnapshotId()); newCinderVolume.setCreationDate(new Date()); newCinderVolume.setLastModifiedDate(new Date()); newCinderVolume.setQuotaId(getParameters().getQuotaId()); newCinderVolume.setDiskProfileId(getParameters().getDiskProfileId()); newCinderVolume.setActive(Boolean.FALSE); }</code><technical_language>change Unassigned</technical_language>

Target:
private void initCinderDependentVolume(CinderDisk newCinderVolume) { newCinderVolume.setVolumeType(VolumeType.Unassigned); newCinderVolume.setvolumeFormat(VolumeFormat.Unassigned); newCinderVolume.setImageStatus(ImageStatus.LOCKED); newCinderVolume.setParentId(getDiskImage().getImageId()); newCinderVolume.setVmSnapshotId(getParameters().getVmSnapshotId()); newCinderVolume.setCreationDate(new Date()); newCinderVolume.setLastModifiedDate(new Date()); newCinderVolume.setQuotaId(getParameters().getQuotaId()); newCinderVolume.setDiskProfileId(getParameters().getDiskProfileId()); newCinderVolume.setActive(Boolean.FALSE); }
Source:
<code>private float[][] calculateRubricStats(List<FeedbackResponseAttributes> responses, FeedbackRubricQuestionDetails fqd) { int[][] responseFrequency = calculateResponseFrequency(responses, fqd); int numOfRubricChoices = fqd.numOfRubricChoices; <START> float[][] percentageFrequencyAndAverageValue = new float[fqd.numOfRubricSubQuestions][]; <END> for (int i = 0; i < percentageFrequencyAndAverageValue.length; i++) { percentageFrequencyAndAverageValue[i] = new float[numOfRubricChoices + 1]; for (int j = 0; j < (percentageFrequencyAndAverageValue.length + 1); j++) { percentageFrequencyAndAverageValue[i][j] = 0; } } for (int i = 0; i < percentageFrequencyAndAverageValue.length; i++) { int totalForSubQuestion = responseFrequency[i][fqd.numOfRubricChoices]; if (totalForSubQuestion == 0) { continue; } for (int j = 0; j < numOfRubricChoices; j++) { percentageFrequencyAndAverageValue[i][j] = (float) responseFrequency[i][j] / totalForSubQuestion; } if (fqd.hasAssignedWeights) { for (int j = 0; j < numOfRubricChoices; j++) { float choiceWeight = (float) (fqd.rubricWeights.get(j) * percentageFrequencyAndAverageValue[i][j]); percentageFrequencyAndAverageValue[i][numOfRubricChoices] += choiceWeight; } } } return percentageFrequencyAndAverageValue; }</code><technical_language>initialise new float[fqd.numOfRubricSubQuestions][numOfRubricChoices + 1];. omit for loops default in java arrays is 0</technical_language>

Target:
private float[][] calculateRubricStats(List<FeedbackResponseAttributes> responses, FeedbackRubricQuestionDetails fqd) { int[][] responseFrequency = calculateResponseFrequency(responses, fqd); int numOfRubricChoices = fqd.numOfRubricChoices; float[][] percentageFrequencyAndAverageValue = new float[fqd.numOfRubricSubQuestions][numOfRubricChoices + 1]; for (int i = 0; i < percentageFrequencyAndAverageValue.length; i++) { int totalForSubQuestion = responseFrequency[i][fqd.numOfRubricChoices]; if (totalForSubQuestion == 0) { continue; } for (int j = 0; j < numOfRubricChoices; j++) { percentageFrequencyAndAverageValue[i][j] = (float) responseFrequency[i][j] / totalForSubQuestion; } if (fqd.hasAssignedWeights) { for (int j = 0; j < numOfRubricChoices; j++) { float choiceWeight = (float) (fqd.rubricWeights.get(j) * percentageFrequencyAndAverageValue[i][j]); percentageFrequencyAndAverageValue[i][numOfRubricChoices] += choiceWeight; } } } return percentageFrequencyAndAverageValue; }
Source:
<code>public void updateTreeItemMappings() { Tree tree = treeViewer.getTree(); if (isDummyChild(tree.getItems())) { treeViewer.createChildren(tree); } final List<TreeNode> needCrossReferencer = new ArrayList<TreeNode>(); TreeNodeCrossReferencer crossReferencer = null; for (TreeItem root : tree.getItems()) { final TreeNode rootNode = getTreeNodeFromAdapter(root.getData()); boolean hasCrossReferencer = false; <START> for (Adapter adapter : rootNode.eAdapters()) { <END> if (adapter instanceof TreeNodeCrossReferencer) { crossReferencer = (TreeNodeCrossReferencer)adapter; hasCrossReferencer = true; } } if (!hasCrossReferencer) { needCrossReferencer.add(rootNode); } } if (crossReferencer == null) { crossReferencer = new TreeNodeCrossReferencer(); } for (TreeNode needy : needCrossReferencer) { needy.eAdapters().add(crossReferencer); } treeNodeToDiffCrossReferencer = crossReferencer; }</code><technical_language>if TreeNodeCR implements isAdapterForType(Object), EcoreUtil.getExistingAdapter(rootNode, TreeNodeCrossReferencer.class). clearer</technical_language>

Target:
public void updateTreeItemMappings() { Tree tree = treeViewer.getTree(); if (isDummyChild(tree.getItems())) { treeViewer.createChildren(tree); } final List<TreeNode> needCrossReferencer = new ArrayList<TreeNode>(); TreeNodeCrossReferencer crossReferencer = null; for (TreeItem root : tree.getItems()) { final TreeNode rootNode = getTreeNodeFromAdapter(root.getData()); final Adapter adapter = EcoreUtil.getExistingAdapter(rootNode, TreeNodeCrossReferencer.class); if (adapter instanceof TreeNodeCrossReferencer) { crossReferencer = (TreeNodeCrossReferencer)adapter; } else { needCrossReferencer.add(rootNode); } } if (crossReferencer == null) { crossReferencer = new TreeNodeCrossReferencer(); } for (TreeNode needy : needCrossReferencer) { needy.eAdapters().add(crossReferencer); } treeNodeToDiffCrossReferencer = crossReferencer; }
Source:
<code>RowSerializerSnapshot(RowSerializer serializerInstance) { super(serializerInstance); <START> this.readVersion = serializerInstance.legacyModeEnabled ? LAST_VERSION_WITHOUT_ROW_KIND : VERSION; <END> }</code><technical_language>I this line is needed, missing in tests. read version changed if this snapshot created restoring a snapshot. In this case, this constructor is create a new snapshot checkpointing occurs - read version default (VALUE)</technical_language>

Target:
RowSerializerSnapshot(RowSerializer serializerInstance) { super(serializerInstance); }
Source:
<code>private void alterFormElementName(FormElement formElement) { String formFieldName = formElement.getName(); <START> String name = formFieldName.substring(formFieldName.indexOf("/", 1) + 1, formFieldName.length()); END> formElement.setName(name); if (formElement.hasChildren()) { for (FormElement child : formElement.getChildren()) { alterFormElementName(child); } } }</code><technical_language>is util method</technical_language>

Target:
private void alterFormElementName(FormElement formElement) throws MalformedUriException { String formFieldName = formElement.getName(); String name = FormUtils.removeTitleFromUri(formFieldName); formElement.setName(name); if (formElement.hasChildren()) { for (FormElement child : formElement.getChildren()) { alterFormElementName(child); } } }
Source:
<code>public int hashCode() { if <START> (getInput(false) != <END> null) { return getInput(false).hashCode(); } return super.hashCode(); }</code><technical_language>stored in a local variable</technical_language>

Target:
public int hashCode() { EObject input = getInput(false); if (input != null) { return input.hashCode(); } return super.hashCode(); }
Source:
<code>private void checkMethodNamingPattern(DetailAST methodDefToken) { final DetailAST modifiersToken = methodDefToken.findFirstToken(TokenTypes.MODIFIERS); final Optional<DetailAST> serviceMethodAnnotationOption = TokenUtil.findFirstTokenByPredicate(modifiersToken, node -> { if (node.getType() != TokenTypes.ANNOTATION) { return false; } final DetailAST annotationIdentToken = node.findFirstToken(TokenTypes.IDENT); return annotationIdentToken != null && "ServiceMethod".equals(annotationIdentToken.getText()); }); if (!serviceMethodAnnotationOption.isPresent()) { return; } final DetailAST serviceMethodAnnotation = serviceMethodAnnotationOption.get(); final String methodName = methodDefToken.findFirstToken(TokenTypes.IDENT).getText(); final String prefix = methodName.split("[A-Z]", 2)[0]; if (!methodName.endsWith("Exists") && !COMMON_NAMING_PREFIX_SET.contains(prefix)) { log(methodDefToken, String.format("Method name ''%s'' should follow a common vocabulary. Refer to Java " <START> + "Spec: %s.", <END> methodName, JAVA_SPEC_LINK)); } if (methodName.contains(ASYNC)) { log(methodDefToken, String.format("Method name ''%s'' should not contain ''%s'' in the method name.", methodName, ASYNC)); } checkServiceClientMethodReturnType(methodDefToken, serviceMethodAnnotation, methodName); checkReturnTypeNamingPattern(methodDefToken, methodName); checkContextInRightPlace(methodDefToken); }</code><technical_language>a good this line break remove, "Spec: %s.", methodName, JAVA_SPEC_LINK));</technical_language>

Target:
private void checkMethodNamingPattern(DetailAST methodDefToken) { final DetailAST modifiersToken = methodDefToken.findFirstToken(TokenTypes.MODIFIERS); final Optional<DetailAST> serviceMethodAnnotationOption = TokenUtil.findFirstTokenByPredicate(modifiersToken, node -> { if (node.getType() != TokenTypes.ANNOTATION) { return false; } final DetailAST annotationIdentToken = node.findFirstToken(TokenTypes.IDENT); return annotationIdentToken != null && "ServiceMethod".equals(annotationIdentToken.getText()); }); if (!serviceMethodAnnotationOption.isPresent()) { return; } final DetailAST serviceMethodAnnotation = serviceMethodAnnotationOption.get(); final String methodName = methodDefToken.findFirstToken(TokenTypes.IDENT).getText(); final String prefix = methodName.split("[A-Z]", 2)[0]; if (!methodName.endsWith("Exists") && !COMMON_NAMING_PREFIX_SET.contains(prefix)) { log(methodDefToken, String.format( "Method name ''%s'' should follow a common vocabulary. Refer to Java Spec: %s.", methodName, JAVA_SPEC_LINK)); } if (methodName.contains(ASYNC)) { log(methodDefToken, String.format("Method name ''%s'' should not contain ''%s'' in the method name.", methodName, ASYNC)); } checkServiceClientMethodReturnType(methodDefToken, serviceMethodAnnotation, methodName); checkReturnTypeNamingPattern(methodDefToken, methodName); checkContextInRightPlace(methodDefToken); }
Source:
<code>public Map<String, Object> anyQuery(QueryBuilder query, Field<?>... fields) { try (Connection c = ds.getConnection()) { LOGGER.log(Level.FINEST, query.toString()); <START> PreparedStatement stmt = query.toStatement(c); <END> try { ResultSet rs = stmt.executeQuery(); try { if(rs.next()) { assert(rs.last()); Map<String, Object> result = new HashMap<String, Object>(); for(int i = 0; i< fields.length; i++) { result.put(fields[i].getFieldName(), fields[i].getValue(rs)); } return result; } else { return null; } } finally { rs.close(); } } finally { stmt.close(); } } catch (SQLException ex) { throw new IllegalStateException("SelectQuery Failed",ex); } }</code><technical_language>try-with-resources</technical_language>

Target:
public Map<String, Object> anyQuery(QueryBuilder query, Field<?>... fields) { LOGGER.log(Level.FINEST, query.toString()); try (Connection c = ds.getConnection()) { try (PreparedStatement stmt = query.toStatement(c)) { try (ResultSet rs = stmt.executeQuery()) { if (rs.next()) { assert (rs.last()); Map<String, Object> result = new HashMap<String, Object>(); for (int i = 0; i < fields.length; i++) { result.put(fields[i].getFieldName(), fields[i].getValue(rs)); } return result; } else { return null; } } } } catch (SQLException ex) { throw new IllegalStateException("SelectQuery Failed", ex); } }
Source:
<code>public void refreshPeopleList() { if (!isAdded()) return; List<Person> peopleList = PeopleTable.getPeople(mLocalTableBlogID); PeopleAdapter peopleAdapter = (PeopleAdapter) getListAdapter(); if (peopleAdapter == null) { peopleAdapter = new PeopleAdapter(getActivity(), peopleList); setListAdapter(peopleAdapter); } else { peopleAdapter.setPeopleList(peopleList); <START> peopleAdapter.notifyDataSetChanged(); <END> } }</code><technical_language>Interesting. error ofc calling notifyDataSetChanged() is Adapter is in position perform adapter's user. reason do call setPeopleList() for example</technical_language>

Target:
public void refreshPeopleList() { if (!isAdded()) return; List<Person> peopleList = PeopleTable.getPeople(mLocalTableBlogID); PeopleAdapter peopleAdapter = (PeopleAdapter) getListAdapter(); if (peopleAdapter == null) { peopleAdapter = new PeopleAdapter(getActivity(), peopleList); setListAdapter(peopleAdapter); } else { peopleAdapter.setPeopleList(peopleList); } }
Source:
<code>public void callPublicMethodWithSeveralByteParams(String containerType, String endpoint) { byte value1 = 1, value2 = 2, value3 = 3; <START> byte result = (byte)(value1 + value2 + value3); <END> performActionForByte(containerType, endpoint, PUBLIC_WITH_SEVERAL_BYTE_PARAMS_ACTION, result, new Param(PARAM_NAME_1, value1), new Param(PARAM_NAME_2, value2), new Param(PARAM_NAME_3, value3)); }</code><technical_language>final (like other places)</technical_language>

Target:
public void callPublicMethodWithSeveralByteParams(String containerType, String endpoint) { final byte value1 = 1; final byte value2 = 2; final byte value3 = 3; final byte result = (byte)(value1 + value2 + value3); performActionForByte(containerType, endpoint, PUBLIC_WITH_SEVERAL_BYTE_PARAMS_ACTION, result, new Param(PARAM_NAME_1, value1), new Param(PARAM_NAME_2, value2), new Param(PARAM_NAME_3, value3)); }
Source:
<code>public void participate(InstanceType role) throws Exception { <START> manager = HelixManagerFactory.getZKHelixManager(vcrClusterName, vcrInstanceName, InstanceType.PARTICIPANT, <END> cloudConfig.vcrClusterZkConnectString); manager.getStateMachineEngine() .registerStateModelFactory(LeaderStandbySMD.name, new HelixVcrStateModelFactory(this)); manager.connect(); helixAdmin = manager.getClusterManagmentTool(); logger.info("Participate HelixVcrCluster as successfully.", role); }</code><technical_language>role</technical_language>

Target:
public void participate(InstanceType role) throws Exception { manager = HelixManagerFactory.getZKHelixManager(vcrClusterName, vcrInstanceName, role, cloudConfig.vcrClusterZkConnectString); manager.getStateMachineEngine() .registerStateModelFactory(LeaderStandbySMD.name, new HelixVcrStateModelFactory(this)); manager.connect(); helixAdmin = manager.getClusterManagmentTool(); logger.info("Participate HelixVcrCluster as successfully.", role); }
Source:
<code>List<SchedulerUserInfo> getUsers() { List<SchedulerUserInfo> users = new ArrayList<>(identifications.size()); for (UserAndCredentials userAndCredentials : identifications.values()) { ListeningUser listeningUser = userAndCredentials.getListeningUser(); UserIdentificationImpl user = listeningUser.getUser(); users.add(new SchedulerUserInfo(user.getHostName(), user.getUsername(), user.getConnectionTime(), user.getLastSubmitTime(), user.getSubmitNumber())); } <START> return users; <END> }</code><technical_language>replace upper block by: return identifications.stream().map(userAndCredentials ->{ ListeningUser listeningUser = userAndCredentials.getListeningUser(); UserIdentificationImpl user = listeningUser.getUser(); return new SchedulerUserInfo(user.getHostName(), user.getUsername(), user.getConnectionTime(), user.getLastSubmitTime(), user.getSubmitNumber())) }).collect(Collectors.toList());</technical_language>

Target:
List<SchedulerUserInfo> getUsers() { return identifications.values().stream().map(userAndCredentials -> { ListeningUser listeningUser = userAndCredentials.getListeningUser(); UserIdentificationImpl user = listeningUser.getUser(); return new SchedulerUserInfo(user.getHostName(), user.getUsername(), user.getConnectionTime(), user.getLastSubmitTime(), user.getSubmitNumber()); }).collect(Collectors.toList()); }
Source:
<code>private void validate() { if (!index.getCurrencyPair().contains(referenceCurrency)) { throw new IllegalArgumentException( <START> Messages.format("Reference currency must be one of those in the FxIndex: {}", referenceCurrency, index)); <END> } }</code><technical_language>Message - reference currency: is currencies in FxIndex: {}</technical_language>

Target:
private void validate() { if (!index.getCurrencyPair().contains(referenceCurrency)) { throw new IllegalArgumentException( Messages.format("Reference currency must be one of those in the FxIndex {}", referenceCurrency, index)); } }
Source:
<code>public void mustEvaluateTrueEqualityTest() throws Exception { new Assertion<>( "Must evaluate true equality", <START> new SiHmac( <END> "key", SiHmac.HMAC256 ), new IsEqual<>( new SiHmac("key", SiHmac.HMAC256) ) ).affirm(); }</code><technical_language>@fanifieiev above</technical_language>

Target:
public void mustEvaluateTrueEqualityTest() throws Exception { final String key = "key"; new Assertion<>( "Must evaluate true equality", new SiHmac(key, SiHmac.HMAC256), new IsEqual<>(new SiHmac(key, SiHmac.HMAC256)) ).affirm(); }
Source:
<code>public ImmutableBitmap getBitmapIndex(String dimension, String value) { final Column column = index.getColumn(dimension); if (column == null) { <START> if (value == null || "".equals(value)) { <END> return bitmapFactory.complement(bitmapFactory.makeEmptyImmutableBitmap(), getNumRows()); } return bitmapFactory.makeEmptyImmutableBitmap(); } if (!column.getCapabilities().hasBitmapIndexes()) { bitmapFactory.makeEmptyImmutableBitmap(); } return column.getBitmapIndex().getBitmap(value); }</code><technical_language>I if this predicate defined in a more common place I logic is copy pasted in a places. afraid of is add new code, get a situation similar casing forget lowercase a bug is introduced</technical_language>

Target:
public ImmutableBitmap getBitmapIndex(String dimension, String value) { final Column column = index.getColumn(dimension); if (column == null) { if (Strings.isNullOrEmpty(value)) { return bitmapFactory.complement(bitmapFactory.makeEmptyImmutableBitmap(), getNumRows()); } else { return bitmapFactory.makeEmptyImmutableBitmap(); } } if (!column.getCapabilities().hasBitmapIndexes()) { bitmapFactory.makeEmptyImmutableBitmap(); } return column.getBitmapIndex().getBitmap(value); }
Source:
<code>public void moveGroup(PerunSession sess, Group destinationGroup, Group movingGroup) throws InternalErrorException, GroupNotExistsException, PrivilegeException, GroupMoveNotAllowedException{ Utils.checkPerunSession(sess); getGroupsManagerBl().checkGroupExists(sess, movingGroup); if(destinationGroup != null){ getGroupsManagerBl().checkGroupExists(sess, destinationGroup); } if ((!AuthzResolver.isAuthorized(sess, Role.VOADMIN, movingGroup) && !AuthzResolver.isAuthorized(sess, Role.GROUPADMIN, movingGroup)) || <START> (!AuthzResolver.isAuthorized(sess, Role.VOADMIN, destinationGroup) && !AuthzResolver.isAuthorized(sess, Role.GROUPADMIN, destinationGroup))) { <END> throw new PrivilegeException(sess, "moveGroup"); } getGroupsManagerBl().moveGroup(sess, destinationGroup, movingGroup); }</code><technical_language>sure, a problem destinationGroup == null if try check authz for VO/Group admin role. In case check VO manager role (on movingGroup)</technical_language>

Target:
public void moveGroup(PerunSession sess, Group destinationGroup, Group movingGroup) throws InternalErrorException, GroupNotExistsException, PrivilegeException, GroupMoveNotAllowedException{ Utils.checkPerunSession(sess); getGroupsManagerBl().checkGroupExists(sess, movingGroup); if(destinationGroup != null){ getGroupsManagerBl().checkGroupExists(sess, destinationGroup); if ((!AuthzResolver.isAuthorized(sess, Role.VOADMIN, movingGroup) && !AuthzResolver.isAuthorized(sess, Role.GROUPADMIN, movingGroup)) || (!AuthzResolver.isAuthorized(sess, Role.VOADMIN, destinationGroup) && !AuthzResolver.isAuthorized(sess, Role.GROUPADMIN, destinationGroup))) { throw new PrivilegeException(sess, "moveGroup"); } } else { if (!AuthzResolver.isAuthorized(sess, Role.VOADMIN, movingGroup)) { throw new PrivilegeException(sess, "moveGroup"); } } getGroupsManagerBl().moveGroup(sess, destinationGroup, movingGroup); }
Source:
<code>public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } TimeAndDims that = (TimeAndDims) o; if (timestamp != that.timestamp) { return false; } <START> for (int i = 0; i < dims.length; i++) { <END> if (!Arrays.equals(dims[i], that.dims[i])) { return false; } } return true; }</code><technical_language>TimeAndDims dims of length I this out of bounds array access that.dims[i]. This check types Comparator for sorted facts check types. equals impl do return dimsComparator.compare(this, that) == 0 this some needless name lookups</technical_language>

Target:
public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } TimeAndDims that = (TimeAndDims) o; if (timestamp != that.timestamp) { return false; } if (dims.length != that.dims.length) { return false; } for (int i = 0; i < dims.length; i++) { if (!Arrays.equals(dims[i], that.dims[i])) { return false; } } return true; }
Source:
<code>private StreamProcessor(int processorId, Config config, Map<String, MetricsReporter> customMetricsReporters, Object taskFactory) { this.processorId = processorId; Map<String, String> updatedConfigMap = new HashMap<>(); updatedConfigMap.putAll(config); <START> updatedConfigMap.put(PROCESSOR_ID, String.valueOf(this.processorId)); <END> Config updatedConfig = new MapConfig(updatedConfigMap); this.containerController = new SamzaContainerController( taskFactory, new TaskConfigJava(updatedConfig).getShutdownMs(), String.valueOf(processorId), customMetricsReporters); this.jobCoordinator = Util. <JobCoordinatorFactory>getObj( new JobCoordinatorConfig(updatedConfig) .getJobCoordinatorFactoryClassName()) .getJobCoordinator(processorId, updatedConfig, this.containerController); }</code><technical_language>reason need augment config processorId? processorId is passed containerController jobCoordinator</technical_language>

Target:
private StreamProcessor(int processorId, Config config, Map<String, MetricsReporter> customMetricsReporters, Object taskFactory) { this.processorId = processorId; Map<String, String> updatedConfigMap = new HashMap<>(); updatedConfigMap.putAll(config); updatedConfigMap.put(PROCESSOR_ID, String.valueOf(this.processorId)); Config updatedConfig = new MapConfig(updatedConfigMap); SamzaContainerController containerController = new SamzaContainerController( taskFactory, new TaskConfigJava(updatedConfig).getShutdownMs(), String.valueOf(processorId), customMetricsReporters); this.jobCoordinator = Util. <JobCoordinatorFactory>getObj( new JobCoordinatorConfig(updatedConfig) .getJobCoordinatorFactoryClassName()) .getJobCoordinator(processorId, updatedConfig, containerController); }
Source:
<code>protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.login); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); <START> toolbar.setTitle("Login"); <END> setSupportActionBar(toolbar); connectionProgressDialog = new ProgressDialog(this); connectionProgressDialog.setMessage(getString(R.string.signing_in)); mUseZulipCheckbox = (CheckBox) findViewById(R.id.checkbox_usezulip); mServerEditText = (EditText) findViewById(R.id.server_url); mGoogleSignInButton = findViewById(R.id.google_sign_in_button); findViewById(R.id.google_sign_in_button).setOnClickListener(this); findViewById(R.id.zulip_login).setOnClickListener(this); mUseZulipCheckbox.setOnCheckedChangeListener(this); mUserName = (EditText) findViewById(R.id.username); mPassword = (EditText) findViewById(R.id.password); if (!BuildConfig.DEBUG) findViewById(R.id.local_server_button).setVisibility(View.GONE); }</code><technical_language>Human readable strings belong in strings.xml</technical_language>

Target:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.login); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); toolbar.setTitle(R.string.title_login); setSupportActionBar(toolbar); connectionProgressDialog = new ProgressDialog(this); connectionProgressDialog.setMessage(getString(R.string.signing_in)); mUseZulipCheckbox = (CheckBox) findViewById(R.id.checkbox_usezulip); mServerEditText = (EditText) findViewById(R.id.server_url); mGoogleSignInButton = findViewById(R.id.google_sign_in_button); findViewById(R.id.google_sign_in_button).setOnClickListener(this); findViewById(R.id.zulip_login).setOnClickListener(this); mUseZulipCheckbox.setOnCheckedChangeListener(this); mUserName = (EditText) findViewById(R.id.username); mPassword = (EditText) findViewById(R.id.password); if (!BuildConfig.DEBUG) findViewById(R.id.local_server_button).setVisibility(View.GONE); }
Source:
<code>public void setMenuItemActive(String nameToken) { <START> $("a", menubar).toggleClass(widgetRes.header().menuActive(), false); <END> $("a[href*=\"" + nameToken + "\"]", menubar).toggleClass(widgetRes.header().menuActive(), true); }</code><technical_language>removeClass instead</technical_language>

Target:
public void setMenuItemActive(String nameToken) { $("a", menubar).removeClass(widgetRes.header().menuActive()); $("a[href*=\"" + nameToken + "\"]", menubar).addClass(widgetRes.header().menuActive()); }
Source:
<code>public List<String> getOid() { if (oid == null) { <START> oid = new ArrayList<String>(); <END> } return this.oid; }</code><technical_language>instantiate provider list constructor itself? allow get rid of "if" condition called getProvider method is invoked</technical_language>

Target:
public List<String> getOid() { return this.oid; }
Source:
<code><START> private JobResult projectDoesNotExistError(final String jobId, <END> final String projectName) { JobResult jobResult = new JobResult(); jobResult.setStatus(JobStatus.RESOURCE_NOT_EXIST); jobResult.setResult("Project [" + projectName + "] does not exist."); return jobResult; }</code><technical_language>is purpose of "jobId" in method? (also applies methods)</technical_language>

Target:
private JobResult projectDoesNotExistError(final String jobId, final String projectName) { JobResult jobResult = new JobResult(); jobResult.setJobId(jobId); jobResult.setStatus(JobStatus.RESOURCE_NOT_EXIST); jobResult.setResult("Project [" + projectName + "] does not exist."); return jobResult; }
Source:
<code>public static HashMap<String, String> parseChecksummedMap(byte[] bytes) { int start = 0, end = bytes.length; while (start < end && bytes[start] <= ' ') { start++; } while (start < end && bytes[end - 1] <= ' ') { end--; <START> } <END> String s = new String(bytes, start, end - start, StandardCharsets.ISO_8859_1); HashMap<String, String> map = New.hashMap(); StringBuilder buff = new StringBuilder(); for (int i = 0, size = s.length(); i < size;) { int startKey = i; i = s.indexOf(':', i); if (i < 0) { throw DataUtils.newIllegalStateException( DataUtils.ERROR_FILE_CORRUPT, "Not a map: {0}", s); } if (i - startKey == 8 && s.regionMatches(startKey, "fletcher", 0, 8)) { DataUtils.parseMapValue(buff, s, i + 1, size); int check = (int) Long.parseLong(buff.toString(), 16); bytes = s.getBytes(StandardCharsets.ISO_8859_1); if (check == DataUtils.getFletcher32(bytes, 0, startKey - 1)) { return map; } return null; } String key = s.substring(startKey, i++); i = DataUtils.parseMapValue(buff, s, i, size); map.put(key, buff.toString()); buff.setLength(0); } return null; }</code><technical_language>trim NUL bytes end too</technical_language>

Target:
public static HashMap<String, String> parseChecksummedMap(byte[] bytes) { int start = 0, end = bytes.length; while (start < end && bytes[start] <= ' ') { start++; } while (start < end && bytes[end - 1] <= ' ') { end--; } String s = new String(bytes, start, end - start, StandardCharsets.ISO_8859_1); HashMap<String, String> map = New.hashMap(); StringBuilder buff = new StringBuilder(); for (int i = 0, size = s.length(); i < size;) { int startKey = i; i = s.indexOf(':', i); if (i < 0) { throw DataUtils.newIllegalStateException( DataUtils.ERROR_FILE_CORRUPT, "Not a map: {0}", s); } if (i - startKey == 8 && s.regionMatches(startKey, "fletcher", 0, 8)) { DataUtils.parseMapValue(buff, s, i + 1, size); int check = (int) Long.parseLong(buff.toString(), 16); if (check == DataUtils.getFletcher32(bytes, start, startKey - 1)) { return map; } return null; } String key = s.substring(startKey, i++); i = DataUtils.parseMapValue(buff, s, i, size); map.put(key, buff.toString()); buff.setLength(0); } return null; }
Source:
<code>public Rule Operation() { return FirstOf( <START> Sequence( Aggregate(), builder.setOperation( Operation.AGGREGATE_PIPELINE ) ), <END> Sequence( Find(), builder.setOperation( Operation.FIND ) ), Sequence( FindOne(), builder.setOperation( Operation.FINDONE ) ), Sequence( FindAndModify(), builder.setOperation( Operation.FINDANDMODIFY ) ), Sequence( Insert(), builder.setOperation( Operation.INSERT ) ), Sequence( Remove(), builder.setOperation( Operation.REMOVE ) ), Sequence( Update(), builder.setOperation( Operation.UPDATE ) ), Sequence( Count(), builder.setOperation( Operation.COUNT ) ) ); }</code><technical_language>here, move end</technical_language>

Target:
public Rule Operation() { return FirstOf( Sequence( Find(), builder.setOperation( Operation.FIND ) ), Sequence( FindOne(), builder.setOperation( Operation.FINDONE ) ), Sequence( FindAndModify(), builder.setOperation( Operation.FINDANDMODIFY ) ), Sequence( Insert(), builder.setOperation( Operation.INSERT ) ), Sequence( Remove(), builder.setOperation( Operation.REMOVE ) ), Sequence( Update(), builder.setOperation( Operation.UPDATE ) ), Sequence( Count(), builder.setOperation( Operation.COUNT ) ), Sequence( Aggregate(), builder.setOperation( Operation.AGGREGATE_PIPELINE ) ) ); }
Source:
<code>public Object createModule(String name) throws CheckstyleException { final String nameCheck = name + CHECK_SUFFIX; <START> Object instance = createObject(name); <END> if (instance == null) { instance = createObject(nameCheck); } if (instance == null) { instance = createObjectFromMap(name, NAME_TO_FULL_MODULE_NAME); } if (instance == null) { if (thirdPartyNameToFullModuleName == null) { thirdPartyNameToFullModuleName = generateThirdPartyNameToFullModuleName(moduleClassLoader); } instance = createObjectFromMap(name, thirdPartyNameToFullModuleName); } if (instance == null) { final String attemptedNames = joinPackageNamesWithClassName(name, packages) + STRING_SEPARATOR + nameCheck + STRING_SEPARATOR + joinPackageNamesWithClassName(nameCheck, packages); final LocalizedMessage exceptionMessage = new LocalizedMessage(0, Definitions.CHECKSTYLE_BUNDLE, UNABLE_TO_INSTANTIATE_EXCEPTION_MESSAGE, new String[] {name, attemptedNames}, null, getClass(), null); throw new CheckstyleException(exceptionMessage.getMessage()); } return instance; }</code><technical_language>createObjectFromMap(name, NAME_TO_FULL_MODULE_NAME); try. fastest common scenario. pure createObject(name) user supplies full package name. Order of finding module be, imo: 1) module map test 2) 3rd party map test 3) full package (or raw) test 4) fail. discuss skipping 1-2 if name a period in it. 3 is needed if examine maps for full package. I a benefit this</technical_language>

Target:
public Object createModule(String name) throws CheckstyleException { Object instance = null; if (!name.contains(PACKAGE_SEPARATOR)) { instance = createObjectFromMap(name, NAME_TO_FULL_MODULE_NAME); if (instance == null) { if (thirdPartyNameToFullModuleName == null) { thirdPartyNameToFullModuleName = generateThirdPartyNameToFullModuleName(moduleClassLoader); } instance = createObjectFromMap(name, thirdPartyNameToFullModuleName); } } if (instance == null) { instance = createObject(name); } final String nameCheck = name + CHECK_SUFFIX; if (instance == null) { instance = createObject(nameCheck); } if (instance == null) { final String attemptedNames = joinPackageNamesWithClassName(name, packages) + STRING_SEPARATOR + nameCheck + STRING_SEPARATOR + joinPackageNamesWithClassName(nameCheck, packages); final LocalizedMessage exceptionMessage = new LocalizedMessage(0, Definitions.CHECKSTYLE_BUNDLE, UNABLE_TO_INSTANTIATE_EXCEPTION_MESSAGE, new String[] {name, attemptedNames}, null, getClass(), null); throw new CheckstyleException(exceptionMessage.getMessage()); } return instance; }
Source:
<code>public void testDoNotUpdateDeviceWhenReadOnlyIsNotChanged() { final UpdateVmDiskParameters parameters = createParameters(); parameters.getDiskInfo().setReadOnly(false); when(diskDao.get(diskImageGuid)).thenReturn(createDiskImage()); initializeCommand(parameters); command.executeVmCommand(); <START> <END> assertFalse(command.shouldUpdateReadOnly()); verify(vmDeviceDAO, never()).update(any(VmDevice.class)); }</code><technical_language>1. creating device/mocking vmdevicedao? 2. do, please add assertion device.readonly is false also. 3. please add verify() shouldUpdateReadOnly() is called</technical_language>

Target:
public void testDoNotUpdateDeviceWhenReadOnlyIsNotChanged() { final UpdateVmDiskParameters parameters = createParameters(); parameters.getDiskInfo().setReadOnly(false); when(diskDao.get(diskImageGuid)).thenReturn(createDiskImage()); VmDevice device = createVmDevice(diskImageGuid, vmId); doReturn(device).when(vmDeviceDAO).get(device.getId()); assertEquals(device.getIsReadOnly(), parameters.getDiskInfo().getReadOnly()); initializeCommand(parameters); command.executeVmCommand(); assertFalse(command.shouldUpdateReadOnly()); verify(command, atLeast(1)).shouldUpdateReadOnly(); verify(vmDeviceDAO, never()).update(any(VmDevice.class)); }
Source:
<code>private static SSAInstruction[] getParticularMethodStatements( MethodReference ref, Collection<IMethod> returnValues, Context context, Map<Integer, ConstantValue> constants) { ArrayList<SSAInstruction> statements = new ArrayList<>(); int nextLocal = ref.getNumberOfParameters() + 2; IClass cls = ((TypeAbstraction) context.get(ContextKey.RECEIVER)).getType(); SSAInstructionFactory insts = ((TypeAbstraction) context.get(ContextKey.RECEIVER)) .getType() .getClassLoader() .getInstructionFactory(); if (cls != null) { for (IMethod m : returnValues) { int c = nextLocal++; constants.put(c, new ConstantValue(m)); SSAReturnInstruction R = insts.ReturnInstruction(statements.size(), c, false); statements.add(R); } } else { } SSAInstruction[] result = new SSAInstruction[statements.size()]; Iterator<SSAInstruction> it = statements.iterator(); <START> Arrays.setAll(result, i -> it.next()); <END> return result; }</code><technical_language>This SSAInstruction[] result = statements.toArray(new SSAInstruction[0]);</technical_language>

Target:
private static SSAInstruction[] getParticularMethodStatements( MethodReference ref, Collection<IMethod> returnValues, Context context, Map<Integer, ConstantValue> constants) { ArrayList<SSAInstruction> statements = new ArrayList<>(); int nextLocal = ref.getNumberOfParameters() + 2; IClass cls = ((TypeAbstraction) context.get(ContextKey.RECEIVER)).getType(); SSAInstructionFactory insts = ((TypeAbstraction) context.get(ContextKey.RECEIVER)) .getType() .getClassLoader() .getInstructionFactory(); if (cls != null) { for (IMethod m : returnValues) { int c = nextLocal++; constants.put(c, new ConstantValue(m)); SSAReturnInstruction R = insts.ReturnInstruction(statements.size(), c, false); statements.add(R); } } else { } return statements.toArray(new SSAInstruction[0]); }
Source:
<code>public void testDoNotValidateNameSizeImport() { checkTemplateName(false, <START> string100); <END> }</code><technical_language>this string500, right</technical_language>

Target:
public void testDoNotValidateNameSizeImport() { checkTemplateName(false, string500); }
Source:
<code>private void registerHandlers() { addMouseOverHandler(new MouseOverHandler() { @Override public void onMouseOver(MouseOverEvent event) { <START> if(!"".equals(title)){ <END> tooltip.setHTML(title); tooltipPanel.showRelativeTo(LabelWithToolTip.this); } } }); addMouseOutHandler(new MouseOutHandler() { @Override public void onMouseOut(MouseOutEvent event) { tooltipPanel.hide(true); } }); }</code><technical_language>Please change !StringUtils.isEmpty(title)</technical_language>

Target:
private void registerHandlers() { addMouseOverHandler(new MouseOverHandler() { @Override public void onMouseOver(MouseOverEvent event) { if (StringUtils.isEmpty(title)) { tooltip.setHTML(title); tooltipPanel.showRelativeTo(LabelWithToolTip.this); } } }); addMouseOutHandler(new MouseOutHandler() { @Override public void onMouseOut(MouseOutEvent event) { tooltipPanel.hide(true); } }); }
Source:
<code>boolean wouldPushProject(Project.NameKey project) { if (projects.length < 1) { return true; } for (final String projectMatch : projects) { <START> String projectName = project.get(); <END> if (isRE(projectMatch)) { if (projectName.matches(projectMatch)) { return true; } } else if (isWildcard(projectMatch)) { if (projectName.startsWith( projectMatch.substring(0, projectMatch.length() - 1))) { return true; } } else { if (projectName.equals(projectMatch)) { return true; } } } return false; }</code><technical_language>this need for-loop</technical_language>

Target:
boolean wouldPushProject(Project.NameKey project) { if (projects.length < 1) { return true; } String projectName = project.get(); for (final String projectMatch : projects) { if (isRE(projectMatch)) { if (projectName.matches(projectMatch)) { return true; } } else if (isWildcard(projectMatch)) { if (projectName.startsWith( projectMatch.substring(0, projectMatch.length() - 1))) { return true; } } else { if (projectName.equals(projectMatch)) { return true; } } } return false; }
Source:
<code>private HttpClientBuilder createHttpBuilder() { HttpClientBuilder httpClientBuilder = HttpClients.custom() .setDefaultCookieStore(new BasicCookieStore()) .setMaxConnTotal(128) .setMaxConnPerRoute(32); if (useTls()) { httpClientBuilder.setSSLSocketFactory( new SSLConnectionSocketFactory( getSslContext(), getSupportedProtocols(), <START> getSupportedCipherSuites(), <END> SSLConnectionSocketFactory.BROWSER_COMPATIBLE_HOSTNAME_VERIFIER)); } if (useBasicAuth()) { httpClientBuilder.setDefaultCredentialsProvider(getCredentialsProvider()); httpClientBuilder.addInterceptorFirst(new PreemptiveAuth(new BasicScheme())); } return httpClientBuilder; }</code><technical_language>in instance of this object method calling creates a new call a method is defined here. This leads un-necessary object creation, cache is this means property reloaded multiple times. This applies static methods this. I suggest provide internal non-static method for static version (if of this class creating a dummy instance)</technical_language>

Target:
private HttpClientBuilder createHttpBuilder() { HttpClientBuilder httpClientBuilder = HttpClients.custom() .setDefaultCookieStore(new BasicCookieStore()) .setMaxConnTotal(128) .setMaxConnPerRoute(32); if (solrSettings.useTls()) { httpClientBuilder.setSSLSocketFactory( new SSLConnectionSocketFactory( getSslContext(), solrSettings.getSupportedProtocols(), solrSettings.getSupportedCipherSuites(), SSLConnectionSocketFactory.BROWSER_COMPATIBLE_HOSTNAME_VERIFIER)); } if (solrSettings.useBasicAuth()) { SolrPasswordUpdate solrPasswordUpdate = new SolrPasswordUpdate( new UuidGeneratorImpl(), new ClientFactoryFactoryImpl(), solrSettings.getEncryptionService()); solrPasswordUpdate.start(); httpClientBuilder.setDefaultCredentialsProvider(getCredentialsProvider()); httpClientBuilder.addInterceptorFirst(new PreemptiveAuth(new BasicScheme())); } return httpClientBuilder; }
Source:
<code>public static String stripProlog(String line) { <START> if (line.contains(PROLOG_START)) { <END> int start = line.indexOf(PROLOG_START); int end = line.indexOf(PROLOG_END) + PROLOG_END.length(); if (end > start) { String prolog = line.substring(start, end); line = line.replace(prolog, ""); } } return line; }</code><technical_language>~~~Thanks for patience!~~~ - contrary, thank for patience</technical_language>

Target:
public static String stripProlog(String line) { if (line.matches("^\\s*<\\?xml\\b.*$")) { int start = line.indexOf(PROLOG_START); int end = line.indexOf(PROLOG_END) + PROLOG_END.length(); if (end > start) { String prolog = line.substring(start, end); line = line.replace(prolog, ""); } } return line; }
Source:
<code>public void init(ConfigurationContextService configurationContextService) { if (mode != Mode.HA) { receiverManager.start(); } executorService.schedule(new Runnable() { @Override public void run() { try { log.info("Starting polling event adapters"); getEventReceiverManagementService().startPolling(); } catch (Exception e) { <START> log.error("Unexpected error occurred", e); <END> } } }, ConfigurationConstants.AXIS_TIME_INTERVAL_IN_MILLISECONDS * 4, TimeUnit.MILLISECONDS); executorService.scheduleAtFixedRate(new Runnable() { @Override public void run() { checkMemberUpdate(); } }, 10, 10, TimeUnit.SECONDS); }</code><technical_language>Improve this statement providing more context.. "Unexpected error occurred start polling event adapters". a suggestion (We need exception occurred well)</technical_language>

Target:
public void init(ConfigurationContextService configurationContextService) { if (mode != Mode.HA) { receiverManager.start(); } executorService.schedule(new Runnable() { @Override public void run() { try { log.info("Starting polling event adapters"); getEventReceiverManagementService().startPolling(); } catch (Exception e) { log.error("Unexpected error occurred when start polling event adapters", e); } } }, ConfigurationConstants.AXIS_TIME_INTERVAL_IN_MILLISECONDS * 4, TimeUnit.MILLISECONDS); executorService.scheduleAtFixedRate(new Runnable() { @Override public void run() { checkMemberUpdate(); } }, 10, 10, TimeUnit.SECONDS); }
Source:
<code>public static String formatDate(LocalDate sundayDate) { <START> if (sundayDate.getDayOfWeek() != DayOfWeek.SUNDAY) <END> throw new IllegalArgumentException("Passed date should be a Sunday"); LocalDate mondayDate = sundayDate.plusDays(1); return ISO8601_WEEK_FORMATTER.format(mondayDate); }</code><technical_language>Please add curly braces next statement</technical_language>

Target:
public static String formatDate(LocalDate sundayDate) { if (sundayDate.getDayOfWeek() != DayOfWeek.SUNDAY) { throw new IllegalArgumentException("Passed date should be a Sunday"); } LocalDate mondayDate = sundayDate.plusDays(1); return ISO8601_WEEK_FORMATTER.format(mondayDate); }
Source:
<code><START> public void testCallService_1_OK_1_FAIL() throws InstallatorException, NodeExecutionException, KeyManagementException, NoSuchAlgorithmException, IOException { <END> when(httpsClient.doHttpsPost(Mockito.anyString(), Mockito.anyString(),(Map<String,String>)Mockito.anyObject())).thenReturn(200); when(httpsClient.doHttpsGet(Mockito.anyString(), Mockito.anyString(),(Map<String,String>)Mockito.anyObject())).thenReturn(500); puppetInstallator.generateFilesinPuppetMaster(host, "test", productRelease, "install", "token"); }</code><technical_language>gt 120</technical_language>

Target:
public void testCallService_1_OK_1_FAIL() throws InstallatorException, NodeExecutionException, KeyManagementException, NoSuchAlgorithmException, IOException { when( httpsClient.doHttps(Mockito.anyString(), Mockito.anyString(), Mockito.anyString(), (Map<String, String>) Mockito.anyObject())).thenReturn(200).thenReturn(500); puppetInstallator.generateFilesinPuppetMaster(host, "test", productRelease, "install", "token"); }
Source:
<code>public void testEqualsIgnoreValueOrder_sameLengthDifferentValues() { <START> MultivaluedHashMap map = new MultivaluedHashMap(); <END> MultivaluedHashMap differentMap = new MultivaluedHashMap(); map.put(1, Arrays.asList(new Integer[]{1, 2, 3})); differentMap.put(1, Arrays.asList(new Integer[]{1, 2, 2})); equalsIgnoreValueOrder_shouldReturnFalseForDifferentMaps(map, differentMap); map.clear(); map.put(1, Arrays.asList(new Integer[]{1, 2, 3})); map.put(2, Arrays.asList(new Integer[]{4, 5, 6})); differentMap.clear(); differentMap.put(1, Arrays.asList(new Integer[]{1, 2, 3})); differentMap.put(2, Arrays.asList(new Integer[]{4, 5, 5})); equalsIgnoreValueOrder_shouldReturnFalseForDifferentMaps(map, differentMap); }</code><technical_language>MultivaluedHashMap<Integer, Integer> map = new MultivaluedHashMap<>(); MultivaluedHashMap<Integer, Integer> differentMap = new MultivaluedHashMap<>(); (same lines 108 125)</technical_language>

Target:
public void testEqualsIgnoreValueOrder_sameLengthDifferentValues() { MultivaluedHashMap<Integer, Integer> map = new MultivaluedHashMap<>(); MultivaluedHashMap<Integer, Integer> differentMap = new MultivaluedHashMap<>(); map.put(1, Arrays.asList(1, 2, 3)); differentMap.put(1, Arrays.asList(1, 2, 2)); equalsIgnoreValueOrder_shouldReturnFalseForDifferentMaps(map, differentMap); map.clear(); differentMap.clear(); map.put(1, Arrays.asList(1, 2, 3)); map.put(2, Arrays.asList(4, 5, 6)); differentMap.put(1, Arrays.asList(1, 2, 3)); differentMap.put(2, Arrays.asList(4, 5, 5)); equalsIgnoreValueOrder_shouldReturnFalseForDifferentMaps(map, differentMap); }