auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public CloseableGSSContext(String serviceName, String krb5Keytab, String krb5ccPath, String krb5ClientPrincipal, URI serviceUri) { requireNonNull(serviceName, "serviceName is null"); requireNonNull(serviceUri, "serviceUri is null"); try { loginContext = new LoginContext("", null, null, new Configuration() { @Override public AppConfigurationEntry[] getAppConfigurationEntry(String name) { ImmutableMap.Builder<String, String> optionsBuilder = ImmutableMap.builder(); optionsBuilder.put("refreshKrb5Config", "true"); optionsBuilder.put("doNotPrompt", "true"); if (log.isDebugEnabled()) { optionsBuilder.put("debug", "true"); } if (krb5Keytab != null) { optionsBuilder.put("useKeytab", "true"); <START> optionsBuilder.put("keyTab", "keyTab"); <END> } if (krb5ccPath != null) { optionsBuilder.put("ticketCache", krb5ccPath); optionsBuilder.put("useTicketCache", "true"); optionsBuilder.put("renewTGT", "true"); } if (krb5ClientPrincipal != null) { optionsBuilder.put("principal", krb5ClientPrincipal); } return new AppConfigurationEntry[] { new AppConfigurationEntry(Krb5LoginModule.class.getName(), REQUIRED, optionsBuilder.build()) }; } }); String servicePrincipal = KerberosUtil.getServicePrincipal(serviceName, serviceUri.getHost()); Subject subject = KerberosUtil.getClientSubject(loginContext); context = KerberosUtil.getGssContext(subject, servicePrincipal); } catch (LoginException | UnknownHostException e) { throw new AuthenticationException(e); } }</code><technical_language>is this right? set keyTab property of krb5Keytab</technical_language>

Target:
public CloseableGSSContext(String serviceName, String krb5Keytab, String krb5ccPath, String krb5ClientPrincipal, URI serviceUri) { requireNonNull(serviceName, "serviceName is null"); requireNonNull(serviceUri, "serviceUri is null"); try { loginContext = new LoginContext("", null, null, new Configuration() { @Override public AppConfigurationEntry[] getAppConfigurationEntry(String name) { ImmutableMap.Builder<String, String> optionsBuilder = ImmutableMap.builder(); optionsBuilder.put("refreshKrb5Config", "true"); optionsBuilder.put("doNotPrompt", "true"); if (log.isDebugEnabled()) { optionsBuilder.put("debug", "true"); } if (krb5Keytab != null) { optionsBuilder.put("useKeytab", "true"); optionsBuilder.put("keyTab", krb5Keytab); } if (krb5ccPath != null) { optionsBuilder.put("ticketCache", krb5ccPath); optionsBuilder.put("useTicketCache", "true"); optionsBuilder.put("renewTGT", "true"); } if (krb5ClientPrincipal != null) { optionsBuilder.put("principal", krb5ClientPrincipal); } return new AppConfigurationEntry[] { new AppConfigurationEntry(Krb5LoginModule.class.getName(), REQUIRED, optionsBuilder.build()) }; } }); String servicePrincipal = KerberosUtil.getServicePrincipal(serviceName, serviceUri.getHost()); Subject subject = KerberosUtil.getClientSubject(loginContext); context = KerberosUtil.getGssContext(subject, servicePrincipal); } catch (LoginException | UnknownHostException e) { throw new AuthenticationException(e); } }
Source:
<code>public OpenConsoleAction(StateManager stateManager) { this.stateManager = stateManager; <START> this.executable.bind(ActionHelper.isFieldSetForSelectedEntry(StandardField.FILE, stateManager)); <END> }</code><technical_language>Is this line purpose? sense action is relative currently selected entry</technical_language>

Target:
public OpenConsoleAction(StateManager stateManager) { this.stateManager = stateManager; this.executable.bind(ActionHelper.needsDatabase(stateManager)); }
Source:
<code>public CodecSupplier(Class<T> clazz, Metadata metadata) { <START> this.clazz = clazz; <END> this.metadata = metadata; ObjectMapperProvider objectMapperProvider = new ObjectMapperProvider(); objectMapperProvider.setJsonDeserializers(ImmutableMap.of(Type.class, new TypeDeserializer())); this.codecFactory = new JsonCodecFactory(objectMapperProvider); }</code><technical_language>add null checks</technical_language>

Target:
public CodecSupplier(Class<T> clazz, Metadata metadata) { this.clazz = requireNonNull(clazz, "clazz is null"); this.metadata = requireNonNull(metadata, "metadata is null"); ObjectMapperProvider objectMapperProvider = new ObjectMapperProvider(); objectMapperProvider.setJsonDeserializers(ImmutableMap.of(Type.class, new TypeDeserializer())); this.codecFactory = new JsonCodecFactory(objectMapperProvider); }
Source:
<code>public String getDescriptiveText() { String defaultLocale = Locale.getDefault().getLanguage(); String descriptiveText = getDescriptiveText(defaultLocale); if (descriptiveText == null) { descriptiveText = getDescriptiveText("en"); if (descriptiveText == null) { descriptiveText = getDescriptiveText(""); if (descriptiveText == null) { <START> descriptiveText = getDescriptiveText(null); <END> } } } return descriptiveText; }</code><technical_language>I if if *never* null key, instead empty string. this 3 LOCs removed</technical_language>

Target:
public String getDescriptiveText() { String defaultLocale = Locale.getDefault().getLanguage(); String descriptiveText = getDescriptiveText(defaultLocale); if (descriptiveText == null) { descriptiveText = getDescriptiveText("en"); if (descriptiveText == null) { descriptiveText = getDescriptiveText(""); } } return descriptiveText; }
Source:
<code>public SourceFile testParameterPath(@ApiParam(value = "Workflow id", required = true) @PathParam("workflowId") Long workflowId, @QueryParam("version") String version){ Workflow workflow = workflowDAO.findById(workflowId); <START> if (workflow.getDescriptorType().toLowerCase().equals("cwl")) { <END> return entryVersionHelper.getSourceFile(workflowId, version, FileType.CWL_TEST_JSON); } else { return entryVersionHelper.getSourceFile(workflowId, version, FileType.WDL_TEST_JSON); } }</code><technical_language>enum ToolDescriptor.TypeEnum</technical_language>

Target:
public SourceFile testParameterPath(@ApiParam(value = "Workflow id", required = true) @PathParam("workflowId") Long workflowId, @QueryParam("version") String version){ Workflow workflow = workflowDAO.findById(workflowId); if (workflow.getDescriptorType().toLowerCase().equals(DescriptorType.CWL.toString())) { return entryVersionHelper.getSourceFile(workflowId, version, FileType.CWL_TEST_JSON); } else { return entryVersionHelper.getSourceFile(workflowId, version, FileType.WDL_TEST_JSON); } }
Source:
<code><START> public String getTupleTypeDescription(TupleTypeId tupleType) { <END> if (tupleType.getId().equals(CoreTupleTypes.TupleMetaType)) { return "TupleMetaType"; } if (tupleType.getId().equals(CoreTupleTypes.ViewApplicability)) { return "ViewApplicability"; } if (tupleType.getId().equals(CoreTupleTypes.OseeTypeDef)) { return "OseeTypeDef"; } if (tupleType.getId().equals(CoreTupleTypes.ArtifactReferenceApplicabilityType)) { return "ArtifactReferenceApplicabilityType"; } if (tupleType.getId().equals(CoreTupleTypes.BranchView)) { return "BranchView"; } if (tupleType.getId().equals(CoreTupleTypes.VersionConfig)) { return "VersionConfig"; } if (tupleType.getId().equals(CoreTupleTypes.FixedMaintenanceData)) { return "FixedMaintenanceData"; } if (tupleType.getId().equals(CoreTupleTypes.VariableMaintenanceData)) { return "VariableMaintenanceData"; } if (tupleType.getId().equals(CoreTupleTypes.CrossRefMaintenanceData)) { return "CrossRefMaintenanceData"; } if (tupleType.getId().equals(CoreTupleTypes.ReversalMaintenanceData)) { return "ReversalMaintenanceData"; } if (tupleType.getId().equals(CoreTupleTypes.LruDataTypes)) { return "LruDataTypes"; } if (tupleType.getId().equals(CoreTupleTypes.ReversalMaintenanceData)) { return "ReversalMaintenanceData"; } if (tupleType.getId().equals(CoreTupleTypes.LruFormatData)) { return "LruFormatData"; } return "N/A"; }</code><technical_language>returning class name. Consider tupleType.getClass().getSimpleName(). need if statements</technical_language>

Target:
public String getTupleTypeDescription(TupleTypeId tupleType) { if (tupleType.getId().equals(CoreTupleTypes.TupleMetaType.getId())) { return "TupleMetaType"; } if (tupleType.getId().equals(CoreTupleTypes.ViewApplicability.getId())) { return "ViewApplicability"; } if (tupleType.getId().equals(CoreTupleTypes.OseeTypeDef.getId())) { return "OseeTypeDef"; } if (tupleType.getId().equals(CoreTupleTypes.ArtifactReferenceApplicabilityType.getId())) { return "ArtifactReferenceApplicabilityType"; } if (tupleType.getId().equals(CoreTupleTypes.BranchView.getId())) { return "BranchView"; } if (tupleType.getId().equals(CoreTupleTypes.VersionConfig.getId())) { return "VersionConfig"; } if (tupleType.getId().equals(CoreTupleTypes.FixedMaintenanceData.getId())) { return "FixedMaintenanceData"; } if (tupleType.getId().equals(CoreTupleTypes.VariableMaintenanceData.getId())) { return "VariableMaintenanceData"; } if (tupleType.getId().equals(CoreTupleTypes.CrossRefMaintenanceData.getId())) { return "CrossRefMaintenanceData"; } if (tupleType.getId().equals(CoreTupleTypes.ReversalMaintenanceData.getId())) { return "ReversalMaintenanceData"; } if (tupleType.getId().equals(CoreTupleTypes.LruDataTypes.getId())) { return "LruDataTypes"; } if (tupleType.getId().equals(CoreTupleTypes.ReversalMaintenanceData.getId())) { return "ReversalMaintenanceData"; } if (tupleType.getId().equals(CoreTupleTypes.LruFormatData.getId())) { return "LruFormatData"; } return "N/A"; }
Source:
<code>public void validateFullRepresentation() throws Exception { assertPropEquals("uuid", getObject().getUuid()); assertPropEquals("name", getObject().getName()); assertPropEquals("description", getObject().getDescription()); assertPropEquals("startTime", getObject().getStartTime()); assertPropEquals("started", getObject().getStarted()); assertPropEquals("taskClass", getObject().getTaskClass()); assertPropEquals("lastExecutionTime", getObject().getLastExecutionTime()); <START> assertPropPresent("startTimePattern"); <END> assertPropPresent("properties"); }</code><technical_language>assertPropEquals()</technical_language>

Target:
public void validateFullRepresentation() throws Exception { assertPropEquals("uuid", getObject().getUuid()); assertPropEquals("name", getObject().getName()); assertPropEquals("description", getObject().getDescription()); assertPropEquals("startTime", getObject().getStartTime()); assertPropEquals("started", getObject().getStarted()); assertPropEquals("taskClass", getObject().getTaskClass()); assertPropEquals("lastExecutionTime", getObject().getLastExecutionTime()); assertPropEquals("startTimePattern", getObject().getStartTimePattern()); assertPropEquals("properties", getObject().getProperties()); }
Source:
<code>@Test public void privateFieldsFail() { class Test { @Inject private Object nope; } @Module(entryPoints = Test.class) class TestModule { @Provides Object provideObject() { return null; } } try { <START> ObjectGraph.create(new TestModule()).inject(new Test()); <END> } catch (IllegalStateException e) { assertThat(e.getMessage()).contains("Can't inject private field: "); } }</code><technical_language>add a fail() line</technical_language>

Target:
@Test public void privateFieldsFail() { class Test { @Inject private Object nope; } @Module(entryPoints = Test.class) class TestModule { @Provides Object provideObject() { return null; } } try { ObjectGraph.create(new TestModule()).inject(new Test()); fail(); } catch (IllegalStateException e) { assertThat(e.getMessage()).contains("Can't inject private field: "); } }
Source:
<code>public String getAccessTokenEncryptedResponseAlg() { <START> return id_token_encrypted_response_alg; <END> }</code><technical_language>I access_token_encrypted_response_alg. JwtTokenEncryptionTest.java find algorithms for Access Token ID Token</technical_language>

Target:
public String getAccessTokenEncryptedResponseAlg() { return access_token_encrypted_response_alg; }
Source:
<code>private void populateNamedCredential(Environment environment, String name) { if (!name.equals("") && !name.endsWith(".")) { name = name + "."; } String tenantIdKey = AZURE_CREDENTIAL_PREFIX + name + "tenantId"; String clientIdKey = AZURE_CREDENTIAL_PREFIX + name + "clientId"; String clientSecretKey = AZURE_CREDENTIAL_PREFIX + name + "clientSecret"; String tenantId = environment.getProperty(tenantIdKey); String clientId = environment.getProperty(clientIdKey); String clientSecret = environment.getProperty(clientSecretKey); <START> if (tenantId != null && clientId != null && clientSecret != null) { <END> TokenCredential credential = new ClientSecretCredentialBuilder() .tenantId(tenantId) .clientId(clientId) .clientSecret(clientSecret) .build(); credentials.put(name, credential); return; } String clientCertificateKey = AZURE_CREDENTIAL_PREFIX + name + "clientSecret"; String clientCertificatePath = environment.getProperty(clientCertificateKey); if (clientCertificatePath != null) { TokenCredential credential = new ClientCertificateCredentialBuilder() .tenantId(tenantId) .clientId(clientId) .pemCertificate(clientCertificatePath) .build(); credentials.put(name, credential); } }</code><technical_language>If some of null, suggest unintentional error condition. worth failing loudly</technical_language>

Target:
private void populateNamedCredential(Environment environment, String name) { String standardizedName = name; if (!standardizedName.equals("") && !standardizedName.endsWith(".")) { standardizedName = standardizedName + "."; } String tenantIdKey = AZURE_CREDENTIAL_PREFIX + standardizedName + "tenantId"; String clientIdKey = AZURE_CREDENTIAL_PREFIX + standardizedName + "clientId"; String clientSecretKey = AZURE_CREDENTIAL_PREFIX + standardizedName + "clientSecret"; String tenantId = environment.getProperty(tenantIdKey); String clientId = environment.getProperty(clientIdKey); String clientSecret = environment.getProperty(clientSecretKey); if (tenantId != null && clientId != null && clientSecret != null) { TokenCredential credential = new ClientSecretCredentialBuilder() .tenantId(tenantId) .clientId(clientId) .clientSecret(clientSecret) .build(); credentials.put(name, credential); return; } String clientCertificateKey = AZURE_CREDENTIAL_PREFIX + standardizedName + "clientCertificate"; String clientCertificatePath = environment.getProperty(clientCertificateKey); if (tenantId != null && clientId != null && clientCertificatePath != null) { TokenCredential credential = new ClientCertificateCredentialBuilder() .tenantId(tenantId) .clientId(clientId) .pemCertificate(clientCertificatePath) .build(); credentials.put(name, credential); return; } if (!name.equals("")) { throw new RuntimeException("Configuration for azure.credential." + name + " is incomplete"); } }
Source:
<code>protected void executeQueryCommand() { if (connect(getParameters().getServerName())) { String glusterServers = executeCommand(); if (StringUtils.isNotEmpty(glusterServers)) { DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder; try { docBuilder = docBuilderFactory.newDocumentBuilder(); Document doc = docBuilder.parse(glusterServers); doc.getDocumentElement().normalize(); NodeList listOfPeers = doc.getElementsByTagName(PEER); parseHostName(listOfPeers); } catch (ParserConfigurationException e1) { log.errorFormat("There is problem in parsing xml." + e1.getMessage()); } catch (SAXException e2) { log.errorFormat("Error in parsing xml." + e2.getMessage()); } catch (IOException e3) { <START> log.errorFormat("There is problem in reading the file." + e3.getMessage()); <END> } serverFingerprint.put(getParameters().getServerName(), getFingerprint(getParameters().getServerName())); getQueryReturnValue().setReturnValue(getServerFingerPrintMap()); } else { log.error("Could not get the peer list form the host: " + getParameters().getServerName()); } } else { log.error("Could not connect to host: " + getParameters().getServerName()); } }</code><technical_language>This means exception xml parsing logged, map a single element (for current server) returned. This is wrong. I throw exception in error conditions, while fetching fingerprints</technical_language>

Target:
protected void executeQueryCommand() { if (connect(getParameters().getServerName())) { String glusterServers = executeCommand(); if (StringUtils.isNotEmpty(glusterServers)) { DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder; try { File returnXml = new File(System.getProperty("java.io.tmpdir") + "/peers.xml"); FileWriter xmlFileWriter = new FileWriter(returnXml); xmlFileWriter.write(glusterServers); xmlFileWriter.close(); docBuilder = docBuilderFactory.newDocumentBuilder(); Document doc = docBuilder.parse(returnXml); doc.getDocumentElement().normalize(); NodeList listOfPeers = doc.getElementsByTagName(PEER); extractServers(listOfPeers); } catch (ParserConfigurationException e1) { log.errorFormat("There is problem in parsing xml." + e1.getMessage()); throw new RuntimeException(e1); } catch (SAXException e2) { log.errorFormat("Error in parsing xml." + e2.getMessage()); throw new RuntimeException(e2); } catch (IOException e3) { log.errorFormat("There is problem in reading the file." + e3.getMessage()); throw new RuntimeException(e3); } fingerprints.put(getParameters().getServerName(), getFingerprint(getParameters().getServerName())); getQueryReturnValue().setReturnValue(getServerFingerPrintMap()); } else { log.error("Could not get the peer list form the host: " + getParameters().getServerName()); } } else { log.error("Could not connect to host: " + getParameters().getServerName()); } }
Source:
<code>private long getDateMidnightMs(int date) { SimpleDateFormat format = new SimpleDateFormat("yyyyMMddz"); try { return format.parse(date + "UTC").getTime(); <START> } catch (Exception e) { <END> throw new AssertionError("unexpected: " + date); } }</code><technical_language>this general</technical_language>

Target:
private long getDateMidnightMs(int date) { SimpleDateFormat format = new SimpleDateFormat("yyyyMMddz"); try { return format.parse(date + "UTC").getTime(); } catch (ParseException e) { throw new AssertionError("unexpected: " + date); } }
Source:
<code>public void run() { if (logger.isFinestEnabled()) { logger.finest("Starting TcpIpAcceptor on " + registry); } try { selector = Selector.open(); for (ServerSocketRegistry.Pair entry : registry) { ServerSocketChannel serverSocketChannel = entry.getChannel(); EndpointQualifier qualifier = entry.getQualifier(); serverSocketChannel.configureBlocking(false); SelectionKey selectionKey = serverSocketChannel.register(selector, OP_ACCEPT); <START> selectionKey.attach(qualifier); <END> selectionKeys.add(selectionKey); } if (selectorWorkaround) { acceptLoopWithSelectorFix(); } else { acceptLoop(); } } catch (OutOfMemoryError e) { OutOfMemoryErrorDispatcher.onOutOfMemory(e); } catch (Throwable e) { logger.severe(e.getClass().getName() + ": " + e.getMessage(), e); } finally { closeSelector(); } }</code><technical_language>attach ServerSocketRegistry.Pair avoid getServerSocketChannel call in handleSelectionKeys</technical_language>

Target:
public void run() { if (logger.isFinestEnabled()) { logger.finest("Starting TcpIpAcceptor on " + registry); } try { selector = Selector.open(); for (ServerSocketRegistry.Pair entry : registry) { ServerSocketChannel serverSocketChannel = entry.getChannel(); serverSocketChannel.configureBlocking(false); SelectionKey selectionKey = serverSocketChannel.register(selector, OP_ACCEPT); selectionKey.attach(entry); selectionKeys.add(selectionKey); } if (selectorWorkaround) { acceptLoopWithSelectorFix(); } else { acceptLoop(); } } catch (OutOfMemoryError e) { OutOfMemoryErrorDispatcher.onOutOfMemory(e); } catch (Throwable e) { logger.severe(e.getClass().getName() + ": " + e.getMessage(), e); } finally { closeSelector(); } }
Source:
<code>public void stopPresenting() { taskDisplayer.detach(taskActionListener); <START> subscriptions.clear(); <END> subscriptions = new CompositeSubscription(); }</code><technical_language>worth lines clearSubscriptions()</technical_language>

Target:
public void stopPresenting() { taskDisplayer.detach(taskActionListener); clearSubscriptions(); }
Source:
<code>public <T extends Transformer> TransformerComponentBuilder<T> addTransformer(TransformerComponentBuilder<T> tjb) { if (tjb.getComponentRequirement() == null) { tjb.setComponentRequirement(_defaultRequirement); } _transformerComponentBuilders.add(tjb); onComponentAdded(); <START> List<TransformerChangeListener> listeners = new ArrayList<>(_transformerChangeListeners); <END> for (TransformerChangeListener listener : listeners) { listener.onAdd(tjb); } return tjb; }</code><technical_language>More final listener</technical_language>

Target:
public <T extends Transformer> TransformerComponentBuilder<T> addTransformer(TransformerComponentBuilder<T> tjb) { if (tjb.getComponentRequirement() == null) { tjb.setComponentRequirement(_defaultRequirement); } _transformerComponentBuilders.add(tjb); onComponentAdded(); final List<TransformerChangeListener> listeners = new ArrayList<>(_transformerChangeListeners); for (TransformerChangeListener listener : listeners) { listener.onAdd(tjb); } return tjb; }
Source:
<code>public boolean commitPrimaryColumn(CommitData cd, Stamp commitStamp) { SyncCommitObserver sco = new SyncCommitObserver(); cd.commitObserver = sco; try { CommitStep firstStep = new GetCommitStampStepTest(commitStamp); firstStep.andThen(new WriteNotificationsStep()).andThen(new CommitPrimaryStep()); <START> firstStep.compose(cd).thenRun(() -> cd.commitObserver.committed()) <END> .exceptionally(throwable -> { cd.commitObserver.failed(throwable); return null; }); sco.waitForCommit(); } catch (CommitException e) { return false; } return true; }</code><technical_language>I opened #1011</technical_language>

Target:
public boolean commitPrimaryColumn(CommitData cd, Stamp commitStamp) { SyncCommitObserver sco = new SyncCommitObserver(); cd.commitObserver = sco; try { CommitStep firstStep = new GetCommitStampStepTest(commitStamp); firstStep.andThen(new WriteNotificationsStep()).andThen(new CommitPrimaryStep()) .andThen(new CommittedTestStep()); firstStep.compose(cd).exceptionally(throwable -> { cd.commitObserver.failed(throwable); return null; }); sco.waitForCommit(); } catch (CommitException e) { return false; } catch (Exception e) { throw new FluoException(e); } return true; }
Source:
<code>public static void log(String toLog) { <START> try { <END> BufferedWriter buffWriter = new BufferedWriter(new FileWriter(loggingFile, true)); buffWriter.newLine(); buffWriter.write(toLog); buffWriter.close(); } catch (IOException e) { System.out.println(e); } }</code><technical_language>start method repeats this code, call log method start method? (Like log("SCRUMBLEDORE LOGGING FILE");) <organisation</technical_language>

Target:
public static void log(String toLog) { if (started == true) { try { BufferedWriter buffWriter = new BufferedWriter(new FileWriter(loggingFile, true)); buffWriter.newLine(); buffWriter.write(toLog); buffWriter.close(); } catch (IOException e) { System.out.println(e); } } }
Source:
<code>public ByteBuf decrypt(ByteBuf toDecrypt, SecretKeySpec key) throws GeneralSecurityException { try { Cipher decrypter = Cipher.getInstance(GCM_CRYPTO_INSTANCE, "BC"); byte[] iv = deserializeIV(new ByteBufInputStream(toDecrypt)); decrypter.init(Cipher.DECRYPT_MODE, key, new IvParameterSpec(iv)); int outputSize = decrypter.getOutputSize(toDecrypt.readableBytes()); ByteBuf decryptedContent = ByteBufAllocator.DEFAULT.heapBuffer(outputSize); boolean toRelease = false; if (toDecrypt.nioBufferCount() != 1) { toRelease = true; ByteBuf temp = ByteBufAllocator.DEFAULT.heapBuffer(toDecrypt.readableBytes()); temp.writeBytes(toDecrypt); toDecrypt = temp; } try { ByteBuffer toDecryptBuffer = toDecrypt.nioBuffer(); ByteBuffer decryptedContentBuffer = decryptedContent.nioBuffer(0, outputSize); int n = decrypter.doFinal(toDecryptBuffer, decryptedContentBuffer); decryptedContent.writerIndex(decryptedContent.writerIndex() + n); return decryptedContent; } finally { if (toRelease) { toDecrypt.release(); } else { <START> toDecrypt.readerIndex(toDecrypt.readerIndex() + toDecrypt.readableBytes()); <END> } } } catch (Exception e) { throw new GeneralSecurityException("Exception thrown while decrypting data", e); } }</code><technical_language>I is a method called skipBytes in situations this: toDecrypt.skipBytes(toDecrypt.readableBytes())</technical_language>

Target:
public ByteBuf decrypt(ByteBuf toDecrypt, SecretKeySpec key) throws GeneralSecurityException { try { Cipher decrypter = Cipher.getInstance(GCM_CRYPTO_INSTANCE, "BC"); byte[] iv = deserializeIV(new ByteBufInputStream(toDecrypt)); decrypter.init(Cipher.DECRYPT_MODE, key, new IvParameterSpec(iv)); int outputSize = decrypter.getOutputSize(toDecrypt.readableBytes()); ByteBuf decryptedContent = ByteBufAllocator.DEFAULT.heapBuffer(outputSize); boolean toRelease = false; if (toDecrypt.nioBufferCount() != 1) { toRelease = true; ByteBuf temp = ByteBufAllocator.DEFAULT.heapBuffer(toDecrypt.readableBytes()); temp.writeBytes(toDecrypt); toDecrypt = temp; } try { ByteBuffer toDecryptBuffer = toDecrypt.nioBuffer(); ByteBuffer decryptedContentBuffer = decryptedContent.nioBuffer(0, outputSize); int n = decrypter.doFinal(toDecryptBuffer, decryptedContentBuffer); decryptedContent.writerIndex(decryptedContent.writerIndex() + n); return decryptedContent; } finally { if (toRelease) { toDecrypt.release(); } else { toDecrypt.skipBytes(toDecrypt.readableBytes()); } } } catch (Exception e) { throw new GeneralSecurityException("Exception thrown while decrypting data", e); } }
Source:
<code>public Map<String, Object> getContextMap() { Map<String, Object> context = getContext().context; if (context instanceof OgnlContext) { <START> ((OgnlContext) context).put(TypeConverter.TYPE_CONVERTER_CONTEXT_KEY, ((OgnlContext) context).getTypeConverter()); <END> } return context; }</code><technical_language>is deal type converter</technical_language>

Target:
public Map<String, Object> getContextMap() { return getContext().context; }
Source:
<code>public boolean isTerrainPopulated() { <START> return this.cubeMap.all().stream().anyMatch(c -> (c.getGeneratorStage() == GeneratorStage.LIVE)); <END> }</code><technical_language>alternating generationPipeline.isLastStage comparing LIVE</technical_language>

Target:
public boolean isTerrainPopulated() { return this.cubeMap.all().stream().anyMatch(c -> c.getGeneratorStage().isLastStage()); }
Source:
<code>public AgentFailuresFileListCap(File folder, FilenameFilter filter, int size) { this.folder = folder; this.size = size; if (!folder.exists() && !folder.mkdirs()) throw new Error("Failed to create "+folder); <START> <END> File[] sortedFiles = folder.listFiles(filter); if (sortedFiles==null) return; Arrays.sort(sortedFiles, new Comparator<File>() { public int compare(File o1, File o2) { long l = o1.lastModified() - o2.lastModified(); if (l<0) return -1; if (l>0) return 1; return 0; } }); files.addAll(Arrays.asList(sortedFiles)); }</code><technical_language>if file exists is a directory</technical_language>

Target:
public AgentFailuresFileListCap(File folder, FilenameFilter filter, int size) { this.folder = folder; this.size = size; if (!folder.exists() && !folder.mkdirs()) { throw new Error("Failed to create " + folder); } File[] sortedFiles = folder.listFiles(filter); if (sortedFiles==null) return; Arrays.sort(sortedFiles, new Comparator<File>() { public int compare(File o1, File o2) { long l = o1.lastModified() - o2.lastModified(); if (l<0) return -1; if (l>0) return 1; return 0; } }); files.addAll(Arrays.asList(sortedFiles)); }
Source:
<code>private static String percentDecode(String encoded) { <START> Preconditions.checkArgument(nonNull(encoded), "string must not be null"); <END> Preconditions.checkArgument(ascii().matchesAllOf(encoded), "string must be ASCII"); ByteArrayOutputStream out = new ByteArrayOutputStream(encoded.length()); for (int i = 0; i < encoded.length(); i++) { char c = encoded.charAt(i); if (c == '%') { Preconditions.checkArgument(i + 2 < encoded.length(), "percent encoded value is truncated"); int high = Character.digit(encoded.charAt(i + 1), 16); int low = Character.digit(encoded.charAt(i + 2), 16); Preconditions.checkArgument(high != -1 && low != -1, "percent encoded value is not a valid hex string: ", encoded.substring(i, i + 2)); int value = (high << 4) | (low); out.write(value); i += 2; } else { out.write((int) c); } } try { return UTF_8.newDecoder() .onMalformedInput(CodingErrorAction.REPORT) .decode(ByteBuffer.wrap(out.toByteArray())) .toString(); } catch (CharacterCodingException e) { throw new IllegalArgumentException("input does not represent a proper UTF8-encoded string"); } }</code><technical_language>This requireNonNull NPE is exception</technical_language>

Target:
private static String percentDecode(String encoded) { requireNonNull(encoded, "encoded is null"); Preconditions.checkArgument(ascii().matchesAllOf(encoded), "string must be ASCII"); ByteArrayOutputStream out = new ByteArrayOutputStream(encoded.length()); for (int i = 0; i < encoded.length(); i++) { char c = encoded.charAt(i); if (c == '%') { Preconditions.checkArgument(i + 2 < encoded.length(), "percent encoded value is truncated"); int high = Character.digit(encoded.charAt(i + 1), 16); int low = Character.digit(encoded.charAt(i + 2), 16); Preconditions.checkArgument(high != -1 && low != -1, "percent encoded value is not a valid hex string: ", encoded.substring(i, i + 2)); int value = (high << 4) | (low); out.write(value); i += 2; } else { out.write((int) c); } } try { return UTF_8.newDecoder() .onMalformedInput(CodingErrorAction.REPORT) .decode(ByteBuffer.wrap(out.toByteArray())) .toString(); } catch (CharacterCodingException e) { throw new IllegalArgumentException("input does not represent a proper UTF8-encoded string"); } }
Source:
<code>public void edit(final HostRestartConfirmationModel object) { driver.edit(object); if (object.getForceToMaintenanceLabel() != null) { <START> forceToMaintenance.setLabel(object.getForceToMaintenanceLabel()); <END> } forceToMaintenance.asCheckBox().setValue(object.getForceToMaintenance().getEntity()); object.getPropertyChangedEvent().addListener((ev, sender, args) -> { if ("ForceToMaintenanceLabel".equals(args.propertyName)) { HostRestartConfirmationModel entity = (HostRestartConfirmationModel) sender; forceToMaintenance.setLabel(entity.getForceToMaintenanceLabel()); } }); }</code><technical_language>set label here? Is supposed changing constant? If constant, set in constructor</technical_language>

Target:
public void edit(final HostRestartConfirmationModel object) { driver.edit(object); forceToMaintenance.asCheckBox().setValue(object.getForceToMaintenance().getEntity()); }
Source:
<code>public Collection<EObject> getDirectEventsOn(Participant context, EObject parent) { List<EventContext> structure = computeContainmentStructure(context); LinkedHashSet<EObject> events = new LinkedHashSet<EObject>(); for (EventContext ec : structure) { if (ec.getParent().equals(parent)) { events.add(ec.getElement()); } } Set<EObject> result = new <START> HashSet<EObject>(); <END> for (EObject event : events) { if (event != parent) { result.add(event); } } return result; }</code><technical_language>more reliable a LinkedHashSet too</technical_language>

Target:
public Collection<EObject> getDirectEventsOn(Participant context, EObject parent) { List<EventContext> structure = computeContainmentStructure(context); LinkedHashSet<EObject> events = new LinkedHashSet<EObject>(); for (EventContext ec : structure) { if (ec.getParent().equals(parent)) { events.add(ec.getElement()); } } Set<EObject> result = new LinkedHashSet<EObject>(); for (EObject event : events) { if (event != parent) { result.add(event); } } return result; }
Source:
<code>public OneValuedMetaProperty<T,List<R>> asFunctionalProperty() { <START> return (OneValuedMetaProperty<T,List<R>>) null; <END> }</code><technical_language>This suspiciously. this return this</technical_language>

Target:
public OneValuedMetaProperty<T,List<R>> asFunctionalProperty() { throw new UnsupportedOperationException(); }
Source:
<code>public Builder addMember(MemberRef member) { <START> this.members.add(member); <END> return this; }</code><technical_language>omit this.</technical_language>

Target:
public Builder addMember(MemberRef member) { members.add(member); return this; }
Source:
<code>public DOI(String doi) { Objects.requireNonNull(doi); String trimmedDoi = doi.trim(); if (doi.matches(HTTP_EXP) || doi.matches(SHORT_DOI_HTTP_EXP)) { try { URI url = new URI(trimmedDoi); trimmedDoi = url.getScheme() + "://" + url.getHost() + url.getPath(); } catch (URISyntaxException e) { throw new IllegalArgumentException(doi + " is not a valid HTTP DOI/Short DOI."); } } Matcher matcher = EXACT_DOI_PATT.matcher(trimmedDoi); if (matcher.find()) { this.doi = matcher.group(1); } else { Matcher shortDoiMatcher = EXACT_SHORT_DOI_PATT.matcher(trimmedDoi); if (shortDoiMatcher.find()) { this.doi = shortDoiMatcher.group(1); isShortDoi = true; checkForAmbiguousShortDOI(); } else { Matcher shortcutDoiMatcher = EXACT_SHORT_DOI_SHORTCUT.matcher(trimmedDoi); if (shortcutDoiMatcher.find()) { this.doi = "10/"+shortcutDoiMatcher.group(1); isShortDoi = true; } else { <START> <END> throw new IllegalArgumentException(trimmedDoi + " is not a valid DOI/Short DOI."); } } } }</code><technical_language>please remove empty line</technical_language>

Target:
public DOI(String doi) { Objects.requireNonNull(doi); String trimmedDoi = doi.trim(); if (doi.matches(HTTP_EXP) || doi.matches(SHORT_DOI_HTTP_EXP)) { try { URI url = new URI(trimmedDoi); trimmedDoi = url.getScheme() + "://" + url.getHost() + url.getPath(); } catch (URISyntaxException e) { throw new IllegalArgumentException(doi + " is not a valid HTTP DOI/Short DOI."); } } Matcher matcher = EXACT_DOI_PATT.matcher(trimmedDoi); if (matcher.find()) { this.doi = matcher.group(1); } else { Matcher shortDoiMatcher = EXACT_SHORT_DOI_PATT.matcher(trimmedDoi); if (shortDoiMatcher.find()) { this.doi = shortDoiMatcher.group(1); isShortDoi = true; } else { Matcher shortcutDoiMatcher = EXACT_SHORT_DOI_SHORTCUT.matcher(trimmedDoi); if (shortcutDoiMatcher.find()) { this.doi = "10/" + shortcutDoiMatcher.group(1); isShortDoi = true; } else { throw new IllegalArgumentException(trimmedDoi + " is not a valid DOI/Short DOI."); } } } }
Source:
<code>public boolean isPaged() { <START> JsonValue jsonPaged = mRepresentation.getProperties().getPropertyValue(BoxRepresentation.FIELD_PROPERTIES_PAGED); <END> return (jsonPaged != null && TextUtils.equals(jsonPaged.asString(), Boolean.TRUE.toString())); }</code><technical_language>a class RepresentationProperties extends BoxMap? object a helper method isPaged</technical_language>

Target:
public boolean isPaged() { return mRepresentation.getProperties().isPaged(); }
Source:
<code>public void bind(Binding params, PreparedStatement statement) throws SQLException { if (stmt.positionalOnly) { boolean finished = false; for (int i = 0; !finished; ++i) { final Optional<Argument> a = params.findForPosition(i); if (a.isPresent()) { try { a.get().apply(i + 1, statement, this.context); } catch (SQLException e) { throw new UnableToExecuteStatementException( String.format("Exception while binding positional param at (0 based) position %d", i), e, context); } } else { finished = true; } } } else { int i = 0; for (String named_param : stmt.params) { if ("*".equals(named_param)) { continue; } final int index = i; Argument a = Stream.concat( JdbiStreams.toStream(params.findForName(named_param)), <START> JdbiStreams.toStream(params.findForPosition(i))) <END> .findFirst() .orElseThrow(() -> { String msg = String.format("Unable to execute, no named parameter matches " + "\"%s\" and no positional param for place %d (which is %d in " + "the JDBC 'start at 1' scheme) has been set.", named_param, index, index + 1); return new UnableToExecuteStatementException(msg, context); }); try { a.apply(i + 1, statement, this.context); } catch (SQLException e) { throw new UnableToCreateStatementException(String.format("Exception while binding '%s'", named_param), e, context); } i++; } } }</code><technical_language>For example, here. This trivially cheap, though</technical_language>

Target:
public void bind(Binding params, PreparedStatement statement) throws SQLException { if (stmt.positionalOnly) { boolean finished = false; for (int i = 0; !finished; ++i) { final Optional<Argument> a = params.findForPosition(i); if (a.isPresent()) { try { a.get().apply(i + 1, statement, this.context); } catch (SQLException e) { throw new UnableToExecuteStatementException( String.format("Exception while binding positional param at (0 based) position %d", i), e, context); } } else { finished = true; } } } else { int i = 0; for (String named_param : stmt.params) { if ("*".equals(named_param)) { continue; } final int index = i; Argument a = findFirstPresent( () -> params.findForName(named_param), () -> params.findForPosition(index)) .orElseThrow(() -> { String msg = String.format("Unable to execute, no named parameter matches " + "\"%s\" and no positional param for place %d (which is %d in " + "the JDBC 'start at 1' scheme) has been set.", named_param, index, index + 1); return new UnableToExecuteStatementException(msg, context); }); try { a.apply(i + 1, statement, this.context); } catch (SQLException e) { throw new UnableToCreateStatementException(String.format("Exception while binding '%s'", named_param), e, context); } i++; } } }
Source:
<code>public StopStreamMethod(HttpWrapper httpWrapper, String baseUri) { super(httpWrapper); <START> uri = baseUri + "/v1/calls"; <END> }</code><technical_language>I general preference is *have* slash end, version more correct, more of a standard internally. long consistent happy happy with</technical_language>

Target:
public StopStreamMethod(HttpWrapper httpWrapper, String baseUri) { super(httpWrapper); uri = baseUri + DEFAULT_PATH; }
Source:
<code><START> public static boolean waitForCopy(CloudBlob blob) throws StorageException, InterruptedException { <END> boolean continueLoop = true; CopyStatus status = CopyStatus.PENDING; while (continueLoop) { blob.downloadAttributes(); status = blob.getCopyState().getStatus(); continueLoop = status == CopyStatus.PENDING; if (continueLoop) { Thread.sleep(500); } } return status == CopyStatus.SUCCESS; }</code><technical_language>this method private</technical_language>

Target:
private static boolean waitForCopy(CloudBlob blob) throws StorageException, InterruptedException { boolean continueLoop = true; CopyStatus status = CopyStatus.PENDING; while (continueLoop) { blob.downloadAttributes(); status = blob.getCopyState().getStatus(); continueLoop = status == CopyStatus.PENDING; if (continueLoop) { Thread.sleep(500); } } return status == CopyStatus.SUCCESS; }
Source:
<code>public int getDelay(int n) { int delay = -1; <START> if (0 <= n && n < header.frameCount) { <END> delay = header.frames.get(n).delay; } return delay; }</code><technical_language>nit: I prefer other ordering for <= ==, easier for read "n is greater equal 0" is "0 is equal n"</technical_language>

Target:
public int getDelay(int n) { int delay = -1; if ((n >= 0) && (n < header.frameCount)) { delay = header.frames.get(n).delay; } return delay; }
Source:
<code>public FeatureSource<? extends FeatureType, ? extends Feature> handleClipParam( FeatureInfoRequestParameters params, FeatureSource<? extends FeatureType, ? extends Feature> featureSource) { <START> Geometry clipGeom = ClipWMSGetMapCallBack.getClipGeometry(params.getGetMapRequest()); <END> if (clipGeom == null) return featureSource; return new ClippedFeatureSource(featureSource, clipGeom); }</code><technical_language>clip geometry parsed present in GetMapRequest object? yesterday, please move getClipGeometry method KVP parser, private, parsed geometry in GetMapRequest else..</technical_language>

Target:
public FeatureSource<? extends FeatureType, ? extends Feature> handleClipParam( FeatureInfoRequestParameters params, FeatureSource<? extends FeatureType, ? extends Feature> featureSource) { Geometry clipGeom = params.getGetMapRequest().getClip(); if (clipGeom == null) return featureSource; return new ClippedFeatureSource(featureSource, clipGeom); }
Source:
<code>public void testBinaryLogicTypeAllOperators() { new JsonModelBuilder().beginBinaryLogicType("AND"); <START> new JsonModelBuilder().beginBinaryLogicType("OR"); <END> }</code><technical_language>This unit test assertions</technical_language>

Target:
public void testBinaryLogicTypeAllOperators() { new JsonModelBuilder().beginBinaryLogicType(AND); new JsonModelBuilder().beginBinaryLogicType(OR); }
Source:
<code>public static VdcParameter create(String name, Class javaType, String guidStr) { Guid guid = new Guid(guidStr); synchronized (parametersMap) { if (parametersMap.containsKey(guid)) { throw new InvalidParameterGuidException(name, parametersMap.get(guid)); } parametersMap.put(guid, new VdcParameter(name, javaType, guid)); } <START> return parametersMap.get(guid); <END> }</code><technical_language>I understand gerrit puts patches... repeat... new VdcParameter() in a variable return instead of map again</technical_language>

Target:
public static VdcParameter create(String name, Class javaType, String guidStr) { Guid guid = new Guid(guidStr); synchronized (parametersMap) { if (parametersMap.containsKey(guid)) { throw new InvalidParameterGuidException(name, parametersMap.get(guid)); } VdcParameter param = new VdcParameter(name, javaType, guid); parametersMap.put(guid, param); return param; } }
Source:
<code>public void close() throws IOException { datagramChannel.socket().close(); <START> datagramChannel = null; <END> }</code><technical_language>I dereference channel in a finally block in case socket failed close</technical_language>

Target:
public void close() throws IOException { try { datagramChannel.socket().close(); } finally { datagramChannel = null; } }
Source:
<code>public void test06_09_NestedJavaBean() { driver.get(applicationContextUrl); <START> driver.findElement(By.id("EL")).click(); <END> driver.findElement(By.id("06_09")).click(); inputFieldAccessor.overrideValue(By.id("criteria.name"), "yamada", driver); inputFieldAccessor.overrideValue(By.id("criteria.age"), "20", driver); inputFieldAccessor.overrideValue(By.id("rememberCriteria"), "true", driver); driver.findElement(By.id("searchButton")).click(); driver.findElement(By.id("pagination")).findElement(By.linkText("2")) .click(); assertThat( driver.findElement(By.id("criteria.name")) .getAttribute("value"), is("yamada")); assertThat( driver.findElement(By.id("criteria.age")).getAttribute("value"), is("20")); assertThat( driver.findElement(By.id("rememberCriteria")).getAttribute( "value"), is("true")); screenCapture.save(driver); }</code><technical_language>Probably, step of unnecessary. perform @Before method of parent class</technical_language>

Target:
public void test06_09_NestedJavaBean() { driver.findElement(By.id("06_09")).click(); inputFieldAccessor.overrideValue(By.id("criteria.name"), "yamada", driver); inputFieldAccessor.overrideValue(By.id("criteria.age"), "20", driver); inputFieldAccessor.overrideValue(By.id("rememberCriteria"), "true", driver); driver.findElement(By.id("searchButton")).click(); driver.findElement(By.id("pagination")).findElement(By.linkText("2")) .click(); assertThat( driver.findElement(By.id("criteria.name")) .getAttribute("value"), is("yamada")); assertThat( driver.findElement(By.id("criteria.age")).getAttribute("value"), is("20")); assertThat( driver.findElement(By.id("rememberCriteria")).getAttribute( "value"), is("true")); }
Source:
<code>public void testXStripeClientUserAgent() { final RequestOptions options = (new RequestOptionsBuilder()).setApiKey("sk_foobar").build(); final Map<String, String> headers = LiveStripeResponseGetter.getHeaders(options); final Map<String, String> uaMap = new Gson().fromJson(headers.get("X-Stripe-Client-User-Agent"), new TypeToken<Map<String, String>>() {}.getType()); for (Map.Entry<String, String> entry : uaMap.entrySet()) { assertTrue("Header key contains unexpected '.'", !entry.getKey().contains(".")); <START> } <END> }</code><technical_language>This test pass if uaMap completely empty. instead assert presence format specific keys in map, bindings_version? test for expected behavior "make keys a dot" feels a tautology</technical_language>

Target:
public void testXStripeClientUserAgent() { final RequestOptions options = (new RequestOptionsBuilder()).setApiKey("sk_foobar").build(); final Map<String, String> headers = LiveStripeResponseGetter.getHeaders(options); final Map<String, String> uaMap = new Gson().fromJson(headers.get("X-Stripe-Client-User-Agent"), new TypeToken<Map<String, String>>() {}.getType()); for (Map.Entry<String, String> entry : uaMap.entrySet()) { assertTrue("Header key contains unexpected '.'", !entry.getKey().contains(".")); assertTrue("Header value should not be empty", entry.getValue() != null); } assertTrue(uaMap.containsKey("bindings_version")); assertTrue(uaMap.containsKey("lang")); assertTrue(uaMap.containsKey("publisher")); assertTrue(uaMap.containsKey("java_version")); assertTrue(uaMap.containsKey("java_vendor")); assertTrue(uaMap.containsKey("java_vm_version")); assertTrue(uaMap.containsKey("java_vm_vendor")); assertTrue(uaMap.containsKey("os_name")); assertTrue(uaMap.containsKey("os_version")); assertTrue(uaMap.containsKey("os_arch")); }
Source:
<code>private void reconcileRequestTimeout(final RequestContext requestContext, Long timeout) { <START> Number contextTimeout = (Number) requestContext.getLocalAttr(R2Constants.REQUEST_TIMEOUT); <END> int timeoutBound = (contextTimeout != null) ? contextTimeout.intValue() : Integer.MAX_VALUE; requestContext.putLocalAttr(R2Constants.REQUEST_TIMEOUT, Math.min(timeout, timeoutBound)); }</code><technical_language>I need defensive catch ClassCastException</technical_language>

Target:
private int reconcileRequestTimeout(final RequestContext requestContext, Long timeout) { int d2Timeout = timeout.intValue(); Object requestTimeout = requestContext.getLocalAttr(R2Constants.REQUEST_TIMEOUT); if (requestTimeout instanceof Number && ((Number)requestTimeout).intValue() > 0) { d2Timeout = Math.min(((Number)requestTimeout).intValue(), d2Timeout); } else if (requestTimeout != null) { LOGGER.error("Ignore invalid value for REQUEST_TIMEOUT set in request context: " + requestTimeout); } requestContext.putLocalAttr(R2Constants.REQUEST_TIMEOUT, d2Timeout); return d2Timeout; }
Source:
<code>public CloseableIterator<CacheEntry<K, V>> iterator() { return new CloseableIteratorMapper<>(new RemovableCloseableIterator<>(Closeables.iterator(stream()), cache, <START> e -> e.getKey()), e -> new EntryWrapper<>(cache, e)); <END> }</code><technical_language>nitpick: e -> e.getKey() replaced CacheEntry::getKey. for change below. ps. is more efficient</technical_language>

Target:
public CloseableIterator<CacheEntry<K, V>> iterator() { return new CloseableIteratorMapper<>(new RemovableCloseableIterator<>(Closeables.iterator(stream()), cache, CacheEntry::getKey), e -> new EntryWrapper<>(cache, e)); }
Source:
<code>private void onSourceColumnsChanged() { <START> boolean everythingEnabled = _datastore != null; <END> _saveButton.setEnabled(everythingEnabled); _saveAsButton.setEnabled(everythingEnabled); for (PopupButton superCategoryButton : _superCategoryButtons) { superCategoryButton.setEnabled(everythingEnabled); } }</code><technical_language>This wrong. _both_</technical_language>

Target:
private void onSourceColumnsChanged() { boolean everythingEnabled = !_analysisJobBuilder.getSourceColumns().isEmpty() && _datastore != null; _saveButton.setEnabled(everythingEnabled); _saveAsButton.setEnabled(everythingEnabled); for (PopupButton superCategoryButton : _superCategoryButtons) { superCategoryButton.setEnabled(everythingEnabled); } }
Source:
<code>public Date getLastModified() { try { if (Files.isSymbolicLink(file) && Files.notExists(file)) { <START> return new Date(0L); <END> } return new Date(Files.getLastModifiedTime(file).toMillis()); } catch (IOException e) { throw new RuntimeException(e); } }</code><technical_language>this return null based getLastModified docs? <LINK_0></technical_language>

Target:
public Date getLastModified() { try { if (Files.isSymbolicLink(file) && Files.notExists(file)) { return null; } return new Date(Files.getLastModifiedTime(file).toMillis()); } catch (IOException e) { throw new RuntimeException(e); } }