auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public Partition moveToSessionId(final String sessionId, final Collection<String> existingSessionIds) { switch (state) { case UNASSIGNED: return toState(State.ASSIGNED, sessionId, null); case ASSIGNED: <START> if (sessionId.equals(this.session)) { END> return toState(State.ASSIGNED, sessionId, null); } else if (!existingSessionIds.contains(this.session)) { return toState(State.ASSIGNED, sessionId, null); } else { return toState(State.REASSIGNING, this.session, sessionId); } case REASSIGNING: if (!existingSessionIds.contains(this.session)) { return toState(State.ASSIGNED, sessionId, null); } else if (this.session.equals(sessionId)) { return toState(State.ASSIGNED, sessionId, null); } else { return toState(State.REASSIGNING, this.session, sessionId); } default: throw new IllegalStateException("Unsupported current state " + state); } }</code><technical_language>??</technical_language>

Target:
public Partition moveToSessionId(final String sessionId, final Collection<String> existingSessionIds) { switch (state) { case UNASSIGNED: return toState(State.ASSIGNED, sessionId, null); case ASSIGNED: case REASSIGNING: if (sessionId.equals(this.session)) { return toState(State.ASSIGNED, sessionId, null); } else if (!existingSessionIds.contains(this.session)) { return toState(State.ASSIGNED, sessionId, null); } else { return toState(State.REASSIGNING, this.session, sessionId); } default: throw new IllegalStateException("Unsupported current state " + state); } }
Source:
<code>public String toString() { <START> final StringBuffer sb = new StringBuffer(60).append("[cmd=").append(_cmd); <END> if (_data != null && _data.length > 0) { sb.append(", {"); for (AuSetAttribute d : (AuSetAttribute[]) _data) { sb.append(d); } sb.append('}'); } return sb.append(']').toString(); }</code><technical_language>StringBuilder</technical_language>

Target:
public String toString() { final StringBuilder sb = new StringBuilder(60).append("[cmd=").append(_cmd); if (_data != null && _data.length > 0) { sb.append(", {"); for (AuSetAttribute d : (AuSetAttribute[]) _data) { sb.append(d); } sb.append('}'); } return sb.append(']').toString(); }
Source:
<code>public static DirectoryUser mapPrincipalRecord(final ExtensionProxy extension, final ExtMap principalRecord) { DirectoryUser directoryUser = null; if (principalRecord != null) { String name = principalRecord.<String> get(Authz.PrincipalRecord.NAME); directoryUser = new DirectoryUser( extension.getContext().<String> get(Base.ContextKeys.INSTANCE_NAME), principalRecord.<String> get(Authz.PrincipalRecord.NAMESPACE), principalRecord.<String> get(Authz.PrincipalRecord.ID), <START> name.contains("@") ? name.substring(0, name.indexOf("@")) : name <END> ); directoryUser.setDepartment(principalRecord.<String> get(Authz.PrincipalRecord.DEPARTMENT)); directoryUser.setFirstName(principalRecord.<String> get(Authz.PrincipalRecord.FIRST_NAME)); directoryUser.setLastName(principalRecord.<String> get(Authz.PrincipalRecord.LAST_NAME)); directoryUser.setEmail(principalRecord.<String> get(Authz.PrincipalRecord.EMAIL)); directoryUser.setTitle(principalRecord.<String> get(Authz.PrincipalRecord.TITLE)); List<DirectoryGroup> directoryGroups = new ArrayList<DirectoryGroup>(); List<ExtMap> groups = principalRecord.<List<ExtMap>> get(Authz.PrincipalRecord.GROUPS); if (groups != null) { for (ExtMap group : groups) { directoryGroups.add(mapGroupRecord(extension, group)); } } directoryUser.setGroups(directoryGroups); } return directoryUser; }</code><technical_language>care this level? this incorrect, extension return string likes. profile is anyway</technical_language>

Target:
public static DirectoryUser mapPrincipalRecord(final ExtensionProxy extension, final ExtMap principalRecord) { DirectoryUser directoryUser = null; if (principalRecord != null) { directoryUser = new DirectoryUser( extension.getContext().<String> get(Base.ContextKeys.INSTANCE_NAME), principalRecord.<String> get(Authz.PrincipalRecord.NAMESPACE), principalRecord.<String> get(Authz.PrincipalRecord.ID), principalRecord.<String> get(Authz.PrincipalRecord.NAME) ); directoryUser.setDepartment(principalRecord.<String> get(Authz.PrincipalRecord.DEPARTMENT)); directoryUser.setFirstName(principalRecord.<String> get(Authz.PrincipalRecord.FIRST_NAME)); directoryUser.setLastName(principalRecord.<String> get(Authz.PrincipalRecord.LAST_NAME)); directoryUser.setEmail(principalRecord.<String> get(Authz.PrincipalRecord.EMAIL)); directoryUser.setTitle(principalRecord.<String> get(Authz.PrincipalRecord.TITLE)); List<DirectoryGroup> directoryGroups = new ArrayList<DirectoryGroup>(); List<ExtMap> groups = principalRecord.<List<ExtMap>> get(Authz.PrincipalRecord.GROUPS); if (groups != null) { for (ExtMap group : groups) { directoryGroups.add(mapGroupRecord(extension, group)); } } directoryUser.setGroups(directoryGroups); } return directoryUser; }
Source:
<code>public void setEntity(EntityLocal entity) { <START> checkArgument(entity instanceof MemberReplaceable, "Replacer must take a DynamicCluster, not %s", entity); <END> Sensor<?> failureSensorToMonitor = checkNotNull(getConfig(FAILURE_SENSOR_TO_MONITOR), "failureSensorToMonitor"); super.setEntity(entity); subscribeToMembers((Group)entity, failureSensorToMonitor, new SensorEventListener<Object>() { @Override public void onEvent(SensorEvent<Object> event) { onDetectedFailure(event); } }); }</code><technical_language>Error message needs updated</technical_language>

Target:
public void setEntity(EntityLocal entity) { checkArgument(entity instanceof MemberReplaceable, "ServiceReplacer must take a MemberReplaceable, not %s", entity); Sensor<?> failureSensorToMonitor = checkNotNull(getConfig(FAILURE_SENSOR_TO_MONITOR), "failureSensorToMonitor"); super.setEntity(entity); subscribeToMembers((Group)entity, failureSensorToMonitor, new SensorEventListener<Object>() { @Override public void onEvent(SensorEvent<Object> event) { onDetectedFailure(event); } }); }
Source:
<code>private CoreHookDefinition(UUID id, HookDefinition delegate) { this.id = requireNonNull(id); this.delegate = delegate; try { this.tagExpression = TagExpressionParser.parse(delegate.getTagExpression()); } catch (TagExpressionException tee) { <START> throw new IllegalArgumentException(String.format("%s at '%s'", tee.getMessage(), delegate.getLocation()), <END> tee); } }</code><technical_language>originally pushed this hook implementations. I I suggested close source possible. this means implement correct location reporting in hook implementations. getLocation method get location of hook. this is close enough</technical_language>

Target:
private CoreHookDefinition(UUID id, HookDefinition delegate) { this.id = requireNonNull(id); this.delegate = delegate; try { this.tagExpression = TagExpressionParser.parse(delegate.getTagExpression()); } catch (TagExpressionException tee) { throw new IllegalArgumentException( String.format("Invalid tag expression at '%s'", delegate.getLocation()), tee); } }
Source:
<code>void notifyChatRoomMemberUpdated(ChatRoomMember chatMember, Presence presence) { super.notifyChatRoomMemberUpdated(chatMember, presence); TranslationLanguageExtension translationLanguage = presence.getExtension( TranslationLanguageExtension.ELEMENT_NAME, TranslationLanguageExtension.NAMESPACE); if(translationLanguage != null) { String identifier = getParticipantIdentifier(chatMember); String language = translationLanguage.getTranslationLanguage(); this.transcriber.updateParticipantLanguage(identifier, language); <START> } <END> }</code><technical_language>need handle case user removes a language (by removing extension presence)</technical_language>

Target:
void notifyChatRoomMemberUpdated(ChatRoomMember chatMember, Presence presence) { super.notifyChatRoomMemberUpdated(chatMember, presence); String identifier = getParticipantIdentifier(chatMember); TranslationLanguageExtension translationLanguageExtension = presence.getExtension( TranslationLanguageExtension.ELEMENT_NAME, TranslationLanguageExtension.NAMESPACE); if(translationLanguageExtension != null) { String language = translationLanguageExtension.getTranslationLanguage(); this.transcriber.updateParticipantLanguage(identifier, language); } else { this.transcriber.updateParticipantLanguage(identifier, null); } }
Source:
<code>public void testConcurrency() { final ServerTemplate serverTemplate = templateStorage.load(serverTemplateId); marshal("application/xml", serverTemplate); Thread disconnect = new Thread(() -> disconnect()); disconnect.start(); String response = marshal("application/xml", serverTemplate); <START> LOGGER.info(response); <END> }</code><technical_language>suggestion assertNotNull(response);</technical_language>

Target:
public void testConcurrency() { final ServerTemplate serverTemplate = templateStorage.load(serverTemplateId); marshal("application/xml", serverTemplate); Thread disconnect = new Thread(() -> disconnect()); disconnect.start(); String response = marshal("application/xml", serverTemplate); assertNotNull(response); }
Source:
<code>public ModuleMetadata findOne(String metadataPath) { ModuleMetadata metadata = null; try { byte[] data = zkConnection.getClient().getData().forPath(metadataPath); if (data != null) { Map<String, String> optionsMap = new HashMap<String, String>(); Map<String, String> metadataMap = mapBytesUtility.toMap(data); String moduleId = getModuleId(metadataPath); String containerId = getContainerId(metadataPath); <START> for (String propertyKey : metadataMap.keySet()) { <END> String propertyValue = metadataMap.get(propertyKey); if (!propertyKey.startsWith(XD_MODULE_PROPERTIES_PREFIX) && !StringUtils.isEmpty(propertyValue)) { resolveModuleOptionValues(optionsMap, metadataMap, propertyKey, propertyValue); } } String moduleProperties = (!optionsMap.isEmpty()) ? MapUtils.toProperties(optionsMap).toString() : ""; metadata = new ModuleMetadata(moduleId, containerId, moduleProperties); } } catch (Exception e) { ZooKeeperUtils.wrapAndThrowIgnoring(e, NoNodeException.class); } return metadata; }</code><technical_language>do putting for loop of resolveModuleOptionValues method? This declare optionsMap in method a return value. intent of resolveModuleOptionValues method easier understand. is right now, reads map writes another. possible, methods avoid "side effects" - in this case, modifying a data structure is passed it</technical_language>

Target:
public ModuleMetadata findOne(String metadataPath) { ModuleMetadata metadata = null; try { byte[] data = zkConnection.getClient().getData().forPath(metadataPath); if (data != null) { Map<String, String> metadataMap = mapBytesUtility.toMap(data); String moduleId = getModuleId(metadataPath); String containerId = getContainerId(metadataPath); Map<String, String> resolvedOptions = resolveModuleOptionValues(metadataMap); String moduleProperties = (resolvedOptions.isEmpty()) ? "" : MapUtils.toProperties(resolvedOptions).toString(); metadata = new ModuleMetadata(moduleId, containerId, moduleProperties); } } catch (Exception e) { ZooKeeperUtils.wrapAndThrowIgnoring(e, NoNodeException.class); } return metadata; }
Source:
<code>protected boolean validateFreeSpace(StorageDomainValidator storageDomainValidator, List<DiskImage> disksList) { for (DiskImage disk : disksList) { disk.setVolumeType(VolumeType.Sparse); <START> disk.setvolumeFormat(VolumeFormat.COW); <END> } return validate(storageDomainValidator.hasSpaceForNewDisks(disksList)); }</code><technical_language>This override properties of disk adding. If want override for sake of validation, clone disk</technical_language>

Target:
protected boolean validateFreeSpace(StorageDomainValidator storageDomainValidator, List<DiskImage> disksList) { Collection<DiskImage> disks = ImagesHandler.getDisksDummiesForStorageAllocations(disksList); return validate(storageDomainValidator.hasSpaceForNewDisks(disks)); }
Source:
<code>public static void InitDictionaries() { log.info("Start initializing dictionaries"); _managersDictionary.clear(); for (Version ver : Config.<HashSet<Version>> GetValue(ConfigValues.SupportedClusterLevels)) { _managersDictionary.put(ver, new CpuFlagsManager(ver)); } <START> log.info("Finished initializing dictionaries" + CpuFlagsManagerHandler.class.getSimpleName()); <END> }</code><technical_language>"+ CpuFlagsManagerHandler.class.getSimpleName() "? if do leave it..space is missing "dictionaries" it</technical_language>

Target:
public static void InitDictionaries() { log.info("Start initializing dictionaries"); _managersDictionary.clear(); for (Version ver : Config.<HashSet<Version>> GetValue(ConfigValues.SupportedClusterLevels)) { _managersDictionary.put(ver, new CpuFlagsManager(ver)); } log.info("Finished initializing dictionaries"); }
Source:
<code>public RuleResult process(PacketContext pktCtx) { if (condition.matches(pktCtx)) { <START> result.matched = true; <END> pktCtx.jlog().debug( "Condition matched on device chain with action and condition {}", pktCtx.currentDevice(), chainId, action, condition); if (meter != null) pktCtx.addFlowTag(meter); if (apply(pktCtx)) return result; } return Chain.CONTINUE(); }</code><technical_language>result is a cached object mutated. for a solution avoid instantiating a RuleResult. I guess do object pooling, Simulator's InstanceStashes. Still, this needs a bit of thought</technical_language>

Target:
public Pair<RuleResult, Boolean> process(PacketContext pktCtx) { if (condition.matches(pktCtx)) { pktCtx.jlog().debug( "Condition matched on device chain with action and condition {}", pktCtx.currentDevice(), chainId, action, condition); if (meter != null) pktCtx.addFlowTag(meter); if (apply(pktCtx)) return Pair.of(result, true); } return Pair.of(Chain.CONTINUE(), false); }
Source:
<code>public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException, NetworkRuleConflictException { validateParams(); Host host = _resourceService.getHost(getHostId()); if (host == null) { throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Unable to find host by ID: " + getHostId()); } <START> PowerOperation powerOperation = PowerOperation.valueOf(getOutOfBandManagementPowerOperation()); <END> CallContext.current().setEventDetails("Host Id: " + host.getId() + " Action: " + powerOperation.toString()); CallContext.current().putContextParameter(Host.class, host.getUuid()); OutOfBandManagementResponse response = outOfBandManagementService.executeOutOfBandManagementPowerOperation(host, powerOperation, getActionTimeout()); response.setResponseName(getCommandName()); setResponseObject(response); }</code><technical_language>this lookup case-insensitive, upper case result of getOutOfBandManagementPowerOperation()</technical_language>

Target:
public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException, NetworkRuleConflictException { final Host host = _resourceService.getHost(getHostId()); if (host == null) { throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Unable to find host by ID: " + getHostId()); } final PowerOperation powerOperation = PowerOperation.valueOf(getPowerAction()); CallContext.current().setEventDetails("Host Id: " + host.getId() + " Action: " + powerOperation.toString()); CallContext.current().putContextParameter(Host.class, host.getUuid()); final OutOfBandManagementResponse response = outOfBandManagementService.executeOutOfBandManagementPowerOperation(host, powerOperation, getActionTimeout()); response.setResponseName(getCommandName()); setResponseObject(response); }
Source:
<code>public static IgniteParameters load(Properties properties) { return new IgniteParameters( properties.getProperty(PROP_HOST, IgniteBackendConstants.DEFAULT_IGNITE_HOST), properties.getProperty(PROP_PORT, IgniteBackendConstants.DEFAULT_IGNITE_PORT), properties.getProperty(PROP_SCHEMA, null), properties.getProperty(PROP_USER, null), <START> properties.getProperty(PROP_PASSWORD, null), <END> properties.getProperty(PROP_ADDITIONALS, null)); }</code><technical_language>Is required add null default value, return null if key is exist in properties. Another point is, handled null for a existing key in higher layer referred IgniteParameters. Check end in null pointer exception if of properties included in properties file</technical_language>

Target:
public static IgniteParameters load(Properties properties) { return new IgniteParameters( properties.getProperty(IgniteBackendConstants.PROP_HOST, IgniteBackendConstants.DEFAULT_IGNITE_HOST), properties.getProperty(IgniteBackendConstants.PROP_PORT, IgniteBackendConstants.DEFAULT_IGNITE_PORT), properties.getProperty(IgniteBackendConstants.PROP_SCHEMA), properties.getProperty(IgniteBackendConstants.PROP_USER), properties.getProperty(IgniteBackendConstants.PROP_PASSWORD), properties.getProperty(IgniteBackendConstants.PROP_ADDITIONALS)); }
Source:
<code>public Certificate viewCertificate() { if (selectedTSCertificate != null) { oldAlias = selectedTSCertificate.getAlias(); RequestContext.getCurrentInstance().execute("PF('viewCertDlg').show();"); <START> } else { <END> HelperUtil.addMessageError(TRUST_STORE_MSG, "Please choose a certificate to view details"); } return selectedTSCertificate; }</code><technical_language>viewCertificate viewCertificateKS basically method. move common functionality a private method pass dialog string argument method</technical_language>

Target:
public Certificate viewCertificate() { return viewCert("viewCertDlg", TRUST_STORE_MSG); }
Source:
<code>public int compareTo(ApplicationInfoEx other) { <START> if (mContext == null) <END> return TextUtils.join(", ", getApplicationName()).compareToIgnoreCase( TextUtils.join(", ", other.getApplicationName())); Collator collator = Collator.getInstance(Locale.getDefault()); return collator.compare(TextUtils.join(", ", getApplicationName()), TextUtils.join(", ", other.getApplicationName())); }</code><technical_language>is this needed? Storing a context for is a good idea in general</technical_language>

Target:
public int compareTo(ApplicationInfoEx other) { Collator collator = Collator.getInstance(Locale.getDefault()); return collator.compare(TextUtils.join(", ", getApplicationName()), TextUtils.join(", ", other.getApplicationName())); }
Source:
<code>public void markAsInvalid(List<String> validationHints) { super.markAsInvalid(validationHints); <START> getValidatedWidgetStyle().setBorderStyle(BorderStyle.SOLID); <END> }</code><technical_language>parent sets border style solid, need do again</technical_language>

Target:
public void markAsInvalid(List<String> validationHints) { super.markAsInvalid(validationHints); }
Source:
<code>private void abandonAudioFocus() { if (audioFocusRequest != null && AudioManagerCompat.abandonAudioFocusRequest(audioManager, audioFocusRequest) != AudioManager.AUDIOFOCUS_REQUEST_FAILED) { <START> audioFocusRequest = null; <END> } isAudioFocusGranted = false; }</code><technical_language>NPE in requestAudioFocus(). Remove audioFocusRequest != null audioFocusRequest = null reuse audioFocusRequest. I guess, Log.d() if AudioManager.AUDIOFOCUS_REQUEST_FAILED</technical_language>

Target:
private void abandonAudioFocus() { AudioManagerCompat.abandonAudioFocusRequest(audioManager, audioFocusRequest); isAudioFocusGranted = false; if (!audioFocusRequestAbandoned()) { Log.d(TAG, "Failed to abandon audioFocusRequest."); } }
Source:
<code>public void execute() throws MojoExecutionException, MojoFailureException { if (emulatorPath == null) { <START> GcloudHelper helper = new GcloudHelper(Executors.newCachedThreadPool()); <END> emulatorPath = helper.getEmulatorPath(); } EmulatorController controller = new EmulatorController.Builder() .setEmulatorPath(emulatorPath) .setPortFilePath(propertiesPath) .build(); getLog().debug("Starting bigtable emulator"); try { controller.start(); } catch (IOException e) { throw new MojoExecutionException("Failed to start emulator", e); } getLog().info("Bigtable emulator is running on port " + controller.getPort()); try { controller.waitForTermination(); } catch (InterruptedException e) { controller.stop(); getLog().info("Exiting"); } }</code><technical_language>a deamon thread block JVM shutdown</technical_language>

Target:
public void execute() throws MojoExecutionException, MojoFailureException { if (emulatorPath == null) { GcloudHelper helper = new GcloudHelper(Executors.newCachedThreadPool()); emulatorPath = helper.getEmulatorPath(); } EmulatorController controller = new EmulatorController.Builder() .setEmulatorPath(emulatorPath) .setPortFilePath(propertiesPath) .setLogPath(logPath) .build(); getLog().debug("Starting bigtable emulator"); try { controller.start(); } catch (IOException e) { throw new MojoExecutionException("Failed to start emulator", e); } getLog().info("Bigtable emulator is running on port " + controller.getPort()); try { controller.waitForTermination(); } catch (InterruptedException e) { controller.stop(); getLog().info("Exiting"); } }
Source:
<code>public RGB buttonColour() { Color c = Color.decode(buttonColour); <START> return new RGB(c.getRed(), c.getGreen(), c.getBlue()); <END> }</code><technical_language>Duplicated code in this method above. Refactor a common utility method</technical_language>

Target:
public RGB buttonColour() { return getRGBFromHex(buttonColour); }
Source:
<code>protected void initRPCDispatcher() { this.dispatcher = new CommandAwareRpcDispatcher(channel, this, globalHandler, this.getTimeoutExecutor(), timeService, marshaller); <START> Field bufField; <END> try { bufField = ByteArrayDataInputStream.class.getDeclaredField("buf"); bufField.setAccessible(true); } catch (NoSuchFieldException e) { throw new IllegalStateException("Field not found", e); } this.dispatcher.start(); }</code><technical_language>hmmm... is this suppose do</technical_language>

Target:
protected void initRPCDispatcher() { this.dispatcher = new CommandAwareRpcDispatcher(channel, this, globalHandler, timeoutExecutor, timeService, remoteExecutor, marshaller); this.dispatcher.start(); }
Source:
<code><START> private List<String> getSwiftParams(SwiftTO swift, String container, String ldir, String lfilename, Boolean isISCSI) { <END> List<String> params = Arrays.asList( "op", "upload", "url", swift.getUrl(), "account", swift.getAccount(), "username", swift.getUserName(), "key", swift.getKey(), "container", container, "ldir", ldir, "lfilename", lfilename, "isISCSI", isISCSI.toString() ); if (swift.getStoragePolicy() != null) { params.add("storagepolicy"); params.add(swift.getStoragePolicy()); } return params; }</code><technical_language>This method benefit unit tests</technical_language>

Target:
List<String> getSwiftParams(SwiftTO swift, String container, String ldir, String lfilename, Boolean isISCSI) { List<String> params = new ArrayList<>(); params.add("op"); params.add("upload"); params.add("url"); params.add(swift.getUrl()); params.add("account"); params.add(swift.getAccount()); params.add("username"); params.add(swift.getUserName()); params.add("key"); params.add(swift.getKey()); params.add("container"); params.add(container); params.add("ldir"); params.add(ldir); params.add("lfilename"); params.add(lfilename); params.add("isISCSI"); params.add(isISCSI.toString()); if (swift.getStoragePolicy() != null) { params.add("storagepolicy"); params.add(swift.getStoragePolicy()); } return params; }
Source:
<code>public void checkAttributeSemantics(PerunSessionImpl sess, Group group, Resource resource, Attribute attribute) throws InternalErrorException, WrongReferenceAttributeValueException, WrongAttributeAssignmentException{ Integer isSystemUnixGroup = attribute.valueAsInteger(); if(isSystemUnixGroup == null) return; Attribute sysUnixGroupName; Attribute sysUnixGID; if(isSystemUnixGroup == 1) { try { sysUnixGroupName = sess.getPerunBl().getAttributesManagerBl().getAttribute(sess, resource, group, A_GR_systemUnixGroupName); sysUnixGID = sess.getPerunBl().getAttributesManagerBl().getAttribute(sess, resource, group, A_GR_systemUnixGID); } catch (AttributeNotExistsException ex) { throw new ConsistencyErrorException("Attributes sysUnixGroupName or sysUnixGID not exist.",ex); } catch (GroupResourceMismatchException ex) { throw new InternalErrorException(ex); } try { sess.getPerunBl().getAttributesManagerBl().checkAttributeSemantics(sess, resource, group, sysUnixGroupName); <START> } catch(WrongReferenceAttributeValueException ex) { <END> throw new WrongReferenceAttributeValueException("Bad value in sysUnixGroupName attribute.",ex); } catch (GroupResourceMismatchException ex) { throw new InternalErrorException(ex); } try { sess.getPerunBl().getAttributesManagerBl().checkAttributeSemantics(sess, resource, group, sysUnixGID); } catch(WrongReferenceAttributeValueException ex) { throw new WrongReferenceAttributeValueException("Bad value in sysUnixGID.",ex); } catch (GroupResourceMismatchException ex) { throw new InternalErrorException(ex); } } }</code><technical_language>I do catch WrongReferenceAttributeValueException throwing anyway</technical_language>

Target:
public void checkAttributeSemantics(PerunSessionImpl sess, Group group, Resource resource, Attribute attribute) throws InternalErrorException, WrongReferenceAttributeValueException, WrongAttributeAssignmentException{ Integer isSystemUnixGroup = attribute.valueAsInteger(); if(isSystemUnixGroup == null) return; Attribute sysUnixGroupName; Attribute sysUnixGID; if(isSystemUnixGroup == 1) { try { sysUnixGroupName = sess.getPerunBl().getAttributesManagerBl().getAttribute(sess, resource, group, A_GR_systemUnixGroupName); sysUnixGID = sess.getPerunBl().getAttributesManagerBl().getAttribute(sess, resource, group, A_GR_systemUnixGID); } catch (AttributeNotExistsException ex) { throw new ConsistencyErrorException("Attributes sysUnixGroupName or sysUnixGID not exist.",ex); } catch (GroupResourceMismatchException ex) { throw new InternalErrorException(ex); } try { sess.getPerunBl().getAttributesManagerBl().checkAttributeSemantics(sess, resource, group, sysUnixGroupName); } catch (GroupResourceMismatchException ex) { throw new InternalErrorException(ex); } try { sess.getPerunBl().getAttributesManagerBl().checkAttributeSemantics(sess, resource, group, sysUnixGID); } catch (GroupResourceMismatchException ex) { throw new InternalErrorException(ex); } } }
Source:
<code>void start() { stop(); if (mLastLocation == null) { return; <START> } <END> LocationManager lm = (LocationManager)mContext.getSystemService(Context.LOCATION_SERVICE); lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, mListener); handler.postDelayed(mRunnable, 30 * 1000); }</code><technical_language>Oof. surprised removeCallbacks(null) crash</technical_language>

Target:
void start() { stop(); if (mLastLocation == null) { AppGlobals.guiLogInfo("Updated location for false pos. filter"); LocationManager lm = (LocationManager)mContext.getSystemService(Context.LOCATION_SERVICE); mLastLocation = lm.getLastKnownLocation(LocationManager.GPS_PROVIDER); if (mLastLocation != null) { mLastLocation.setTime(mClock.currentTimeMillis()); } } if (mLastLocation == null) { return; } LocationManager lm = (LocationManager)mContext.getSystemService(Context.LOCATION_SERVICE); lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, mListener); mHandler.postDelayed(mStopListeningTimer, MAX_TIME_TO_WAIT_FOR_GPS_MS); }
Source:
<code>public Callout parse() throws InvalidStructureException, IOException, XmlPullParserException { String actionName = parser.getAttributeValue(null, "action"); String image = parser.getAttributeValue(null, "image"); String dislayName = parser.getAttributeValue(null, "name"); Callout callout = new Callout(actionName, image, dislayName); while(nextTagInBlock("lookup")){ String tagname = parser.getName(); <START> if(tagname != null && tagname.equals("extra")){ <END> callout.addExtra(parser.getAttributeValue(null, "key"), parser.getAttributeValue(null, "value")); } else if (tagname != null && tagname.equals("response")){ callout.addResponse(parser.getAttributeValue(null, "key")); } } return callout; }</code><technical_language>Minor, "extra".equals(tagname) this more concise. Java endless checking for nulls..</technical_language>

Target:
public Callout parse() throws InvalidStructureException, IOException, XmlPullParserException { String actionName = parser.getAttributeValue(null, "action"); String image = parser.getAttributeValue(null, "image"); String displayName = parser.getAttributeValue(null, "name"); Callout callout = new Callout(actionName, image, displayName); while(nextTagInBlock("lookup")){ String tagName = parser.getName(); if(("extra").equals(tagName)){ callout.addExtra(parser.getAttributeValue(null, "key"), parser.getAttributeValue(null, "value")); } else if ("response".equals(tagName)){ callout.addResponse(parser.getAttributeValue(null, "key")); } } return callout; }
Source:
<code>public void LargeTest() { ITmfStateSystemBuilder fixture = createFixture(); int parentQuark = fixture.getQuarkAbsoluteAndAdd(PROCESS_PATH, THREAD_PATH, CALLSTACK_PATH); for (int i = 0; i < LARGE_AMOUNT_OF_SEGMENTS; i++) { int quark = fixture.getQuarkRelativeAndAdd(parentQuark, Integer.toString(i)); TmfStateValue statev = TmfStateValue.newValueLong(i); fixture.pushAttribute(0, statev, quark); } for (int i = 0; i < LARGE_AMOUNT_OF_SEGMENTS; i++) { int quark = fixture.getQuarkRelativeAndAdd(parentQuark, Integer.toString(i)); fixture.popAttribute(10, quark); } <START> fixture.closeHistory(1002); <END> CGAnalysis cga = new CGAnalysis(); assertTrue(cga.iterateOverStateSystem(fixture, tp, pp, csp, new NullProgressMonitor())); ISegmentStore<@NonNull ISegment> segmentStore = cga.getSegmentStore(); assertNotNull(segmentStore); Object[] segments = segmentStore.toArray(); assertEquals("Number of segments found", LARGE_AMOUNT_OF_SEGMENTS, segments.length, ERROR); }</code><technical_language>Close 11</technical_language>

Target:
public void LargeTest() { ITmfStateSystemBuilder fixture = createFixture(); int parentQuark = fixture.getQuarkAbsoluteAndAdd(PROCESS_PATH, THREAD_PATH, CALLSTACK_PATH); for (int i = 0; i < LARGE_AMOUNT_OF_SEGMENTS; i++) { int quark = fixture.getQuarkRelativeAndAdd(parentQuark, Integer.toString(i)); TmfStateValue statev = TmfStateValue.newValueLong(i); fixture.pushAttribute(0, statev, quark); } for (int i = 0; i < LARGE_AMOUNT_OF_SEGMENTS; i++) { int quark = fixture.getQuarkRelativeAndAdd(parentQuark, Integer.toString(i)); fixture.popAttribute(10, quark); } fixture.closeHistory(11); CGAnalysis cga = new CGAnalysis(); assertTrue(cga.iterateOverStateSystem(fixture, tp, pp, csp, new NullProgressMonitor())); ISegmentStore<@NonNull ISegment> segmentStore = cga.getSegmentStore(); assertNotNull(segmentStore); Object[] segments = segmentStore.toArray(); assertEquals("Number of segments found", LARGE_AMOUNT_OF_SEGMENTS, segments.length); for (int i = 1; i < LARGE_AMOUNT_OF_SEGMENTS; i++) { assertEquals("Test parenthood", ((CalledFunction) segments[i - 1]).getAddr(), NonNullUtils.checkNotNull(((CalledFunction) segments[i]).getParent()).getAddr()); } }
Source:
<code>public DbUser(LdapUser ldapUser) { externalId = ldapUser.getUserId(); domain = ldapUser.getDomainControler(); namespace = ldapUser.getNamespace(); loginName = ldapUser.getUserName(); firstName = ldapUser.getName(); lastName = ldapUser.getSurName(); department = ldapUser.getDepartment(); email = ldapUser.getEmail(); active = true; <START> groupNames = new HashSet<String>(Arrays.asList(ldapUser.getGroup().split(","))); <END> role = ""; note = ""; }</code><technical_language>split .trim().split(" *, *")</technical_language>

Target:
public DbUser(LdapUser ldapUser) { externalId = ldapUser.getUserId(); domain = ldapUser.getDomainControler(); namespace = ldapUser.getNamespace(); loginName = ldapUser.getUserName(); firstName = ldapUser.getName(); lastName = ldapUser.getSurName(); department = ldapUser.getDepartment(); email = ldapUser.getEmail(); active = true; groupNames = new HashSet<String>(Arrays.asList(ldapUser.getGroup().trim().split(" *, *"))); role = ""; note = ""; }
Source:
<code>private int formatStdin(CommandLineOptions parameters, JavaFormatterOptions options) { String input; try { input = new String(ByteStreams.toByteArray(inStream), UTF_8); } catch (IOException e) { throw new IOError(e); } try { String output = new FormatFileCallable(parameters, input, options).call(); if (parameters.isDryRun()) { <START> outWriter.println(STDIN_FILENAME); <END> } else { outWriter.write(output); } if (input.equals(output)) { return 0; } return parameters.isSetExitIfChanged() ? 1 : 0; } catch (FormatterException e) { for (FormatterDiagnostic diagnostic : e.diagnostics()) { errWriter.println(STDIN_FILENAME + ":" + diagnostic.toString()); } return 1; } }</code><technical_language>do this if input unformatted, for file inputs</technical_language>

Target:
private int formatStdin(CommandLineOptions parameters, JavaFormatterOptions options) { String input; try { input = new String(ByteStreams.toByteArray(inStream), UTF_8); } catch (IOException e) { throw new IOError(e); } try { String output = new FormatFileCallable(parameters, input, options).call(); boolean changed = !output.equals(input); if (parameters.isDryRun()) { if (changed) { outWriter.println(STDIN_FILENAME); } } else { outWriter.write(output); } if (changed) { return parameters.isSetExitIfChanged() ? 1 : 0; } return 0; } catch (FormatterException e) { for (FormatterDiagnostic diagnostic : e.diagnostics()) { errWriter.println(STDIN_FILENAME + ":" + diagnostic.toString()); } return 1; } }
Source:
<code>public static <T> T randomElement(List<T> list) { <START> int idx = randomInt(list.size()); <END> return list.get(idx); }</code><technical_language>idx -> index</technical_language>

Target:
public static <T> T randomElement(List<T> list) { int index = randomInt(list.size()); return list.get(index); }
Source:
<code>public void setClan(Clan clan) { nameLabel.setText(clan.getName()); <START> membersLabel.setText(String.valueOf(clan.getMembers().size())); <END> descriptionLabel.setText(clan.getDescription()); leaderLabel.setText(clan.getLeader().getUsername()); descriptionLabel.setText(Optional.ofNullable(clan.getDescription()).orElse("")); }</code><technical_language>String.valueOf() display integers consider user's locale. i18n.number() instead</technical_language>

Target:
public void setClan(Clan clan) { nameLabel.setText(clan.getName()); membersLabel.setText(i18n.number(clan.getMembers().size())); descriptionLabel.setText(clan.getDescription()); leaderLabel.setText(clan.getLeader().getUsername()); descriptionLabel.setText(Optional.ofNullable(clan.getDescription()).orElse("")); }
Source:
<code>public void testConcurrentReadStateAndProcessAndClose() throws Exception { final int totalStates = 5; final int[] states = {1, 2, 3, 4}; final ChannelStateReader stateReader = new ResultPartitionTest.FiniteChannelStateReader(totalStates, states); final int totalBuffers = 3; final NettyShuffleEnvironment environment = new NettyShuffleEnvironmentBuilder() .setBufferSize(states.length * Integer.BYTES) .setNumNetworkBuffers(totalBuffers) .build(); final SingleInputGate inputGate = createInputGate(environment); final ExecutorService executor = Executors.newFixedThreadPool(3); try { inputGate.setup(); Callable<Void> closeTask = () -> { inputGate.close(); return null; }; Callable<Void> readRecoveredStateTask = () -> { inputGate.readRecoveredState(executor, stateReader); return null; }; Callable<Void> processStateTask = () -> { while (true) { try { if (!getNextBufferAndVerify(inputGate, states)) { Thread.sleep(1); } } catch (Throwable t) { <START> assertTrue("The gate is expected closed, but the actual exception is " + t.getMessage(), inputGate.getCloseFuture().isDone()); <END> return null; } } }; submitTasksAndWaitForResults(executor, new Callable[] {closeTask, readRecoveredStateTask, processStateTask}); assertEquals(totalBuffers, environment.getNetworkBufferPool().getNumberOfAvailableMemorySegments()); } finally { executor.shutdown(); environment.close(); } }</code><technical_language>error message I is incorrect, I guess point is, if close future is done, exception occur? if (!inputGate.getCloseFuture().isDone()) { throw new AssertionError("Exceptions expected if gate closed", t); }</technical_language>

Target:
public void testConcurrentReadStateAndProcessAndClose() throws Exception { final int totalStates = 5; final int[] states = {1, 2, 3, 4}; final ChannelStateReader stateReader = new ResultPartitionTest.FiniteChannelStateReader(totalStates, states); final int totalBuffers = 3; final NettyShuffleEnvironment environment = new NettyShuffleEnvironmentBuilder() .setBufferSize(states.length * Integer.BYTES) .setNumNetworkBuffers(totalBuffers) .build(); final SingleInputGate inputGate = createInputGate(environment); final ExecutorService executor = Executors.newFixedThreadPool(3); try { inputGate.setup(); Callable<Void> closeTask = () -> { inputGate.close(); return null; }; Callable<Void> readRecoveredStateTask = () -> { inputGate.readRecoveredState(executor, stateReader); return null; }; Callable<Void> processStateTask = () -> { while (true) { try { if (!getNextBufferAndVerify(inputGate, states)) { Thread.sleep(1); } } catch (Throwable t) { if (!inputGate.getCloseFuture().isDone()) { throw new AssertionError("Exceptions are expected here only if the gate was closed", t); } return null; } } }; submitTasksAndWaitForResults(executor, new Callable[] {closeTask, readRecoveredStateTask, processStateTask}); assertEquals(totalBuffers, environment.getNetworkBufferPool().getNumberOfAvailableMemorySegments()); } finally { executor.shutdown(); environment.close(); } }
Source:
<code>public static boolean validResponse(String request, String responsePattern, BufferedReader r, Writer wr) throws IOException { boolean validResponse = true; if (!Strings.isNullOrEmpty(request) && !Strings.isNullOrEmpty(responsePattern)) { String l = null; validResponse = false; LOG.debug("writing {}, hoping response matches /{}/", request, responsePattern); wr.write(request); wr.flush(); Pattern p = Pattern.compile(responsePattern); String str = ""; int i; try { while((i = r.read()) != -1) { <START> str += (char)i; <END> } } catch (InterruptedIOException e) { LOG.debug("response was: {}", str); } validResponse = p.matcher(str).matches(); } return validResponse; }</code><technical_language>a StringBuilder instead of appending a string</technical_language>

Target:
public static boolean validResponse(String request, String responsePattern, BufferedReader r, Writer wr) throws IOException { boolean validResponse = true; if (!Strings.isNullOrEmpty(request) && !Strings.isNullOrEmpty(responsePattern)) { String l = null; validResponse = false; LOG.debug("writing {}, hoping response matches /{}/", request, responsePattern); wr.write(request); wr.flush(); Pattern p = Pattern.compile(responsePattern); StringBuilder sb = new StringBuilder(); int i; try { while((i = r.read()) != -1) { sb.append((char)i); } } catch (InterruptedIOException e) { LOG.debug("response was: {}", sb.toString()); } validResponse = p.matcher(sb.toString()).matches(); } return validResponse; }
Source:
<code>public void ovfUpdate_timer() { log.info("OvfDataUpdater: Attempting to update VMs/Templates Ovf."); <START> List<storage_pool> storagePools = DbFacade.getInstance().getStoragePoolDao().getAll(); <END> for (storage_pool pool : storagePools) { try { if (StoragePoolStatus.Up == pool.getstatus()) { log.infoFormat("OvfDataUpdater: Attempting to update VMs/Templates Ovf in Data Center {0}", pool.getname()); List<VM> vmsForUpdate = getVmsForUpdate(DbFacade.getInstance() .getVmDao() .getAllVmsForOvfUpdateForStoragePool(pool.getId())); VmCommand.updateVmInSpm(pool.getId(), vmsForUpdate); if (!vmsForUpdate.isEmpty()) { for (VM vm : vmsForUpdate) { DbFacade.getInstance() .getVmDao() .updateVmOvfGeneration(vm.getId(), vm.getStaticData().getDb_generation()); } } List<VmTemplate> templatesForUpdate = getTemplatesForUpdate(DbFacade.getInstance() .getVmTemplateDao() .getAllVmTemplatesForOvfUpdateForStoragePool(pool.getId())); if (!templatesForUpdate.isEmpty()) { VmTemplateCommand.UpdateTemplateInSpm(pool.getId(), templatesForUpdate); for (VmTemplate template : templatesForUpdate) { DbFacade.getInstance() .getVmDao() .updateVmOvfGeneration(template.getId(), template.getDb_generation()); } } } } catch (Exception ex) { addAuditLogError(pool.getname()); log.errorFormat("Exception while trying to update VMs/Templates ovf in Data Center {0}, the exception is {1}", pool.getname(), ex.getMessage()); } } }</code><technical_language>Please getStoragePoolDao() convention (i.e - add a method of getStoragePoolDao() { return DbFacade.getInstance().getStoragePoolDao(); }</technical_language>

Target:
public void ovfUpdate_timer() { log.info("OvfDataUpdater: Attempting to update VMs/Templates Ovf."); List<storage_pool> storagePools = getStoragePoolDao().getAll(); for (storage_pool pool : storagePools) { try { if (StoragePoolStatus.Up == pool.getstatus()) { log.infoFormat("OvfDataUpdater: Attempting to update vms Ovf in Data Center {0}", pool.getname()); updateOvfForVmsOfStoragePool(pool.getId()); log.infoFormat("OvfDataUpdater: Attempting to update templates Ovf in Data Center {0}", pool.getname()); updateOvfForTemplatesOfStoragePool(pool.getId()); if (!proccessedIdsInfo.isEmpty()) { performVdsUpdateOperationIfNeeded(pool.getId(), true); } } } catch (Exception ex) { addAuditLogError(pool.getname()); log.errorFormat("Exception while trying to update VMs/Templates ovf in Data Center {0}, the exception is {1}", pool.getname(), ex.getMessage()); log.debug(ex.getStackTrace()); } } }
Source:
<code>public void handleTaskCompletion(AppInstallStatus result) { if (result == AppInstallStatus.UpdateStaged) { uiController.unappliedUpdateAvailableUiState(); if (proceedAutomatically) { launchUpdateInstallTask(); return; } } else if (result == AppInstallStatus.UpToDate) { uiController.upToDateUiState(); if (proceedAutomatically) { finishWithResult(RefreshToLatestBuildActivity.ALREADY_UP_TO_DATE); return; } } else { uiController.checkFailedUiState(); if (proceedAutomatically) { finishWithResult(RefreshToLatestBuildActivity.UPDATE_ERROR); return; } } <START> unregisterTask(); <END> uiController.refreshView(); }</code><technical_language>good idea call unregisterTask() proceedAutomatically is set true</technical_language>

Target:
public void handleTaskCompletion(AppInstallStatus result) { if (result == AppInstallStatus.UpdateStaged) { uiController.unappliedUpdateAvailableUiState(); if (proceedAutomatically) { launchUpdateInstallTask(); return; } } else if (result == AppInstallStatus.UpToDate) { uiController.upToDateUiState(); if (proceedAutomatically) { unregisterTask(); finishWithResult(RefreshToLatestBuildActivity.ALREADY_UP_TO_DATE); return; } } else { uiController.checkFailedUiState(); if (proceedAutomatically) { unregisterTask(); finishWithResult(RefreshToLatestBuildActivity.UPDATE_ERROR); return; } } unregisterTask(); uiController.refreshView(); }
Source:
<code>public void start(final BundleContext context) throws Exception { super.start(context); pluginId = context.getBundle().getSymbolicName(); Dictionary<String, String> props = new Hashtable<String, String>(4); props.put(DebugOptions.LISTENER_SYMBOLICNAME, pluginId); context.registerService(DebugOptionsListener.class.getName(), this, props); repositoryCache = new RepositoryCache(); indexDiffCache = new IndexDiffCache(); try { GitProjectData.reconfigureWindowCache(); } catch (RuntimeException e) { logError(CoreText.Activator_ReconfigureWindowCacheError, e); } GitProjectData.attachToWorkspace(true); IEclipsePreferences node = InstanceScope.INSTANCE.getNode(Activator.getPluginId()); String gitPrefix = node.get(GitCorePreferences.core_gitPrefix, null); if (gitPrefix != null) FS.DETECTED.setGitPrefix(new File(gitPrefix)); repositoryUtil = new RepositoryUtil(); secureStore = new EGitSecureStore(SecurePreferencesFactory.getDefault()); registerAutoShareProjects(); if (egitChangeListener == null) { egitChangeListener = new IResourceChangeListener() { public void resourceChanged(IResourceChangeEvent event) { IResource project = event.getResource(); <START> if (project != null && project instanceof IProject) <END> GitProjectData.reconfigureWindowCache(); } }; ResourcesPlugin.getWorkspace().addResourceChangeListener(egitChangeListener, IResourceChangeEvent.PRE_DELETE); } }</code><technical_language>need protect instanceof null pointerns. Wrap this done registerAutoShareProjects</technical_language>

Target:
public void start(final BundleContext context) throws Exception { super.start(context); pluginId = context.getBundle().getSymbolicName(); Dictionary<String, String> props = new Hashtable<String, String>(4); props.put(DebugOptions.LISTENER_SYMBOLICNAME, pluginId); context.registerService(DebugOptionsListener.class.getName(), this, props); repositoryCache = new RepositoryCache(); indexDiffCache = new IndexDiffCache(); try { GitProjectData.reconfigureWindowCache(); } catch (RuntimeException e) { logError(CoreText.Activator_ReconfigureWindowCacheError, e); } GitProjectData.attachToWorkspace(true); IEclipsePreferences node = InstanceScope.INSTANCE.getNode(Activator.getPluginId()); String gitPrefix = node.get(GitCorePreferences.core_gitPrefix, null); if (gitPrefix != null) FS.DETECTED.setGitPrefix(new File(gitPrefix)); repositoryUtil = new RepositoryUtil(); secureStore = new EGitSecureStore(SecurePreferencesFactory.getDefault()); registerAutoShareProjects(); if (egitChangeListener == null) { egitChangeListener = new IResourceChangeListener() { public void resourceChanged(IResourceChangeEvent event) { IResource project = event.getResource(); if (project instanceof IProject) GitProjectData.reconfigureWindowCache(); } }; ResourcesPlugin.getWorkspace().addResourceChangeListener(egitChangeListener, IResourceChangeEvent.PRE_DELETE); } }
Source:
<code><START> public GASMeterDevice findGASMeteringDevice(final String deviceIdentification) throws FunctionalException { <END> final GASMeterDevice gASMeteringDevice; try { gASMeteringDevice = this.smartMeteringDeviceDomainService.searchGASMeteringDevice(deviceIdentification); } catch (final UnknownEntityException e) { throw new FunctionalException(FunctionalExceptionType.UNKNOWN_DEVICE, COMPONENT_TYPE, e); } return gASMeteringDevice; }</code><technical_language>I gas is written in capital letters, this conform common capitalization conventions. of GASMeterDevice GASMeteringDevice avoidable inconsistency</technical_language>

Target:
public GasMeterDevice findGASMeteringDevice(final String deviceIdentification) throws FunctionalException { final GasMeterDevice gasMeteringDevice; try { gasMeteringDevice = this.smartMeteringDeviceDomainService.searchGasMeteringDevice(deviceIdentification); } catch (final UnknownEntityException e) { throw new FunctionalException(FunctionalExceptionType.UNKNOWN_DEVICE, COMPONENT_TYPE, e); } return gasMeteringDevice; }
Source:
<code>public Observable<Void> unregister() { STATE currentState = moveToState(STATE.Closed); switch (currentState) { case Registered: <START> InstanceInfo instanceInfo = registrationSubject.getValue(); <END> logger.info("Unregistering service in registry: {}", instanceInfo.getId()); registrationSubject.onCompleted(); break; case Closed: logger.info("Unregister on an already closed channel. This is a no-op"); return Observable.empty(); case Idle: logger.info("Unregistered an Idle channel, This is a no-op"); break; } return sendAckOnTransport().doOnTerminate(new Action0() { @Override public void call() { close(); } }); }</code><technical_language>@ Experimental method, avoid</technical_language>

Target:
public Observable<Void> unregister() { STATE currentState = moveToState(STATE.Closed); switch (currentState) { case Registered: logger.info("Unregistering service in registry: {}", lastInstanceInfo.getId()); registrationSubject.onCompleted(); break; case Closed: logger.info("Unregister on an already closed channel. This is a no-op"); return Observable.empty(); case Idle: logger.info("Unregistered an Idle channel, This is a no-op"); break; } return sendAckOnTransport().doOnTerminate(new Action0() { @Override public void call() { close(); } }); }
Source:
<code>public int getStatus() { <START> return response.getStatus().code(); <END> }</code><technical_language>response.status().code()</technical_language>

Target:
public int getStatus() { return response.status().code(); }