auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void setHeader(String headerTitle) { HTMLPanel headerTitlePanel = new <START> HTMLPanel <END> ("H4", headerTitle); headerTitlePanel.addStyleName(Styles.MODAL_TITLE); headerTitlePanel.getElement().getStyle().setFloat(Float.LEFT); if (header.getWidgetCount() > 2) { header.remove(header.getWidgetCount() - 1); } header.add(headerTitlePanel); addHelpButtonHandler(); helpIconButtonTooltip.setText(constants.clickForHelp()); }</code><technical_language>Nit-pick: please remove this space</technical_language>

Target:
public void setHeader(String headerTitle) { HTMLPanel headerTitlePanel = new HTMLPanel("H4", headerTitle); headerTitlePanel.addStyleName(Styles.MODAL_TITLE); headerTitlePanel.getElement().getStyle().setFloat(Float.LEFT); while (header.getWidgetCount() > 2) { header.remove(header.getWidgetCount() - 1); } header.add(headerTitlePanel); addHelpButtonHandler(); helpIconButtonTooltip.setText(constants.clickForHelp()); }
Source:
<code><START> boolean tryAdd(final EventData eventData) { <END> if (eventData == null) { throw logger.logExceptionAsWarning(new IllegalArgumentException("eventData cannot be null")); } EventData event = tracerProvider.isEnabled() ? traceMessageSpan(eventData) : eventData; final int size; try { size = getSize(event, events.isEmpty()); } catch (BufferOverflowException exception) { throw logger.logExceptionAsWarning(new AmqpException(false, AmqpErrorCondition.LINK_PAYLOAD_SIZE_EXCEEDED, String.format(Locale.US, "Size of the payload exceeded maximum message size: %s kb", maxMessageSize / 1024), contextProvider.getErrorContext())); } synchronized (lock) { if (this.sizeInBytes + size > this.maxMessageSize) { return false; } this.sizeInBytes += size; } this.events.add(event); return true; }</code><technical_language>this get overridden in subtypes</technical_language>

Target:
boolean tryAdd(final EventData eventData) { if (eventData == null) { throw logger.logExceptionAsWarning(new NullPointerException("eventData cannot be null")); } EventData event = tracerProvider.isEnabled() ? traceMessageSpan(eventData) : eventData; final int size; try { size = getSize(event, events.isEmpty()); } catch (BufferOverflowException exception) { throw logger.logExceptionAsWarning(new AmqpException(false, AmqpErrorCondition.LINK_PAYLOAD_SIZE_EXCEEDED, String.format(Locale.US, "Size of the payload exceeded maximum message size: %s kb", maxMessageSize / 1024), contextProvider.getErrorContext())); } synchronized (lock) { if (this.sizeInBytes + size > this.maxMessageSize) { return false; } this.sizeInBytes += size; } this.events.add(event); return true; }
Source:
<code>public Optional<SolrConfiguration> getSolrConfiguration() { <START> return null; <END> }</code><technical_language>Optional.empty()</technical_language>

Target:
public Optional<SolrConfiguration> getSolrConfiguration() { return Optional.empty(); }
Source:
<code>public boolean isEqualTo(StateChange stateChange) { if (stateChange instanceof SetViewportSizeOf) { <START> return this.fboName.equals(((SetViewportSizeOf) stateChange).fboName); <END> } return false; }</code><technical_language>this generate error? fboName is private. this is a quirk of java I know. In case implement a getter write: return this.fboName.equals(((SetViewportSizeOf) stateChange).getFboName());</technical_language>

Target:
public boolean isEqualTo(StateChange stateChange) { if (stateChange instanceof SetViewportSizeOf) { return this.fboName.equals(((SetViewportSizeOf) stateChange).getFboName()); } return false; }
Source:
<code>public RecyclerViewIndicatorDotDecor(int radius, int padding, int indicatorHeight, @ColorInt int colorInactive, @ColorInt int colorActive) { <START> float strokeWidth = Resources.getSystem().getDisplayMetrics().density * 1; this.radius = radius; inactivePaint.setStrokeCap(Paint.Cap.ROUND); inactivePaint.setStrokeWidth(strokeWidth); inactivePaint.setStyle(Paint.Style.FILL); inactivePaint.setAntiAlias(true); inactivePaint.setColor(colorInactive); activePaint.setStrokeCap(Paint.Cap.ROUND); activePaint.setStrokeWidth(strokeWidth); activePaint.setStyle(Paint.Style.FILL); activePaint.setAntiAlias(true); activePaint.setColor(colorActive); this.indicatorItemPadding = padding; this.indicatorHeight = indicatorHeight; <END> }</code><technical_language>This is minor is rearrange code this? this.radius = radius; this.indicatorItemPadding = padding; this.indicatorHeight = indicatorHeight; float strokeWidth = Resources.getSystem().getDisplayMetrics().density * 1; inactivePaint.setStrokeCap(Paint.Cap.ROUND); inactivePaint.setStrokeWidth(strokeWidth); inactivePaint.setStyle(Paint.Style.FILL); inactivePaint.setAntiAlias(true); inactivePaint.setColor(colorInactive); activePaint.setStrokeCap(Paint.Cap.ROUND); activePaint.setStrokeWidth(strokeWidth); activePaint.setStyle(Paint.Style.FILL); activePaint.setAntiAlias(true); activePaint.setColor(colorActive);</technical_language>

Target:
public RecyclerViewIndicatorDotDecor(int radius, int padding, int indicatorHeight, @ColorInt int colorInactive, @ColorInt int colorActive) { this.radius = radius; this.indicatorItemPadding = padding; this.indicatorHeight = indicatorHeight; float strokeWidth = Resources.getSystem().getDisplayMetrics().density * 1; inactivePaint.setStrokeCap(Paint.Cap.ROUND); inactivePaint.setStrokeWidth(strokeWidth); inactivePaint.setStyle(Paint.Style.FILL); inactivePaint.setAntiAlias(true); inactivePaint.setColor(colorInactive); activePaint.setStrokeCap(Paint.Cap.ROUND); activePaint.setStrokeWidth(strokeWidth); activePaint.setStyle(Paint.Style.FILL); activePaint.setAntiAlias(true); activePaint.setColor(colorActive); }
Source:
<code>public Iterator<ResultHandler.ComparableRow> iterator() { if (wasFailed()) return Collections.emptyListIterator(); return new AbstractIterator<ResultHandler.ComparableRow>() { Iterator<Row> iter = resultSet.iterator(); protected ResultHandler.ComparableRow computeNext() { if (iter.hasNext()) <START> { <END> return new DriverRow(iter.next()); } return endOfData(); } }; }</code><technical_language>Unnecessary braces for single statement block (there bunch of in this file)</technical_language>

Target:
public Iterator<ResultHandler.ComparableRow> iterator() { if (wasFailed()) return Collections.emptyListIterator(); return new AbstractIterator<ResultHandler.ComparableRow>() { Iterator<Row> iter = resultSet.iterator(); protected ResultHandler.ComparableRow computeNext() { if (iter.hasNext()) return new DriverRow(iter.next()); return endOfData(); } }; }
Source:
<code>public void onMinecartPass(EntityMinecart cart) { if (isPowered()) { double speed = Math.sqrt(cart.motionX * cart.motionX + cart.motionZ * cart.motionZ); BlockRailBase.EnumRailDirection dir = getRailDirectionRaw(); World world = theWorldAsserted(); if (speed > BOOST_THRESHOLD) { BlockRailBase.EnumRailDirection trackShape = getRailDirectionRaw(); boolean highSpeed = CartTools.isTravellingHighSpeed(cart); if (TrackShapeHelper.isNorthSouth(trackShape)) { if (reversed ^ cart.motionZ < 0) { boostCartSpeed(cart, speed); } else { slowOrNormalCartSpeed(cart, highSpeed); } } else { if (!reversed ^ cart.motionX < 0) { boostCartSpeed(cart, speed); } else { slowOrNormalCartSpeed(cart, highSpeed); } } } else if (dir == BlockRailBase.EnumRailDirection.EAST_WEST) { if (world.isSideSolid(getPos().west(), EnumFacing.EAST)) { cart.motionX = START_BOOST; } else if (world.isSideSolid(getPos().east(), EnumFacing.WEST)) { cart.motionX = -START_BOOST; } } else if (dir == BlockRailBase.EnumRailDirection.NORTH_SOUTH) { if (world.isSideSolid(getPos().north(), EnumFacing.SOUTH)) { cart.motionZ = START_BOOST; } else if (world.isSideSolid(getPos().south(), EnumFacing.NORTH)) { cart.motionZ = -START_BOOST; <START> } <END> } } }</code><technical_language>This share some code Booster if add it</technical_language>

Target:
public void onMinecartPass(EntityMinecart cart) { if (isPowered()) { double speed = Math.sqrt(cart.motionX * cart.motionX + cart.motionZ * cart.motionZ); if (speed > BOOST_THRESHOLD) { BlockRailBase.EnumRailDirection trackShape = getRailDirectionRaw(); boolean highSpeed = CartTools.isTravellingHighSpeed(cart); if (TrackShapeHelper.isNorthSouth(trackShape)) { if (reversed ^ cart.motionZ < 0) { boostCartSpeed(cart, speed); } else { slowOrNormalCartSpeed(cart, highSpeed); } } else { if (!reversed ^ cart.motionX < 0) { boostCartSpeed(cart, speed); } else { slowOrNormalCartSpeed(cart, highSpeed); } } } else { CartTools.startBoost(cart, getPos(), getRailDirectionRaw(), START_BOOST); } } }
Source:
<code>private void handleNiInEs(GpsNiNotification notif) { if (DEBUG) Log.d(TAG, "in handleNiInEs () :" + " niType: " + notif.niType + " notificationId: " + notif.notificationId); boolean isUEInEmergencyMode = mIsInEmergency || Boolean.parseBoolean(SystemProperties.get(TelephonyProperties.PROPERTY_INECM_MODE)); boolean isNiTypeES = notif.niType == <START> GPS_NI_TYPE_EMERGENCY_SUPL ? true : false; <END> if (isNiTypeES != isUEInEmergencyMode) { try { mNetInitiatedListener.sendNiResponse(notif.notificationId, GPS_NI_RESPONSE_IGNORE); } catch (RemoteException e) { Log.e(TAG, "RemoteException in sendNiResponse"); } } else { handleNi(notif); } }</code><technical_language>this redundant</technical_language>

Target:
private void handleNiInEs(GpsNiNotification notif) { if (DEBUG) Log.d(TAG, "in handleNiInEs () :" + " niType: " + notif.niType + " notificationId: " + notif.notificationId); boolean isUEInEmergencyMode = mIsInEmergency || Boolean.parseBoolean(SystemProperties.get(TelephonyProperties.PROPERTY_INECM_MODE)); boolean isNiTypeES = (notif.niType == GPS_NI_TYPE_EMERGENCY_SUPL); if (isNiTypeES != isUEInEmergencyMode) { try { mNetInitiatedListener.sendNiResponse(notif.notificationId, GPS_NI_RESPONSE_IGNORE); } catch (RemoteException e) { Log.e(TAG, "RemoteException in sendNiResponse"); } } else { handleNi(notif); } }
Source:
<code>public void testIsTypeConstrainedForConstructorReturnValueConstrainedType() { BeanDescriptor descriptor = getBeanDescriptor( ConstructorReturnValueConstrainedType.class ); assertFalse( descriptor.isBeanConstrained(), "The entity should have no bean constraints" ); assertTrue( descriptor.getConstrainedMethods( MethodType.NON_GETTER, MethodType.GETTER ).isEmpty(), <START> "The entity should have no constraint methods" <END> ); assertTrue( descriptor.getConstrainedConstructors().size() == 1, "The entity should have a constrained constructor" ); }</code><technical_language>constrained</technical_language>

Target:
public void testIsTypeConstrainedForConstructorReturnValueConstrainedType() { BeanDescriptor descriptor = getBeanDescriptor( ConstructorReturnValueConstrainedType.class ); assertFalse( descriptor.isBeanConstrained(), "The entity should have no bean constraints" ); assertTrue( descriptor.getConstrainedMethods( MethodType.NON_GETTER, MethodType.GETTER ).isEmpty(), "The entity should have no constrained methods" ); assertTrue( descriptor.getConstrainedConstructors().size() == 1, "The entity should have a constrained constructor" ); }
Source:
<code>public static final IntList lineMap(final byte[] buf, int ptr, int end) { IntList map = new IntList((end - ptr) / 36); map.add(Integer.MIN_VALUE); boolean foundLF = true; for (; ptr < end; ptr++) { if (foundLF) { map.add(ptr); } if (buf[ptr] == '\0') { map = new IntList(3); map.add(Integer.MIN_VALUE); <START> map.add(0); <END> break; } foundLF = (buf[ptr] == '\n'); } map.add(end); return map; }</code><technical_language>Do want 0 initial of ptr</technical_language>

Target:
public static final IntList lineMap(final byte[] buf, int ptr, int end) { int start = ptr; IntList map = new IntList((end - ptr) / 36); map.add(Integer.MIN_VALUE); boolean foundLF = true; for (; ptr < end; ptr++) { if (foundLF) { map.add(ptr); } if (buf[ptr] == '\0') { map = new IntList(3); map.add(Integer.MIN_VALUE); map.add(start); break; } foundLF = (buf[ptr] == '\n'); } map.add(end); return map; }
Source:
<code>private static Type getPrestoType(String elasticsearchType) { switch (elasticsearchType) { case "double": case "float": return DOUBLE; case "integer": return INTEGER; case "long": return BIGINT; case "string": return VARCHAR; case "boolean": return BOOLEAN; case "binary": return VARBINARY; default: <START> return VARCHAR; <END> } }</code><technical_language>default case of varchar work fine for other presto types handled in cases above</technical_language>

Target:
private static Type getPrestoType(String elasticsearchType) { switch (elasticsearchType) { case "double": case "float": return DOUBLE; case "integer": return INTEGER; case "long": return BIGINT; case "string": case "text": case "keyword": return VARCHAR; case "boolean": return BOOLEAN; case "binary": return VARBINARY; default: throw new IllegalArgumentException("Not supported Elasticsearch type: " + elasticsearchType); } }
Source:
<code>public KafkaProducer<Long, Object> createProducer() { Properties properties = new Properties(); properties.setProperty(BOOTSTRAP_SERVERS_CONFIG, getConnectString()); properties.setProperty(VALUE_SERIALIZER_CLASS_CONFIG, JsonEncoder.class.getName()); properties.setProperty(KEY_SERIALIZER_CLASS_CONFIG, LongSerializer.class.getName()); <START> properties.setProperty(PARTITIONER_CLASS_CONFIG, DefaultPartitioner.class.getName()); <END> properties.setProperty(ACKS_CONFIG, "1"); return new KafkaProducer<>(properties); }</code><technical_language>Default partitioner is default. Need specify</technical_language>

Target:
public KafkaProducer<Long, Object> createProducer() { Properties properties = new Properties(); properties.setProperty(BOOTSTRAP_SERVERS_CONFIG, getConnectString()); properties.setProperty(VALUE_SERIALIZER_CLASS_CONFIG, JsonEncoder.class.getName()); properties.setProperty(KEY_SERIALIZER_CLASS_CONFIG, LongSerializer.class.getName()); properties.setProperty(ACKS_CONFIG, "1"); return new KafkaProducer<>(properties); }
Source:
<code>private View getFontStyleOwnerView() { <START> if (this instanceof DNodeListElementEditPart) { return (View) getModel(); } else { <END> return getPrimaryView(); } }</code><technical_language>This done in DNodeListElementEditPart</technical_language>

Target:
protected View getFontStyleOwnerView() { return getPrimaryView(); }
Source:
<code><START> Map<String, Set<String>> getAllConnectorTaskLocks(String connector) { <END> return _zkclient.getChildren(KeyBuilder.datastreamTaskLockRoot(_cluster, connector)) .stream() .collect(Collectors.toMap(Function.identity(), x -> new HashSet<>(_zkclient.getChildren(KeyBuilder.datastreamTaskLockPrefix(_cluster, connector, x))))); }</code><technical_language>This method is N roundtrips ZK N's number of unique task prefixes in cluster. This number is close 1500 in of bigger change capture clusters atm. calling this out in case extended lock cleanup duration issues</technical_language>

Target:
Map<String, Set<String>> getAllConnectorTaskLocks(String connector) { return _zkclient.getChildren(KeyBuilder.datastreamTaskLockRoot(_cluster, connector)) .stream() .collect(Collectors.toMap(Function.identity(), prefix -> new HashSet<>(_zkclient.getChildren(KeyBuilder.datastreamTaskLockPrefix(_cluster, connector, prefix))))); }
Source:
<code>public FormInstance parse() throws InvalidStructureException, IOException, XmlPullParserException, UnfullfilledRequirementsException { this.checkNode("fixture"); String fixtureId = parser.getAttributeValue(null, "id"); if (fixtureId == null) { throw new InvalidStructureException("fixture is lacking id attribute", parser); } String userId = parser.getAttributeValue(null, "user_id"); TreeElement root; if (nextTagInBlock("fixture")) { root = new TreeElementParser(parser, 0, fixtureId).parse(); } else { <START> root = new TreeElement(); <END> } FormInstance instance = new FormInstance(root, fixtureId); if (userId != null) { instance.schema = userId; } if (storage() != null) { int recordId = -1; Vector<Integer> matchingFixtures = storage().getIDsForValue(FormInstance.META_ID, fixtureId); if (matchingFixtures.size() > 0) { Vector<Integer> matchingUsers = storage().getIDsForValue(FormInstance.META_XMLNS, ExtUtil.emptyIfNull(userId)); for (Integer i : matchingFixtures) { if (matchingUsers.indexOf(i) != -1) { recordId = i.intValue(); } } } if (recordId != -1) { if (!overwrite) { return instance; } instance.setID(recordId); } } commit(instance); return instance; }</code><technical_language>Oh, do need one? If empty fixture, I need add a record DB. I empty <fixture/> tag delete existing fixture entirely. a meaningful "Base" element this</technical_language>

Target:
public FormInstance parse() throws InvalidStructureException, IOException, XmlPullParserException, UnfullfilledRequirementsException { this.checkNode("fixture"); String fixtureId = parser.getAttributeValue(null, "id"); if (fixtureId == null) { throw new InvalidStructureException("fixture is lacking id attribute", parser); } String userId = parser.getAttributeValue(null, "user_id"); TreeElement root; if (!nextTagInBlock("fixture")) { return null; } root = new TreeElementParser(parser, 0, fixtureId).parse(); FormInstance instance = new FormInstance(root, fixtureId); if (userId != null) { instance.schema = userId; } if (storage() != null) { int recordId = -1; Vector<Integer> matchingFixtures = storage().getIDsForValue(FormInstance.META_ID, fixtureId); if (matchingFixtures.size() > 0) { Vector<Integer> matchingUsers = storage().getIDsForValue(FormInstance.META_XMLNS, ExtUtil.emptyIfNull(userId)); for (Integer i : matchingFixtures) { if (matchingUsers.indexOf(i) != -1) { recordId = i.intValue(); } } } if (recordId != -1) { if (!overwrite) { return instance; } instance.setID(recordId); } } commit(instance); return instance; }
Source:
<code>private Map<VirtualFile, Collection<LiveIssue>> flagFailedFiles(Collection<VirtualFile> analyzed, Collection<ClientInputFile> failedAnalysisFiles) { Map<VirtualFile, Collection<LiveIssue>> map = new HashMap<>(); Set<VirtualFile> failedVirtualFiles = failedAnalysisFiles.stream().map(f -> (VirtualFile) f.getClientObject()).collect(Collectors.toSet()); for (VirtualFile f : analyzed) { if (failedVirtualFiles.contains(f)) { <START> console.error("File won't be refreshed because there were errors during analysis: " + f.getPath()); <END> manager.addFileWithErrors(f); } else { manager.removeFileWithErrors(f); } map.put(f, new ArrayList<>()); } return map; }</code><technical_language>I this error log. happen frequently</technical_language>

Target:
private Map<VirtualFile, Collection<LiveIssue>> flagFailedFiles(Collection<VirtualFile> analyzed, Collection<ClientInputFile> failedAnalysisFiles) { Map<VirtualFile, Collection<LiveIssue>> map = new HashMap<>(); Set<VirtualFile> failedVirtualFiles = asVirtualFiles(failedAnalysisFiles); for (VirtualFile f : analyzed) { if (failedVirtualFiles.contains(f)) { manager.addFileWithErrors(f); } else { manager.removeFileWithErrors(f); } map.put(f, new ArrayList<>()); } return map; }
Source:
<code>public GraphQLSchema build() { Set<Class<?>> allClasses = dictionary.getBindings(); if (allClasses.isEmpty()) { throw new IllegalArgumentException("None of the provided classes are exported by Elide"); } Set<Class<?>> rootClasses = allClasses.stream().filter(dictionary::isRoot).collect(Collectors.toSet()); dictionary.walkEntityGraph(rootClasses, this::buildInputObjectStub); resolveInputObjectRelationships(); GraphQLObjectType.Builder root = newObject().name("root"); for (Class<?> clazz : rootClasses) { String entityName = dictionary.getJsonAliasFor(clazz); root.field(newFieldDefinition() .name(entityName) .dataFetcher(dataFetcher) .argument(relationshipOpArg) .argument(idArgument) .argument(filterArgument) .argument(sortArgument) .argument(pageFirstArgument) .argument(pageOffsetArgument) .argument(buildInputObjectArgument(clazz, true)) <START> .type(buildQueryObject(clazz))); <END> } dictionary.walkEntityGraph(rootClasses, this::buildQueryObject); GraphQLSchema schema = GraphQLSchema.newSchema() .query(root) .mutation(root) .build(new HashSet<>(CollectionUtils.union( queryObjectRegistry.values(), inputObjectRegistry.values() ))); return schema; }</code><technical_language>buildQueryObject build connections (like should). builds GraphQLObjects connections. root object a set of connections</technical_language>

Target:
public GraphQLSchema build() { Set<Class<?>> allClasses = dictionary.getBindings(); if (allClasses.isEmpty()) { throw new IllegalArgumentException("None of the provided classes are exported by Elide"); } Set<Class<?>> rootClasses = allClasses.stream().filter(dictionary::isRoot).collect(Collectors.toSet()); dictionary.walkEntityGraph(rootClasses, this::buildInputObjectStub); resolveInputObjectRelationships(); GraphQLObjectType.Builder root = newObject().name("root"); for (Class<?> clazz : rootClasses) { String entityName = dictionary.getJsonAliasFor(clazz); root.field(newFieldDefinition() .name(entityName) .dataFetcher(dataFetcher) .argument(relationshipOpArg) .argument(idArgument) .argument(filterArgument) .argument(sortArgument) .argument(pageFirstArgument) .argument(pageOffsetArgument) .argument(buildInputObjectArgument(clazz, true)) .type(buildConnectionObject(clazz))); } dictionary.walkEntityGraph(rootClasses, this::buildConnectionObject); GraphQLSchema schema = GraphQLSchema.newSchema() .query(root) .mutation(root) .build(new HashSet<>(CollectionUtils.union( connectionObjectRegistry.values(), inputObjectRegistry.values() ))); return schema; }
Source:
<code>public void onServiceConnected(IBinder binder) { if (connectState != ConnectState.IDLE) { connectState = ConnectState.CONNECTED; if (eventCallbacks != null) { eventCallbacks.onServiceConnected(binder); } if (!connectionCallbacks.isEmpty()) { <START> final Set<ConnectionCallbacks> copy = new HashSet<>(connectionCallbacks); <END> for (LostApiClient.ConnectionCallbacks callbacks : copy) { callbacks.onConnected(); } } } }</code><technical_language>copy ArrayList reserve memory</technical_language>

Target:
public void onServiceConnected(IBinder binder) { if (connectState != ConnectState.IDLE) { connectState = ConnectState.CONNECTED; if (eventCallbacks != null) { eventCallbacks.onServiceConnected(binder); } if (!connectionCallbacks.isEmpty()) { final ArrayList<ConnectionCallbacks> copy = new ArrayList<>(connectionCallbacks); for (LostApiClient.ConnectionCallbacks callbacks : copy) { callbacks.onConnected(); } } } }
Source:
<code>public void write(Enriched<EntityType> enrichable, JsonGenerator jg) { try { write(jg, enrichable.getEntity()); } catch (IOException e) { <START> log.error(e); <END> } }</code><technical_language>log.error(e, e) wrote stacktrace is logged. worth adding a // TODO collect exception return caller</technical_language>

Target:
public void write(Enriched<EntityType> enrichable, JsonGenerator jg) { try { write(jg, enrichable.getEntity()); } catch (Exception e) { if (e instanceof InterruptedException) { Thread.currentThread().interrupt(); throw new RuntimeException("interrupted", e); } else { log.info("enrichment failed", e); } } }
Source:
<code>public AbstractSpanBatchInformation(int batchSize, Task task, Column column, Span span) { super(batchSize, task, column); <START> Preconditions.checkNotNull(span); <END> this.span = span; }</code><technical_language>this.span = checkNotNull(span)</technical_language>

Target:
public AbstractSpanBatchInformation(int batchSize, Task task, Column column, Span span) { super(batchSize, task, column); this.span = Preconditions.checkNotNull(span); }
Source:
<code>protected void refreshLunsInfo(List<LUNs> lunsFromVgInfo, List<LUNs> lunsFromDb) { for (LUNs lunFromVgInfo : lunsFromVgInfo) { LUNs lunFromDB = getLunDao().get(lunFromVgInfo.getLUN_id()); if (lunFromDB == null) { getLunDao().save(lunFromVgInfo); log.infoFormat("New LUN discovered, ID: {0}", lunFromVgInfo.getLUN_id()); } else if (lunFromDB.getDeviceSize() != lunFromVgInfo.getDeviceSize()) { getLunDao().updateLUNsDeviceSize(lunFromVgInfo.getLUN_id(), lunFromVgInfo.getDeviceSize()); <START> log.infoFormat("Updated LUN device size, ID: {0}", lunFromVgInfo.getLUN_id()); <END> } for (StorageServerConnections connection : lunFromVgInfo.getLunConnections()) { StorageServerConnections connectionFromDb = getStorageServerConnectionDAO().getForIqn(connection.getiqn()); if (connectionFromDb == null) { continue; } LUN_storage_server_connection_map lunConnection = new LUN_storage_server_connection_map( lunFromVgInfo.getLUN_id(), connectionFromDb.getid()); if (getStorageServerConnectionLunMapDao().get(lunConnection.getId()) == null) { getStorageServerConnectionLunMapDao().save(lunConnection); } } } for (LUNs lunFromDb : lunsFromDb) { if (!isDummyLun(lunFromDb) && !containsLun(lunsFromVgInfo, lunFromDb)) { getLunDao().remove(lunFromDb.getLUN_id()); log.infoFormat("Removed LUN ID: {0}", lunFromDb.getLUN_id()); } } }</code><technical_language>log new sizes well? (could debugging awry)</technical_language>

Target:
protected void refreshLunsInfo(List<LUNs> lunsFromVgInfo, List<LUNs> lunsFromDb) { for (LUNs lunFromVgInfo : lunsFromVgInfo) { LUNs lunFromDB = getLunDao().get(lunFromVgInfo.getLUN_id()); if (lunFromDB == null) { getLunDao().save(lunFromVgInfo); log.infoFormat("New LUN discovered, ID: {0}", lunFromVgInfo.getLUN_id()); } else if (lunFromDB.getDeviceSize() != lunFromVgInfo.getDeviceSize()) { getLunDao().updateLUNsDeviceSize(lunFromVgInfo.getLUN_id(), lunFromVgInfo.getDeviceSize()); log.infoFormat("Updated LUN device size - ID: {0}, previous size: {1}, new size: {2}.", lunFromVgInfo.getLUN_id(), lunFromDB.getDeviceSize(), lunFromVgInfo.getDeviceSize()); } for (StorageServerConnections connection : lunFromVgInfo.getLunConnections()) { StorageServerConnections connectionFromDb = getStorageServerConnectionDAO().getForIqn(connection.getiqn()); if (connectionFromDb == null) { continue; } LUN_storage_server_connection_map lunConnection = new LUN_storage_server_connection_map( lunFromVgInfo.getLUN_id(), connectionFromDb.getid()); if (getStorageServerConnectionLunMapDao().get(lunConnection.getId()) == null) { getStorageServerConnectionLunMapDao().save(lunConnection); } } } for (LUNs lunFromDb : lunsFromDb) { if (!isDummyLun(lunFromDb) && !containsLun(lunsFromVgInfo, lunFromDb)) { getLunDao().remove(lunFromDb.getLUN_id()); log.infoFormat("Removed LUN ID: {0}", lunFromDb.getLUN_id()); } } }
Source:
<code>Mono<PagedResponse<String>> queryFirstPage(String query, Context context) { QuerySpecification querySpecification = new QuerySpecification(); <START> querySpecification <END> .setQuery(query); return protocolLayer .getQueries() .queryTwinsWithResponseAsync(querySpecification, context) .map(objectPagedResponse -> new PagedResponseBase<>( objectPagedResponse.getRequest(), objectPagedResponse.getStatusCode(), objectPagedResponse.getHeaders(), objectPagedResponse.getValue().getItems().stream() .map(object -> { try { return mapper.writeValueAsString(object); } catch (JsonProcessingException e) { logger.error("JsonProcessingException occurred while retrieving query result items: ", e); throw new RuntimeException("JsonProcessingException occurred while retrieving query result items", e); } }) .filter(Objects::nonNull) .collect(Collectors.toList()), objectPagedResponse.getValue().getContinuationToken(), objectPagedResponse.getDeserializedHeaders())); }</code><technical_language>QuerySpecification fluent setters</technical_language>

Target:
Mono<PagedResponse<String>> queryFirstPage(String query, Context context) { QuerySpecification querySpecification = new QuerySpecification().setQuery(query); return protocolLayer .getQueries() .queryTwinsWithResponseAsync(querySpecification, context) .map(objectPagedResponse -> new PagedResponseBase<>( objectPagedResponse.getRequest(), objectPagedResponse.getStatusCode(), objectPagedResponse.getHeaders(), objectPagedResponse.getValue().getItems().stream() .map(object -> { try { return mapper.writeValueAsString(object); } catch (JsonProcessingException e) { logger.error("JsonProcessingException occurred while retrieving query result items: ", e); throw new RuntimeException("JsonProcessingException occurred while retrieving query result items", e); } }) .filter(Objects::nonNull) .collect(Collectors.toList()), objectPagedResponse.getValue().getContinuationToken(), objectPagedResponse.getDeserializedHeaders())); }
Source:
<code>private void receiveAndSend(JmsTemplate template) { javax.jms.Message request = template.receive(requestQueue7); final javax.jms.Message jmsReply = request; try { template.send(request.getJMSReplyTo(), (MessageCreator) session -> jmsReply); } catch (JmsException e) { } <START> catch (JMSException e) { <END> } }</code><technical_language>multi-catch if pursuit modern style :smile: : <LINK_0> ![multi-catch](<LINK_1> pay attention MessageCreator cast is redundant. lambdas need final for passed variables. So, this block simplified this: private void receiveAndSend(JmsTemplate template) { javax.jms.Message request = template.receive(requestQueue7); try { template.send(request.getJMSReplyTo(), session -> request); } catch (JmsException | JMSException e) { } }</technical_language>

Target:
private void receiveAndSend(JmsTemplate template) { javax.jms.Message request = template.receive(requestQueue7); final javax.jms.Message jmsReply = request; try { template.send(request.getJMSReplyTo(), (MessageCreator) session -> jmsReply); } catch (JmsException | JMSException e) { } }
Source:
<code><START> public void update(float delta) { <END> Iterable<EntityRef> characterEntities = entityManager.getEntitiesWith(CharacterComponent.class, LocationComponent.class); for (EntityRef characterEntity: characterEntities) { CharacterComponent characterComponent = characterEntity.getComponent(CharacterComponent.class); if (characterComponent == null) { continue; } LocationComponent characterLocation = characterEntity.getComponent(LocationComponent.class); if (characterLocation == null) { continue; } EntityRef target = characterComponent.interactionTarget; if (target.isActive()) { LocationComponent targetLocation = target.getComponent(LocationComponent.class); if (targetLocation == null) { continue; } float maxInteractionRange = characterComponent.interactionRange; if (isDistanceToLarge(characterLocation, targetLocation, maxInteractionRange)) { InteractionUtil.setInteractionTarget(characterEntity, EntityRef.NULL); } } } }</code><technical_language>inefficient do this in update loop. more sense hook this character movement in general</technical_language>

Target:
public void update(float delta) { Iterable<EntityRef> characterEntities = entityManager.getEntitiesWith(CharacterComponent.class, LocationComponent.class); for (EntityRef characterEntity: characterEntities) { CharacterComponent characterComponent = characterEntity.getComponent(CharacterComponent.class); if (characterComponent == null) { continue; } LocationComponent characterLocation = characterEntity.getComponent(LocationComponent.class); if (characterLocation == null) { continue; } EntityRef target = characterComponent.authorizedInteractionTarget; if (target.isActive()) { LocationComponent targetLocation = target.getComponent(LocationComponent.class); if (targetLocation == null) { continue; } float maxInteractionRange = characterComponent.interactionRange; if (isDistanceToLarge(characterLocation, targetLocation, maxInteractionRange)) { InteractionUtil.cancelInteractionAsServer(characterEntity); } } } }
Source:
<code>private void sync() throws IOException { TransactionLogWriter tmpWriter = null; long latestSeq = 0; int entryCount = 0; synchronized (this) { if (closed) { return; } tmpWriter = writer; List<Entry> currentPending = getPendingWrites(); <START> if (currentPending.size() != 0) { <END> tmpWriter.commitMarker(currentPending.size()); } for (Entry e : currentPending) { tmpWriter.append(e); entryCount++; latestSeq = Math.max(latestSeq, e.getKey().get()); } } long lastSynced = syncedUpTo.get(); if (lastSynced < latestSeq) { tmpWriter.sync(); metricsCollector.histogram("wal.sync.size", entryCount); syncedUpTo.compareAndSet(lastSynced, latestSeq); } }</code><technical_language>This check replaced !currentPending.isEmpty()</technical_language>

Target:
private void sync() throws IOException { TransactionLogWriter tmpWriter = null; long latestSeq = 0; int entryCount = 0; synchronized (this) { if (closed) { return; } tmpWriter = writer; List<Entry> currentPending = getPendingWrites(); if (!currentPending.isEmpty()) { tmpWriter.commitMarker(currentPending.size()); } for (Entry e : currentPending) { tmpWriter.append(e); entryCount++; latestSeq = Math.max(latestSeq, e.getKey().get()); } } long lastSynced = syncedUpTo.get(); if (lastSynced < latestSeq) { tmpWriter.sync(); metricsCollector.histogram("wal.sync.size", entryCount); syncedUpTo.compareAndSet(lastSynced, latestSeq); } }
Source:
<code>public <T> T getService(final Class<T> clazz, final ServiceReference reference) { <START> ServiceTracker tracker = new ServiceTracker(bundleContext, reference, null); <END> Object newProxyInstance = Proxy.newProxyInstance(clazz.getClassLoader(), new Class<?>[] { clazz }, new ServiceTrackerInvocationHandler(tracker)); return (T) newProxyInstance; }</code><technical_language>this is a bit dangerous reference unavailable time..</technical_language>

Target:
public <T> T getService(final Class<T> clazz, final ServiceReference reference) throws OsgiServiceNotAvailableException { Object service = bundleContext.getService(reference); if (service == null) { throw new OsgiServiceNotAvailableException("service retrieved from the bundlecontext was null"); } return (T) service; }
Source:
<code>public void deleteAll(List<K> keys) { <START> cache.invalidateAll(keys); <END> }</code><technical_language>pattern consistently: model sync calls asyncCall.get() Model aysnc-calls sync call + CompletableFuture.completedFuture(null) prefer making async more general API expressing sync-variant in terms of async</technical_language>

Target:
public void deleteAll(List<K> keys) { try { deleteAllAsync(keys).get(); } catch (Exception e) { throw new SamzaException("DELETE_ALL failed", e); } }
Source:
<code>public void show(@NonNull PageTitle title) { ReadingList.DAO.anyListContainsTitleAsync(ReadingListDaoProxy.key(title), new CallbackTask.Callback<ReadingListPage>() { @Override <START> public void success(@Nullable ReadingListPage page) { <END> ReadingListBookmarkMenu.this.page = page; PopupMenu menu = new PopupMenu(anchorView.getContext(), anchorView); menu.getMenuInflater().inflate(R.menu.menu_reading_list_page_toggle, menu.getMenu()); menu.setOnMenuItemClickListener(new PageSaveMenuClickListener()); menu.show(); } }); }</code><technical_language>want expose a mechanism for client cancel AsyncTask suppress dialog show behavior. easy expose a setter Callback do if null asynchronous operation completes</technical_language>

Target:
public void show(@NonNull PageTitle title) { ReadingList.DAO.anyListContainsTitleAsync(ReadingListDaoProxy.key(title), new CallbackTask.Callback<ReadingListPage>() { @Override public void success(@Nullable ReadingListPage page) { if (!ViewCompat.isAttachedToWindow(anchorView)) { return; } ReadingListBookmarkMenu.this.page = page; PopupMenu menu = new PopupMenu(anchorView.getContext(), anchorView); menu.getMenuInflater().inflate(R.menu.menu_reading_list_page_toggle, menu.getMenu()); menu.setOnMenuItemClickListener(new PageSaveMenuClickListener()); menu.show(); } }); }
Source:
<code><START> public JavaWriter emitLastEnumValue(String name) throws IOException { <END> indent(); out.write(name); out.write(";\n"); return this; }</code><technical_language>Drop this, iterable only</technical_language>

Target:
private JavaWriter emitLastEnumValue(String name) throws IOException { indent(); out.write(name); out.write(";\n"); return this; }
Source:
<code>private void doInitialize() { EEFCorePlugin.getPlugin().debug("EEFViewImpl#initialize()"); for (final EEFPageDescription eefPageDescription : this.getDescription().getPages()) { String semanticCandidatesExpression = Util.firstNonBlank(eefPageDescription.getSemanticCandidateExpression(), org.eclipse.eef.core.api.EEFExpressionUtils.VAR_SELF); new Eval(this.interpreter, this.variableManager).call(semanticCandidatesExpression, new ISuccessfulResultConsumer<Object>() { @Override public void apply(Object value) { long start = System.currentTimeMillis(); Iterable<EObject> iterable = Util.asIterable(value, EObject.class); Iterable<EObject> eObjects = Iterables.filter(iterable, new DomainClassTester(eefPageDescription.getDomainClass())); <START> long end = System.currentTimeMillis(); System.out.println((end - start) / 1000 + "s"); END> for (Object object : eObjects) { EEFPageImpl ePage = createPage(eefPageDescription, object); ePage.initialize(); EEFViewImpl.this.eefPages.add(ePage); } } }); } }</code><technical_language>this voluntarily</technical_language>

Target:
private void doInitialize() { EEFCorePlugin.getPlugin().debug("EEFViewImpl#initialize()"); for (final EEFPageDescription eefPageDescription : this.getDescription().getPages()) { String semanticCandidatesExpression = Util.firstNonBlank(eefPageDescription.getSemanticCandidateExpression(), org.eclipse.eef.core.api.EEFExpressionUtils.VAR_SELF); new Eval(this.interpreter, this.variableManager).call(semanticCandidatesExpression, new ISuccessfulResultConsumer<Object>() { @Override public void apply(Object value) { Iterable<EObject> iterable = Util.asIterable(value, EObject.class); Iterable<EObject> eObjects = Iterables.filter(iterable, new DomainClassTester(eefPageDescription.getDomainClass())); for (Object object : eObjects) { EEFPageImpl ePage = createPage(eefPageDescription, object); ePage.initialize(); EEFViewImpl.this.eefPages.add(ePage); } } }); } }
Source:
<code>private void initLMAlgoFactoryDecorator() { if (lmFactoryDecorator.hasWeightings()) return; for (FlagEncoder encoder : encodingManager.fetchEdgeEncoders()) { for (String lmWeightingStr : lmFactoryDecorator.getWeightingsAsStrings()) { <START> Weighting weighting = createWeighting(new HintsMap(lmWeightingStr), encoder, null, new NoTurnCostProvider()); <END> lmFactoryDecorator.addWeighting(weighting); } } }</code><technical_language>Yes, this is intended. In a separate issue try if this negative consequences</technical_language>

Target:
private void initLMAlgoFactoryDecorator() { if (lmFactoryDecorator.hasWeightings()) return; for (FlagEncoder encoder : encodingManager.fetchEdgeEncoders()) { for (String lmWeightingStr : lmFactoryDecorator.getWeightingsAsStrings()) { Weighting weighting = createWeighting(new HintsMap(lmWeightingStr), encoder, null, NO_TURN_COST_PROVIDER); lmFactoryDecorator.addWeighting(weighting); } } }
Source:
<code>public void registerCallback(ISender sender, ParameterResolutionContext prc) { <START> <END> }</code><technical_language>this is implemented, throw error log a warning</technical_language>

Target:
public void registerCallback(ISender sender, ParameterResolutionContext prc) { throw new UnsupportedOperationException("Rhino callback functionality not implemented"); }
Source:
<code>public void testDeleteRecordV1() throws IOException, MessageFormatException { ByteBuffer deleteRecord = ByteBuffer.allocate(MessageFormatRecord.Delete_Format_V1.getDeleteRecordSize()); MessageFormatRecord.Delete_Format_V1.serializeDeleteRecord(deleteRecord, true); deleteRecord.flip(); DeleteRecord deserializeDeleteRecord = MessageFormatRecord.deserializeDeleteRecord(new ByteBufferInputStream(deleteRecord)); Assert.assertEquals("Delete record version mismatch ", deserializeDeleteRecord.getVersion(), MessageFormatRecord.Delete_Version_V1); Assert.assertEquals(deserializeDeleteRecord.isDeleted(), true); deleteRecord.flip(); deleteRecord.put(10, (byte) 4); try { MessageFormatRecord.deserializeDeleteRecord(new ByteBufferInputStream(deleteRecord)); <START> Assert.assertEquals(true, false); <END> } catch (MessageFormatException e) { Assert.assertEquals(e.getErrorCode(), MessageFormatErrorCodes.Data_Corrupt); } }</code><technical_language>fail() a message</technical_language>

Target:
public void testDeleteRecordV1() throws IOException, MessageFormatException { short accountId = Utils.getRandomShort(TestUtils.RANDOM); short containerId = Utils.getRandomShort(TestUtils.RANDOM); long deletionTimeMs = SystemTime.getInstance().milliseconds() + TestUtils.RANDOM.nextInt(); ByteBuffer deleteRecord = ByteBuffer.allocate(MessageFormatRecord.Delete_Format_V1.getDeleteRecordSize()); MessageFormatRecord.Delete_Format_V1.serializeDeleteRecord(deleteRecord, new DeleteRecord(accountId, containerId, deletionTimeMs)); deleteRecord.flip(); DeleteRecord deserializeDeleteRecord = MessageFormatRecord.deserializeDeleteRecord(new ByteBufferInputStream(deleteRecord)); Assert.assertEquals("AccountId mismatch ", UNKNOWN_ACCOUNT_ID, deserializeDeleteRecord.getAccountId()); Assert.assertEquals("ContainerId mismatch ", UNKNOWN_CONTAINER_ID, deserializeDeleteRecord.getContainerId()); Assert.assertEquals("DeletionTime mismatch ", Utils.Infinite_Time, deserializeDeleteRecord.getDeletionTimeInMs()); deleteRecord.flip(); byte toCorrupt = deleteRecord.get(10); deleteRecord.put(10, (byte) (toCorrupt + 1)); try { MessageFormatRecord.deserializeDeleteRecord(new ByteBufferInputStream(deleteRecord)); fail("Deserialization of a corrupt delete record V1 should have failed "); } catch (MessageFormatException e) { Assert.assertEquals(e.getErrorCode(), MessageFormatErrorCodes.Data_Corrupt); } }
Source:
<code>public String toString() { <START> return "VertexInfo{" + <END> "id=" + id + ", type=" + type + ", sysObjectId='" + sysObjectId + '\'' + ", label='" + label + '\'' + ", location=" + location + '}'; }</code><technical_language>VertexInfo NodeTopologyEntity</technical_language>

Target:
public String toString() { return "NodeTopologyEntity{" + "id=" + id + ", type=" + type + ", sysObjectId='" + sysObjectId + '\'' + ", label='" + label + '\'' + ", location=" + location + '}'; }
Source:
<code>public void testProcessNonJavaFiles() throws Exception { <START> final String charsetName = "ISO-8859-1"; <END> final TreeWalker treeWalker = new TreeWalker(); treeWalker.setTabWidth(1); treeWalker.configure(new DefaultConfiguration("default config")); final File file = new File("src/main/resources/checkstyle_packages.xml"); final FileText fileText = new FileText(file, charsetName); treeWalker.processFiltered(file, fileText); }</code><technical_language>StandardCharsets.ISO_8859_1.name()</technical_language>

Target:
public void testProcessNonJavaFiles() throws Exception { final TreeWalker treeWalker = new TreeWalker(); final PackageObjectFactory factory = new PackageObjectFactory( new HashSet<>(), Thread.currentThread().getContextClassLoader()); treeWalker.setModuleFactory(factory); treeWalker.configure(new DefaultConfiguration("default config")); final DefaultConfiguration childConfig = createCheckConfig(JavadocParagraphCheck.class); treeWalker.setupChild(childConfig); final File file = new File("input.java"); final List<String> lines = new ArrayList<>(Arrays.asList("package com.puppycrawl.tools.checkstyle;", "", "error public class InputTreeWalkerFileWithViolation {}")); final FileText fileText = new FileText(file, lines); try { treeWalker.processFiltered(file, fileText); fail("Exception expected"); } catch (CheckstyleException ex) { assertEquals("Invalid exception message", "MismatchedTokenException occurred during the analysis of file input.java.", ex.getMessage()); } }
Source:
<code>public RelNode convert(Sort sort, boolean convertInputTraits) { final RelTraitSet traitSet = sort.getTraitSet().replace(out); <START> RelTraitSet inputTraitSet = traitSet.replace(RelCollations.EMPTY); <END> final RelNode input; if (convertInputTraits) { input = convert(sort.getInput(), inputTraitSet); } else { input = sort.getInput(); } return new JdbcSort(sort.getCluster(), traitSet, input, sort.getCollation(), sort.offset, sort.fetch); }</code><technical_language>final RelTraitSet inputTraitSet = sort.getInput().getTraitSet().replace(out);</technical_language>

Target:
public RelNode convert(Sort sort, boolean convertInputTraits) { final RelTraitSet traitSet = sort.getTraitSet().replace(out); final RelNode input; if (convertInputTraits) { final RelTraitSet inputTraitSet = sort.getInput().getTraitSet().replace(out); input = convert(sort.getInput(), inputTraitSet); } else { input = sort.getInput(); } return new JdbcSort(sort.getCluster(), traitSet, input, sort.getCollation(), sort.offset, sort.fetch); }
Source:
<code>private void findAndCreateKnownSpatialIndexes() { Pattern pattern = Pattern.compile( "(\\d+)-(\\d+)" ); File rootDirectory = this.directoryStructure().rootDirectory(); if ( rootDirectory == null ) { return; } File[] files = rootDirectory.listFiles(); if ( files != null ) { for ( File file : files ) { if ( file.isDirectory() ) { Integer indexId = Integer.parseInt( file.getName() ); File[] subdirs = this.directoryStructure().directoryForIndex( indexId ).listFiles(); if ( subdirs != null ) { for ( File subdir : subdirs ) { Matcher m = pattern.matcher( subdir.getName() ); if ( m.matches() ) { int tableId = Integer.parseInt( m.group( 1 ) ); int code = Integer.parseInt( m.group( 2 ) ); CoordinateReferenceSystem crs = CoordinateReferenceSystem.get( tableId, code ); SpatialKnownIndex index = selectAndCreate( indexesFor( indexId ), indexId, crs ); if ( !index.indexExists() ) { indexesFor( indexId ).remove( crs ); <START> } <END> } } } } } } }</code><technical_language>Is safe ignore a potentially missing index here? this remove a subdirectory some CRS happy this report a failed state</technical_language>

Target:
private void findAndCreateKnownSpatialIndexes() { Pattern pattern = Pattern.compile( "(\\d+)-(\\d+)" ); File rootDirectory = this.directoryStructure().rootDirectory(); if ( rootDirectory == null ) { return; } File[] files = rootDirectory.listFiles(); if ( files != null ) { for ( File file : files ) { if ( file.isDirectory() ) { Integer indexId = Integer.parseInt( file.getName() ); File[] subdirs = this.directoryStructure().directoryForIndex( indexId ).listFiles(); if ( subdirs != null ) { for ( File subdir : subdirs ) { Matcher m = pattern.matcher( subdir.getName() ); if ( m.matches() ) { int tableId = Integer.parseInt( m.group( 1 ) ); int code = Integer.parseInt( m.group( 2 ) ); CoordinateReferenceSystem crs = CoordinateReferenceSystem.get( tableId, code ); SpatialKnownIndex index = selectAndCreate( indexesFor( indexId ), indexId, crs ); if ( !index.indexExists() ) { index.markAsFailed( "Index file was not found" ); } } } } } } } }
Source:
<code>public void logout(final IProgressMonitor monitor) throws XmlRpcException { try { (new BugzillaXmlRpcOperation<Integer>(this) { @Override public Integer execute() throws XmlRpcException { call(monitor, XML_USER_LOGOUT); return -1; } }).execute(); <START> } catch (XmlRpcException e) { <END> e.printStackTrace(); throw e; } finally { userID = -1; token = null; } return; }</code><technical_language>I a catch block if rethrow exception</technical_language>

Target:
public void logout(final IProgressMonitor monitor) throws XmlRpcException { try { (new BugzillaXmlRpcOperation<Integer>(this) { @Override public Integer execute() throws XmlRpcException { call(monitor, XML_USER_LOGOUT); return -1; } }).execute(); } finally { userID = -1; token = null; } return; }