auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void shouldUpdateClusterMetadataAndHostInfoOnAssignment() { final Map<HostInfo, Set<TopicPartition>> initialHostState = mkMap( mkEntry(new HostInfo("localhost", 9090), mkSet(t1p0, t1p1)), mkEntry(new HostInfo("otherhost", 9090), mkSet(t2p0, t2p1)) ); final Map<HostInfo, Set<TopicPartition>> newHostState = mkMap( mkEntry(new HostInfo("localhost", 9090), mkSet(t1p0, t1p1)), mkEntry(new HostInfo("newotherhost", 9090), mkSet(t2p0, t2p1)) ); streamsMetadataState = EasyMock.createStrictMock(StreamsMetadataState.class); createMockTaskManager(); configurePartitionAssignor(emptyMap()); <START> streamsMetadataState.onChange(EasyMock.anyObject(), EasyMock.anyObject(), EasyMock.anyObject()); <END> streamsMetadataState.onChange(EasyMock.anyObject(), EasyMock.anyObject(), EasyMock.anyObject()); EasyMock.replay(taskManager, streamsMetadataState); partitionAssignor.onAssignment(createAssignment(initialHostState), null); partitionAssignor.onAssignment(createAssignment(newHostState), null); EasyMock.verify(taskManager, streamsMetadataState); }</code><technical_language>Combine L1421-1422 times(2)</technical_language>

Target:
public void shouldUpdateClusterMetadataAndHostInfoOnAssignment() { final Map<HostInfo, Set<TopicPartition>> initialHostState = mkMap( mkEntry(new HostInfo("localhost", 9090), mkSet(t1p0, t1p1)), mkEntry(new HostInfo("otherhost", 9090), mkSet(t2p0, t2p1)) ); final Map<HostInfo, Set<TopicPartition>> newHostState = mkMap( mkEntry(new HostInfo("localhost", 9090), mkSet(t1p0, t1p1)), mkEntry(new HostInfo("newotherhost", 9090), mkSet(t2p0, t2p1)) ); streamsMetadataState = EasyMock.createStrictMock(StreamsMetadataState.class); streamsMetadataState.onChange(EasyMock.eq(initialHostState), EasyMock.anyObject(), EasyMock.anyObject()); streamsMetadataState.onChange(EasyMock.eq(newHostState), EasyMock.anyObject(), EasyMock.anyObject()); EasyMock.replay(streamsMetadataState); createDefaultMockTaskManager(); configureDefaultPartitionAssignor(); partitionAssignor.onAssignment(createAssignment(initialHostState), null); partitionAssignor.onAssignment(createAssignment(newHostState), null); EasyMock.verify(taskManager, streamsMetadataState); }
Source:
<code>private void enqueueExceptionHandlers(Type exceptionType, ProgramState ps) { List<BytecodeCFG.Block> blocksCatchingException = programPosition.block.successors().stream() .map(b -> (BytecodeCFG.Block) b) .filter(BytecodeCFG.Block::isCatchBlock) .filter(b -> isExceptionHandledByBlock(exceptionType, b)) .collect(Collectors.toList()); if (!blocksCatchingException.isEmpty()) { blocksCatchingException.forEach(b -> enqueue(new ProgramPoint(b), ps)); if (isCatchExhaustive(exceptionType, blocksCatchingException)) { return; } } <START> ps.storeExitValue(); <END> enqueue(new ProgramPoint(exitBlock), ps); }</code><technical_language>this point is a Exceptional SV top of stack? enforce a precondition</technical_language>

Target:
private void enqueueExceptionHandlers(Type exceptionType, ProgramState ps) { List<BytecodeCFG.Block> blocksCatchingException = programPosition.block.successors().stream() .map(b -> (BytecodeCFG.Block) b) .filter(BytecodeCFG.Block::isCatchBlock) .filter(b -> isExceptionHandledByBlock(exceptionType, b)) .collect(Collectors.toList()); if (!blocksCatchingException.isEmpty()) { blocksCatchingException.forEach(b -> enqueue(new ProgramPoint(b), ps)); if (isCatchExhaustive(exceptionType, blocksCatchingException)) { return; } } Preconditions.checkState(ps.peekValue() instanceof SymbolicValue.ExceptionalSymbolicValue, "Exception shall be on top of the stack"); ps.storeExitValue(); enqueue(new ProgramPoint(exitBlock), ps); }
Source:
<code>public boolean remove() { if (parentNode == null) return false; boolean success = parentNode.childrenNodes.remove(this); Class<?> parentClass = parentNode.getClass(); while (parentClass != Object.class) { for (Field f : parentClass.getDeclaredFields()) { f.setAccessible(true); try { Object object = f.get(parentNode); if (object == null) continue; if (List.class.isAssignableFrom(object.getClass())) { <START> List<?> l = (List<?>) object; <END> success &= l.remove(this); } else if (object == this) { f.set(parentNode, null); success &= true; } } catch (IllegalArgumentException | IllegalAccessException e) { throw new RuntimeException("Error while removing " + getClass().getSimpleName(), e); } } parentClass = parentClass.getSuperclass(); } return success; }</code><technical_language>Collection here</technical_language>

Target:
public boolean remove() { if (parentNode == null) return false; boolean success = false; Class<?> parentClass = parentNode.getClass(); while (parentClass != Object.class) { for (Field f : parentClass.getDeclaredFields()) { f.setAccessible(true); try { Object object = f.get(parentNode); if (object == null) continue; if (Collection.class.isAssignableFrom(object.getClass())) { Collection<?> l = (Collection<?>) object; boolean remove = l.remove(this); success |= remove; } else if (Optional.class.equals(f.getType())) { Optional<?> opt = (Optional<?>) object; if (opt.isPresent()) if (opt.get() == this) f.set(parentNode, Optional.empty()); } else if (object == this) { f.set(parentNode, null); success |= true; } } catch (IllegalArgumentException | IllegalAccessException e) { throw new RuntimeException("Error while removing " + getClass().getSimpleName(), e); } } parentClass = parentClass.getSuperclass(); } setParentNode(null); return success; }
Source:
<code>private void setWarningToError(Map<String, String> options) { for (Map.Entry<String, String> entry : <START> options.entrySet()) <END> { if (entry.getValue().equals(CompilerOptions.WARNING)) { options.put(entry.getKey(), CompilerOptions.ERROR); } } }</code><technical_language>please contract of Map.entrySet(): invoking put() iteration result is undefined</technical_language>

Target:
private void setWarningToError(Map<String, String> options) { for (Map.Entry<String, String> entry : options.entrySet()) { if (entry.getValue().equals(CompilerOptions.WARNING)) { entry.setValue(CompilerOptions.ERROR); } } }
Source:
<code>private void verifyAbcdAdIsNotDisplayed(AdsBaseObject ads) { ads.scrollToSlot(AdsContent.TOP_LB); <START> Assertion.assertFalse(ads.getGptParams(AdsContent.TOP_LB, "data-gpt-line-item-id").equals("4376117186"), <END> "TOP_LEADERBOARD slot has ABCD ad line item id 4376117186, ABCD slot should not be displayed"); }</code><technical_language>here, existing function</technical_language>

Target:
private void verifyAbcdAdIsNotDisplayed(AdsBaseObject ads) { Assertion.assertNotEquals(String.valueOf(ads.getLineItemId(AdsContent.TOP_LB)), ABCD_LINE_ITEM_ID, "ABCD " + ABCD_LINE_ITEM_ID + " line item id is displayed"); }
Source:
<code>private void showMediaToastError(@StringRes int message, @Nullable String messageDetail) { if (isFinishing()) return; String errorMessage = getString(message); if (!TextUtils.isEmpty(messageDetail)) { <START> errorMessage += ", " + messageDetail; <END> } ToastUtils.showToast(this, errorMessage, ToastUtils.Duration.LONG); }</code><technical_language>This a colon instead of a comma - error messages odd: Media upload error occurred, Sorry, space allocation</technical_language>

Target:
private void showMediaToastError(@StringRes int message, @Nullable String messageDetail) { if (isFinishing()) { return; } String errorMessage = getString(message); if (!TextUtils.isEmpty(messageDetail)) { errorMessage += ". " + messageDetail; } ToastUtils.showToast(this, errorMessage, ToastUtils.Duration.LONG); }
Source:
<code>protected <T extends Item> void mergeIn(Application application, T chosen, Iterable<T> notChosen) { if (Publisher.AMAZON_UNBOX.equals(chosen.getPublisher())) { if (isNotUhd(chosen)) { return; } <START> Optional<T> nonUhditem = StreamSupport.stream(notChosen.spliterator(), false) <END> .filter(this::isNotUhd) .filter(item -> !Strings.isNullOrEmpty(item.getDescription())) .findFirst(); nonUhditem.ifPresent(item -> chosen.setDescription(item.getDescription())); } super.mergeIn(application, chosen, notChosen); }</code><technical_language>Rename nonUhditem nonUhdItem</technical_language>

Target:
protected <T extends Item> void mergeIn(Application application, T chosen, Iterable<T> notChosen) { if (Publisher.AMAZON_UNBOX.equals(chosen.getPublisher())) { if (isNotUhd(chosen)) { return; } Optional<T> nonUhdItem = StreamSupport.stream(notChosen.spliterator(), false) .filter(this::isNotUhd) .filter(item -> !Strings.isNullOrEmpty(item.getDescription())) .findFirst(); nonUhdItem.ifPresent(item -> chosen.setDescription(item.getDescription())); } super.mergeIn(application, chosen, notChosen); }
Source:
<code>public static void validateParamCollection(EventType[] eventTypes, String paramName) throws Exception { validateParam(eventTypes, paramName); int count = 0; <START> for (Object event : eventTypes) { <END> try { validateParam(event, String.format("collection[%d] , ", count)); } catch (Exception e) { throw new IllegalArgumentException(String.format( "The element at position %d is invalid", count), e); } count++; } if (count == 0) { throw new IllegalArgumentException( String.format("The collection \"%s\" is empty.", paramName) ); } }</code><technical_language>perhabs Object switched EventType</technical_language>

Target:
public static void validateParamCollection(EventType[] eventTypes, String paramName) throws Exception { validateParam(eventTypes, paramName); int count = 0; for (EventType event : eventTypes) { try { validateParam(event, String.format("collection[%d] , ", count)); } catch (Exception e) { throw new IllegalArgumentException(String.format( "The element at position %d is invalid", count), e); } count++; } if (count == 0) { throw new IllegalArgumentException( String.format("The collection \"%s\" is empty.", paramName) ); } }
Source:
<code>private void setup() { int startIndex = 0; int endIndex = pattern.length(); if (pattern.startsWith("!")) { startIndex++; negation = true; } if (pattern.endsWith("/")) { endIndex --; dirOnly = true; } pattern = pattern.substring(startIndex, endIndex); if (!pattern.contains("/")) { nameOnly = true; } else if (!pattern.startsWith("/")) { pattern = "/" + pattern; } if (pattern.contains("*") || pattern.contains("?") || pattern.contains("[")) { try { matcher = new FileNameMatcher(pattern, new Character('/')); } catch (InvalidPatternException e) { <START> e.printStackTrace(); <END> } } }</code><technical_language>Please print stack traces system.err, hard discover Eclipse</technical_language>

Target:
private void setup() { int startIndex = 0; int endIndex = pattern.length(); if (pattern.startsWith("!")) { startIndex++; negation = true; } if (pattern.endsWith("/")) { endIndex --; dirOnly = true; } pattern = pattern.substring(startIndex, endIndex); if (!pattern.contains("/")) nameOnly = true; else if (!pattern.startsWith("/")) { pattern = "/" + pattern; } if (pattern.contains("*") || pattern.contains("?") || pattern.contains("[")) { try { matcher = new FileNameMatcher(pattern, new Character('/')); } catch (InvalidPatternException e) { e.printStackTrace(); } } }
Source:
<code>TimerThread( BlockingQueue<QueueEntry> queue, int timeout ) { <START> super(); <END> fQueue = queue; setWaitTimout( timeout ); }</code><technical_language>putting a name for thread? in future if need debug</technical_language>

Target:
TimerThread( BlockingQueue<QueueEntry> queue, int timeout ) { super(); setName( "GDB Command Timer Thread" ); fQueue = queue; setWaitTimout( timeout ); }
Source:
<code><START> private void addEntryTodnsToUuidMap(String dnsName, String uuid) { <END> Set<String> dnList = dnsToUuidMap.get(dnsName); if (dnList == null) { dnList = new HashSet<>(); dnsToUuidMap.put(dnsName, dnList); } dnList.add(uuid); }</code><technical_language>synchronized HashSet - > ConcurrentHashSet</technical_language>

Target:
private synchronized void addEntryTodnsToUuidMap( String dnsName, String uuid) { Set<String> dnList = dnsToUuidMap.get(dnsName); if (dnList == null) { dnList = ConcurrentHashMap.newKeySet(); dnsToUuidMap.put(dnsName, dnList); } dnList.add(uuid); }
Source:
<code>public StepExecutionProgressInfoResource(StepExecution stepExecution, StepExecutionHistory stepExecutionHistory, double percentageComplete, boolean isFinished, double duration) { Assert.notNull(stepExecution, "stepExecution must not be null."); Assert.notNull(stepExecutionHistory, "stepExecution must not be null."); this.stepExecution = stepExecution; this.stepExecutionHistory = stepExecutionHistory; this.percentageComplete = percentageComplete; <START> this.finished = isFinished ? "true" : "false"; <END> this.duration = duration; }</code><technical_language>a String in Resource. client responsible for formatting</technical_language>

Target:
public StepExecutionProgressInfoResource(StepExecution stepExecution, StepExecutionHistory stepExecutionHistory, double percentageComplete, boolean isFinished, double duration) { Assert.notNull(stepExecution, "stepExecution must not be null."); Assert.notNull(stepExecutionHistory, "stepExecution must not be null."); this.stepExecution = stepExecution; this.stepExecutionHistory = stepExecutionHistory; this.percentageComplete = percentageComplete; this.finished = isFinished; this.duration = duration; }
Source:
<code><START> public long offset() { <END> return offset; }</code><technical_language>suggestion public Long offset() {</technical_language>

Target:
public Long offset() { return offset; }
Source:
<code>public void destroy() { <START> LOG.debug("InitServlet shutdown stopping executor(s)...."); <END> super.destroy(); }</code><technical_language>Fix log statement. executors in this class</technical_language>

Target:
public void destroy() { LOG.debug("InitServlet--destroy"); super.destroy(); }
Source:
<code>private static Object readTrueTillTheEnd(final StringTokenizer tokenizer) { if (tokenizer.next(3).equals("rue")) { return Boolean.TRUE; } else { <START> throw syntaxError("Expected false value", tokenizer); <END> } }</code><technical_language>"Expected **true** value"</technical_language>

Target:
private static Object readTrueTillTheEnd(final StringTokenizer tokenizer) { if (tokenizer.next(3).equals("rue")) { return Boolean.TRUE; } else { throw syntaxError("Expected true value", tokenizer); } }
Source:
<code>private String getName(Object object) { if (object instanceof IFSTreeNode) <START> return ((IFSTreeNode) object).getLocation(); <END> if (object instanceof File) return ((File) object).getAbsolutePath(); return String.valueOf(object); }</code><technical_language>This is clean. If this method returns absolute path, change method name "getName()" "getAbsolutePath()". Also, need change messages. change, FSOperation_ConfirmFolderReplaceMessage "This folder contains a folder named /foo/bar/target/file" . is accurate. Instead, message "Folder '/foo/bar/target/file' exists. Do want to...' change code more, "Follder /foo/bar/target" contains a folder named "file". Do want to..." Please test workflow, validate final message sense</technical_language>

Target:
private String getName(Object object) { if (object instanceof IFSTreeNode) return ((IFSTreeNode) object).getName(); if (object instanceof File) return ((File) object).getName(); return String.valueOf(object); }
Source:
<code>public void getGroupObjectCollectionTest() throws Exception { CommunityService communityService = ContentServiceFactory.getInstance().getCommunityService(); CollectionService collectionService = ContentServiceFactory.getInstance().getCollectionService(); Community community = null; Collection collection = null; Group adminGroup = null; Group worfklowGroup = null; Group submitterGroup = null; try { context.turnOffAuthorisationSystem(); community = communityService.create(null, context); collection = collectionService.create(context, community); adminGroup = collectionService.createAdministrators(context, collection); worfklowGroup = collectionService.createWorkflowGroup(context, collection, 1); submitterGroup = collectionService.createSubmitters(context, collection); context.commit(); <START> adminGroup = context.reloadEntity(adminGroup); <END> String authToken = getAuthToken(admin.getEmail(), password); getClient(authToken).perform( get("/api/eperson/groups/" + adminGroup.getID() + "/object") ).andExpect(status().isOk()); getClient(authToken).perform( get("/api/eperson/groups/" + worfklowGroup.getID() + "/object") ).andExpect(status().isOk()); getClient(authToken).perform( get("/api/eperson/groups/" + submitterGroup.getID() + "/object") ).andExpect(status().isOk()); } finally { if (collection != null) { CollectionBuilder.deleteCollection(collection.getID()); } if (community != null) { CommunityBuilder.deleteCommunity(community.getID()); } if (adminGroup != null) { GroupBuilder.deleteGroup(adminGroup.getID()); } if (worfklowGroup != null) { GroupBuilder.deleteGroup(worfklowGroup.getID()); } if (submitterGroup != null) { GroupBuilder.deleteGroup(submitterGroup.getID()); } } }</code><technical_language>above. GroupBuilder, missing a context.restoreAuthSystemState(); question commit() reloadEntity() above</technical_language>

Target:
public void getGroupObjectCollectionTest() throws Exception { context.turnOffAuthorisationSystem(); Community community = CommunityBuilder.createCommunity(context) .withName("Parent Community") .withAdminGroup(admin) .build(); Collection collection = CollectionBuilder.createCollection(context, community) .withName("Collection") .withAdminGroup(admin) .withWorkflowGroup(1, admin) .withSubmitterGroup(admin) .build(); Group adminGroup = collection.getAdministrators(); Group worfklowGroup = collection.getWorkflowStep1(context); Group submitterGroup = collection.getSubmitters(); context.restoreAuthSystemState(); String authToken = getAuthToken(admin.getEmail(), password); getClient(authToken).perform( get("/api/eperson/groups/" + adminGroup.getID() + "/object") ).andExpect(status().isOk()); getClient(authToken).perform( get("/api/eperson/groups/" + worfklowGroup.getID() + "/object") ).andExpect(status().isOk()); getClient(authToken).perform( get("/api/eperson/groups/" + submitterGroup.getID() + "/object") ).andExpect(status().isOk()); }
Source:
<code><START> public Object getValueAt(int row, int col) { <END> int index = candidateRowToInstanceIndex(row); return keyFields.getField(col, side.opposite()).getView().getString(index); }</code><technical_language>![MAJOR](<LINK_1> Add "@Override" annotation this method signature [![rule](<LINK_2>](<LINK_0></technical_language>

Target:
public Object getValueAt(int row, int col) { int index = candidateRowToInstanceIndex(row); String value = keyFields.getField(col, side.opposite()).getView().getString(index); double score = rowScore(matrix, index, col); return String.format("%s [%.2f]", Strings.nullToEmpty(value), score); }
Source:
<code>public void put(byte[] key, byte[] value) { try { OutgoingMessageEnvelope envelope = new OutgoingMessageEnvelope(coordinatorSystemStream, 0, key, value); if (value != null) { <START> bootstrappedMessages.put(key, value); <END> } else { bootstrappedMessages.remove(key); } systemProducer.send(source, envelope); systemProducer.flush(source); } catch (Exception e) { throw new SamzaException(e); } }</code><technical_language>do need this if read path get methods bootstrap for messages prior reading</technical_language>

Target:
public void put(byte[] key, byte[] value) { OutgoingMessageEnvelope envelope = new OutgoingMessageEnvelope(coordinatorSystemStream, 0, key, value); systemProducer.send(SOURCE, envelope); flush(); }
Source:
<code>private boolean maybeWriteResponseMetadata(HttpResponse responseMetadata, GenericFutureListener<ChannelFuture> listener) { long writeProcessingStartTime = System.currentTimeMillis(); boolean writtenThisTime = false; if (responseMetadataWriteInitiated.compareAndSet(false, true) && ctx.channel().isActive()) { if (!HttpUtil.isContentLengthSet(responseMetadata) && (responseMetadata.status().equals(HttpResponseStatus.OK) || responseMetadata.status().equals(HttpResponseStatus.PARTIAL_CONTENT))) { HttpUtil.setTransferEncodingChunked(responseMetadata, true); } else if (HttpUtil.isContentLengthSet(responseMetadata) && HttpUtil.getContentLength(responseMetadata) == 0 && !(responseMetadata instanceof FullHttpResponse)) { FullHttpResponse fullHttpResponse = new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, responseMetadata.status()); fullHttpResponse.headers().set(responseMetadata.headers()); responseMetadata = fullHttpResponse; } logger.trace("Sending response with status on channel {}", responseMetadata.status(), ctx.channel()); finalResponseMetadata = responseMetadata; ChannelPromise writePromise = ctx.newPromise().addListener(listener); ctx.writeAndFlush(responseMetadata, writePromise); writtenThisTime = true; long writeProcessingTime = System.currentTimeMillis() - writeProcessingStartTime; nettyMetrics.responseMetadataProcessingTimeInMs.update(writeProcessingTime); <START> request.getMetricsTracker().nioMetricsTracker.markFirstByteSent(); <END> } return writtenThisTime; }</code><technical_language>need wrap this a if (request != null)</technical_language>

Target:
private boolean maybeWriteResponseMetadata(HttpResponse responseMetadata, GenericFutureListener<ChannelFuture> listener) { long writeProcessingStartTime = System.currentTimeMillis(); boolean writtenThisTime = false; if (responseMetadataWriteInitiated.compareAndSet(false, true) && ctx.channel().isActive()) { if (!HttpUtil.isContentLengthSet(responseMetadata) && (responseMetadata.status().equals(HttpResponseStatus.OK) || responseMetadata.status().equals(HttpResponseStatus.PARTIAL_CONTENT))) { HttpUtil.setTransferEncodingChunked(responseMetadata, true); } else if (HttpUtil.isContentLengthSet(responseMetadata) && HttpUtil.getContentLength(responseMetadata) == 0 && !(responseMetadata instanceof FullHttpResponse)) { FullHttpResponse fullHttpResponse = new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, responseMetadata.status()); fullHttpResponse.headers().set(responseMetadata.headers()); responseMetadata = fullHttpResponse; } logger.trace("Sending response with status on channel {}", responseMetadata.status(), ctx.channel()); finalResponseMetadata = responseMetadata; ChannelPromise writePromise = ctx.newPromise().addListener(listener); ctx.writeAndFlush(responseMetadata, writePromise); writtenThisTime = true; long writeProcessingTime = System.currentTimeMillis() - writeProcessingStartTime; nettyMetrics.responseMetadataProcessingTimeInMs.update(writeProcessingTime); if (request != null) { request.getMetricsTracker().nioMetricsTracker.markFirstByteSent(); } } return writtenThisTime; }
Source:
<code>public void onClosed() { <START> CoreRegistry.remove(WorldGeneratorPluginLibrary.class); <END> if (environment != null) { CoreRegistry.get(AssetManager.class).setEnvironment(moduleManager.getEnvironment()); environment.close(); environment = null; } if (previewGen != null) { previewGen.close(); previewGen = null; } WorldConfigurator worldConfig = worldGenerator.getConfigurator(); Map<String, Component> params = worldConfig.getProperties(); if (params != null) { config.setModuleConfigs(worldGenerator.getUri(), params); } super.onClosed(); }</code><technical_language>a local branch of I removed remove method of CoreRegistry. remove is a sign in CoreRegistry for place. If need a Context contains objects temporarly create a child context ContextImpl(context) implicitly contains objects of parent. add temporary objects child context need a context temporary object. done simply throw child context parent context remains unchanged</technical_language>

Target:
public void onClosed() { context.remove(WorldGeneratorPluginLibrary.class); if (environment != null) { assetManager.setEnvironment(moduleManager.getEnvironment()); environment.close(); environment = null; } if (previewGen != null) { previewGen.close(); previewGen = null; } WorldConfigurator worldConfig = worldGenerator.getConfigurator(); Map<String, Component> params = worldConfig.getProperties(); if (params != null) { config.setModuleConfigs(worldGenerator.getUri(), params); } super.onClosed(); }
Source:
<code>private static Cache initGetCache(final String name) { Cache cache = new Cache( new CacheConfiguration(name, MAX_ELEMENTS) <START> .memoryStoreEvictionPolicy(MemoryStoreEvictionPolicy.LFU) <END> .eternal(true) .diskExpiryThreadIntervalSeconds(0) .persistence(new PersistenceConfiguration().strategy(PersistenceConfiguration.Strategy.LOCALTEMPSWAP))); return cache; }</code><technical_language>I if LFU LRU</technical_language>

Target:
private static Cache initGetCache(final String name) { Cache cache = new Cache( new CacheConfiguration(name, MAX_ELEMENTS) .memoryStoreEvictionPolicy(MemoryStoreEvictionPolicy.LRU) .eternal(true) .diskExpiryThreadIntervalSeconds(0) .persistence(new PersistenceConfiguration().strategy(PersistenceConfiguration.Strategy.LOCALTEMPSWAP))); return cache; }
Source:
<code>private void onClose() { if (DEBUG) Log.d(TAG, "onClose() called"); if (lockManager != null) { lockManager.releaseWifiAndCpu(); } if (basePlayerImpl != null) { basePlayerImpl.stopActivityBinding(); basePlayerImpl.destroy(); } if (notificationManager != null) notificationManager.cancel(NOTIFICATION_ID); mBinder = null; basePlayerImpl = null; lockManager = null; <START> basePlayerImpl.audioReactor.unregisterMediaButtonEventReceiver(mReceiverComponent); <END> stopForeground(true); stopSelf(); }</code><technical_language>This a NPE, basePlayerImpl is set null line 160</technical_language>

Target:
private void onClose() { if (DEBUG) Log.d(TAG, "onClose() called"); if (lockManager != null) { lockManager.releaseWifiAndCpu(); } if (basePlayerImpl != null) { basePlayerImpl.audioReactor.unregisterMediaButtonEventReceiver(mReceiverComponent); basePlayerImpl.stopActivityBinding(); basePlayerImpl.destroy(); } if (notificationManager != null) notificationManager.cancel(NOTIFICATION_ID); mBinder = null; basePlayerImpl = null; lockManager = null; stopForeground(true); stopSelf(); }
Source:
<code>public boolean updateLearnedStateFromPeers(Optional<PaxosValue> greatestLearned) { <START> final long nextToLearnSeq = greatestLearned.map(value -> value.getRound() + 1).orElse(0L); <END> List<PaxosUpdate> updates = PaxosQuorumChecker.<PaxosLearner, PaxosUpdate> collectQuorumResponses( learners, new Function<PaxosLearner, PaxosUpdate>() { @Override @Nullable public PaxosUpdate apply(@Nullable PaxosLearner learner) { return new PaxosUpdate( copyOf(learner.getLearnedValuesSince(nextToLearnSeq))); } }, proposer.getQuorumSize(), executor, PaxosQuorumChecker.DEFAULT_REMOTE_REQUESTS_TIMEOUT_IN_SECONDS); boolean learned = false; for (PaxosUpdate update : updates) { ImmutableCollection<PaxosValue> values = update.getValues(); for (PaxosValue value : values) { PaxosValue currentLearnedValue = knowledge.getLearnedValue(value.getRound()); if (currentLearnedValue == null) { knowledge.learn(value.getRound(), value); learned = true; } } } return learned; }</code><technical_language>(as before, constant for 'no log yet' add 1?)</technical_language>

Target:
public boolean updateLearnedStateFromPeers(Optional<PaxosValue> greatestLearned) { final long nextToLearnSeq = greatestLearned.map(value -> value.getRound()).orElse(PaxosAcceptor.NO_LOG_ENTRY) + 1; List<PaxosUpdate> updates = PaxosQuorumChecker.<PaxosLearner, PaxosUpdate>collectQuorumResponses( learners, new Function<PaxosLearner, PaxosUpdate>() { @Override @Nullable public PaxosUpdate apply(@Nullable PaxosLearner learner) { return new PaxosUpdate( copyOf(learner.getLearnedValuesSince(nextToLearnSeq))); } }, proposer.getQuorumSize(), executor, PaxosQuorumChecker.DEFAULT_REMOTE_REQUESTS_TIMEOUT_IN_SECONDS); boolean learned = false; for (PaxosUpdate update : updates) { ImmutableCollection<PaxosValue> values = update.getValues(); for (PaxosValue value : values) { PaxosValue currentLearnedValue = knowledge.getLearnedValue(value.getRound()); if (currentLearnedValue == null) { knowledge.learn(value.getRound(), value); learned = true; } } } return learned; }
Source:
<code>public void shouldReturn400_whenCorporateDebitCardSurchargeOperationIsInvalid() { JsonNode jsonNode = new ObjectMapper() <START> .valueToTree(ImmutableMap.of("op", "anything other than the string replace", <END> "path", "corporate_debit_card_surcharge_amount", "value", 250)); Response response = resources.client() .target("/v1/api/accounts/12") .request() .method("PATCH", Entity.json(jsonNode)); assertThat(response.getStatus(), is(400)); String errorMessage = response.readEntity(JsonNode.class).get("errors").get(0).textValue(); assertThat(errorMessage, is("Operation [anything other than the string replace] is not valid for path [corporate_debit_card_surcharge_amount]")); }</code><technical_language>Another place I benefit realistic "remove"</technical_language>

Target:
public void shouldReturn400_whenCorporateDebitCardSurchargeOperationIsInvalid() { JsonNode jsonNode = new ObjectMapper() .valueToTree(ImmutableMap.of("op", "add", "path", "corporate_debit_card_surcharge_amount", "value", 250)); Response response = resources.client() .target("/v1/api/accounts/12") .request() .method("PATCH", Entity.json(jsonNode)); assertThat(response.getStatus(), is(400)); String errorMessage = response.readEntity(JsonNode.class).get("errors").get(0).textValue(); assertThat(errorMessage, is("Operation [add] is not valid for path [corporate_debit_card_surcharge_amount]")); }
Source:
<code>public HttpServiceResponse handle(HttpServiceRequest request) throws Exception { HttpServiceResponse response = new HttpServiceResponse(); if (HttpServer.Method.PUT == request.getMethod()) { ClientConfiguration adminConf = new ClientConfiguration(conf); BookKeeperAdmin admin = new BookKeeperAdmin(adminConf); try { admin.triggerAudit(); } catch (Exception e) { <START> e.printStackTrace(); <END> response.setCode(HttpServer.StatusCode.NOT_FOUND); response.setBody("Exception when do operation." + e.getMessage()); return response; } response.setCode(HttpServer.StatusCode.OK); response.setBody("Success trigger audit."); LOG.debug("response body:" + response.getBody()); return response; } else { response.setCode(HttpServer.StatusCode.NOT_FOUND); response.setBody("Not found method. Should be PUT method"); return response; } }</code><technical_language>remove</technical_language>

Target:
public HttpServiceResponse handle(HttpServiceRequest request) throws Exception { HttpServiceResponse response = new HttpServiceResponse(); if (HttpServer.Method.PUT == request.getMethod()) { try { bka.triggerAudit(); } catch (Exception e) { LOG.error("Meet Exception: ", e); response.setCode(HttpServer.StatusCode.NOT_FOUND); response.setBody("Exception when do operation." + e.getMessage()); return response; } response.setCode(HttpServer.StatusCode.OK); response.setBody("Success trigger audit."); LOG.debug("response body:" + response.getBody()); return response; } else { response.setCode(HttpServer.StatusCode.NOT_FOUND); response.setBody("Not found method. Should be PUT method"); return response; } }
Source:
<code>public void RegularUserCanAddVideoInArticleCommentEditorByFindingWikiaVideo() { new ArticleContent().clear(); ArticlePageObject article = new ArticlePageObject().open(); MiniEditorComponentObject editor = article.triggerCommentArea(); VetAddVideoComponentObject vetAddingVideo = editor.clickAddVideo(); VetOptionsComponentObject vetOptions = vetAddingVideo.addVideoByQuery(VideoContent.WIKIA_VIDEO_QUERY, 0); vetOptions.setCaption(PageContent.CAPTION); String desiredVideoName = vetOptions.getVideoName(); vetOptions.submit(); <START> Assertion.assertTrue(article.getArticleComment().isVideoVisible()); <END> article.submitComment(); Assertion.assertTrue(article.isVideoCommentPresent(desiredVideoName)); }</code><technical_language>Add messages assertions</technical_language>

Target:
public void RegularUserCanAddVideoInArticleCommentEditorByFindingWikiaVideo() { new ArticleContent().clear(); ArticlePageObject article = new ArticlePageObject().open(); MiniEditorComponentObject editor = article.triggerCommentArea(); VetAddVideoComponentObject vetAddingVideo = editor.clickAddVideo(); VetOptionsComponentObject vetOptions = vetAddingVideo.addVideoByQuery(VideoContent.WIKIA_VIDEO_QUERY, 0); vetOptions.setCaption(PageContent.CAPTION); String desiredVideoName = vetOptions.getVideoName(); vetOptions.submit(); Assertion.assertTrue(article.getArticleComment().isVideoVisible(), "Video is not visible"); article.submitComment(); Assertion.assertTrue(article.isVideoCommentPresent(desiredVideoName), "Video comment doesn't have desired name"); }
Source:
<code>@Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); pageTitle = GsonUnmarshaller.unmarshal(PageTitle.class, getArguments().getString(ARG_TITLE)); reviewEnabled = getArguments().getBoolean(ARG_REVIEW_ENABLED); DescriptionEditFunnel.Type type = pageTitle.getDescription() == null ? DescriptionEditFunnel.Type.NEW : DescriptionEditFunnel.Type.EXISTING; highlightText = getArguments().getString(ARG_HIGHLIGHT_TEXT); languageCode = <START> StringUtils.defaultString(SiteInfoClient.getLang(pageTitle.getWikiSite()), <END> pageTitle.getWikiSite().languageCode()); funnel = new DescriptionEditFunnel(WikipediaApp.getInstance(), pageTitle, type); funnel.logStart(); }</code><technical_language>this performing network operations main thread? sound right</technical_language>

Target:
@Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); pageTitle = GsonUnmarshaller.unmarshal(PageTitle.class, getArguments().getString(ARG_TITLE)); reviewEnabled = getArguments().getBoolean(ARG_REVIEW_ENABLED); DescriptionEditFunnel.Type type = pageTitle.getDescription() == null ? DescriptionEditFunnel.Type.NEW : DescriptionEditFunnel.Type.EXISTING; highlightText = getArguments().getString(ARG_HIGHLIGHT_TEXT); funnel = new DescriptionEditFunnel(WikipediaApp.getInstance(), pageTitle, type); funnel.logStart(); }
Source:
<code>private Boolean getBooleanCapability(String key) { Object o = getRawCapabilities().get(key); if (o == null) { return null; } else { <START> return is(key); <END> } }</code><technical_language>hmm, method sense in core java, I behavior for selendroid. expecting a boolean value, essentially care true "true" coming across... else is false. Is confusing users? add additional else clause check for string of "true" "false", raise exception. users of other programming languages (like javascript python) a impression of a truthy be</technical_language>

Target:
private Boolean getBooleanCapability(String key) { Object o = getRawCapabilities().get(key); if (o == null) { return null; } else if (o instanceof Boolean) { return (Boolean) o; } else if (o instanceof String && ("true".equalsIgnoreCase((String) o) || "false".equalsIgnoreCase((String) o))) { return Boolean.valueOf((String) o); } else { throw new ClassCastException(String.format( "DesiredCapability %s's value should be boolean: found value %s of type %s", key, o.toString(), o.getClass().getName())); } }
Source:
<code>public static boolean onPistonMove(World world, BlockPos pos, EnumFacing facing, boolean extending) { if (extending) return MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.PistonEvent.PistonExtendEvent(world, pos, facing)); else <START> return MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.PistonEvent.PistonRetractEvent(world, pos, facing)); <END> }</code><technical_language>Please import PistonEvent, this is a patch import need to</technical_language>

Target:
public static boolean onPistonMove(World world, BlockPos pos, EnumFacing facing, boolean extending) { if (extending) return MinecraftForge.EVENT_BUS.post(new PistonExtendEvent(world, pos, facing)); else return MinecraftForge.EVENT_BUS.post(new PistonRetractEvent(world, pos, facing)); }
Source:
<code>public void test_add_sub_mul_div_rem() throws Exception { int[] opcodes = new int[] { <START> Opcodes.IADD, LADD, Opcodes.FADD, Opcodes.DADD, <END> Opcodes.ISUB, Opcodes.LSUB, Opcodes.FSUB, Opcodes.DSUB, Opcodes.IMUL, Opcodes.LMUL, Opcodes.FMUL, Opcodes.DMUL, Opcodes.IDIV, Opcodes.LDIV, Opcodes.FDIV, Opcodes.DDIV, Opcodes.IREM, Opcodes.LREM, Opcodes.FREM, Opcodes.DREM, }; assertConsume2produceNotNull(opcodes); assertThrowWhenInvalidStack(opcodes, " needs 2 values on stack"); }</code><technical_language>unnecessary change</technical_language>

Target:
public void test_add_sub_mul_div_rem() throws Exception { int[] opcodes = new int[] { Opcodes.IADD, Opcodes.LADD, Opcodes.FADD, Opcodes.DADD, Opcodes.ISUB, Opcodes.LSUB, Opcodes.FSUB, Opcodes.DSUB, Opcodes.IMUL, Opcodes.LMUL, Opcodes.FMUL, Opcodes.DMUL, Opcodes.IDIV, Opcodes.LDIV, Opcodes.FDIV, Opcodes.DDIV, Opcodes.IREM, Opcodes.LREM, Opcodes.FREM, Opcodes.DREM, }; assertConsume2produceNotNull(opcodes); assertThrowWhenInvalidStack(opcodes, " needs 2 values on stack"); }
Source:
<code>public boolean inputIsConnected(int index) { <START> if (index >= 0 && index < getInputs().length) { <END> return getInputs()[index] != null && getInputs()[index].isFullyConnected(); } return false; }</code><technical_language>Met List: @Override public boolean inputIsConnected(int index) { return index < inputs.size() && inputs.get(index).isFullyConnected(); }</technical_language>

Target:
public boolean inputIsConnected(int index) { return index>=0 && index < inputs.size() && inputs.get(index).isConnected(); }
Source:
<code>private static int[] buildLookupArray( SortedSet<LocalDate> holidays, Set<DayOfWeek> weekendDays, int startYear, int endYearExclusive) { int[] array = new int[(endYearExclusive - startYear) * 12]; LocalDate firstOfMonth = LocalDate.of(startYear, 1, 1); for (int i = 0; i < array.length; i++) { int monthLen = firstOfMonth.lengthOfMonth(); array[i] = (1 << monthLen) - 1; for (DayOfWeek weekendDow : weekendDays) { int loopDow0 = firstOfMonth.getDayOfWeek().getValue() - 1; <START> int weekendDow0 = weekendDow.getValue() - 1; <END> int offset = (weekendDow0 - loopDow0 + 7) % 7; array[i] &= ~(0b10000001000000100000010000001 << offset); } firstOfMonth = firstOfMonth.plusMonths(1); } for (LocalDate date : holidays) { int index = (date.getYear() - startYear) * 12 + date.getMonthValue() - 1; array[index] &= ~(1 << (date.getDayOfMonth() - 1)); } return array; }</code><technical_language>point subtracting 1 values difference is used</technical_language>

Target:
private static int[] buildLookupArray( SortedSet<LocalDate> holidays, Set<DayOfWeek> weekendDays, int startYear, int endYearExclusive) { int[] array = new int[(endYearExclusive - startYear) * 12]; LocalDate firstOfMonth = LocalDate.of(startYear, 1, 1); for (int i = 0; i < array.length; i++) { int monthLen = firstOfMonth.lengthOfMonth(); array[i] = (1 << monthLen) - 1; for (DayOfWeek weekendDow : weekendDays) { int daysDiff = weekendDow.getValue() - firstOfMonth.getDayOfWeek().getValue(); int offset = (daysDiff < 0 ? daysDiff + 7 : daysDiff); array[i] &= ~(0b10000001000000100000010000001 << offset); } firstOfMonth = firstOfMonth.plusMonths(1); } for (LocalDate date : holidays) { int index = (date.getYear() - startYear) * 12 + date.getMonthValue() - 1; array[index] &= ~(1 << (date.getDayOfMonth() - 1)); } return array; }
Source:
<code><START> public GroupedHistogramState( <END> Type keyType, int expectedEntriesCount) { valuesBlockBuilder = keyType.createBlockBuilder(null, computeBucketCount(expectedEntriesCount, GroupedTypedHistogram.MAX_FILL_RATIO)); typedHistogram = new GroupedTypedHistogram(keyType, expectedEntriesCount, valuesBlockBuilder); }</code><technical_language>need break multiple lines</technical_language>

Target:
public GroupedHistogramState(Type keyType, int expectedEntriesCount) { typedHistogram = new GroupedTypedHistogram(keyType, expectedEntriesCount); }
Source:
<code>public void createTopic(final String topic, final int partitionsNum, final int replicaFactor, final long retentionMs, final long rotationMs) { final String connectionString = zkFactory.get().getZookeeperClient().getCurrentConnectionString(); final ZkClient zkClient = new ZkClient(connectionString, settings.getZkSessionTimeoutMs(), settings.getZkConnectionTimeoutMs(), ZKStringSerializer$.MODULE$); final ZkUtils zkUtils = ZkUtils.apply(zkClient, false); final Properties topicConfig = new Properties(); topicConfig.setProperty("retention.ms", Long.toString(retentionMs)); topicConfig.setProperty("segment.ms", Long.toString(rotationMs)); AdminUtils.createTopic(zkUtils, topic, partitionsNum, replicaFactor, topicConfig); <START> zkClient.close(); <END> }</code><technical_language>I thinking if is chance of error causing this connection remain open. Do wrap this statement in a finally clause</technical_language>

Target:
public void createTopic(final String topic, final int partitionsNum, final int replicaFactor, final long retentionMs, final long rotationMs) { final String connectionString = zkFactory.get().getZookeeperClient().getCurrentConnectionString(); final ZkUtils zkUtils = ZkUtils.apply(connectionString, settings.getZkSessionTimeoutMs(), settings.getZkConnectionTimeoutMs(), false); try { final Properties topicConfig = new Properties(); topicConfig.setProperty("retention.ms", Long.toString(retentionMs)); topicConfig.setProperty("segment.ms", Long.toString(rotationMs)); AdminUtils.createTopic(zkUtils, topic, partitionsNum, replicaFactor, topicConfig); } finally { zkUtils.close(); } }
Source:
<code>public long get(int length, boolean signed) throws CTFReaderException { if (length > BIT_LONG) { throw new CTFReaderException("Cannot read a long longer than 64 bits. Rquested: " + length); } if (length > BIT_INT) { final int highShift = length - BIT_INT; long a = getInt() & 0x00000000FFFFFFFFL; long b = getInt(highShift, false); long retVal; <START> a &= 0xFFFFFFFFL; <END> b &= ((1L << highShift) - 1L); retVal = (this.byteOrder == ByteOrder.BIG_ENDIAN) ? ((a << highShift) | b) : ((b << BIT_INT) | a); if (signed) { int signExtendBits = BIT_LONG - length; retVal = (retVal << signExtendBits) >> signExtendBits; } return retVal; } long retVal = getInt(length, signed); return (signed ? retVal : (retVal & 0xFFFFFFFFL)); }</code><technical_language>this cast is done line 147. I prefer here, you, removed line 147. you</technical_language>

Target:
public long get(int length, boolean signed) throws CTFReaderException { if (length > BIT_LONG) { throw new CTFReaderException("Cannot read a long longer than 64 bits. Rquested: " + length); } if (length > BIT_INT) { final int highShift = length - BIT_INT; long a = getInt(); long b = getInt(highShift, false); long retVal; a &= 0xFFFFFFFFL; b &= (1L << highShift) - 1L; retVal = (this.byteOrder == ByteOrder.BIG_ENDIAN) ? ((a << highShift) | b) : ((b << BIT_INT) | a); if (signed) { int signExtendBits = BIT_LONG - length; retVal = (retVal << signExtendBits) >> signExtendBits; } return retVal; } long retVal = getInt(length, signed); return (signed ? retVal : (retVal & 0xFFFFFFFFL)); }
Source:
<code>public FulltextFactory( FileSystemAbstraction fileSystem, File storeDir, Analyzer analyzer ) throws IOException { this.analyzer = analyzer; this.fileSystem = fileSystem; <START> Factory<IndexWriterConfig> population = () -> IndexWriterConfigs.population( analyzer ); <END> partitionFactory = new WritableIndexPartitionFactory( population ); this.storeDir = storeDir; }</code><technical_language>before, do population configuration here</technical_language>

Target:
public FulltextFactory( FileSystemAbstraction fileSystem, File storeDir, Analyzer analyzer ) throws IOException { this.analyzer = analyzer; this.fileSystem = fileSystem; Factory<IndexWriterConfig> indexWriterConfigFactory = () -> IndexWriterConfigs.standard( analyzer ); partitionFactory = new WritableIndexPartitionFactory( indexWriterConfigFactory ); indexDir = new File( storeDir, INDEX_DIR ); }
Source:
<code>public void onSupportActionModeStarted(ActionMode mode) { <START> if (CustomCabMenuHelper.shouldInjectCustomMenu(PageActivity.this, mode)) { <END> CustomCabMenuHelper.injectCustomMenu(PageActivity.this, mode); } prepareActionMode(mode); super.onSupportActionModeStarted(mode); }</code><technical_language>ask helper if do and, if so, helper do something. sense for helper a onSupportActionModeStarted callback is Activity in</technical_language>

Target:
public void onSupportActionModeStarted(ActionMode mode) { boolean wasCabOpen = isCabOpen(); currentActionMode = new CompatActionMode(mode, wasCabOpen); if (currentActionMode.shouldInjectCustomMenu(PageActivity.this)) { currentActionMode.injectCustomMenu(PageActivity.this); } prepareActionMode(); super.onSupportActionModeStarted(mode); }
Source:
<code>protected Document fillCreateOptions(DocumentRef parentRef, String childName, Map<String, Serializable> options) throws DocumentSecurityException { <START> Document document; <END> if (parentRef == null || EMPTY_PATH.equals(parentRef)) { document = getSession().getNullDocument(); options.put(CoreEventConstants.DESTINATION_REF, null); options.put(CoreEventConstants.DESTINATION_PATH, null); options.put(CoreEventConstants.DESTINATION_NAME, childName); options.put(CoreEventConstants.DESTINATION_EXISTS, false); } else { document = resolveReference(parentRef); checkPermission(document, ADD_CHILDREN); options.put(CoreEventConstants.DESTINATION_REF, parentRef); options.put(CoreEventConstants.DESTINATION_PATH, document.getPath()); options.put(CoreEventConstants.DESTINATION_NAME, childName); if (Boolean.TRUE.equals(options.get(CoreSession.SKIP_DESTINATION_CHECK_ON_CREATE))) { options.put(CoreEventConstants.DESTINATION_EXISTS, false); } else { options.put(CoreEventConstants.DESTINATION_EXISTS, document.hasChild(childName)); } } return document; }</code><technical_language>Wdyt parent</technical_language>

Target:
protected Document fillCreateOptions(DocumentRef parentRef, String childName, Map<String, Serializable> options) throws DocumentSecurityException { Document folder; if (parentRef == null || EMPTY_PATH.equals(parentRef)) { folder = getSession().getNullDocument(); options.put(CoreEventConstants.DESTINATION_REF, null); options.put(CoreEventConstants.DESTINATION_PATH, null); options.put(CoreEventConstants.DESTINATION_NAME, childName); options.put(CoreEventConstants.DESTINATION_EXISTS, false); } else { folder = resolveReference(parentRef); checkPermission(folder, ADD_CHILDREN); options.put(CoreEventConstants.DESTINATION_REF, parentRef); options.put(CoreEventConstants.DESTINATION_PATH, folder.getPath()); options.put(CoreEventConstants.DESTINATION_NAME, childName); if (Boolean.TRUE.equals(options.get(CoreSession.SKIP_DESTINATION_CHECK_ON_CREATE))) { options.put(CoreEventConstants.DESTINATION_EXISTS, false); } else { options.put(CoreEventConstants.DESTINATION_EXISTS, folder.hasChild(childName)); } } return folder; }
Source:
<code>public void testExecutionOrder() throws Exception { final PersistentObject container = mock(PersistentObject.class); final List<SConnectorDefinition> connectors = getConnectorList(); bpmInstancesCreator.createConnectorInstances(container, connectors, SConnectorInstance.FLOWNODE_TYPE); verify(bpmInstancesCreator).createConnectorInstanceObject(any(PersistentObject.class), anyString(), any(SConnectorDefinition.class),eq(0)); verify(bpmInstancesCreator).createConnectorInstanceObject(any(PersistentObject.class), anyString(), any(SConnectorDefinition.class),eq(1)); <START> ignoreStubs(transactionExecutor); <END> ignoreStubs(connectorInstanceService); }</code><technical_language>Is necessary</technical_language>

Target:
public void testExecutionOrder() throws Exception { final PersistentObject container = mock(PersistentObject.class); final List<SConnectorDefinition> connectors = getConnectorList(); bpmInstancesCreator.createConnectorInstances(container, connectors, SConnectorInstance.FLOWNODE_TYPE); verify(bpmInstancesCreator).createConnectorInstanceObject(any(PersistentObject.class), anyString(), any(SConnectorDefinition.class),eq(0)); verify(bpmInstancesCreator).createConnectorInstanceObject(any(PersistentObject.class), anyString(), any(SConnectorDefinition.class),eq(1)); }