auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void testOnSelectionChanged() { final DataObject do1 = mock(DataObject.class); final DataObject do2 = mock(DataObject.class); final DataObject do3 = mock(DataObject.class); final TreeListItem treeListItem1 = mock(TreeListItem.class); final TreeListItem treeListItem2 = mock(TreeListItem.class); final TreeListItem treeListItem3 = mock(TreeListItem.class); when(treeListItem1.getDataSource()).thenReturn(do1); when(treeListItem2.getDataSource()).thenReturn(do2); when(treeListItem3.getDataSource()).thenReturn(do3); view.onSelectionChanged(Arrays.asList(treeListItem1, treeListItem2, treeListItem3)); verify(presenter).onDataObjectSelectionChanged(dataObjectsCaptor.capture()); final List<DataObject> values = dataObjectsCaptor.getValue(); <START> assertEquals(3, values.size()); assertTrue(values.contains(do1)); assertTrue(values.contains(do2)); assertTrue(values.contains(do3)); <END> }</code><technical_language>assertj assertions, this line: assertThat(values).containsExactly(do1, do2, do3);</technical_language>

Target:
public void testOnSelectionChanged() { final DataObject do1 = mock(DataObject.class); final DataObject do2 = mock(DataObject.class); final DataObject do3 = mock(DataObject.class); final TreeListItem treeListItem1 = mock(TreeListItem.class); final TreeListItem treeListItem2 = mock(TreeListItem.class); final TreeListItem treeListItem3 = mock(TreeListItem.class); when(treeListItem1.getDataSource()).thenReturn(do1); when(treeListItem2.getDataSource()).thenReturn(do2); when(treeListItem3.getDataSource()).thenReturn(do3); view.onSelectionChanged(Arrays.asList(treeListItem1, treeListItem2, treeListItem3)); verify(presenter).onDataObjectSelectionChanged(dataObjectsCaptor.capture()); final List<DataObject> values = dataObjectsCaptor.getValue(); assertEquals(3, values.size()); assertThat(values).containsExactly(do1, do2, do3); }
Source:
<code>protected IStatus validateItem(Object item) { <START> for (int i = 0; i < fdisabledModels.length; i++) { <END> if (((IPluginModelBase) item).equals(fdisabledModels[i])) { return new Status(IStatus.CANCEL, IPDEUIConstants.PLUGIN_ID, 0, "", null); } } return new Status(IStatus.OK, IPDEUIConstants.PLUGIN_ID, 0, "", null); }</code><technical_language>loop style a List</technical_language>

Target:
protected IStatus validateItem(Object item) { if (fdisabledModels != null && fdisabledModels.contains(item)) { return new Status(IStatus.CANCEL, IPDEUIConstants.PLUGIN_ID, 0, "", null); } return new Status(IStatus.OK, IPDEUIConstants.PLUGIN_ID, 0, "", null); }
Source:
<code>public SpongeTameableData setOwner(@Nullable UUID owner){ <START> this.owner = new UUID(owner.getMostSignificantBits(), owner.getLeastSignificantBits()); <END> return this; }</code><technical_language>null checks</technical_language>

Target:
public SpongeTameableData setOwner(@Nullable UUID owner){ this.owner = owner; return this; }
Source:
<code>public GetPartitionsResponse getPartitionsByAlgebra(RpcController controller, PartitionsByAlgebraProto request) throws ServiceException { String dbName = request.getDatabaseName(); String tbName = request.getTableName(); try { <START> if (linkedMetadataManager.existsDatabase(dbName)) { <END> return GetPartitionsResponse.newBuilder().setState(errUndefinedPartitionMethod(tbName)).build(); } } catch (Throwable t) { printStackTraceIfError(LOG, t); return GetPartitionsResponse.newBuilder() .setState(returnError(t)) .build(); } if (metaDictionary.isSystemDatabase(dbName)) { return GetPartitionsResponse.newBuilder().setState(errUndefinedPartitionMethod(tbName)).build(); } rlock.lock(); try { GetPartitionsResponse.Builder builder = GetPartitionsResponse.newBuilder(); List<PartitionDescProto> partitions = store.getPartitionsByAlgebra(request); builder.addAllPartition(partitions); builder.setState(OK); return builder.build(); } catch (Throwable t) { printStackTraceIfError(LOG, t); return GetPartitionsResponse.newBuilder() .setState(returnError(t)) .build(); } finally { rlock.unlock(); } }</code><technical_language>codes simplified. Please refer existsTable() method of this class</technical_language>

Target:
public GetPartitionsResponse getPartitionsByAlgebra(RpcController controller, PartitionsByAlgebraProto request) throws ServiceException { String dbName = request.getDatabaseName(); String tbName = request.getTableName(); if (linkedMetadataManager.existsDatabase(dbName)) { return GetPartitionsResponse.newBuilder().setState(errUndefinedPartitionMethod(tbName)).build(); } if (metaDictionary.isSystemDatabase(dbName)) { return GetPartitionsResponse.newBuilder().setState(errUndefinedPartitionMethod(tbName)).build(); } else { rlock.lock(); try { GetPartitionsResponse.Builder builder = GetPartitionsResponse.newBuilder(); List<PartitionDescProto> partitions = store.getPartitionsByAlgebra(request); builder.addAllPartition(partitions); builder.setState(OK); return builder.build(); } catch (Throwable t) { printStackTraceIfError(LOG, t); return GetPartitionsResponse.newBuilder() .setState(returnError(t)) .build(); } finally { rlock.unlock(); } } }
Source:
<code>public PotionEffect getPotionEffect() { <START> return super.getPotionEffect; <END> }</code><technical_language>Compile error @mcenderdragon</technical_language>

Target:
public PotionEffect getPotionEffect() { return super.getPotionEffect(); }
Source:
<code>public Object convertToRequestFormat(Object o, MediaType contentType) { <START> return encoderRegistry.convert(o, contentType, requestMediaType); <END> }</code><technical_language>I updated #8196, handle first, including commit in this PR</technical_language>

Target:
public Object convertToRequestFormat(Object o, MediaType contentType) { if (o == null) return null; if (requestMediaType == null) return fromStorage(o); Transcoder transcoder = encoderRegistry.getTranscoder(contentType, requestMediaType); return transcoder.transcode(o, contentType, requestMediaType); }
Source:
<code>private String modifybasename(String name) { if(name.equalsIgnoreCase("children")) return "child"; <START> Map<String, String> map = Stream.of( <END> new AbstractMap.SimpleImmutableEntry<>("Entries", "Entry"), new AbstractMap.SimpleImmutableEntry<>("Taxes", "Tax")) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); for(String suffix : map.keySet()) { if(name.endsWith(suffix)) { String firstpart=name.substring(0,name.length()-suffix.length()); return firstpart+map.get(suffix); } } if(name.length()>2 && name.endsWith("s")) return name.substring(0,name.length()-1); return FOR_LOOP_ELEMENT_IDENTIFIER; }</code><technical_language>I agree - this PR minimum sneaking a complete implementation for inflection this</technical_language>

Target:
private String modifybasename(String name) { if(name.equalsIgnoreCase("children")) return "child"; for(String suffix : irregNouns.keySet()) { if(name.endsWith(suffix)) { String firstpart=name.substring(0,name.length()-suffix.length()); return firstpart+irregNouns.get(suffix); } } if(name.length()>2 && name.endsWith("s")) return name.substring(0,name.length()-1); return FOR_LOOP_ELEMENT_IDENTIFIER; }
Source:
<code>public void setUp() throws Exception { System.out.println(" => [" + testName.getMethodName() + "] " + getClass().getSimpleName() + ".setUp()"); voltron.getClusterControl().waitForActive(); voltron.getClusterControl().waitForRunningPassivesInStandby(); commonSetUp(voltron); nmsService.readMessages(); <START> while (nmsService.readTopology() <END> .serverStream() .filter(server -> !server.isActive()) .flatMap(Server::serverEntityStream) .filter(AbstractManageableNode::isManageable) .count() != 3) { Thread.sleep(1_000); } }</code><technical_language>long a junit timeout, fine</technical_language>

Target:
public void setUp() throws Exception { System.out.println(" => [" + testName.getMethodName() + "] " + getClass().getSimpleName() + ".setUp()"); voltron.getClusterControl().waitForActive(); voltron.getClusterControl().waitForRunningPassivesInStandby(); commonSetUp(voltron); nmsService.readMessages(); while (!Thread.currentThread().isInterrupted() && nmsService.readTopology() .serverStream() .filter(server -> !server.isActive()) .flatMap(Server::serverEntityStream) .filter(AbstractManageableNode::isManageable) .count() != 3) { Thread.sleep(1_000); } }
Source:
<code>private void logHadoopDistro() { String hadoopDistroOption = environment.resolvePlaceholders(HADOOP_DISTRO_OPTION); <START> String hadoopDistro = (hadoopDistroOption.equals(HADOOP_DISTRO_OPTION)) ? HadoopDistro.hadoop12.toString() <END> : hadoopDistroOption; logger.info("Hadoop distro config: " + hadoopDistro); logger.info("Hadoop version: " + org.apache.hadoop.util.VersionInfo.getVersion()); }</code><technical_language>I bottom of this understand this resolve in place</technical_language>

Target:
private void logHadoopDistro() { String hadoopDistro = environment.resolvePlaceholders(HADOOP_DISTRO_OPTION); logger.info("Hadoop distro config (--hadoopDistro) used: " + hadoopDistro); String hdpVersionFromCP = org.apache.hadoop.util.VersionInfo.getVersion(); Map<HadoopDistro, String> hadoopVersionsMap = ContainerOptions.getHadoopDistroVersions(); if (!hdpVersionFromCP.contains(hadoopVersionsMap.get(HadoopDistro.valueOf(hadoopDistro)))) { for (HadoopDistro key : hadoopVersionsMap.keySet()) { if (hdpVersionFromCP.contains(hadoopVersionsMap.get(key))) { logger.error("Hadoop version detected from classpath : " + hdpVersionFromCP + " but you provided --hadoopDistro " + hadoopDistro + ". Did you mean? --hadoopDistro " + key.toString()); } } } else { logger.info("Hadoop version detected from classpath: " + hdpVersionFromCP); } }
Source:
<code>public void create() { <START> <END> this.applicationComponent = DaggerSolApplicationComponent.builder() .audioModule(new AudioModule()) .inputModule(new InputModule()) .moduleManagerModule(new ModuleManagerModule()) .optionsModule(new OptionsModule(null )) .build(); Assets.initialize(applicationComponent.moduleEnviroment()); applicationComponent.inject(this); if (Gdx.app.getType() == Application.ApplicationType.Android || Gdx.app.getType() == Application.ApplicationType.iOS) { DebugOptions.read(null); } context = new ContextImpl(); context.put(SolApplication.class, this); logger.info("\n\n ------------------------------------------------------------ \n"); moduleManager.printAvailableModules(); worldConfig = new WorldConfig(); musicManager.playMusic(OggMusicManager.MENU_MUSIC_SET, options); this.menuScreens = applicationComponent.menuScreens(); inputManager.setScreen(this, menuScreens.main); }</code><technical_language>Another unnecessary whitespace</technical_language>

Target:
public void create() { resizeSubscribers = new HashSet<>(); displayDimensions = new DisplayDimensions(Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); Context context = new ContextImpl(); context.put(SolApplication.class, this); this.applicationComponent = DaggerSolApplicationComponent.builder() .appModule(new AppModule(this,context,null)) .build(); Assets.initialize(applicationComponent.moduleEnviroment()); applicationComponent.inject(this); boolean isMobile = Gdx.app.getType() == Application.ApplicationType.Android || Gdx.app.getType() == Application.ApplicationType.iOS; if (isMobile) { DebugOptions.read(null); } logger.info("\n\n ------------------------------------------------------------ \n"); moduleManager.printAvailableModules(); musicManager.playMusic(OggMusicManager.MENU_MUSIC_SET, options); inputManager.setScreen(this, applicationComponent.menuScreens().main); }
Source:
<code>public static void assertMetricsEqual(final MetricSet metricSet, final Map<String, Number> assertions) { assertions.forEach((name, value) -> { final long expected = value.longValue(); final long actual = extractLong(metricSet, name); <START> Assert.assertEquals(String.format("%s assertion failed", name), expected, actual); <END> }); }</code><technical_language>Consider throwing exception org.junit.Assert avoid pulling junit compile scope. Or, move a separate class MetricsAssert junit <optional>true</optional></technical_language>

Target:
public static void assertMetricsEqual(final MetricSet metricSet, final Map<String, Number> assertions) throws AssertionError { assertions.forEach((name, value) -> { final long expected = value.longValue(); final long actual = extractLong(metricSet, name); if (expected != actual) { throw new AssertionError( String.format("%s assertion failed; expected %d != actual %d", name, expected, actual)); } }); }
Source:
<code>public static void generatePemPublicKey(ByteStringBuilder target, PublicKey publicKey) { Assert.checkNotNullParam("target", target); Assert.checkNotNullParam("publicKey", publicKey); <START> generatePemContent(target, "PUBLIC KEY", ByteIterator.ofBytes(publicKey.getEncoded())); <END> }</code><technical_language>This break if key X.509 representation, right? In this case a KeyFactory for key get X.509 keyspec persist that, I think</technical_language>

Target:
public static void generatePemPublicKey(ByteStringBuilder target, PublicKey publicKey) { Assert.checkNotNullParam("target", target); Assert.checkNotNullParam("publicKey", publicKey); try { KeyFactory instance = KeyFactory.getInstance(publicKey.getAlgorithm()); X509EncodedKeySpec keySpec = instance.getKeySpec(publicKey, X509EncodedKeySpec.class); generatePemContent(target, PUBLIC_KEY_FORMAT, ByteIterator.ofBytes(keySpec.getEncoded())); } catch (Exception e) { throw log.publicKeyParseError(e); } }
Source:
<code>public void dispose() { cm.unregisterForCallStateChanged(this); cm.unregisterForOn(this); cm.unregisterForNotAvailable(this); <START> this.removeCallbacksAndMessages(null); <END> for(GsmConnection c : connections) { if(c != null) { c.dispose(); c = null; } else { continue; } } this.phone = null; }</code><technical_language>emoveCallbacksAndMessages(null) remove messages. > this.removeCallbacksAndMessages(null) instead. Done in Patch set 2</technical_language>

Target:
public void dispose() { cm.unregisterForCallStateChanged(this); cm.unregisterForOn(this); cm.unregisterForNotAvailable(this); for(GsmConnection c : connections) { try { if(c != null) hangup(c); } catch (CallStateException ex) { Log.e(LOG_TAG, "unexpected error on hangup during dispose"); } } try { if(pendingMO != null) hangup(pendingMO); } catch (CallStateException ex) { Log.e(LOG_TAG, "unexpected error on hangup during dispose"); } clearDisconnected(); }
Source:
<code><START> public void testGetAutoStack() throws Exception { <END> MockWebServer server = mockOpenStackServer(); server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access.json")))); server.enqueue(addCommonHeaders( new MockResponse().setResponseCode(200).setBody(stringFromResource("/stack_get_response.json")))); try { HeatApi heatApi = api(server.getUrl("/").toString(), "openstack-heat", overrides); StackApi api = heatApi.getStackApi("RegionOne"); Stack stack = api.get("simple_stack", "3095aefc-09fb-4bc7-b1f0-f21a304e864c"); System.out.println(stack); Method[] methods = stack.getClass().getDeclaredMethods(); for (Method m : methods) { System.out.println(m.getName()); } assertThat(server.getRequestCount()).isEqualTo(2); assertAuthentication(server); assertRequest(server.takeRequest(), "GET", BASE_URI + "/stacks/simple_stack/3095aefc-09fb-4bc7-b1f0-f21a304e864c"); assertThat(stack).isNotNull(); } finally { server.shutdown(); } }</code><technical_language>failure states need tested. For example, MockResponse().setResponseCode(404), @Fallback annotations tested. For example <LINK_0></technical_language>

Target:
public void testGetAutoStack() throws Exception { MockWebServer server = mockOpenStackServer(); server.enqueue(addCommonHeaders(new MockResponse().setBody(stringFromResource("/access.json")))); server.enqueue(addCommonHeaders( new MockResponse().setResponseCode(200).setBody(stringFromResource("/stack_get_response.json")))); try { HeatApi heatApi = api(server.getUrl("/").toString(), "openstack-heat", overrides); StackApi api = heatApi.getStackApi("RegionOne"); Stack stack = api.get("simple_stack", "3095aefc-09fb-4bc7-b1f0-f21a304e864c"); assertThat(server.getRequestCount()).isEqualTo(2); assertAuthentication(server); assertRequest(server.takeRequest(), "GET", BASE_URI + "/stacks/simple_stack/3095aefc-09fb-4bc7-b1f0-f21a304e864c"); assertThat(stack).isNotNull(); } finally { server.shutdown(); } }
Source:
<code>public void execute(MapActivity activity) { switch (activity.getMyApplication().getSettings().DAYNIGHT_MODE.get()){ case DAY: { activity.getMyApplication().getSettings().DAYNIGHT_MODE.set(OsmandSettings.DayNightMode.NIGHT); break; } <START> case NIGHT: <END> case AUTO: case SENSOR: { activity.getMyApplication().getSettings().DAYNIGHT_MODE.set(OsmandSettings.DayNightMode.DAY); break; } } }</code><technical_language>Night, auto switching day is strange. "DAY" (AUTO) -> "DAY" -> "NIGHT" [wrong] "NIGHT" (AUTO) -> "DAY" -> "NIGHT" [correct] "DAY" (AUTO) -> "NIGHT" -> "DAY" [correct]</technical_language>

Target:
public void execute(MapActivity activity) { if (activity.getMyApplication().getDaynightHelper().isNightMode()) { activity.getMyApplication().getSettings().DAYNIGHT_MODE.set(OsmandSettings.DayNightMode.DAY); } else { activity.getMyApplication().getSettings().DAYNIGHT_MODE.set(OsmandSettings.DayNightMode.NIGHT); } }
Source:
<code>public int getGroupedColumnCount() { int result = <START> 0; <END> for (IColumn<?> c : getSortColumns()) { if (c.isGroupingActive()) { result++; } } return result; }</code><technical_language>getGroupedColumns()</technical_language>

Target:
public int getGroupedColumnCount() { return getGroupedColumns().size(); }
Source:
<code>public boolean equalValues(QosBase other) { <START> return true; <END> }</code><technical_language>true for other QOS, if type</technical_language>

Target:
public boolean equalValues(QosBase other) { return false; }
Source:
<code>void columnValues() { ColumnName columnName = archived.columnName(); Object value = false; Map<ColumnName, Object> columnsExpected = singletonMap(columnName, value); EntityRecordWithColumns<?> record = EntityRecordWithColumns.of(sampleEntityRecord(), columnsExpected); ImmutableSet<ColumnName> columnNames = record.columnNames(); assertThat(columnNames).hasSize(1); assertTrue(columnNames.contains(columnName)); <START> assertEquals(value, record.columnValue(columnName)); <END> }</code><technical_language>Please migrate assertThat() in previous assertion. easier read</technical_language>

Target:
void columnValues() { ColumnName columnName = archived.columnName(); Object value = false; Map<ColumnName, Object> columnsExpected = singletonMap(columnName, value); EntityRecordWithColumns<?> record = EntityRecordWithColumns.of(sampleEntityRecord(), columnsExpected); ImmutableSet<ColumnName> columnNames = record.columnNames(); assertThat(columnNames).hasSize(1); assertTrue(columnNames.contains(columnName)); assertThat(value).isEqualTo(record.columnValue(columnName)); }
Source:
<code>public boolean sendSerialData(XBee16BitAddress address, byte[] data) throws InterfaceNotOpenException, InvalidOperatingModeException, TimeoutException, IOException { if (!connectionInterface.isOpen()) throw new InterfaceNotOpenException(); <START> XBeePacket xbeePacket; <END> XBeePacket receivedPacket; if (address == null || data == null) throw new NullPointerException("Address and data cannot be null"); logger.info("Sending data to >> {}.", address, HexUtils.byteArrayToHexString(data)); switch (getXBeeProtocol()) { case RAW_802_15_4: xbeePacket = new TX16Packet(getNextFrameID(), address, XBeeTransmitOptions.NONE, data); receivedPacket = sendXBeePacket(xbeePacket); if (receivedPacket == null) return true; if (receivedPacket instanceof TXStatusPacket) { switch (((TXStatusPacket)receivedPacket).getTransmitStatus()) { case SUCCESS: return true; default: return false; } } else return false; default: xbeePacket = new TransmitPacket(getNextFrameID(), XBee64BitAddress.UNKNOWN_ADDRESS, address, 0, XBeeTransmitOptions.NONE, data); receivedPacket = sendXBeePacket(xbeePacket); if (receivedPacket == null) return true; if (receivedPacket instanceof TransmitStatusPacket) { switch (((TransmitStatusPacket)receivedPacket).getTransmitStatus()) { case SUCCESS: return true; default: return false; } } else return false; } }</code><technical_language>here, move this declaration check of parameters</technical_language>

Target:
public boolean sendSerialData(XBee16BitAddress address, byte[] data) throws InterfaceNotOpenException, InvalidOperatingModeException, TimeoutException, IOException { if (!connectionInterface.isOpen()) throw new InterfaceNotOpenException(); if (address == null) throw new NullPointerException("Address cannot be null"); if (data == null) throw new NullPointerException("Data cannot be null"); XBeePacket xbeePacket; XBeePacket receivedPacket; logger.info(toString() + "Sending serial data to >> {}.", address, HexUtils.byteArrayToHexString(data)); switch (getXBeeProtocol()) { case RAW_802_15_4: xbeePacket = new TX16Packet(getNextFrameID(), address, XBeeTransmitOptions.NONE, data); receivedPacket = sendXBeePacket(xbeePacket); if (receivedPacket == null) return true; if (receivedPacket instanceof TXStatusPacket) { switch (((TXStatusPacket)receivedPacket).getTransmitStatus()) { case SUCCESS: return true; default: return false; } } else return false; default: xbeePacket = new TransmitPacket(getNextFrameID(), XBee64BitAddress.UNKNOWN_ADDRESS, address, 0, XBeeTransmitOptions.NONE, data); receivedPacket = sendXBeePacket(xbeePacket); if (receivedPacket == null) return true; if (receivedPacket instanceof TransmitStatusPacket) { switch (((TransmitStatusPacket)receivedPacket).getTransmitStatus()) { case SUCCESS: return true; default: return false; } } else return false; } }
Source:
<code>public PageCache getPageCache(final long pageId) { try { if (pageId > pagingStore.getCurrentWritingPage()) { return null; } boolean createPage = false; CompletableFuture<PageCache> inProgressReadPage; PageCache cache; Page page = null; synchronized (softCache) { cache = softCache.get(pageId); if (cache != null) { return cache; } if (!pagingStore.checkPageFileExists((int) pageId)) { return null; } inProgressReadPage = inProgressReadPages.get(pageId); if (inProgressReadPage == null) { final CompletableFuture<PageCache> readPage = new CompletableFuture<>(); cache = createPageCache(pageId); page = pagingStore.createPage((int) pageId); createPage = true; inProgressReadPage = readPage; inProgressReadPages.put(pageId, readPage); } } if (createPage) { return readPage(pageId, page, cache, inProgressReadPage); } else { <START> return inProgressReadPage.get(10, TimeUnit.SECONDS); <END> } } catch (Exception e) { throw new RuntimeException(e.getMessage(), e); } }</code><technical_language>this fixed timeout is bad. I logic... However: i - configurable somehow. (it nice if is another semantic apply in configuration, I case here). ii - a Timeout considered IOException, CriticalIOListener called this case</technical_language>

Target:
public PageCache getPageCache(final long pageId) { try { PageCache cache; synchronized (softCache) { if (pageId > pagingStore.getCurrentWritingPage()) { return null; } cache = softCache.get(pageId); if (cache == null) { if (!pagingStore.checkPageFileExists((int) pageId)) { return null; } cache = createPageCache(pageId); logger.tracef("adding pageCache pageNr=%d into cursor = %s", pageId, this.pagingStore.getAddress()); readPage((int) pageId, cache); softCache.put(pageId, cache); } } return cache; } catch (Exception e) { throw new RuntimeException(e.getMessage(), e); } }
Source:
<code>private void checkLinesIndent(DetailAstSet astSet, IndentLevel indentLevel, boolean firstLineMatches, int firstLine, boolean allowNesting) { if (!astSet.isEmpty()) { final DetailAST startLine = astSet.firstLine(); <START> final int endLine = astSet.lastLine(); <END> int startCol = expandedTabsColumnNo(astSet.firstLine()); final int realStartCol = getLineStart(indentCheck.getLine(startLine.getLineNo() - 1)); if (firstLineMatches && !allowNesting) { startCol = realStartCol; } if (realStartCol == startCol) { checkLineIndent(startLine, indentLevel, firstLineMatches); } IndentLevel theLevel = indentLevel; if (firstLineMatches || firstLine > mainAst.getLineNo() && shouldIncreaseIndent()) { theLevel = new IndentLevel(indentLevel, getBasicOffset()); } for (int i = startLine.getLineNo() + 1; i <= endLine; i++) { final Integer col = astSet.getStartColumn(i); if (col != null) { checkLineIndent(astSet.getAst(i), theLevel, false); } } } }</code><technical_language>Naming is confusing. called "Line" is int other is AST. startLine => startLineAst</technical_language>

Target:
private void checkLinesIndent(DetailAstSet astSet, IndentLevel indentLevel, boolean firstLineMatches, int firstLine, boolean allowNesting) { if (!astSet.isEmpty()) { final DetailAST startLineAst = astSet.firstLine(); final int endLine = astSet.lastLine(); int startCol = expandedTabsColumnNo(astSet.firstLine()); final int realStartCol = getLineStart(indentCheck.getLine(startLineAst.getLineNo() - 1)); if (firstLineMatches && !allowNesting) { startCol = realStartCol; } if (realStartCol == startCol) { checkLineIndent(startLineAst, indentLevel, firstLineMatches); } IndentLevel theLevel = indentLevel; if (firstLineMatches || firstLine > mainAst.getLineNo() && shouldIncreaseIndent()) { theLevel = new IndentLevel(indentLevel, getBasicOffset()); } for (int i = startLineAst.getLineNo() + 1; i <= endLine; i++) { final Integer col = astSet.getStartColumn(i); if (col != null) { checkLineIndent(astSet.getAst(i), theLevel, false); } } } }
Source:
<code>private CacheEventFilter<Object, String> filter(Object keyToFilter) { return (Serializable & CacheEventFilter<Object, String>) (k, oldValue, oldMetadata, newValue, newMetadata, eventType) -> { <START> boolean retVal = Objects.equals(k, keyToFilter); <END> return retVal; }; }</code><technical_language>this line remove brackets now</technical_language>

Target:
private CacheEventFilter<Object, String> filter(Object keyToFilter) { return (Serializable & CacheEventFilter<Object, String>) (k, oldValue, oldMetadata, newValue, newMetadata, eventType) -> Objects.equals(k, keyToFilter); }
Source:
<code>public boolean evaluate(Tuple tuple, ImmutableBytesWritable ptr) { Expression childExpr = children.get(0); PDataType dataType = childExpr.getDataType(); if (childExpr.evaluate(tuple, ptr)) { byte[] retBytes; <START> if (dataType instanceof PWholeNumber) { <END> PWholeNumber wholeNumber = (PWholeNumber) dataType; int ret = wholeNumber.signum(ptr, childExpr.getSortOrder()); retBytes = wholeNumber.getInstance().toBytes(Integer.valueOf(ret)); } else { PRealNumber realNumber = (PRealNumber) dataType; double ret = realNumber.signum(ptr, childExpr.getSortOrder()); if (dataType instanceof PDecimal) retBytes = PDecimal.INSTANCE.toBytes(BigDecimal.valueOf(ret)); else retBytes = realNumber.getInstance().toBytes(Double.valueOf(ret)); } ptr.set(retBytes); return true; } return false; }</code><technical_language>Remove if statement, declare int signum(ImmutableBytesWritable, SortOrder) common base class of PNumericType, implement differently for PWholeNumber PRealNumber. This code before</technical_language>

Target:
public boolean evaluate(Tuple tuple, ImmutableBytesWritable ptr) { Expression childExpr = children.get(0); PDataType dataType = childExpr.getDataType(); if (childExpr.evaluate(tuple, ptr)) { int ret = ((PNumericType) dataType).signum(ptr, childExpr.getSortOrder()); ptr.set(RESULT[ret + 1]); return true; } return false; }
Source:
<code>private Change getChange(RenameResourceWizard refactoringWizard) { refactoringWizard.setChangeCreationCancelable(true); <START> refactoringWizard.setInitialComputationContext(new IRunnableContext() { <END> @Override public void run(boolean fork, boolean cancelable, IRunnableWithProgress runnable) throws InvocationTargetException, InterruptedException { runnable.run(new NullProgressMonitor()); } }); return refactoringWizard.internalCreateChange(InternalAPI.INSTANCE, new CreateChangeOperation(new CheckConditionsOperation(refactoringWizard.getRefactoring(), CheckConditionsOperation.FINAL_CONDITIONS), RefactoringStatus.FATAL), true); }</code><technical_language>tried, write this lambda beginning, starts another "inner class lambda" mass change</technical_language>

Target:
private Change getChange(RenameResourceWizard refactoringWizard) { refactoringWizard.setChangeCreationCancelable(true); refactoringWizard.setInitialComputationContext((boolean fork, boolean cancelable, IRunnableWithProgress runnable) -> runnable.run(new NullProgressMonitor())); return refactoringWizard.internalCreateChange(InternalAPI.INSTANCE, new CreateChangeOperation(new CheckConditionsOperation(refactoringWizard.getRefactoring(), CheckConditionsOperation.FINAL_CONDITIONS), RefactoringStatus.FATAL), true); }
Source:
<code>public FreeformFamily(BlockFamilyDefinition definition, BlockShape shape, BlockBuilderHelper blockBuilder) { super(definition, shape, blockBuilder); BlockUri uri; if (CUBE_SHAPE_URN.equals(shape.getUrn())) { uri = new BlockUri(definition.getUrn()); } else { <START> uri = new BlockUri(definition.getUrn(), shape.getUrn()); <END> } if (shape.isCollisionYawSymmetric()) { block = blockBuilder.constructSimpleBlock(definition, shape); block.setBlockFamily(this); block.setUri(uri); } else { for (Rotation rot : Rotation.horizontalRotations()) { Side side = rot.rotate(Side.FRONT); Block block = blockBuilder.constructTransformedBlock(definition, shape, side.toString().toLowerCase(Locale.ENGLISH), rot); if (block == null) { throw new IllegalArgumentException("Missing block for side: " + side.toString()); } block.setBlockFamily(this); block.setUri(new BlockUri(uri, new Name(side.name()))); blocks.put(side, block); } } this.setBlockUri(uri); this.setCategory(definition.getCategories()); }</code><technical_language>get rid of this conditional constant if call this signature in case. a semantic difference in signatures</technical_language>

Target:
public FreeformFamily(BlockFamilyDefinition definition, BlockShape shape, BlockBuilderHelper blockBuilder) { super(definition, shape, blockBuilder); BlockUri uri; if (CUBE_SHAPE_URN.equals(shape.getUrn())) { uri = new BlockUri(definition.getUrn()); } else { uri = new BlockUri(definition.getUrn(), shape.getUrn()); } if (shape.isCollisionYawSymmetric()) { block = blockBuilder.constructSimpleBlock(definition, shape); block.setBlockFamily(this); block.setUri(uri); } else { for (Rotation rot : Rotation.horizontalRotations()) { Side side = rot.rotate(Side.FRONT); block = blockBuilder.constructTransformedBlock(definition, shape, side.toString().toLowerCase(Locale.ENGLISH), rot); if (block == null) { throw new IllegalArgumentException("Missing block for side: " + side.toString()); } block.setBlockFamily(this); block.setUri(new BlockUri(uri, new Name(side.name()))); blocks.put(side, block); } } this.setBlockUri(uri); this.setCategory(definition.getCategories()); }
Source:
<code>private boolean wontExceedLocalStorageLimit(DownloadRequest next) { <START> return localStorageAllocated + next.getSize() < config.getLocalStorageLimit(); <END> }</code><technical_language>.... return localStorageAllocated + next.getSize() <= config.getLocalStorageLimit();</technical_language>

Target:
private boolean wontExceedLocalStorageLimit(DownloadRequest next) { return localStorageAllocated + next.getSize() <= config.getLocalStorageLimit(); }
Source:
<code>void rollbackLocal() throws SystemException { if (transaction instanceof ImportedTransaction) { throw Log.log.rollbackOnImported(); } int oldVal; do { oldVal = completionBits.get(); <START> if ((oldVal & BIT_PREPARE_OR_ROLLBACK) == 0) { <END> throw Log.log.invalidTxnState(); } } while (! completionBits.compareAndSet(oldVal, oldVal | BIT_PREPARE_OR_ROLLBACK | BIT_BEFORE_COMP)); transaction.rollback(); }</code><technical_language>this bit is set transaction is PREPARED ROLLED_BACK. if do a rollback() transaction PREPARED ROLLED_BACK, throw exception. In other words, bits represent states reached, state is valid next</technical_language>

Target:
void rollbackLocal() throws SystemException { if (transaction instanceof ImportedTransaction) { throw Log.log.rollbackOnImported(); } transaction.rollback(); }
Source:
<code>public void <START> test19CloseImportedProjectsZipFile() <END> throws Exception { IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); String zipName = "ImportExistingProjectsWizardTestRebuildProject"; zipLocation = copyZipLocation(zipName, zipName); IProject[] workspaceProjects = root.getProjects(); for (IProject workspaceProject : workspaceProjects) { FileUtil.deleteProject(workspaceProject); } WizardProjectsImportPage wpip = getNewWizard(); HashSet<String> projects = new HashSet<>(); projects.add("ImportExistingProjectsWizardTestRebuildProject"); wpip.getProjectFromDirectoryRadio().setSelection(false); wpip.setCloseProjectsAfterImport(true); wpip.updateProjectsList(zipLocation); ProjectRecord[] selectedProjects = wpip.getProjectRecords(); ArrayList<String> projectNames = new ArrayList<>(); for (ProjectRecord selectedProject : selectedProjects) { projectNames.add(selectedProject.getProjectName()); } assertTrue("Expected import wizard to find projects: " + projects + ", instead it detects: " + projectNames, projectNames.containsAll(projects)); CheckboxTreeViewer projectsList = wpip.getProjectsList(); projectsList.setCheckedElements(selectedProjects); wpip.createProjects(); IProject testProject = root.getProject("ImportExistingProjectsWizardTestRebuildProject"); assertFalse("Expected imported project to be closd due to setting dialog option checkbox", testProject.isAccessible()); }</code><technical_language>of test code is duplicated, some helper function setup basic rest different</technical_language>

Target:
public void test19CloseImportedProjectsZipFile() throws Exception { WizardProjectsImportPage wpip = createImportWizardWithZipLocation( "ImportExistingProjectsWizardTestRebuildProject"); wpip.setCloseProjectsAfterImport(true); wpip.createProjects(); IProject testProject = ResourcesPlugin.getWorkspace().getRoot() .getProject("ImportExistingProjectsWizardTestRebuildProject"); assertFalse("Expected imported project to be closd due to setting dialog option checkbox", testProject.isAccessible()); }
Source:
<code>public void testDrivingInternalRepartitioningForwardingTimestampTopology() { driver = new TopologyTestDriver(createInternalRepartitioningWithValueTimestampTopology(), props); final TestInputTopic<String, String> inputTopic = driver.createInputTopic(INPUT_TOPIC_1, STRING_SERIALIZER, STRING_SERIALIZER); inputTopic.pipeInput("key1", "value1@1000"); inputTopic.pipeInput("key2", "value2@2000"); inputTopic.pipeInput("key3", "value3@3000"); <START> assertThat(driver.readOutput(OUTPUT_TOPIC_1, STRING_DESERIALIZER, STRING_DESERIALIZER), <END> equalTo(new ProducerRecord<>(OUTPUT_TOPIC_1, null, 1000L, "key1", "value1"))); assertThat(driver.readOutput(OUTPUT_TOPIC_1, STRING_DESERIALIZER, STRING_DESERIALIZER), equalTo(new ProducerRecord<>(OUTPUT_TOPIC_1, null, 2000L, "key2", "value2"))); assertThat(driver.readOutput(OUTPUT_TOPIC_1, STRING_DESERIALIZER, STRING_DESERIALIZER), equalTo(new ProducerRecord<>(OUTPUT_TOPIC_1, null, 3000L, "key3", "value3"))); }</code><technical_language>yes, this test is checking on. I drop here</technical_language>

Target:
public void testDrivingInternalRepartitioningForwardingTimestampTopology() { driver = new TopologyTestDriver(createInternalRepartitioningWithValueTimestampTopology(), props); final TestInputTopic<String, String> inputTopic = driver.createInputTopic(INPUT_TOPIC_1, STRING_SERIALIZER, STRING_SERIALIZER); inputTopic.pipeInput("key1", "value1@1000"); inputTopic.pipeInput("key2", "value2@2000"); inputTopic.pipeInput("key3", "value3@3000"); final TestOutputTopic<String, String> outputTopic = driver.createOutputTopic(OUTPUT_TOPIC_1, STRING_DESERIALIZER, STRING_DESERIALIZER); assertThat(outputTopic.readRecord(), equalTo(new TestRecord<>("key1", "value1", null, 1000L))); assertThat(outputTopic.readRecord(), equalTo(new TestRecord<>("key2", "value2", null, 2000L))); assertThat(outputTopic.readRecord(), equalTo(new TestRecord<>("key3", "value3", null, 3000L))); }
Source:
<code>protected String quoteStringLiteral(String value) { StringWriter sw = new StringWriter(); <START> JsonWriter writer = new JsonWriter(sw); <END> try { writer.setLenient(true); writer.value(value); writer.flush(); writer.close(); } catch (IOException ex) { throw new RuntimeException("Unexpected I/O failure: " + ex.getLocalizedMessage(), ex); } return sw.toString(); }</code><technical_language>try-with-resources here</technical_language>

Target:
protected String quoteStringLiteral(String value) { StringWriter sw = new StringWriter(); try (JsonWriter writer = new JsonWriter(sw)) { writer.setLenient(true); writer.value(value); writer.flush(); } catch (IOException ex) { throw new RuntimeException("Unexpected I/O failure: " + ex.getLocalizedMessage(), ex); } return sw.toString(); }
Source:
<code>public static WeatherChangeEvent createWeatherChange(Game game, WeatherUniverse weatherUniverse, Weather initialWeather, Weather resultingWeather) { Map<String, Object> values = Maps.newHashMap(); values.put("game", game); values.put("initialWeather", initialWeather); <START> values.put("weatherVolume", weatherUniverse); <END> values.put("resultingWeather", resultingWeather); return createEvent(WeatherChangeEvent.class, values); }</code><technical_language>is reason changed key here</technical_language>

Target:
public static WeatherChangeEvent createWeatherChange(Game game, WeatherUniverse weatherUniverse, Weather initialWeather, Weather resultingWeather) { Map<String, Object> values = Maps.newHashMap(); values.put("game", game); values.put("initialWeather", initialWeather); values.put("weatherUniverse", weatherUniverse); values.put("resultingWeather", resultingWeather); return createEvent(WeatherChangeEvent.class, values); }
Source:
<code>public AuthorizationPluginInfo pluginInfoFor(GoPluginDescriptor descriptor) { Capabilities capabilities = capabilities(descriptor.id()); PluggableInstanceSettings authConfigSettings = authConfigSettings(descriptor.id()); PluggableInstanceSettings roleSettings = roleSettings(descriptor.id(), capabilities); Image image = image(descriptor.id()); <START> return new AuthorizationPluginInfo(descriptor, authConfigSettings, roleSettings, image, capabilities, null); <END> }</code><technical_language>This [this](<LINK_0> correct. auth plugins written/used do allow plugin-settings, authorization-extension support plugin-settings</technical_language>

Target:
public AuthorizationPluginInfo pluginInfoFor(GoPluginDescriptor descriptor) { Capabilities capabilities = capabilities(descriptor.id()); PluggableInstanceSettings authConfigSettings = authConfigSettings(descriptor.id()); PluggableInstanceSettings roleSettings = roleSettings(descriptor.id(), capabilities); PluggableInstanceSettings pluginSettingsAndView = getPluginSettingsAndView(descriptor, extension); Image image = image(descriptor.id()); return new AuthorizationPluginInfo(descriptor, authConfigSettings, roleSettings, image, capabilities, pluginSettingsAndView); }
Source:
<code>@Test public void testHasSomeEffect() { <START> Policy p = Parser.parse("script-src *", "<LINK_0>"); <END> assertFalse(p.hasSomeEffect()); p = Parser.parse("script-src a; upgrade-insecure-requests; report-to a", "<LINK_0>"); assertTrue(p.hasSomeEffect()); p = Parser.parse("report-to a", "<LINK_0>"); assertFalse(p.hasSomeEffect()); }</code><technical_language>I prefer empty policy here. Remember, changing this. script-src * allow inline scripts</technical_language>

Target:
@Test public void testHasSomeEffect() { Policy p = Parser.parse("", "<LINK_0>"); assertFalse(p.hasSomeEffect()); p = Parser.parse("script-src a; upgrade-insecure-requests; report-to a", "<LINK_0>"); assertTrue(p.hasSomeEffect()); p = Parser.parse("report-to a", "<LINK_0>"); assertFalse(p.hasSomeEffect()); }
Source:
<code>private CachedBytecodeGenerator mockCachePerClassLoaderOf(ClassLoader classLoader) { classLoader = classLoader == null ? BOOT_LOADER : classLoader; CachedBytecodeGenerator generator = avoidingClassLeakageCache.get(new StrongKey<ClassLoader>(classLoader)), newGenerator; if (generator == null) { generator = avoidingClassLeakageCache.putIfAbsent(new WeakKey<ClassLoader>(classLoader, this), newGenerator = new CachedBytecodeGenerator(mockBytecodeGenerator, weak)); if (generator == null) { generator = newGenerator; <START> } <END> } return generator; }</code><technical_language>change code variable declaration line. I avoid inline assignment (the newGenerator is needed if). confuse readers</technical_language>

Target:
private CachedBytecodeGenerator mockCachePerClassLoaderOf(ClassLoader classLoader) { classLoader = classLoader == null ? BOOT_LOADER : classLoader; CachedBytecodeGenerator generator = avoidingClassLeakageCache.get(new LookupKey(classLoader)); if (generator == null) { CachedBytecodeGenerator newGenerator = new CachedBytecodeGenerator(mockBytecodeGenerator, weak); generator = avoidingClassLeakageCache.putIfAbsent(new WeakKey(classLoader, this), newGenerator); if (generator == null) { generator = newGenerator; } } return generator; }
Source:
<code>public void setParticipantDetails() { if (fParticipant.getEmail() == null || fParticipant.getEmail().equals("")) { if (fParticipant.getId().equals( R4EUIPlugin.getDefault().getPreferenceStore().getString(PreferenceConstants.P_USER_ID))) { String email = R4EUIPlugin.getDefault() .getPreferenceStore() .getString(PreferenceConstants.P_USER_EMAIL); fParticipant.setEmail(email); <START> } else if (R4EUIModelController.isUserQueryAvailable()) { <END> try { final IQueryUser query = new QueryUserFactory().getInstance(); final List<IUserInfo> info = query.searchByUserId(fParticipant.getId()); if (info.size() > 0) { final IUserInfo userInfo = info.get(0); fParticipantDetails = UIUtils.buildUserDetailsString(userInfo); if (null == fParticipant.getEmail() || fParticipant.getEmail().length() < 1) { fParticipant.setEmail(userInfo.getEmail()); } } } catch (NamingException e) { R4EUIPlugin.Ftracer.traceWarning("Exception: " + e.toString() + " (" + e.getMessage() + ")"); } catch (IOException e) { R4EUIPlugin.Ftracer.traceWarning("Exception: " + e.toString() + " (" + e.getMessage() + ")"); } } else { fParticipant.setEmail(""); } } }</code><technical_language>I this "If" statement "else if" want check this for users</technical_language>

Target:
public void setParticipantDetails() { if (fParticipant.getEmail() == null || fParticipant.getEmail().equals("")) { if (fParticipant.getId().equals( R4EUIPlugin.getDefault().getPreferenceStore().getString(PreferenceConstants.P_USER_ID))) { String email = R4EUIPlugin.getDefault() .getPreferenceStore() .getString(PreferenceConstants.P_USER_EMAIL); fParticipant.setEmail(email); } if (R4EUIModelController.isUserQueryAvailable()) { try { final IQueryUser query = new QueryUserFactory().getInstance(); final List<IUserInfo> info = query.searchByUserId(fParticipant.getId()); if (info.size() > 0) { final IUserInfo userInfo = info.get(0); fParticipantDetails = UIUtils.buildUserDetailsString(userInfo); if (null == fParticipant.getEmail() || fParticipant.getEmail().length() < 1) { fParticipant.setEmail(userInfo.getEmail()); } } } catch (NamingException e) { R4EUIPlugin.Ftracer.traceWarning("Exception: " + e.toString() + " (" + e.getMessage() + ")"); } catch (IOException e) { R4EUIPlugin.Ftracer.traceWarning("Exception: " + e.toString() + " (" + e.getMessage() + ")"); } } if (fParticipant.getEmail() == null) { fParticipant.setEmail(""); } } }
Source:
<code>public FileFormat getFormat() { try { return FileFormat.valueOf(format.toUpperCase()); } catch (IllegalArgumentException e) { <START> String values = Arrays.stream(FileFormat.values()) <END> .map(f -> f.name().toLowerCase()) .collect(Collectors.joining(", ")); throw new IllegalArgumentException(String.format("Invalid format '%s'. The value must be one of %s", format, values)); } }</code><technical_language>if move this FileFormat? java public static String getFormats() { return Arrays.stream(FileFormat.values()).map(f -> f.name().toLowerCase()).collect(Collectors.joining(", ")); }</technical_language>

Target:
public FileFormat getFormat() { return FileFormat.from(format); }
Source:
<code>private void peerProbeAlternateInterfaces(Network glusterNetwork, VDS host) { <START> GlusterServer glusterServer = getGlusterServerDao().get(host.getId()); <END> if (glusterNetwork != null && host.getStatus() == VDSStatus.Up && glusterServer != null) { List<VdsNetworkInterface> interfaces = getInterfaceDao().getAllInterfacesForVds(host.getId()); for (VdsNetworkInterface iface : interfaces) { if (glusterNetwork.getName().equals(iface.getNetworkName()) && !StringUtils.isBlank(iface.getAddress()) && !glusterServer.getKnownAddresses().contains(iface.getAddress())) { VDS upServer = getAlternateUpServerInCluster(host.getVdsGroupId(), host.getId()); if (upServer != null) { Boolean peerProbed = glusterPeerProbeAdditionalInterface(upServer.getId(), iface.getAddress()); if (peerProbed) { getGlusterServerDao().addKnownAddress(host.getId(), iface.getAddress()); } } } } } }</code><technical_language>split this condition, in case glusterNetwork is null status supported, early, need fetch glusterServer db. reduce nesting levels, improves readability</technical_language>

Target:
private void peerProbeAlternateInterfaces(Network glusterNetwork, VDS host) { if (glusterNetwork == null || host.getStatus() != VDSStatus.Up) { return; } GlusterServer glusterServer = getGlusterServerDao().get(host.getId()); if (glusterServer == null) { return; } List<VdsNetworkInterface> interfaces = getInterfaceDao().getAllInterfacesForVds(host.getId()); for (VdsNetworkInterface iface : interfaces) { if (glusterNetwork.getName().equals(iface.getNetworkName()) && StringUtils.isNotBlank(iface.getAddress()) && !glusterServer.getKnownAddresses().contains(iface.getAddress())) { VDS upServer = getAlternateUpServerInCluster(host.getVdsGroupId(), host.getId()); if (upServer != null) { boolean peerProbed = glusterPeerProbeAdditionalInterface(upServer.getId(), iface.getAddress()); if (peerProbed) { getGlusterServerDao().addKnownAddress(host.getId(), iface.getAddress()); } } } } }
Source:
<code>protected void collect(final Object message) { final ActorRef self = self(); final Collect request = (Collect) message; stop(lastEvent); Object signal; if (request.type() == Collect.Type.DTMF) { final PlayCollect.Builder builder = PlayCollect.builder(); for (final URI prompt : request.prompts()) { builder.addPrompt(prompt); } builder.setClearDigitBuffer(true); builder.setDigitPattern(request.pattern()); builder.setFirstDigitTimer(request.timeout()); builder.setInterDigitTimer(request.timeout()); builder.setEndInputKey(request.endInputKey()); builder.setMaxNumberOfDigits(request.numberOfDigits()); signal = builder.build(); this.lastEvent = AUMgcpEvent.aupc; } else { this.lastEvent = AsrSignal.REQUEST_ASR; <START> signal = new AsrSignal(request.getDriver(), request.lang(), request.prompts(), request.endInputKey(), 60, request.timeout(), <END> request.timeout(), request.getHints(), request.type().toString() ,request.numberOfDigits()); } this.originator = sender(); ivr.tell(signal, self); ivrInUse = true; }</code><technical_language>is a reason 60 is hardcoded here</technical_language>

Target:
protected void collect(final Object message) { final ActorRef self = self(); final Collect request = (Collect) message; stop(lastEvent); Object signal; if (request.type() == Collect.Type.DTMF) { final PlayCollect.Builder builder = PlayCollect.builder(); for (final URI prompt : request.prompts()) { builder.addPrompt(prompt); } builder.setClearDigitBuffer(true); builder.setDigitPattern(request.pattern()); builder.setFirstDigitTimer(request.timeout()); builder.setInterDigitTimer(request.timeout()); builder.setEndInputKey(request.endInputKey()); builder.setMaxNumberOfDigits(request.numberOfDigits()); signal = builder.build(); this.lastEvent = AUMgcpEvent.aupc; } else { this.lastEvent = AsrSignal.REQUEST_ASR; signal = new AsrSignal(request.getDriver(), request.lang(), request.prompts(), request.endInputKey(), request.timeout(), request.timeout(), request.timeout(), request.getHints(), request.type().toString() ,request.numberOfDigits()); } this.originator = sender(); ivr.tell(signal, self); ivrInUse = true; }