auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private void refreshValues() { try { txtPrincipal.setText(loan.getPrincipal().toAmountAndSymbolString()); lblAPR.setText(loan.getInterestRate() + "%"); lblCollateralPct.setText(loan.getCollateralPercent() + "%"); lblYears.setText(loan.getYears() + " years"); lblSchedule.setText(Finances.getScheduleName(loan.getPaymentSchedule())); lblPrincipal.setText(loan.getPrincipal().toAmountAndSymbolString()); lblFirstPayment.setText(SimpleDateFormat.getDateInstance().format(loan.getNextPayDate())); lblPayAmount.setText(loan.getPaymentAmount().toAmountAndSymbolString()); lblNPayment.setText(numberFormatter.valueToString(loan.getRemainingPayments())); lblTotalPayment.setText(loan.getRemainingValue().toAmountAndSymbolString()); lblCollateralAmount.setText(loan.getCollateralAmount().toAmountAndSymbolString()); } catch (Exception ignored ){ <START> <END> } }</code><technical_language>log this exception if impacts UI functionality</technical_language>

Target:
private void refreshValues() { final String METHOD_NAME = "refreshValues"; try { txtPrincipal.setText(loan.getPrincipal().toAmountAndSymbolString()); lblAPR.setText(loan.getInterestRate() + "%"); lblCollateralPct.setText(loan.getCollateralPercent() + "%"); lblYears.setText(loan.getYears() + " years"); lblSchedule.setText(Finances.getScheduleName(loan.getPaymentSchedule())); lblPrincipal.setText(loan.getPrincipal().toAmountAndSymbolString()); lblFirstPayment.setText(SimpleDateFormat.getDateInstance().format(loan.getNextPayDate())); lblPayAmount.setText(loan.getPaymentAmount().toAmountAndSymbolString()); lblNPayment.setText(numberFormatter.valueToString(loan.getRemainingPayments())); lblTotalPayment.setText(loan.getRemainingValue().toAmountAndSymbolString()); lblCollateralAmount.setText(loan.getCollateralAmount().toAmountAndSymbolString()); } catch (Exception ex ){ MekHQ.getLogger().error(NewLoanDialog.class, METHOD_NAME, ex); } }
Source:
<code>public synchronized void refreshCache() { <START> log.debug("refreshCache"); <END> ResourceResolver resolver = null; try { resolver = getResourceResolver(); Resource aprRoot = resolver.getResource(getRootPath()); List<String> configuredIds = new ArrayList<String>(); for (Resource child : aprRoot.getChildren()) { if (!JcrConstants.JCR_CONTENT.equals(child.getName())) { updateJobService(child.getPath(), child.getChild(JcrConstants.JCR_CONTENT)); configuredIds.add(child.getPath()); } } String filter = "(" + SERVICE_OWNER_KEY + "=" + getClass().getCanonicalName() + ")"; ServiceReference[] serviceReferences = (ServiceReference[]) ArrayUtils.addAll( bctx.getServiceReferences(Runnable.class.getCanonicalName(), filter), bctx.getServiceReferences(EventHandler.class.getCanonicalName(), filter)); log.warn("Found registered services", serviceReferences.length); for (ServiceReference reference : serviceReferences) { try { String configurationId = (String) reference.getProperty(CONFIGURATION_ID_KEY); if (!configuredIds.contains(configurationId)) { log.debug("Unregistering service for configuration {}", configurationId); this.unregisterService(configurationId); } } catch (Exception e) { log.warn("Exception unregistering reference " + reference, e); } } } catch (InvalidSyntaxException e) { log.warn("Unable to search for invalid references due to invalid filter format", e); } finally { if (resolver != null) { resolver.close(); } } }</code><technical_language>trace</technical_language>

Target:
public synchronized void refreshCache() { log.trace("refreshCache"); ResourceResolver resolver = null; try { resolver = getResourceResolver(); Resource aprRoot = resolver.getResource(getRootPath()); List<String> configuredIds = new ArrayList<String>(); for (Resource child : aprRoot.getChildren()) { if (!JcrConstants.JCR_CONTENT.equals(child.getName())) { log.debug("Updating service for configuration {}", child.getPath()); updateJobService(child.getPath(), child.getChild(JcrConstants.JCR_CONTENT)); configuredIds.add(child.getPath()); } } String filter = "(" + SERVICE_OWNER_KEY + "=" + getClass().getCanonicalName() + ")"; ServiceReference[] serviceReferences = (ServiceReference[]) ArrayUtils.addAll( bctx.getServiceReferences(Runnable.class.getCanonicalName(), filter), bctx.getServiceReferences(EventHandler.class.getCanonicalName(), filter)); log.debug("Found registered services", serviceReferences.length); for (ServiceReference reference : serviceReferences) { try { String configurationId = (String) reference.getProperty(CONFIGURATION_ID_KEY); if (!configuredIds.contains(configurationId)) { log.debug("Unregistering service for configuration {}", configurationId); this.unregisterService(configurationId); } } catch (Exception e) { log.warn("Exception unregistering reference " + reference, e); } } } catch (InvalidSyntaxException e) { log.warn("Unable to search for invalid references due to invalid filter format", e); } finally { if (resolver != null) { resolver.close(); } } }
Source:
<code>public static String <START> nullToEmptyString(@Nullable <END> Object obj) { if (obj == null) { return ""; } String str = obj.toString(); return str != null ? str : ""; }</code><technical_language>If me, I call this method toString(Object)</technical_language>

Target:
public static String nullToEmptyString(@Nullable Object obj) { if (obj == null) { return ""; } String str = obj.toString(); return (str == null ? "" : str); }
Source:
<code>public static CloudConfigurationProvider getCloudConfigurationProvider() { if (!isEnabled()) { return null; } return <START> getCloudConfigurationProviderExtension(); <END> }</code><technical_language>rename getExtension</technical_language>

Target:
public static CloudConfigurationProvider getCloudConfigurationProvider() { if (!isEnabled()) { return null; } return getExtension(); }
Source:
<code>public static TaskInfo getTaskInfoFromTaskType(TaskType taskType, String taskInfoString) throws IOException { TaskInfo taskInfo = null; try { switch(taskType) { case DATA_QUALITY: taskInfo = OBJECT_MAPPER.readValue(taskInfoString, DetectionPipelineTaskInfo.class); break; case DETECTION: taskInfo = OBJECT_MAPPER.readValue(taskInfoString, DetectionPipelineTaskInfo.class); break; case DETECTION_ALERT: taskInfo = OBJECT_MAPPER.readValue(taskInfoString, DetectionAlertTaskInfo.class); break; case YAML_DETECTION_ONBOARD: taskInfo = OBJECT_MAPPER.readValue(taskInfoString, YamlOnboardingTaskInfo.class); break; case ANOMALY_DETECTION: taskInfo = OBJECT_MAPPER.readValue(taskInfoString, DetectionTaskInfo.class); break; case MERGE: LOG.error("TaskType MERGE not supported"); break; case MONITOR: taskInfo = OBJECT_MAPPER.readValue(taskInfoString, MonitorTaskInfo.class); break; default: LOG.error("TaskType must be one of ANOMALY_DETECTION, MONITOR, ALERT, ALERT2, DATA_COMPLETENESS, CLASSIFICATION"); break; <START> } <END> } catch (Exception e) { LOG.error("Exception in converting taskInfoString to taskType {}", taskInfoString, taskType, e); } return taskInfo; }</code><technical_language>ANOMALY_DETECTION MERGE tasks used</technical_language>

Target:
public static TaskInfo getTaskInfoFromTaskType(TaskType taskType, String taskInfoString) throws IOException { TaskInfo taskInfo = null; try { switch(taskType) { case DATA_QUALITY: taskInfo = OBJECT_MAPPER.readValue(taskInfoString, DetectionPipelineTaskInfo.class); break; case DETECTION: taskInfo = OBJECT_MAPPER.readValue(taskInfoString, DetectionPipelineTaskInfo.class); break; case DETECTION_ALERT: taskInfo = OBJECT_MAPPER.readValue(taskInfoString, DetectionAlertTaskInfo.class); break; case YAML_DETECTION_ONBOARD: taskInfo = OBJECT_MAPPER.readValue(taskInfoString, YamlOnboardingTaskInfo.class); break; case MONITOR: taskInfo = OBJECT_MAPPER.readValue(taskInfoString, MonitorTaskInfo.class); break; default: LOG.error("TaskType must be one of DATA_QUALITY, DETECTION, DETECTION_ALERT, YAML_DETECTION_ONBOARD, MONITOR"); break; } } catch (Exception e) { LOG.error("Exception in converting taskInfoString to taskType {}", taskInfoString, taskType, e); } return taskInfo; }
Source:
<code>public String toString() { <START> return "HeatAdoptStackData{" + "id=" + id + ", name=" + name + ", status=" + status + ", resources=" + resources + '}'; <END> }</code><technical_language>prefer public String toString() { MoreObjects.toStringHelper(this).omitNullValues() .add("id", id) .add(...) .toString(); } do @akemr</technical_language>

Target:
public String toString() { return MoreObjects.toStringHelper(this).omitNullValues() .add("id", id) .add("name", name) .add("status", status) .add("resources", resources) .toString(); }
Source:
<code>private boolean handleWMSSpecific(final ActionParameters params, OskariLayer ml) { <START> final String xslt = params.getHttpParam("xslt"); <END> if(xslt != null) { ml.setGfiXslt(xslt); } ml.setGfiType(params.getHttpParam("gfiType", ml.getGfiType())); try { OskariLayerCapabilities raw = capabilitiesService.getCapabilities(ml, true); WebMapService wms = OskariLayerCapabilitiesHelper.parseWMSCapabilities(raw.getData(), ml); OskariLayerCapabilitiesHelper.setPropertiesFromCapabilitiesWMS(wms, ml); return true; } catch (ServiceException ex) { LOG.error(ex, "Couldn't update capabilities for layer", ml); return false; } }</code><technical_language>difference is want run jsoup not. xslt is modified jsoup</technical_language>

Target:
private boolean handleWMSSpecific(final ActionParameters params, OskariLayer ml) { HttpServletRequest request = params.getRequest(); final String xslt = request.getParameter("xslt"); if(xslt != null) { ml.setGfiXslt(xslt); } ml.setGfiType(params.getHttpParam("gfiType", ml.getGfiType())); try { OskariLayerCapabilities raw = capabilitiesService.getCapabilities(ml, true); WebMapService wms = OskariLayerCapabilitiesHelper.parseWMSCapabilities(raw.getData(), ml); OskariLayerCapabilitiesHelper.setPropertiesFromCapabilitiesWMS(wms, ml); return true; } catch (ServiceException ex) { LOG.error(ex, "Couldn't update capabilities for layer", ml); return false; } }
Source:
<code>public void testChannelClosedException() throws IOException { GoogleCloudStorage rawStorage = createGoogleCloudStorage(); <START> final int totalBytes = 1200; <END> StorageResourceId resourceId = new StorageResourceId(BUCKET_NAME, "testChannelClosedException_Object"); writeObject(rawStorage, resourceId, totalBytes); byte[] readArray = new byte[totalBytes]; SeekableByteChannel readableByteChannel = rawStorage.open(resourceId); ByteBuffer readBuffer = ByteBuffer.wrap(readArray); readBuffer.limit(5); readableByteChannel.read(readBuffer); assertThat(readableByteChannel.position()).isEqualTo(readBuffer.position()); readableByteChannel.close(); readBuffer.clear(); assertThrows(ClosedChannelException.class, () -> readableByteChannel.read(readBuffer)); }</code><technical_language>Remove final</technical_language>

Target:
public void testChannelClosedException() throws IOException { GoogleCloudStorage rawStorage = createGoogleCloudStorage(); int totalBytes = 1200; StorageResourceId resourceId = new StorageResourceId(BUCKET_NAME, "testChannelClosedException_Object"); writeObject(rawStorage, resourceId, totalBytes); byte[] readArray = new byte[totalBytes]; SeekableByteChannel readableByteChannel = rawStorage.open(resourceId); ByteBuffer readBuffer = ByteBuffer.wrap(readArray); readBuffer.limit(5); readableByteChannel.read(readBuffer); assertThat(readableByteChannel.position()).isEqualTo(readBuffer.position()); readableByteChannel.close(); readBuffer.clear(); assertThrows(ClosedChannelException.class, () -> readableByteChannel.read(readBuffer)); }
Source:
<code>public DataType createDataType(int sqlType, String sqlTypeName) throws DataTypeException { LOG.debug("createDataType(sqlType={}, sqlTypeName={})", String.valueOf(sqlType), sqlTypeName); <START> if (sqlType == Types.OTHER) <END> if ("json".equals(sqlTypeName)) { return new JsonType(); } else if ("uuid".equals(sqlTypeName)) return new UuidType(); else if ("interval".equals(sqlTypeName)) return new IntervalType(); else if ("inet".equals(sqlTypeName)) return new InetType(); else if("geometry".equals(sqlTypeName)) return new GeometryType(); else if("citext".equals(sqlTypeName)) return new CitextType(); else { if(isEnumType(sqlTypeName)) { if(LOG.isDebugEnabled()) LOG.debug("Custom enum type used for sqlTypeName (sqlType '{}')", new Object[] {sqlTypeName, new Integer(sqlType)} ); return new GenericEnumType(sqlTypeName); } } return super.createDataType(sqlType, sqlTypeName); }</code><technical_language>This is confusing - curly braces line 25 lines 29-40</technical_language>

Target:
public DataType createDataType(int sqlType, String sqlTypeName) throws DataTypeException { LOG.debug("createDataType(sqlType={}, sqlTypeName={})", String.valueOf(sqlType), sqlTypeName); if (sqlType == Types.OTHER && "json".equals(sqlTypeName)) { return new JsonType(); } else { return super.createDataType(sqlType, sqlTypeName); } }
Source:
<code>private static String profileArgsDesc(String method, List<String> args) { StringBuilder b = new StringBuilder(); b.append(method).append(": "); String sep = ""; for (String arg : args) { <START> int appendLen = arg.length() + sep.length(); <END> int remainingLen = MAX_PROFILE_ARGS_LEN - b.length(); if (appendLen <= remainingLen) { b.append(sep); b.append(arg); } else { String shortenedArg = (sep + arg).substring(0, remainingLen); b.append(shortenedArg); b.append("..."); break; } sep = " "; } return b.toString(); }</code><technical_language>super-nit: please swap arg sep order appending order</technical_language>

Target:
private static String profileArgsDesc(String method, List<String> args) { StringBuilder b = new StringBuilder(); b.append(method).append(":"); final String sep = " "; for (String arg : args) { int appendLen = sep.length() + arg.length(); int remainingLen = MAX_PROFILE_ARGS_LEN - b.length(); if (appendLen <= remainingLen) { b.append(sep); b.append(arg); } else { String shortenedArg = (sep + arg).substring(0, remainingLen); b.append(shortenedArg); b.append("..."); break; } } return b.toString(); }
Source:
<code>public Response intercept(Chain chain) throws IOException { <START> okhttp3.Request requestWithUserAgent = chain.request() <END> .newBuilder() .addHeader(USER_AGENT_HEADER, userAgent) .build(); return chain.proceed(requestWithUserAgent); }</code><technical_language>import Request</technical_language>

Target:
public Response intercept(Chain chain) throws IOException { Request requestWithUserAgent = chain.request() .newBuilder() .addHeader(USER_AGENT_HEADER, userAgent) .build(); return chain.proceed(requestWithUserAgent); }
Source:
<code>private static <E> Set<E> computeIgnoredElements(Comparison comparison, IEqualityHelper equalityHelper, List<E> candidates, final Diff diff, boolean rightToLeft) { <START> if (!candidates.isEmpty()) { <END> IgnoredElementsEntry currentIgnoredElementsEntry = null; Iterable<? extends Diff> filteredCandidates = null; final Set<E> ignored = Sets.newLinkedHashSet(); UnresolvedDiffMatching predicate = new UnresolvedDiffMatching(comparison, equalityHelper, diff, rightToLeft); for (E candidate : candidates) { predicate.setReferenceValue(candidate); if (candidate instanceof EObject) { if (currentIgnoredElementsEntry == null) { currentIgnoredElementsEntry = ignoredElementsEntry.get(); if (currentIgnoredElementsEntry == null || !currentIgnoredElementsEntry.appliesTo(candidates)) { currentIgnoredElementsEntry = new IgnoredElementsEntry(comparison, candidates); ignoredElementsEntry = new WeakReference<IgnoredElementsEntry>( currentIgnoredElementsEntry); } } List<Diff> differences = currentIgnoredElementsEntry.getDifferences(candidate); if (Iterables.any(differences, predicate)) { ignored.add(candidate); } } else { if (filteredCandidates == null) { Match match = diff.getMatch(); filteredCandidates = Lists.newArrayList(match.getDifferences()); } if (Iterables.any(filteredCandidates, predicate)) { ignored.add(candidate); } } } return ignored; } else { return Collections.emptySet(); } }</code><technical_language>Clear exit conditions beginning of methods. if (candidates.isEmpty()) { return Collections.emptySet(); }</technical_language>

Target:
private static <E> Set<E> computeIgnoredElements(Comparison comparison, IEqualityHelper equalityHelper, List<E> candidates, final Diff diff, boolean rightToLeft) { if (!candidates.isEmpty()) { return Collections.emptySet(); } IgnoredElementsEntry currentIgnoredElementsEntry = null; Iterable<? extends Diff> filteredCandidates = null; final Set<E> ignored = Sets.newLinkedHashSet(); UnresolvedDiffMatching predicate = new UnresolvedDiffMatching(comparison, equalityHelper, diff, rightToLeft); for (E candidate : candidates) { predicate.setReferenceValue(candidate); if (candidate instanceof EObject) { if (currentIgnoredElementsEntry == null) { currentIgnoredElementsEntry = ignoredElementsEntry.get(); if (currentIgnoredElementsEntry == null || !currentIgnoredElementsEntry.appliesTo(candidates)) { currentIgnoredElementsEntry = new IgnoredElementsEntry(comparison, candidates); ignoredElementsEntry = new WeakReference<IgnoredElementsEntry>( currentIgnoredElementsEntry); } } List<Diff> differences = currentIgnoredElementsEntry.getDifferences(candidate); if (Iterables.any(differences, predicate)) { ignored.add(candidate); } } else { if (filteredCandidates == null) { Match match = diff.getMatch(); filteredCandidates = Lists.newArrayList(match.getDifferences()); } if (Iterables.any(filteredCandidates, predicate)) { ignored.add(candidate); } } } return ignored; }
Source:
<code>public boolean visit(@Nonnull JMethod method) { <START> if (method.isNative() || method.isAbstract()) { return false; } <END> if (ams == null || throwable == null || boostMethodId == null || resetMethodId == null) { return false; } return super.visit(method); }</code><technical_language>Move run() method</technical_language>

Target:
public boolean visit(@Nonnull JMethod method) { if (method.isNative() || method.isAbstract()) { return false; } return super.visit(method); }
Source:
<code>public AtomicFileWriter(@Nonnull Path destinationPath, @Nonnull Charset charset) throws IOException { if (charset == null) { throw new IllegalArgumentException("charset is null"); } this.destPath = destinationPath; Path dir = this.destPath.getParent(); if (Files.exists(dir) && !Files.isDirectory(dir)) { throw new IOException(dir + " exists and is neither a directory nor a symlink to a directory"); } else { if (Files.isSymbolicLink(dir)) { LOGGER.log(Level.CONFIG, "{0} is a symlink to a directory", dir); } else { Files.createDirectories(dir); } } try { tmpPath = Files.createTempFile(dir, "atomic", "tmp"); } catch (IOException e) { throw new IOException("Failed to create a temporary file in "+ dir,e); } <START> core = new FileChannelWriter(tmpPath, charset, false, StandardOpenOption.WRITE); <END> }</code><technical_language>helpful write in-memory buffer? files typically smallish, all, do care heap usage much, do care is flushing when. If commit is called, write entire buffer temp file (if lucky this a single block), is synched, do atomic rename. I add a flag XmlFile allowing callers opt out of expensive consistency guarantees, default strict mode. Run.getDataFile SimpleXStreamFlowNodeStorage.getNodeFile lax mode, accepting risk of corrupted data in exchange for performance. guide callers this decision explicitly (say) deprecating existing XmlFile constructors in favor of a boolean flag</technical_language>

Target:
public AtomicFileWriter(@Nonnull Path destinationPath, @Nonnull Charset charset) throws IOException { this(destinationPath, charset, false, true); }
Source:
<code>public static String getVersion() { final Properties properties = new Properties(); ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); <START> InputStream stream = classLoader.getResourceAsStream("project.properties"); <END> try { properties.load(stream); stream.close(); return properties.getProperty("version"); } catch (IOException e) { try { stream.close(); } catch (IOException ex) { ex.printStackTrace(); } e.printStackTrace(); return "?.?.?"; } }</code><technical_language>I this enough: try (InputStream stream = classLoader.getResourceAsStream("project.properties")) { properties.load(stream); return properties.getProperty("version"); }</technical_language>

Target:
public static String getVersion() { final Properties properties = new Properties(); ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); try (InputStream stream = classLoader.getResourceAsStream("project.properties")) { properties.load(stream); return properties.getProperty("version"); } catch (IOException e) { e.printStackTrace(); return "?.?.?"; } }
Source:
<code>protected void syncSearch() { <START> SearchParameters tempVar = new SearchParameters(getSearchString(), SearchType.VDS, isCaseSensitiveSearch()); <END> tempVar.setRefresh(getIsQueryFirstTime()); super.syncSearch(VdcQueryType.Search, tempVar); }</code><technical_language>this model is influenced searchbar, remove patch</technical_language>

Target:
protected void syncSearch() { SearchParameters tempVar = new SearchParameters(getSearchString(), SearchType.VDS); tempVar.setRefresh(getIsQueryFirstTime()); super.syncSearch(VdcQueryType.Search, tempVar); }
Source:
<code>public boolean onKeyUp(int keyCode, KeyEvent event) { AudioManager audioManager = (AudioManager) getSystemService(AUDIO_SERVICE); switch (keyCode) { case KeyEvent.KEYCODE_P: case KeyEvent.KEYCODE_SPACE: onPlayPause(); toggleVideoControlsVisibility(); return true; case KeyEvent.KEYCODE_J: case KeyEvent.KEYCODE_A: case KeyEvent.KEYCODE_COMMA: onRewind(); showSkipAnimation(false); return true; case KeyEvent.KEYCODE_K: case KeyEvent.KEYCODE_D: case KeyEvent.KEYCODE_PERIOD: onFastForward(); showSkipAnimation(true); return true; case KeyEvent.KEYCODE_F: case KeyEvent.KEYCODE_ESCAPE: onBackPressed(); return true; case KeyEvent.KEYCODE_I: compatEnterPictureInPicture(); return true; case KeyEvent.KEYCODE_PLUS: case KeyEvent.KEYCODE_W: audioManager.adjustStreamVolume(AudioManager.STREAM_MUSIC, AudioManager.ADJUST_RAISE, AudioManager.FLAG_SHOW_UI); return true; case KeyEvent.KEYCODE_MINUS: case KeyEvent.KEYCODE_S: audioManager.adjustStreamVolume(AudioManager.STREAM_MUSIC, AudioManager.ADJUST_LOWER, AudioManager.FLAG_SHOW_UI); return true; case KeyEvent.KEYCODE_M: if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { <START> audioManager.adjustStreamVolume(AudioManager.STREAM_MUSIC, AudioManager.ADJUST_TOGGLE_MUTE, 0); <END> return true; } break; } if (keyCode >= KeyEvent.KEYCODE_0 && keyCode <= KeyEvent.KEYCODE_9) { controller.seekTo((int) (0.1f * (keyCode - KeyEvent.KEYCODE_0) * controller.getDuration())); return true; } return super.onKeyUp(keyCode, event); }</code><technical_language>please add AudioManager.FLAG_SHOW_UI here, too</technical_language>

Target:
public boolean onKeyUp(int keyCode, KeyEvent event) { AudioManager audioManager = (AudioManager) getSystemService(AUDIO_SERVICE); switch (keyCode) { case KeyEvent.KEYCODE_P: case KeyEvent.KEYCODE_SPACE: onPlayPause(); toggleVideoControlsVisibility(); return true; case KeyEvent.KEYCODE_J: case KeyEvent.KEYCODE_A: case KeyEvent.KEYCODE_COMMA: onRewind(); showSkipAnimation(false); return true; case KeyEvent.KEYCODE_K: case KeyEvent.KEYCODE_D: case KeyEvent.KEYCODE_PERIOD: onFastForward(); showSkipAnimation(true); return true; case KeyEvent.KEYCODE_F: case KeyEvent.KEYCODE_ESCAPE: onBackPressed(); return true; case KeyEvent.KEYCODE_I: compatEnterPictureInPicture(); return true; case KeyEvent.KEYCODE_PLUS: case KeyEvent.KEYCODE_W: audioManager.adjustStreamVolume(AudioManager.STREAM_MUSIC, AudioManager.ADJUST_RAISE, AudioManager.FLAG_SHOW_UI); return true; case KeyEvent.KEYCODE_MINUS: case KeyEvent.KEYCODE_S: audioManager.adjustStreamVolume(AudioManager.STREAM_MUSIC, AudioManager.ADJUST_LOWER, AudioManager.FLAG_SHOW_UI); return true; case KeyEvent.KEYCODE_M: if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { audioManager.adjustStreamVolume(AudioManager.STREAM_MUSIC, AudioManager.ADJUST_TOGGLE_MUTE, AudioManager.FLAG_SHOW_UI); return true; } break; } if (keyCode >= KeyEvent.KEYCODE_0 && keyCode <= KeyEvent.KEYCODE_9) { controller.seekTo((int) (0.1f * (keyCode - KeyEvent.KEYCODE_0) * controller.getDuration())); return true; } return super.onKeyUp(keyCode, event); }
Source:
<code>public List<Page> benchmarkJoin(Context context) { return context.getQueryRunner() <START> .execute("SELECT count(1) FROM points, polygons WHERE ST_Contains(ST_GeometryFromText(wkt), ST_Point(latitude, longitude))"); <END> }</code><technical_language>count(*) is more canonical count(1)</technical_language>

Target:
public List<Page> benchmarkJoin(Context context) { return context.getQueryRunner() .execute("SELECT count(*) FROM points, polygons WHERE ST_Contains(ST_GeometryFromText(wkt), ST_Point(latitude, longitude))"); }
Source:
<code>private InputStream open() throws IOException, CoreException, IncorrectObjectTypeException { final ObjectLoader reader = db.openBlob(blobId); if (reader == null) throw new CoreException(new Status(IStatus.ERROR, path, NLS.bind(CoreText.BlobStorage_blobNotFound, blobId), null)); <START> final byte[] data = reader.getBytes(); <END> if (reader.getType() != Constants.OBJ_BLOB) throw new IncorrectObjectTypeException(blobId, Constants.TYPE_BLOB); return new ByteArrayInputStream(data); }</code><technical_language>parameter of Status is pluginId. pass path here</technical_language>

Target:
private InputStream open() throws IOException, CoreException, IncorrectObjectTypeException { final ObjectLoader reader = db.openBlob(blobId); if (reader == null) throw new CoreException(Activator.error(NLS.bind( CoreText.BlobStorage_blobNotFound, blobId.name(), path), null)); final byte[] data = reader.getBytes(); if (reader.getType() != Constants.OBJ_BLOB) throw new IncorrectObjectTypeException(blobId, Constants.TYPE_BLOB); return new ByteArrayInputStream(data); }
Source:
<code>public LogEntry newObject() { return null; <START> } <END></code><technical_language>resource test i pointed in ticket description put some in method bodies? copy some ideas pull request i pointed done of team members</technical_language>

Target:
public LogEntry newObject() { return Context.getService(IdentifierSourceService.class) .getLogEntries(null, null, null, getUuidProperty(), null, null).get(0); }
Source:
<code>static public String getDescription(int quotaType) { HashMap<Integer, QuotaTypes> quotaMap = listQuotaTypes(); if (quotaMap.containsKey(quotaType)) { return quotaMap.get(quotaType).getDescription(); } <START> return null; <END> }</code><technical_language>Map.get return null if key is present in map. if block is unnecessary</technical_language>

Target:
static public String getDescription(int quotaType) { QuotaTypes t = quotaTypeMap.get(quotaType); if (t != null) { return t.getDescription(); } return null; }
Source:
<code>public void onSuccess(final int httpStatusCode, final String response, final Map<String, String> headers) { final PageItem page = JSonItemReader.parseItem(response, PageDefinition.get()); addBody(new DeletePageFormProblemsCallout(formMappings, page.getDisplayName())); pagesLeft--; <START> if (pagesLeft==0) { <END> addBody(new CalloutWarning(_("If you delete a page that is used by a process, the process becomes unresolved.\nBefore deleting a page, you should also check whether it is used in a custom profile navigation."))); addBody(new Paragraph(_("Do you still want to delete the selected pages?"))); } }</code><technical_language>inline : if (--pagesLeft==0)</technical_language>

Target:
public void onSuccess(final int httpStatusCode, final String response, final Map<String, String> headers) { final PageItem page = JSonItemReader.parseItem(response, PageDefinition.get()); addBody(new DeletePageFormProblemsCallout(formMappings, page.getDisplayName())); if (--pagesLeft==0) { addBody(new CalloutWarning(_("If you delete a page that is used by a process, the process becomes unresolved.\nBefore deleting a page, you should also check whether it is used in a custom profile navigation."))); addBody(new Paragraph(_("Do you still want to delete the selected pages?"))); } }
Source:
<code>private void setDarkReviewScreen(boolean enabled) { if (invokeSource == SUGGESTED_EDITS_ADD_CAPTION || invokeSource == FEED_CARD_SUGGESTED_EDITS_TRANSLATE_IMAGE_CAPTION || invokeSource == SUGGESTED_EDITS_TRANSLATE_CAPTION || invokeSource == FEED_CARD_SUGGESTED_EDITS_IMAGE_CAPTION) { int whiteRes = getResources().getColor(android.R.color.white); toolbarContainer.setBackgroundResource(enabled ? android.R.color.black : ResourceUtil.getThemedAttributeId(getContext(), R.attr.main_toolbar_color)); saveButton.setColorFilter(enabled ? whiteRes : ResourceUtil.getThemedColor(getContext(), R.attr.themed_icon_color), PorterDuff.Mode.SRC_IN); cancelButton.setColorFilter(enabled ? whiteRes : ResourceUtil.getThemedColor(getContext(), R.attr.main_toolbar_icon_color), PorterDuff.Mode.SRC_IN); headerText.setTextColor(enabled ? whiteRes : ResourceUtil.getThemedColor(getContext(), R.attr.main_toolbar_title_color)); ((DescriptionEditActivity) activity).updateStatusBarColor(enabled ? android.R.color.black : ResourceUtil.getThemedAttributeId(getContext(), R.attr.main_status_bar_color)); <START> ((DescriptionEditActivity) activity).updateNavigationBarColor(enabled ? ContextCompat.getColor(activity, android.R.color.black) : ResourceUtil.getThemedAttributeId(getContext(), R.attr.paper_color)); <END> DeviceUtil.updateStatusBarTheme(activity, null, enabled); } }</code><technical_language>Right, good me. Changed</technical_language>

Target:
private void setDarkReviewScreen(boolean enabled) { if (invokeSource == SUGGESTED_EDITS_ADD_CAPTION || invokeSource == FEED_CARD_SUGGESTED_EDITS_TRANSLATE_IMAGE_CAPTION || invokeSource == SUGGESTED_EDITS_TRANSLATE_CAPTION || invokeSource == FEED_CARD_SUGGESTED_EDITS_IMAGE_CAPTION) { int whiteRes = getResources().getColor(android.R.color.white); toolbarContainer.setBackgroundResource(enabled ? android.R.color.black : ResourceUtil.getThemedAttributeId(getContext(), R.attr.main_toolbar_color)); saveButton.setColorFilter(enabled ? whiteRes : ResourceUtil.getThemedColor(getContext(), R.attr.themed_icon_color), PorterDuff.Mode.SRC_IN); cancelButton.setColorFilter(enabled ? whiteRes : ResourceUtil.getThemedColor(getContext(), R.attr.main_toolbar_icon_color), PorterDuff.Mode.SRC_IN); headerText.setTextColor(enabled ? whiteRes : ResourceUtil.getThemedColor(getContext(), R.attr.main_toolbar_title_color)); ((DescriptionEditActivity) activity).updateStatusBarColor(enabled ? ContextCompat.getColor(activity, android.R.color.black) : ResourceUtil.getThemedColor(getContext(), R.attr.main_status_bar_color)); DeviceUtil.updateStatusBarTheme(activity, null, enabled); ((DescriptionEditActivity) activity).updateNavigationBarColor(enabled ? ContextCompat.getColor(activity, android.R.color.black) : ResourceUtil.getThemedColor(getContext(), R.attr.paper_color)); } }
Source:
<code>public void no_key_value_deserialization_on_server_when_entry_is_removed() { <START> if (inMemoryFormat == InMemoryFormat.OBJECT) { <END> return; } Config config = new Config(); config.getReplicatedMapConfig("default").setInMemoryFormat(inMemoryFormat); HazelcastInstance server = factory.newHazelcastInstance(config); HazelcastInstance client = factory.newHazelcastClient(); ReplicatedMap<DeserializationCounter, DeserializationCounter> replicatedMap = client.getReplicatedMap("test"); DeserializationCounter key = new Key1(); DeserializationCounter value = new Value1(); replicatedMap.put(key, value); replicatedMap.remove(key); assertEquals(0, ((Key1) key).COUNTER.get()); assertEquals(1, ((Value1) value).COUNTER.get()); }</code><technical_language>Assume.assumeThat(inMemoryFormat != OBJECT); for consistency junit conventions</technical_language>

Target:
public void no_key_value_deserialization_on_server_when_entry_is_removed() { Assume.assumeThat(inMemoryFormat, is(BINARY)); Config config = new Config(); config.getReplicatedMapConfig("default").setInMemoryFormat(inMemoryFormat); HazelcastInstance server = factory.newHazelcastInstance(config); HazelcastInstance client = factory.newHazelcastClient(); ReplicatedMap<DeserializationCounter, DeserializationCounter> replicatedMap = client.getReplicatedMap("test"); DeserializationCounter key = new Key1(); DeserializationCounter value = new Value1(); replicatedMap.put(key, value); replicatedMap.remove(key); assertEquals(0, ((Key1) key).COUNTER.get()); assertEquals(1, ((Value1) value).COUNTER.get()); }
Source:
<code>public MappingElasticsearchConverter elasticsearchEntityMapper( SimpleElasticsearchMappingContext elasticsearchMappingContext) { <START> return new MappingElasticsearchConverter(elasticsearchMappingContext, new DefaultConversionService()); <END> }</code><technical_language>a constructor a conversionService align other modules</technical_language>

Target:
public MappingElasticsearchConverter elasticsearchEntityMapper( SimpleElasticsearchMappingContext elasticsearchMappingContext) { return new MappingElasticsearchConverter(elasticsearchMappingContext); }
Source:
<code>public void testLongTransactionCleanup() throws Exception { conf.setInt(TxConstants.Manager.CFG_TX_CLEANUP_INTERVAL, 3); conf.setInt(TxConstants.Manager.CFG_TX_LONG_TIMEOUT, 2); TransactionManager txm = new TransactionManager (conf, new InMemoryTransactionStateStorage(), new TxMetricsCollector()); txm.startAndWait(); try { Assert.assertEquals(0, txm.getInvalidSize()); Assert.assertEquals(0, txm.getCommittedSize()); Transaction tx1 = txm.startLong(); Assert.assertEquals(0, txm.getInvalidSize()); Assert.assertEquals(0, txm.getCommittedSize()); TimeUnit.SECONDS.sleep(5); Assert.assertEquals(1, txm.getInvalidSize()); Assert.assertEquals(0, txm.getCommittedSize()); try { txm.canCommit(tx1, Collections.singleton(new byte[] { 0x11 })); Assert.fail(); } catch (TransactionNotInProgressException e) { } <START> txm.abort(tx1); <END> Assert.assertEquals(0, txm.getInvalidSize()); } finally { txm.stopAndWait(); } }</code><technical_language>This test TransactionManager.doAbort() handling, a change in behavior due this patch. Previously, long running transactions in progress timed out, hit branch in method -- resulting in long running transaction invalid list staying there. Now, this change, if long running transaction is timed out, calls abort(), hit branch in conditional logic, resulting in transaction ID removed invalid list. If making assumption long running transaction's edits rolled back, this is want. I preserve current behavior if relying in CDAP</technical_language>

Target:
public void testLongTransactionCleanup() throws Exception { conf.setInt(TxConstants.Manager.CFG_TX_CLEANUP_INTERVAL, 3); conf.setInt(TxConstants.Manager.CFG_TX_LONG_TIMEOUT, 2); TransactionManager txm = new TransactionManager (conf, new InMemoryTransactionStateStorage(), new TxMetricsCollector()); txm.startAndWait(); try { Assert.assertEquals(0, txm.getInvalidSize()); Assert.assertEquals(0, txm.getCommittedSize()); Transaction tx1 = txm.startLong(); Assert.assertEquals(0, txm.getInvalidSize()); Assert.assertEquals(0, txm.getCommittedSize()); TimeUnit.SECONDS.sleep(5); Assert.assertEquals(1, txm.getInvalidSize()); Assert.assertEquals(0, txm.getCommittedSize()); try { txm.canCommit(tx1, Collections.singleton(new byte[] { 0x11 })); Assert.fail(); } catch (TransactionNotInProgressException e) { } txm.abort(tx1); Assert.assertEquals(1, txm.getInvalidSize()); } finally { txm.stopAndWait(); } }
Source:
<code>private void loadClasses(AuthorizationStack stack, List<File> classfiles, List<File> jarfiles) { IAuthorizationPlugin pf; for (File file : classfiles) { String classname = getClassName(file); if (classname.isEmpty()) { continue; } if ((pf = handleLoadClass(classname)) != null) { <START> stack.setPlugin(pf); <END> } } for (File file : jarfiles) { try (JarFile jar = new JarFile(file)) { Enumeration<JarEntry> entries = jar.entries(); while (entries.hasMoreElements()) { JarEntry entry = entries.nextElement(); String classname = getClassName(entry); if (!entry.getName().endsWith(".class") || classname.isEmpty()) { continue; } if ((pf = handleLoadClass(classname)) != null) { stack.setPlugin(pf); } } } catch (IOException ex) { LOGGER.log(Level.WARNING, "Could not manipulate with file because of: ", ex); } } }</code><technical_language>some log this plugin is configured in stack</technical_language>

Target:
private void loadClasses(AuthorizationStack stack, List<File> classfiles, List<File> jarfiles) { IAuthorizationPlugin pf; for (File file : classfiles) { String classname = getClassName(file); if (classname.isEmpty()) { continue; } if ((pf = handleLoadClass(classname)) != null) { if (!stack.setPlugin(pf)) { LOGGER.log(Level.INFO, "plugin {0} is not configured in the stack", classname); } } } for (File file : jarfiles) { try (JarFile jar = new JarFile(file)) { Enumeration<JarEntry> entries = jar.entries(); while (entries.hasMoreElements()) { JarEntry entry = entries.nextElement(); String classname = getClassName(entry); if (!entry.getName().endsWith(".class") || classname.isEmpty()) { continue; } if ((pf = handleLoadClass(classname)) != null) { if (!stack.setPlugin(pf)) { LOGGER.log(Level.INFO, "plugin {0} is not configured in the stack", classname); } } } } catch (IOException ex) { LOGGER.log(Level.WARNING, "Could not manipulate with file because of: ", ex); } } }
Source:
<code><START> private UserAgentInterceptor(String userAgent, Class<?> serviceClass) { <END> Preconditions.checkArgument(VALID_USER_AGENT.matcher(userAgent).matches(), "User Agent must match pattern '%s': %s", VALID_USER_AGENT, userAgent); String version = getVersionString(serviceClass); this.userAgent = version.isEmpty() ? userAgent : String.format("%s (%s)", userAgent, version); }</code><technical_language>decided get rid of service class version parsing in favor of passing explicit service+version config time. want add this back</technical_language>

Target:
private UserAgentInterceptor(String userAgent, Class<?> serviceClass) { Preconditions.checkArgument(VALID_USER_AGENT.matcher(userAgent).matches(), "User Agent must match pattern '%s': %s", VALID_USER_AGENT, userAgent); String version = getVersionString(serviceClass); this.userAgent = version.isEmpty() ? userAgent : userAgent + " (" + version + ")"; }
Source:
<code>private void addFieldAndUnbindStatement(TypeSpec.Builder result, MethodSpec.Builder unbindMethod, ViewBindings bindings) { Map<ListenerClass, Map<ListenerMethod, Set<MethodViewBinding>>> classMethodBindings = bindings.getMethodBindings(); if (classMethodBindings.isEmpty()) { return; } String fieldName = "view" + bindings.getId(); <START> result.addField(ClassName.get("android.view", "View"), fieldName); <END> boolean needsNullChecked = bindings.getRequiredBindings().isEmpty(); if (needsNullChecked) { unbindMethod.beginControlFlow("if ($L != null)", fieldName); } for (ListenerClass listenerClass : classMethodBindings.keySet()) { if (!VIEW_TYPE.equals(listenerClass.targetType())) { unbindMethod.addStatement("(($T) $L).$L(null)", bestGuess(listenerClass.targetType()), fieldName, listenerClass.setter()); } else { unbindMethod.addStatement("$L.$L(null)", fieldName, listenerClass.setter()); } } if (needsNullChecked) { unbindMethod.endControlFlow(); } }</code><technical_language>VIEW constant</technical_language>

Target:
private void addFieldAndUnbindStatement(TypeSpec.Builder result, MethodSpec.Builder unbindMethod, ViewBindings bindings) { Map<ListenerClass, Map<ListenerMethod, Set<MethodViewBinding>>> classMethodBindings = bindings.getMethodBindings(); if (classMethodBindings.isEmpty()) { return; } String fieldName = "view" + bindings.getId(); result.addField(VIEW, fieldName); boolean needsNullChecked = bindings.getRequiredBindings().isEmpty(); if (needsNullChecked) { unbindMethod.beginControlFlow("if ($L != null)", fieldName); } for (ListenerClass listenerClass : classMethodBindings.keySet()) { if (!VIEW_TYPE.equals(listenerClass.targetType())) { unbindMethod.addStatement("(($T) $L).$L(null)", bestGuess(listenerClass.targetType()), fieldName, listenerClass.setter()); } else { unbindMethod.addStatement("$L.$L(null)", fieldName, listenerClass.setter()); } } if (needsNullChecked) { unbindMethod.endControlFlow(); } }
Source:
<code>private static PersistableBundle getDefaults() { PersistableBundle defaults = new PersistableBundle(); defaults.putBoolean(KEY_PERSIST_LPP_MODE_BOOL, true); defaults.putString(KEY_SUPL_HOST_STRING, "supl.google.com"); defaults.putString(KEY_SUPL_PORT_STRING, "7275"); defaults.putString(KEY_SUPL_VER_STRING, "0x20000"); defaults.putString(KEY_SUPL_MODE_STRING, "1"); defaults.putString(KEY_SUPL_ES_STRING, "1"); defaults.putString(KEY_LPP_PROFILE_STRING, "0"); defaults.putString(KEY_USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL_STRING, "1"); defaults.putString(KEY_A_GLONASS_POS_PROTOCOL_SELECT_STRING, "0"); defaults.putString(KEY_GPS_LOCK_STRING, "3"); defaults.putString(KEY_ES_EXTENSION_SEC_STRING, "0"); defaults.putString(KEY_NFW_PROXY_APPS_STRING, ""); defaults.putInt(KEY_ES_SUPL_CONTROL_PLANE_SUPPORT_INT, SUPL_EMERGENCY_MODE_TYPE_CP_ONLY); <START> defaults.putStringArray(KEY_ES_SUPL_CONTROL_PLANE_SUPPORT_INT, null); <END> return defaults; }</code><technical_language>wrong constant, ints null</technical_language>

Target:
private static PersistableBundle getDefaults() { PersistableBundle defaults = new PersistableBundle(); defaults.putBoolean(KEY_PERSIST_LPP_MODE_BOOL, true); defaults.putString(KEY_SUPL_HOST_STRING, "supl.google.com"); defaults.putString(KEY_SUPL_PORT_STRING, "7275"); defaults.putString(KEY_SUPL_VER_STRING, "0x20000"); defaults.putString(KEY_SUPL_MODE_STRING, "1"); defaults.putString(KEY_SUPL_ES_STRING, "1"); defaults.putString(KEY_LPP_PROFILE_STRING, "0"); defaults.putString(KEY_USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL_STRING, "1"); defaults.putString(KEY_A_GLONASS_POS_PROTOCOL_SELECT_STRING, "0"); defaults.putString(KEY_GPS_LOCK_STRING, "3"); defaults.putString(KEY_ES_EXTENSION_SEC_STRING, "0"); defaults.putString(KEY_NFW_PROXY_APPS_STRING, ""); defaults.putInt(KEY_ES_SUPL_CONTROL_PLANE_SUPPORT_INT, SUPL_EMERGENCY_MODE_TYPE_CP_ONLY); defaults.putStringArray(KEY_ES_SUPL_DATA_PLANE_ONLY_ROAMING_PLMN_STRING_ARRAY, null); return defaults; }
Source:
<code>public void testUpdateDecisionWithTopLevelFunction() { final List<Decision> decisions = setupDecisionWithTopLevelFunction(); handler.update(DOCUMENT_NAME_ORIGINAL, DOCUMENT_NAME_UPDATED); assertTopLevelLiteralExpression(decisions.get(0)); assertTopLevelFunctionDefinition(decisions.get(1), DOCUMENT_NAME_UPDATED, DOCUMENT_NAME_ORIGINAL); assertTopLevelFunctionDefinition(decisions.get(2), "do-not-change", <START> "do-not-change"); <END> verify(expressionGrid1).initialiseUiCells(); verify(expressionGrid2).initialiseUiCells(); verify(expressionGrid3).initialiseUiCells(); }</code><technical_language>"model-not-affected" ? for other tests</technical_language>

Target:
public void testUpdateDecisionWithTopLevelFunction() { final List<Decision> decisions = setupDecisionWithTopLevelFunction(); handler.update(DOCUMENT_NAME_ORIGINAL, DOCUMENT_NAME_UPDATED); assertTopLevelLiteralExpression(decisions.get(0)); assertTopLevelFunctionDefinition(decisions.get(1), DOCUMENT_NAME_UPDATED, MODEL_NAME); assertTopLevelFunctionDefinition(decisions.get(2), UNAFFECTED_DOCUMENT, UNAFFECTED_MODEL); verify(expressionGrid1).initialiseUiCells(); verify(expressionGrid2).initialiseUiCells(); verify(expressionGrid3).initialiseUiCells(); }
Source:
<code>List<LongRange> getTilesIntersectingEnvelope( Envelope referenceEnvelope, SpaceFillingCurveConfiguration config, SpaceFillingCurveMonitor monitor ) { SearchEnvelope search = new SearchEnvelope( this, referenceEnvelope ); SearchEnvelope wholeExtent = new SearchEnvelope( 0, this.getWidth(), nbrDim ); <START> ArrayList<LongRange> results = new ArrayList<>(1000); <END> if ( monitor != null ) { monitor.registerSearchArea( search.getArea() ); } addTilesIntersectingEnvelopeAt( config, monitor, 0, config.maxDepth( referenceEnvelope, this.range, nbrDim, maxLevel ), search, wholeExtent, rootCurve(), 0, this.getValueWidth(), results ); return results; }</code><technical_language>Is 1000 arbitrary trade-of memory extend size of array times is some more reasoning choice of value? benchmark later</technical_language>

Target:
List<LongRange> getTilesIntersectingEnvelope( Envelope referenceEnvelope, SpaceFillingCurveConfiguration config, SpaceFillingCurveMonitor monitor ) { SearchEnvelope search = new SearchEnvelope( this, referenceEnvelope ); SearchEnvelope wholeExtent = new SearchEnvelope( 0, this.getWidth(), nbrDim ); ArrayList<LongRange> results = new ArrayList<>( config.initialRangesListCapacity() ); if ( monitor != null ) { monitor.registerSearchArea( search.getArea() ); } addTilesIntersectingEnvelopeAt( config, monitor, 0, config.maxDepth( referenceEnvelope, this.range, nbrDim, maxLevel ), search, wholeExtent, rootCurve(), 0, this.getValueWidth(), results ); return results; }
Source:
<code>private boolean updateEffectiveTime(SnomedRefSetMember member) { if (force) { final String effectiveTime = (String) properties.get(SnomedRf2Headers.FIELD_EFFECTIVE_TIME); if (effectiveTime != null) { member.setEffectiveTime(EffectiveTimes.parse(effectiveTime, DateFormats.SHORT)); member.setReleased(true); } else { member.unsetEffectiveTime(); } <START> return true; <END> } return false; }</code><technical_language>Is possible/problematic member is force set effective time currently has</technical_language>

Target:
private boolean updateEffectiveTime(SnomedRefSetMember member) { if (force) { final String effectiveTime = (String) properties.get(SnomedRf2Headers.FIELD_EFFECTIVE_TIME); if (!Strings.isNullOrEmpty(effectiveTime)) { final Date effectiveTimeDate = EffectiveTimes.parse(effectiveTime, DateFormats.SHORT); if (!effectiveTimeDate.equals(member.getEffectiveTime())) { member.setEffectiveTime(effectiveTimeDate); member.setReleased(true); return true; } } else { member.unsetEffectiveTime(); return true; } } return false; }
Source:
<code>public Authentication supply(@Nonnull HttpServletRequest request) { NpmUser npmUser = deserializeNpmUser(request); <START> if (isValidNpmUser(npmUser)) <END> { return new PasswordAuthentication(npmUser.getName(), npmUser.getPassword()); } else { throw new BadCredentialsException("invalid.credentials"); } }</code><technical_language>if (!isValidNpmUser(npmUser)) { throw new BadCredentialsException("invalid.credentials"); }</technical_language>

Target:
public Authentication supply(@Nonnull HttpServletRequest request) { NpmUser npmUser = deserializeNpmUser(request); if (!isValidNpmUser(npmUser) || !usernamesMatch(request.getRequestURI(), npmUser.getName())) { throw new BadCredentialsException("invalid.credentials"); } return new PasswordAuthentication(npmUser.getName(), npmUser.getPassword()); }
Source:
<code>public @Nullable String resolveString(LamiTableEntry entry) { LamiData data = entry.getValue(fColIndex); if (data instanceof LamiIRQ) { LamiIRQ irq = (LamiIRQ) data; switch (irq.getType()) { case HARD: <START> return "Hard"; END> case SOFT: return "Soft"; default: return "?"; } } return data.toString(); }</code><technical_language>externalize</technical_language>

Target:
public @Nullable String resolveString(LamiTableEntry entry) { LamiData data = entry.getValue(fColIndex); if (data instanceof LamiIRQ) { LamiIRQ irq = (LamiIRQ) data; switch (irq.getType()) { case HARD: return Messages.LamiIRQTypeAspect_HardwareIRQ; case SOFT: return Messages.LamiIRQTypeAspect_SoftIRQ; default: return "?"; } } return data.toString(); }
Source:
<code>public void configure(Configuration parameters) { <START> inputFormat.configure(parameters); <END> super.configure(parameters); }</code><technical_language>A is super., do works. below</technical_language>

Target:
public void configure(Configuration parameters) { super.configure(parameters); inputFormat.configure(parameters); }
Source:
<code>public VCFSimpleHeaderLine altHeaderLine(final String description) { if (allele.isReference()) { <START> throw new UnsupportedOperationException("you cannot ask for a ALT header line on a reference allele"); <END> } return new VCFSimpleHeaderLine(ALT_KEY, name(), Utils.nonNull(description)); }</code><technical_language>ALT header</technical_language>

Target:
public VCFSimpleHeaderLine altHeaderLine(final String description) { if (allele.isReference()) { throw new UnsupportedOperationException("you cannot ask for an ALT header line on a reference allele"); } return new VCFSimpleHeaderLine(ALT_KEY, name(), Utils.nonNull(description)); }
Source:
<code>public int maxRetryCount() { <START> return this.maxRetryCount; <END> }</code><technical_language>nit: need this. is other variable declared in this scope name</technical_language>

Target:
public int maxRetryCount() { return maxRetryCount; }