auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code><START> public TimeLockServices createInvalidatingTimeLockServices(String client) { <END> ManagedTimestampService timestampService = instrument( ManagedTimestampService.class, leadershipAgent.wrapInLeadershipProxy( timestampCreator.createPaxosBackedTimestampService(client), ManagedTimestampService.class), client); RemoteLockService lockService = instrument( RemoteLockService.class, leadershipAgent.wrapInLeadershipProxy( lockCreator::createThreadPoolingLockService, RemoteLockService.class), client); return TimeLockServices.create(timestampService, lockService, timestampService); }</code><technical_language>is a need for this method? used</technical_language>

Target:
protected TimeLockServices createInvalidatingTimeLockServices(String client) { ManagedTimestampService timestampService = instrument( ManagedTimestampService.class, leadershipAgent.wrapInLeadershipProxy( timestampCreator.createPaxosBackedTimestampService(client), ManagedTimestampService.class), client); RemoteLockService lockService = instrument( RemoteLockService.class, leadershipAgent.wrapInLeadershipProxy( lockCreator::createThreadPoolingLockService, RemoteLockService.class), client); return TimeLockServices.create(timestampService, lockService, timestampService); }
Source:
<code>public List<Properties> getTaskConfigs(int maxTasks) { <START> List<Properties> taskConfigs = new ArrayList<Properties>(); <END> for(int i = 0; i < maxTasks; i++) { Properties taskProps = new Properties(); taskProps.putAll(configProperties); taskConfigs.add(taskProps); } return taskConfigs; }</code><technical_language>here. First, I started a ConnectorUtils class try capture common patterns duplicate code a bunch of connectors. This pattern create maximum # of tasks input config a common for sink tasks care topic/partition mapping need split else in a consistent way. nice move this in there. Second, config anyway, object return N times -- need create a bunch of copies. If framework needs modify anything, in a safe allows reusing object (if for other reason connector implementers mistake if disallowed it). In fact, this entire class define providing a generic base class right type parameters, e.g. public class HdfsSinkConnector extends StandardSinkConnector<HdfsSinkConnectorConfig, HdfsSinkTask> need a name for it, again, if this is a common pattern remove this boilerplate code, do that</technical_language>

Target:
public List<Properties> getTaskConfigs(int maxTasks) { List<Properties> taskConfigs = new ArrayList<Properties>(); Properties taskProps = new Properties(); taskProps.putAll(configProperties); for (int i = 0; i < maxTasks; i++) { taskConfigs.add(taskProps); } return taskConfigs; }
Source:
<code>public BinaryData getBody() { final AmqpMessageBodyType bodyType = amqpAnnotatedMessage.getBody().getBodyType(); switch (bodyType) { case DATA: <START> final Optional<byte[]> payload = amqpAnnotatedMessage.getBody().getData().stream().findFirst(); <END> return payload.isPresent() ? BinaryData.fromBytes(payload.get()) : BinaryData.fromBytes(new byte[0]); case SEQUENCE: case VALUE: throw logger.logExceptionAsError(new UnsupportedOperationException( "This body type not is supported: " + bodyType)); default: throw logger.logExceptionAsError(new IllegalStateException("Body type not valid: " + bodyType)); } }</code><technical_language>I missed change return BinaryData.fromBytes(amqpAnnotatedMessage.getBody().getFirstData()) BinaryData data, a null is converted empty byte array BinaryData, do check for payload.isPresent(). BinaryData store data in byte[] variable. calling getFirstData efficient</technical_language>

Target:
public BinaryData getBody() { final AmqpMessageBodyType bodyType = amqpAnnotatedMessage.getBody().getBodyType(); switch (bodyType) { case DATA: final byte[] payload = amqpAnnotatedMessage.getBody().getFirstData(); return BinaryData.fromBytes(payload); case SEQUENCE: case VALUE: throw logger.logExceptionAsError(new UnsupportedOperationException( "This body type not is supported: " + bodyType)); default: throw logger.logExceptionAsError(new IllegalStateException("Body type not valid: " + bodyType)); } }
Source:
<code>public void search() { String organization = randomAlphanumeric(20); int page = 17; int pageSize = 39; String textQuery = randomAlphanumeric(20); underTest.search(new SearchWsRequest() .setOrganization(organization) .setQualifiers(asList("q1", "q2")) .setPage(page) .setPageSize(pageSize) .setQuery(textQuery) ); serviceTester.assertThat(serviceTester.getGetRequest()) .hasPath("search") .hasParam("organization", organization) .hasParam("qualifiers", "q1,q2") .hasParam("p", page) .hasParam("ps", pageSize) .hasParam("q", textQuery) <START> .andNoOtherParam(); <END> }</code><technical_language>Please add check parser</technical_language>

Target:
public void search() { String organization = randomAlphanumeric(20); int page = 17; int pageSize = 39; String textQuery = randomAlphanumeric(20); underTest.search(new SearchWsRequest() .setOrganization(organization) .setQualifiers(asList("q1", "q2")) .setPage(page) .setPageSize(pageSize) .setQuery(textQuery) ); assertThat(serviceTester.getGetParser()).isSameAs(WsComponents.SearchWsResponse.parser()); serviceTester.assertThat(serviceTester.getGetRequest()) .hasPath("search") .hasParam("organization", organization) .hasParam("qualifiers", "q1,q2") .hasParam("p", page) .hasParam("ps", pageSize) .hasParam("q", textQuery) .andNoOtherParam(); }
Source:
<code>public void testTypedHandleResponse() throws IllegalAccessException, InstantiationException { expect(response.getStatus()).andReturn(responseStatusCode); expect(response.readEntity(eq(String.class))).andReturn(""); expect(statusType.getFamily()).andReturn(Response.Status.Family.SUCCESSFUL); expectedParsedResponse = new HashMap<String, Object>(); expect(response.readEntity(anyObject(GenericType.class))).andReturn(expectedParsedResponse); replay(response, statusType); <START> assertThat(new DefaultResponseHandler().handleResponse(response, new ParameterizedTypeImpl(Map.class, String.class, Object.class)), instanceOf(Map.class)); <END> }</code><technical_language>in this file. Please verify mocks</technical_language>

Target:
public void testTypedHandleResponse() throws IllegalAccessException, InstantiationException { expect(response.getStatus()).andReturn(responseStatusCode); expect(response.readEntity(eq(String.class))).andReturn(""); expect(statusType.getFamily()).andReturn(Response.Status.Family.SUCCESSFUL); expectedParsedResponse = new HashMap<String, Object>(); expect(response.readEntity(anyObject(GenericType.class))).andReturn(expectedParsedResponse); replay(response, statusType); assertThat(new DefaultResponseHandler().handleResponse(response, new ParameterizedTypeImpl(Map.class, String.class, Object.class)), instanceOf(Map.class)); verify(response, statusType); }
Source:
<code>public KubernetesBase() { String endpointIP = System.getenv(KUBERNETES_MASTER_IP_ENV); String endpointPort = System.getenv(KUBERNETES_MASTER_PORT_ENV); if (endpointIP == null || endpointIP.isEmpty()) { endpointIP = DEFAULT_KUBERNETES_MASTER_IP; } if (endpointPort == null || endpointPort.isEmpty()) { endpointPort = DEFAULT_KUBERNETES_MASTER_PORT; } <START> this.client = new DefaultKubernetesClient("http://" + endpointIP + ":" + endpointPort); <END> }</code><technical_language>java.net.URL class for constructing URLs</technical_language>

Target:
public KubernetesBase() { String endpointIP = System.getenv(KUBERNETES_MASTER_IP_ENV); String endpointPort = System.getenv(KUBERNETES_MASTER_PORT_ENV); if (endpointIP == null || endpointIP.isEmpty()) { endpointIP = DEFAULT_KUBERNETES_MASTER_IP; } if (endpointPort == null || endpointPort.isEmpty()) { endpointPort = DEFAULT_KUBERNETES_MASTER_PORT; } URL url; try { url = new URL("http", endpointIP, Integer.parseInt(endpointPort), ""); this.client = new DefaultKubernetesClient(url.toString()); } catch (MalformedURLException e) { LOGGER.error("Unable to identify the Kubernetes master node.", e); } catch (NullPointerException e) { LOGGER.error("Unable to identify the Kubernetes master node.", e); } }
Source:
<code>public void verifyService() { assertNotNull(atomClientService); atomClientService.fetch(); atomClientService.fetch(); <START> atomClientService.fetch(); <END> }</code><technical_language>this fail? log in case of problems. verify expect</technical_language>

Target:
public void verifyService() { assertNotNull(atomClientService); }
Source:
<code>public void testDropViewIndexColumn() throws Exception { String table = generateUniqueName(); String view = generateUniqueName(); String index = generateUniqueName(); try (Connection conn = DriverManager.getConnection(getUrl())) { conn.setAutoCommit(true); try (Statement stmt = conn.createStatement()) { stmt.execute("CREATE TABLE IF NOT EXISTS " + table + " (ID CHAR(10) NOT NULL,KEY_PREFIX CHAR(3) NOT NULL," + " CONSTRAINT PK PRIMARY KEY (ID,KEY_PREFIX))"); stmt.execute( "CREATE VIEW IF NOT EXISTS " + view + " (PK1 DATE NOT NULL,PK2 CHAR(15) NOT NULL," + "NON_PK1 CHAR(15),NON_PK2 CHAR(15) CONSTRAINT PKVIEW PRIMARY KEY (PK1,PK2)) " + "AS SELECT * FROM " + table + " WHERE KEY_PREFIX = '123'"); stmt.execute("CREATE INDEX " + index + " ON " + view + " (PK2, PK1) INCLUDE (NON_PK1, NON_PK2)"); stmt.execute("ALTER VIEW " + view + " DROP COLUMN NON_PK1"); } <START> } catch (Exception e) { <END> fail(); } }</code><technical_language>need catch</technical_language>

Target:
public void testDropViewIndexColumn() throws Exception { String table = generateUniqueName(); String view = generateUniqueName(); String index = generateUniqueName(); try (Connection conn = DriverManager.getConnection(getUrl())) { conn.setAutoCommit(true); try (Statement stmt = conn.createStatement()) { stmt.execute("CREATE TABLE IF NOT EXISTS " + table + " (ID CHAR(10) NOT NULL,KEY_PREFIX CHAR(3) NOT NULL," + " CONSTRAINT PK PRIMARY KEY (ID,KEY_PREFIX))"); stmt.execute( "CREATE VIEW IF NOT EXISTS " + view + " (PK1 DATE NOT NULL,PK2 CHAR(15) NOT NULL," + "NON_PK1 CHAR(15),NON_PK2 CHAR(15) CONSTRAINT " + "PKVIEW PRIMARY KEY (PK1,PK2)) " + "AS SELECT * FROM " + table + " WHERE KEY_PREFIX = '123'"); stmt.execute("CREATE INDEX " + index + " ON " + view + " (PK2, PK1) INCLUDE (NON_PK1, NON_PK2)"); stmt.execute("ALTER VIEW " + view + " DROP COLUMN NON_PK1"); } } }
Source:
<code>public void onLiveStreamPacketizerCreate(ILiveStreamPacketizer liveStreamPacketizer, String streamName) { logger.debug("onLiveStreamPacketizerCreate. stream: " + streamName); if (!(liveStreamPacketizer instanceof LiveStreamPacketizerCupertino)) return; LiveStreamPacketizerCupertino cupertinoPacketizer = (LiveStreamPacketizerCupertino) liveStreamPacketizer; IMediaStream stream = appInstance.getStreams().getStream(streamName); KalturaLiveEntry entry = null; try { Pair<Object, KalturaEntryIdKey> entryPair = KalturaStreamsDataPersistence.getEntry(Constants.CLIENT_PROPERTY_KALTURA_LIVE_ENTRY, streamName); entry = (KalturaLiveEntry) entryPair.getLeft(); WMSProperties properties = stream.getProperties(); synchronized (properties) { <START> properties.setProperty(Constants.KALTURA_ENTRY_DATA_PERSISTENCY_KEY, entryPair.getRight()); <END> } } catch(Exception e) { logger.error("(" + streamName + ") failed to get entry."); } streamSettings.onStreamCreate(cupertinoPacketizer, stream, streamName, entry); logger.info("Create [" + streamName + "]: " + liveStreamPacketizer.getClass().getSimpleName()); cupertinoPacketizer.setDataHandler(new LiveStreamPacketizerDataHandler(cupertinoPacketizer, streamName)); }</code><technical_language>keeping twice? in source stream....</technical_language>

Target:
public void onLiveStreamPacketizerCreate(ILiveStreamPacketizer liveStreamPacketizer, String streamName) { logger.debug("onLiveStreamPacketizerCreate. stream: " + streamName); if (!(liveStreamPacketizer instanceof LiveStreamPacketizerCupertino)) return; LiveStreamPacketizerCupertino cupertinoPacketizer = (LiveStreamPacketizerCupertino) liveStreamPacketizer; IMediaStream stream = appInstance.getStreams().getStream(streamName); streamSettings.onStreamCreate(cupertinoPacketizer, stream, streamName); logger.info("Create [" + streamName + "]: " + liveStreamPacketizer.getClass().getSimpleName()); cupertinoPacketizer.setDataHandler(new LiveStreamPacketizerDataHandler(cupertinoPacketizer, streamName)); }
Source:
<code>public void deleteSubscription(@PathParam("subscription_id") String subscriptionId) { Pool master = this.poolManager.getMasterPoolBySubscriptionId(subscriptionId); if (master == null) { throw new NotFoundException( i18n.tr("A subscription with the ID \"{0}\" could not be found.", subscriptionId)); } <START> this.poolManager.deletePools(Collections.singletonList(master), null); <END> }</code><technical_language>This is minor, mind switching this this.poolManager.deletePools(Collections.singletonList(master)) superfluous null hanging around. I functionality parameter method delegates parameter method provides null parameter</technical_language>

Target:
public void deleteSubscription(@PathParam("subscription_id") String subscriptionId) { Pool master = this.poolManager.getMasterPoolBySubscriptionId(subscriptionId); if (master == null) { throw new NotFoundException( i18n.tr("A subscription with the ID \"{0}\" could not be found.", subscriptionId)); } this.poolManager.deletePools(Collections.singletonList(master)); }
Source:
<code><START> public boolean isConcreteStorageType() { <END> return this.getValue() > 0; }</code><technical_language>if remove property, removing this method well</technical_language>

Target:
public boolean isConcreteStorageType() { return this != UNKNOWN; }
Source:
<code>public SqlSystemViewColumns(GridKernalContext ctx, SchemaManager schemaMgr) { super("COLUMNS", "Ignite columns", ctx, new String[] {TABLE_NAME, COLUMN_NAME}, newColumn("SCHEMA_NAME"), newColumn(TABLE_NAME), newColumn(COLUMN_NAME), <START> newColumn("COLUMN_ID", Value.INT), <END> newColumn("DATA_TYPE"), newColumn("SQL_TYPE", Value.INT), newColumn("IS_NULLABLE", Value.BOOLEAN), newColumn("DISPLAY_SIZE", Value.INT), newColumn("PRECISION", Value.INT), newColumn("SCALE", Value.INT), newColumn("AFFINITY_KEY", Value.BOOLEAN) ); this.schemaMgr = schemaMgr; }</code><technical_language>For other views ID's columns name's column. I propose order for system views</technical_language>

Target:
public SqlSystemViewColumns(GridKernalContext ctx, SchemaManager schemaMgr) { super("COLUMNS", "Ignite columns", ctx, new String[] {TABLE_NAME, COLUMN_NAME}, newColumn("SCHEMA_NAME"), newColumn(TABLE_NAME), newColumn(COLUMN_NAME), newColumn("ORDINAL_POSITION", Value.INT), newColumn("DEFAULT_VALUE"), newColumn("IS_NULLABLE", Value.BOOLEAN), newColumn("DATA_TYPE"), newColumn("CHARACTER_LENGTH", Value.INT), newColumn("NUMERIC_PRECISION", Value.INT), newColumn("NUMERIC_SCALE", Value.INT), newColumn("IS_AFFINITY_KEY", Value.BOOLEAN) ); this.schemaMgr = schemaMgr; }
Source:
<code>public static void setAuthorAttributionText(@NonNull TextView textView, @StringRes final int stringRes, @NonNull final IAuthorData authorData, long initialTimeStampMs, @NonNull final Runnable onAuthorClickListener) { final CharSequence text; { final Context context = textView.getContext(); final CharSequence formattedTime = getRelativeTimeSpanString(context, initialTimeStampMs, authorData.getCreatedAt().getTime()); final String authorLabel = authorData.getAuthorLabel(); final SpannableString authorSpan = new SpannableString(authorData.getAuthor()); if (config.isUserProfilesEnabled() && !authorData.isAuthorAnonymous()) { authorSpan.setSpan(new ClickableSpan() { @Override public void onClick(View widget) { onAuthorClickListener.run(); } @Override public void updateDrawState(TextPaint ds) { super.updateDrawState(ds); ds.setUnderlineText(false); } }, 0, authorSpan.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); authorSpan.setSpan(new StyleSpan(Typeface.BOLD), 0, authorSpan.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); } text = trim(ResourceUtil.getFormattedString(context.getResources(), stringRes, new HashMap<String, CharSequence>() {{ put("time", formattedTime); put("author", authorSpan); <START> put("author_label", null == authorLabel ? "" : authorLabel); <END> }})); } textView.setText(text); textView.setMovementMethod(new LinkMovementMethod()); }</code><technical_language>I null handling removed now, done ResourceUtil.getFormattedString() method called here</technical_language>

Target:
public static void setAuthorAttributionText(@NonNull TextView textView, @StringRes final int stringRes, @NonNull final IAuthorData authorData, long initialTimeStampMs, @NonNull final Runnable onAuthorClickListener) { final CharSequence text; { final Context context = textView.getContext(); final CharSequence formattedTime = getRelativeTimeSpanString(context, initialTimeStampMs, authorData.getCreatedAt().getTime()); final String authorLabel = authorData.getAuthorLabel(); final SpannableString authorSpan = new SpannableString(authorData.getAuthor()); if (config.isUserProfilesEnabled() && !authorData.isAuthorAnonymous()) { authorSpan.setSpan(new ClickableSpan() { @Override public void onClick(View widget) { onAuthorClickListener.run(); } @Override public void updateDrawState(TextPaint ds) { super.updateDrawState(ds); ds.setUnderlineText(false); } }, 0, authorSpan.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); authorSpan.setSpan(new StyleSpan(Typeface.BOLD), 0, authorSpan.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); } text = trim(ResourceUtil.getFormattedString(context.getResources(), stringRes, new HashMap<String, CharSequence>() {{ put("time", formattedTime); put("author", authorSpan); put("author_label", authorLabel); }})); } textView.setText(text); textView.setMovementMethod(new LinkMovementMethod()); }
Source:
<code>public void setTaskRetries(Map<String, String> taskRetries) { if (this.taskRetries == null) { this.taskRetries = new HashMap<String, String>(); } else { this.taskRetries = taskRetries; <START> } <END> }</code><technical_language>this is redundant, this in getter</technical_language>

Target:
public void setTaskRetries(Map<String, String> taskRetries) { this.taskRetries = taskRetries; }
Source:
<code>private HeaderEntry getEntryInsensitive(CharSequence name, CharSequence value) { if (length() == 0 || name == null || value == null) { return null; } int h = AsciiString.hashCode(name); int i = index(h); for (HeaderEntry e = headerFields[i]; e != null; e = e.next) { <START> if (e.hash == h && equalsVariableTime(name, e.name) && equalsVariableTime(value, e.value)) { <END> return e; } } return null; }</code><technical_language>Do a performance benefit comparing name? In minds eye, typically a larger range name (which hash this entry). For example, skip iterating chars in name for headers like: content-length: 0 content-length: 1</technical_language>

Target:
private HeaderEntry getEntryInsensitive(CharSequence name, CharSequence value) { if (length() == 0 || name == null || value == null) { return null; } int h = AsciiString.hashCode(name); int i = index(h); for (HeaderEntry e = headerFields[i]; e != null; e = e.next) { if (e.hash == h && equalsVariableTime(value, e.value) && equalsVariableTime(name, e.name)) { return e; } } return null; }
Source:
<code>public Response install(Action action) { VDS vds = getEntity(); UpdateVdsActionParameters params = new UpdateVdsActionParameters(vds.getStaticData(), action.getRootPassword(), true); <START> params.setFenceAgents(vds.getFenceAgents()); <END> params = (UpdateVdsActionParameters) getMapper (Action.class, VdsOperationActionParameters.class).map(action, params); if (vds.isOvirtNode()) { params.setReinstallOrUpgrade(true); if (action.isSetImage()) { params.setoVirtIsoFile(action.getImage()); return doAction(VdcActionType.UpgradeOvirtNode, params, action); } } return doAction(VdcActionType.UpdateVds, params, action); }</code><technical_language>This correct me. If do this time this action is executed updating fencing agents, opening door for additional unexpected side effects. backend handles that, optimizes skips update if changes, I doubt it. fact this method "UpdateVds" command is confusing, source of problem. Please consider adding backend a new "InstallHost" command receives parameters required for installing a host, parameters update it</technical_language>

Target:
public Response install(Action action) { VDS vds = getEntity(); UpdateVdsActionParameters params = new UpdateVdsActionParameters(vds.getStaticData(), action.getRootPassword(), true); params.setFenceAgents(null); params = (UpdateVdsActionParameters) getMapper (Action.class, VdsOperationActionParameters.class).map(action, params); if (vds.isOvirtNode()) { params.setReinstallOrUpgrade(true); if (action.isSetImage()) { params.setoVirtIsoFile(action.getImage()); return doAction(VdcActionType.UpgradeOvirtNode, params, action); } } return doAction(VdcActionType.UpdateVds, params, action); }
Source:
<code>private String evaluateFormattedFilterDate(int calendarUnit, int amount) { Calendar cal = Calendar.getInstance(); cal.setTime(new Date()); cal.add(calendarUnit, -(amount)); Date filterDate = cal.getTime(); <START> ISO8601DateSerde serde = (ISO8601DateSerde) elide.getElideSettings().getSerdes().get(Date.class); <END> Format dateFormat = new SimpleDateFormat(serde.getFormat()); String filterDateFormatted = dateFormat.format(filterDate); log.debug("FilterDateFormatted = {}", filterDateFormatted); return filterDateFormatted; }</code><technical_language>This a safe cast. other Serde's for Date besides ISO8601. Also, client control this figure out work in circumstances</technical_language>

Target:
private String evaluateFormattedFilterDate(int calendarUnit, int amount) { Calendar cal = Calendar.getInstance(); cal.setTime(new Date()); cal.add(calendarUnit, -(amount)); Date filterDate = cal.getTime(); Format dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm'Z'"); String filterDateFormatted = dateFormat.format(filterDate); log.debug("FilterDateFormatted = {}", filterDateFormatted); return filterDateFormatted; }
Source:
<code>public void logAuditEvent(AuditEvent auditEvent) { <START> if (AuditConstants.FAILURE.equals(auditEvent.getValue(AuditEvent.FieldName.RESULT))) { <END> LOG.error(auditEvent.toString()); } else { LOG.info(auditEvent.toString()); } }</code><technical_language>If RESULT is a mandatory field of AuditEvent, a member field instead of adding Map. In case replace this part a single field comparison</technical_language>

Target:
public void logAuditEvent(AuditEvent auditEvent) { if (auditEvent.getResult() == Result.FAILURE) { LOG.error(auditEvent.toString()); } else { LOG.info(auditEvent.toString()); } }
Source:
<code>public String getRouteName(@NonNull Resources resources) { <START> return "JABODETABEK"; <END> }</code><technical_language>this localized too</technical_language>

Target:
public String getRouteName(@NonNull Resources resources) { return resources.getString(R.string.kmt_defroute); }
Source:
<code>public void testDelete() throws Exception { List<Deployment> deployments = api().list(); for (Deployment d : deployments) { if (d.name().contains("jcdep")) { URI uri = api().delete(d.name()); assertNotNull(uri); assertTrue(uri.toString().contains("api-version")); assertTrue(uri.toString().contains("operationresults")); boolean jobDone = Predicates2.retry(new Predicate<URI>() { @Override public boolean apply(URI uri) { System.out.println(uri.toString()); <START> System.out.println(api.getJobApi().jobStatus(uri).name()); <END> return ParseJobStatus.JobStatus.NO_CONTENT == api.getJobApi().jobStatus(uri); } }, 60 * maxTestDuration * 1000).apply(uri); assertTrue(jobDone, "delete operation did not complete in the configured timeout"); } } }</code><technical_language>Remove this anonymous logger</technical_language>

Target:
public void testDelete() throws Exception { List<Deployment> deployments = api().list(); for (Deployment d : deployments) { if (d.name().contains("jc")) { URI uri = api().delete(d.name()); assertNotNull(uri); assertTrue(uri.toString().contains("api-version")); assertTrue(uri.toString().contains("operationresults")); boolean jobDone = Predicates2.retry(new Predicate<URI>() { @Override public boolean apply(URI uri) { return ParseJobStatus.JobStatus.NO_CONTENT == api.getJobApi().jobStatus(uri); } }, 60 * maxTestDuration * 1000).apply(uri); assertTrue(jobDone, "delete operation did not complete in the configured timeout"); } } }
Source:
<code>public Flatbush(T[] items, int degree) { checkArgument(degree > 0, "degree must be positive"); this.degree = degree; this.items = requireNonNull(items, "items is null"); <START> this.levelOffsets = Flatbush.calculateLevelIndices(items.length, degree); <END> this.tree = this.buildTree(); }</code><technical_language>Flatbush.calculateLevelIndices -> calculateLevelIndices - calculateLevelIndices -> calculateLevelOffsets avoid multiple terms for</technical_language>

Target:
public Flatbush(T[] items, int degree) { checkArgument(degree > 0, "degree must be positive"); this.degree = degree; this.items = requireNonNull(items, "items is null"); this.levelOffsets = calculateLevelOffsets(items.length, degree); this.tree = buildTree(); }
Source:
<code>public AbstractSequence<NucleotideCompound> getSequence() throws CompoundNotFoundException { try { DNASequenceCreator creator = new DNASequenceCreator(ABITracerCompoundSet.getABITracerCompoundSet()); return creator.getSequence(sequence, 0); <START> } catch (Exception e) { <END> throw new CompoundNotFoundException(e.toString()); } }</code><technical_language>need catch, CompoundNotFoundException through. Catching a general Exception undesired side effects in error handling. If CompoundNotFoundException happen (other of a bug), valid catch (but exception), log a warning throw it</technical_language>

Target:
public AbstractSequence<NucleotideCompound> getSequence() throws CompoundNotFoundException { DNASequenceCreator creator = new DNASequenceCreator(ABITracerCompoundSet.getABITracerCompoundSet()); return creator.getSequence(sequence, 0); }
Source:
<code>public boolean isSSPISupported() { try { if (!Platform.isWindows()) { LOGGER.log(Level.FINE, "SSPI not supported: non-Windows host"); return false; } Class.forName("waffle.windows.auth.impl.WindowsSecurityContextImpl"); return true; } catch (NoClassDefFoundError ex) { <START> LOGGER.log(Level.FINE, "SSPI unavailable (no Waffle/JNA libraries?)", ex); <END> return false; } catch (ClassNotFoundException ex) { LOGGER.log(Level.FINE, "SSPI unavailable (no Waffle/JNA libraries?)", ex); return false; } }</code><technical_language>1 highlight configuration issues. other hand, sense this one-time-only log message (e.g. static boolean sspiUnavailable in SSPIClient class</technical_language>

Target:
public boolean isSSPISupported() { try { if (!Platform.isWindows()) { LOGGER.log(Level.FINE, "SSPI not supported: non-Windows host"); return false; } Class.forName("waffle.windows.auth.impl.WindowsSecurityContextImpl"); return true; } catch (NoClassDefFoundError ex) { LOGGER.log(Level.WARNING, "SSPI unavailable (no Waffle/JNA libraries?)", ex); return false; } catch (ClassNotFoundException ex) { LOGGER.log(Level.WARNING, "SSPI unavailable (no Waffle/JNA libraries?)", ex); return false; } }
Source:
<code>public DataSource getNewDataSource() { if (switched) throw new IllegalStateException(); if (!isCurrent()) { switched = true; try { if (iter != null) { iter.close(); } iter = null; iterator(); } catch (Exception e) { <START> throw new RuntimeException(e); <END> } } return this; }</code><technical_language>I this changed : java } catch (IOException e) { throw new UncheckedIOException(e) }</technical_language>

Target:
public DataSource getNewDataSource() { if (switched) throw new IllegalStateException(); if (!isCurrent()) { switched = true; iter = null; try { iterator(); } catch (IOException e) { throw new RuntimeException(); } } return this; }
Source:
<code>public void deleteTableTest() throws Exception { List<Table> modelTables = getTables(); int amountBeforeDeletion = modelTables.size(); selectElementInTheModelexplorer(modelTables.get(0)); IHandler handler = getActiveHandler(); handler.execute((new ExecutionEvent(testedCommand, Collections.EMPTY_MAP, null, null))); modelTables = getTables(); Assert.assertEquals("The deletion of a table has no effect", amountBeforeDeletion - 1, modelTables.size()); <START> <END> }</code><technical_language>Please,a dd lines add NON-NLS tag TransactionalEditingDomain domain = ServiceUtilsForEObject.getInstance().getTransactionalEditingDomain(getRootOfTheModel()); domain.getCommandStack().undo(); modelTables = getTables(); Assert.assertEquals("The undo deletion of a table effect", amountBeforeDeletion, modelTables.size()); domain.getCommandStack().redo(); modelTables = getTables(); Assert.assertEquals("The redo deletion of a table effect", amountBeforeDeletion, modelTables.size()); domain.getCommandStack().undo(); modelTables = getTables(); Assert.assertEquals("The undo deletion of a table effect", amountBeforeDeletion, modelTables.size()); domain.getCommandStack().redo(); modelTables = getTables(); Assert.assertEquals("The redo deletion of a table effect", amountBeforeDeletion, modelTables.size());</technical_language>

Target:
public void deleteTableTest() throws Exception { List<Table> modelTables = getTables(); int amountBeforeDeletion = modelTables.size(); selectElementInTheModelexplorer(modelTables.get(0)); IHandler handler = getActiveHandler(); handler.execute((new ExecutionEvent(testedCommand, Collections.EMPTY_MAP, null, null))); modelTables = getTables(); Assert.assertEquals("The deletion of a table has no effect", amountBeforeDeletion - 1, modelTables.size()); TransactionalEditingDomain domain = ServiceUtilsForEObject.getInstance().getTransactionalEditingDomain(getRootOfTheModel()); domain.getCommandStack().undo(); modelTables = getTables(); Assert.assertEquals("The undo after the deletion of a table has no effect", amountBeforeDeletion, modelTables.size()); domain.getCommandStack().redo(); modelTables = getTables(); Assert.assertEquals("The redo after the deletion of a table has no effect", amountBeforeDeletion - 1, modelTables.size()); domain.getCommandStack().undo(); modelTables = getTables(); Assert.assertEquals("The undo after the deletion of a table has no effect", amountBeforeDeletion, modelTables.size()); domain.getCommandStack().redo(); modelTables = getTables(); Assert.assertEquals("The redo after the deletion of a table has no effect", amountBeforeDeletion - 1, modelTables.size()); }
Source:
<code>public <T> void notifyReadyAsync(Callable<T> callable, BiConsumer<T, Throwable> handler) { workerExecutor.execute(() -> { try { T result = callable.call(); executorToNotify.execute(() -> handler.accept(result, null)); } catch (Throwable t) { <START> LOG.error("Unexpected exception", t); <END> executorToNotify.execute(() -> handler.accept(null, t)); } }); }</code><technical_language>Remove / update this log line</technical_language>

Target:
public <T> void notifyReadyAsync(Callable<T> callable, BiConsumer<T, Throwable> handler) { workerExecutor.execute(() -> { try { T result = callable.call(); executorToNotify.execute(() -> handler.accept(result, null)); } catch (Throwable t) { executorToNotify.execute(() -> handler.accept(null, t)); } }); }
Source:
<code>public Table getTable(String dbName, String tableName) { Table table; try { synchronized(client) { table = HCatUtil.getTable(client, dbName, tableName); } } catch (RuntimeException e) { <START> throw new RuntimeException("Hive metastore exception", e); <END> } catch (Exception e) { throw new DatasetNotFoundException("Hive table lookup exception", e); } if (table == null) { throw new DatasetNotFoundException("Could not find info for table: " + tableName); } return table; }</code><technical_language>reason this is needed catch Exception? (Also, added in a cases - e.g. tableExists catch RuntimeException.) If do need this a DatasetException Kite</technical_language>

Target:
public Table getTable(String dbName, String tableName) { Table table; try { synchronized(client) { table = HCatUtil.getTable(client, dbName, tableName); } } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new DatasetNotFoundException("Hive table lookup exception", e); } if (table == null) { throw new DatasetNotFoundException("Could not find info for table: " + tableName); } return table; }
Source:
<code>public void onSelect(SelectEvent event) { int size = DynamicLayoutPanel.Layout.values().length; <START> DynamicLayoutPanel.Layout layout = DynamicLayoutPanel.Layout.values()[(layoutPanel.getLayout().ordinal() + 1) % size]; <END> layoutPanel.changeLayout(layout); }</code><technical_language>happen I add new elements enum</technical_language>

Target:
public void onSelect(SelectEvent event) { layoutPanel.changeLayout(layoutPanel.getLayout().getNext()); }
Source:
<code>public Promise<UsagesResponse> usages(TextDocumentPositionParams params) { return Promises.create( (resolve, reject) -> { requestTransmitter .newRequest() .endpointId(WS_AGENT_JSON_RPC_ENDPOINT_ID) .methodName("java/usages") .paramsAsDto(params) <START> .sendAndReceiveResultAsDto(UsagesResponse.class, 10000) <END> .onSuccess(resolve::apply) .onTimeout( () -> { reject.apply(JsPromiseError.create(new TimeoutException("Timeout"))); }) .onFailure( error -> { reject.apply(ServiceUtil.getPromiseError(error)); }); }); }</code><technical_language>Please this constant org.eclipse.che.ide.ext.java.shared.Constants#REQUEST_TIMEOUT</technical_language>

Target:
public Promise<UsagesResponse> usages(TextDocumentPositionParams params) { return Promises.create( (resolve, reject) -> { requestTransmitter .newRequest() .endpointId(WS_AGENT_JSON_RPC_ENDPOINT_ID) .methodName(USAGES) .paramsAsDto(params) .sendAndReceiveResultAsDto(UsagesResponse.class, REQUEST_TIMEOUT) .onSuccess(resolve::apply) .onTimeout(() -> reject.apply(JsPromiseError.create(new TimeoutException("Timeout")))) .onFailure(error -> reject.apply(ServiceUtil.getPromiseError(error))); }); }
Source:
<code>public Void visitDir(AbstractFile dir) { if (isDotDirectory(dir)) { return null; } dest.mkdir(); try { int numProcessed = 0; for (Content child : dir.getChildren()) { <START> if (child instanceof FsContent){ <END> java.io.File childFile = getFsContentDest(child); ExtractFscContentVisitor<T, V> childVisitor = new ExtractFscContentVisitor<>(childFile, progress, worker, false); if (worker != null && worker.isCancelled()) { break; } if (progress != null && source) { progress.progress(child.getName(), numProcessed); } child.accept(childVisitor); numProcessed++; } } } catch (TskCoreException ex) { logger.log(Level.SEVERE, "Trouble fetching children to extract.", ex); } return null; }</code><technical_language>right time, I misled you. This instanceof check is correct. visitor is supposed able "extract" LayoutFile, DerrivedFile, LocalFile, LocalFile recurse VirtualDirectory LocalDirectory. of classes extend AbstractFile, FsContent</technical_language>

Target:
public Void visitDir(AbstractFile dir) { if (isDotDirectory(dir)) { return null; } dest.mkdir(); try { int numProcessed = 0; for (Content child : dir.getChildren()) { if (child instanceof AbstractFile){ java.io.File childFile = getFsContentDest(child); ExtractFscContentVisitor<T, V> childVisitor = new ExtractFscContentVisitor<>(childFile, progress, worker, false); if (worker != null && worker.isCancelled()) { break; } if (progress != null && source) { progress.progress(child.getName(), numProcessed); } child.accept(childVisitor); numProcessed++; } } } catch (TskCoreException ex) { logger.log(Level.SEVERE, "Trouble fetching children to extract.", ex); } return null; }
Source:
<code><START> public AbstractMetricsRW(Clock clock) { <END> this.clock = clock; }</code><technical_language>public protected</technical_language>

Target:
protected AbstractMetricsRW(Clock clock) { this.clock = clock; }
Source:
<code>private static int getXForTime(Rectangle rect, long time0, double pixelsPerNanoSec, long time) { int x = rect.x + (int) (Math.floor((time - time0) * pixelsPerNanoSec)); return Math.min(Math.max(x, Integer.MIN_VALUE / <START> 256), <END> Integer.MAX_VALUE / 256); }</code><technical_language>magic number</technical_language>

Target:
private static int getXForTime(Rectangle rect, long time0, double pixelsPerNanoSec, long time) { int x = rect.x + (int) (Math.floor((time - time0) * pixelsPerNanoSec)); return Math.min(Math.max(x, -X_LIMIT), X_LIMIT); }
Source:
<code>public GoogleBuilder setSignInOptions(@NonNull GoogleSignInOptions options) { <START> if (getParams().containsKey(ExtraConstants.EXTRA_GOOGLE_SIGN_IN_OPTIONS)) { <END> throw new IllegalStateException( "Cannot overwrite previously set sign-in options."); } GoogleSignInOptions.Builder builder = new GoogleSignInOptions.Builder(options); builder.requestEmail().requestIdToken(getApplicationContext() .getString(R.string.default_web_client_id)); getParams().putParcelable( ExtraConstants.EXTRA_GOOGLE_SIGN_IN_OPTIONS, builder.build()); return this; }</code><technical_language>nit: checks of this style a lot, refactored a checkUnset(key, errorMsg) method</technical_language>

Target:
public GoogleBuilder setSignInOptions(@NonNull GoogleSignInOptions options) { Preconditions.checkUnset(getParams(), "Cannot overwrite previously set sign-in options.", ExtraConstants.EXTRA_GOOGLE_SIGN_IN_OPTIONS); GoogleSignInOptions.Builder builder = new GoogleSignInOptions.Builder(options); builder.requestEmail().requestIdToken(getApplicationContext() .getString(R.string.default_web_client_id)); getParams().putParcelable( ExtraConstants.EXTRA_GOOGLE_SIGN_IN_OPTIONS, builder.build()); return this; }
Source:
<code>private void verifyUsages(int line, int offset, TextRange... trs) { Collection<TextRange> textRanges = context.referencesForSymbolAt(componentKey, line, offset); <START> if (trs.length == 0) { <END> assertThat(textRanges).isEmpty(); } else { assertThat(textRanges).containsExactly(trs); } }</code><technical_language>need condition</technical_language>

Target:
private void verifyUsages(int line, int offset, TextRange... trs) { Collection<TextRange> textRanges = context.referencesForSymbolAt(componentKey, line, offset); assertThat(textRanges).containsExactly(trs); }
Source:
<code>public static WebAppDescriptor.Builder getBuilder() { <START> String p = System.getenv("withVladimir"); <END> System.out.println("HELLLLLLLLLLLLLLOOOOOOOOOOOOOO " + p); if (p == null || !"true".equalsIgnoreCase(p)) { return getBuilderForLegacyApi(); } else { return getBuilderForVladimir(); } }</code><technical_language>Consider: boolean p = Boolean.parseBoolean(System.getenv("withVlad")); This case-insensitive comparison 'null' input returns false, want here</technical_language>

Target:
public static WebAppDescriptor.Builder getBuilder() { boolean withVlad = Boolean.parseBoolean(System.getenv("withVladimir")); if (withVlad) { return getBuilderForLegacyApi(); } else { return getBuilderForVladimir(); } }
Source:
<code>public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } <START> if (getClass() != obj.getClass()) { <END> return false; } NetworkView other = (NetworkView) obj; if (compatibilityVersion == null) { if (other.compatibilityVersion != null) { return false; } } else if (!compatibilityVersion.equals(other.compatibilityVersion)) { return false; } if (network == null) { if (other.network != null) { return false; } } else if (!network.equals(other.network)) { return false; } if (storagePoolName == null) { if (other.storagePoolName != null) { return false; } } else if (!storagePoolName.equals(other.storagePoolName)) { return false; } return true; }</code><technical_language>instanceof comparison</technical_language>

Target:
public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof NetworkView)) { return false; } NetworkView other = (NetworkView) obj; if (getCompatibilityVersion() == null) { if (other.getCompatibilityVersion() != null) { return false; } } else if (!getCompatibilityVersion().equals(other.getCompatibilityVersion())) { return false; } if (getNetwork() == null) { if (other.getNetwork() != null) { return false; } } else if (!getNetwork().equals(other.getNetwork())) { return false; } if (getStoragePoolName() == null) { if (other.getStoragePoolName() != null) { return false; } } else if (!getStoragePoolName().equals(other.getStoragePoolName())) { return false; } return true; }
Source:
<code>public AbstractPcjIndexSetProvider(final Configuration conf) { <START> requireNonNull(conf); <END> this.conf = conf; }</code><technical_language>nit: this.conf = requireNonNull(conf);</technical_language>

Target:
public AbstractPcjIndexSetProvider(final Configuration conf) { this.conf = requireNonNull(conf); }
Source:
<code>public SimpleCertificateResponseMessageType listTemporaryAlias(SimpleCertificateRequestMessageType request) { try { SimpleCertificateResponseMessageType response = buildSimpleResponse(true, "Temporary Aliases"); CollectionUtils.addAll(response.getAliasList(), getTempKeystore().aliases()); return response; } catch (CertificateManagerException | KeyStoreException e) { LOG.error("Eror while getting temporary aliases list: {}", e.getLocalizedMessage(), e); <START> return buildSimpleResponse(false, "Fail to retrieve aliases list"); <END> } }</code><technical_language>Fail -> "Failed" aliases -> alias</technical_language>

Target:
public SimpleCertificateResponseMessageType listTemporaryAlias(SimpleCertificateRequestMessageType request) { try { SimpleCertificateResponseMessageType response = buildSimpleResponse(true, "Temporary Aliases"); CollectionUtils.addAll(response.getAliasList(), getTempKeystore().aliases()); return response; } catch (CertificateManagerException | KeyStoreException e) { LOG.error("Error while getting temporary alias list: {}", e.getLocalizedMessage(), e); return buildSimpleResponse(false, "Failed to retrieve alias list"); } }
Source:
<code>protected View onCreateAnswerView(Context context, FormEntryPrompt prompt, int answerFontSize) { binding = GeoWidgetAnswerBinding.inflate(((Activity) context).getLayoutInflater()); View answerView = binding.getRoot(); binding.geoAnswerText.setTextSize(TypedValue.COMPLEX_UNIT_DIP, answerFontSize); readOnly = prompt.isReadOnly(); if (readOnly) { binding.simpleButton.setVisibility(GONE); } else { binding.simpleButton.setText(getDefaultButtonLabel()); binding.simpleButton.setTextSize(TypedValue.COMPLEX_UNIT_DIP, answerFontSize); binding.simpleButton.setOnClickListener(v -> { Bundle bundle = GeoWidgetUtils.getGeoPointBundle(stringAnswer, accuracyThreshold, null, null); <START> GeoWidgetUtils.onButtonClick(context, prompt, getPermissionUtils(), null, <END> waitingForDataRegistry, GeoPointActivity.class, bundle, LOCATION_CAPTURE); }); } return answerView; }</code><technical_language>I want test shared behaviour good try hard responsibility of onButtonClick is here. For is ask for geo data for widget. feels interface called GeoDataRequester GeoDataFetcher methods requestPoint, requestShape etc: binding.simpleButton.setOnClickListener(v -> { geoDataRequester.requestPoint(promp); }); In of geo widgets a test requestPoint is called methods tested for some implementation of interface (ActivityGeoDataRequester). detail questions process is: 1. I shared code in multiple places sense test behaviour in place? 2. If not, is shared code responsible for? Is some kind of interface/object/entity responsible for that</technical_language>

Target:
protected View onCreateAnswerView(Context context, FormEntryPrompt prompt, int answerFontSize) { binding = GeoWidgetAnswerBinding.inflate(((Activity) context).getLayoutInflater()); binding.geoAnswerText.setTextSize(TypedValue.COMPLEX_UNIT_DIP, answerFontSize); if (prompt.isReadOnly()) { binding.simpleButton.setVisibility(GONE); } else { binding.simpleButton.setTextSize(TypedValue.COMPLEX_UNIT_DIP, answerFontSize); binding.simpleButton.setOnClickListener(v -> geoDataRequester.requestGeoPoint(context, prompt, answerText, waitingForDataRegistry)); } answerText = prompt.getAnswerText(); if (answerText != null && !answerText.isEmpty()) { binding.geoAnswerText.setText(GeoWidgetUtils.getAnswerToDisplay(getContext(), answerText)); binding.simpleButton.setText(R.string.change_location); } else { binding.simpleButton.setText(R.string.get_point); } return binding.getRoot(); }
Source:
<code>protected List<String> getTabCompleteOptions(Server server, User user, String commandLabel, String[] args) { if (args.length == 1) { <START> return Lists.newArrayList("set", "reset"); <END> } else if (args.length == 2) { return Lists.newArrayList("1", "2", "3", "4"); } else { return Collections.emptyList(); } }</code><technical_language>suggestion return Lists.newArrayList("set", "clear");</technical_language>

Target:
protected List<String> getTabCompleteOptions(Server server, User user, String commandLabel, String[] args) { if (args.length == 1) { return Lists.newArrayList("set", "clear"); } else if (args.length == 2) { return Lists.newArrayList("1", "2", "3", "4"); } else { return Collections.emptyList(); } }
Source:
<code>public void partDeactivated(IWorkbenchPart part) { if ((part == AbstractTimeGraphView.this) && (fFindHandlerActivation != null)) { final Object service = PlatformUI.getWorkbench().getService(IHandlerService.class); <START> ((IHandlerService) service).deactivateHandler(fFindHandlerActivation); <END> } }</code><technical_language>Set null deactivation ensure reactivation</technical_language>

Target:
public void partDeactivated(IWorkbenchPart part) { if ((part == AbstractTimeGraphView.this) && (fFindHandlerActivation != null)) { final Object service = PlatformUI.getWorkbench().getService(IHandlerService.class); ((IHandlerService) service).deactivateHandler(fFindHandlerActivation); fFindHandlerActivation = null; } }
Source:
<code>protected Object readArray(Object old, Schema expected, ResolvingDecoder in) throws IOException { Schema expectedType = expected.getElementType(); long l = in.readArrayStart(); if (l <= 0) { return newArray(old, 0, expected); } Object array = newArray(old, (int) l, expected); if (array instanceof Collection) { @SuppressWarnings("unchecked") Collection<Object> c = (Collection<Object>) array; return readCollection(c, expectedType, l, in); } else if (array instanceof Map <START> && ReflectData.isMapWithNonStringKeysSchema(expected)) { <END> Collection<Object> c = new ArrayList<Object> (); readCollection(c, expectedType, l, in); Map m = (Map)array; for (Object ele: c) { IndexedRecord rec = ((IndexedRecord)ele); Object key = rec.get(ReflectData.NS_MAP_KEY_INDEX); Object value = rec.get(ReflectData.NS_MAP_VALUE_INDEX); m.put (key, value); } return array; } else { return readJavaArray(array, expectedType, l, in); } }</code><technical_language>I Schema condition validated in block removed. If object is a Map, schema match. In case schema match error throw AvroRuntimeException. Right now, if object match expected Schema, code assumes object is a java array, is false. If object is a Map, created (or validated) newArray(Object, int, Schema). overridden, I a check throw is right solution</technical_language>

Target:
protected Object readArray(Object old, Schema expected, ResolvingDecoder in) throws IOException { Schema expectedType = expected.getElementType(); long l = in.readArrayStart(); if (l <= 0) { return newArray(old, 0, expected); } Object array = newArray(old, (int) l, expected); if (array instanceof Collection) { @SuppressWarnings("unchecked") Collection<Object> c = (Collection<Object>) array; return readCollection(c, expectedType, l, in); } else if (array instanceof Map) { if (ReflectData.isNonStringMapSchema(expected)) { Collection<Object> c = new ArrayList<Object> (); readCollection(c, expectedType, l, in); Map m = (Map)array; for (Object ele: c) { IndexedRecord rec = ((IndexedRecord)ele); Object key = rec.get(ReflectData.NS_MAP_KEY_INDEX); Object value = rec.get(ReflectData.NS_MAP_VALUE_INDEX); m.put (key, value); } return array; } else { String msg = "Expected a schema of map with non-string keys but got " + expected; throw new AvroRuntimeException(msg); } } else { return readJavaArray(array, expectedType, l, in); } }