auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected Response performRemove(String id) { DiskImage diskImage = (DiskImage) DiskSnapshotMapper.map(getDeviceSubResource(id).get(), null); return performAction(VdcActionType.RemoveDiskSnapshots, new RemoveDiskSnapshotsParameters(diskImage)); }

Target:
protected Response performRemove(String id) { return performAction(VdcActionType.RemoveDiskSnapshots, new RemoveDiskSnapshotsParameters(Guid.createGuidFromString(id))); }
Source:
public boolean isIgnored(String fullyQualifiedName) { if (getIgnoreFilters() != null) { for (StringMatcher ignoreFilter : getIgnoreFilters()) { String fullyQualifiedName1 = fullyQualifiedName; if (ignoreFilter.match(fullyQualifiedName1)) { return true; } } } return false; }

Target:
public boolean isIgnored(String fullyQualifiedName) { StringMatcher[] ignoreFilters= getIgnoreFilters(); if (ignoreFilters != null) { for (StringMatcher ignoreFilter : ignoreFilters) { if (ignoreFilter.match(fullyQualifiedName)) { return true; } } } return false; }
Source:
public void changePermission(User user, Permission permission) throws CancellationException, InterruptedException; public boolean hasWriteAccess(); public User getHost(); public boolean isHost(); public void addUser(User user); public void userStartedQueuing(final User user); public void userFinishedProjectNegotiation(final User user); public void removeUser(User user); public void kickUser(User user); public void addListener(ISessionListener listener); public void removeListener(ISessionListener listener); default void disposeProject(IProject project) { }

Target:
public void changePermission(User user, Permission permission) throws CancellationException, InterruptedException; public boolean hasWriteAccess(); public User getHost(); public boolean isHost(); public void addUser(User user); public void userStartedQueuing(final User user); public void userFinishedProjectNegotiation(final User user); public void removeUser(User user); public void kickUser(User user); public void addListener(ISessionListener listener); public void removeListener(ISessionListener listener); default void setActivityExecution(IProject project, boolean enabled) { }
Source:
private Position parseCommandResponse(Channel channel, SocketAddress remoteAddress, ChannelBuffer buf) { DeviceSession deviceSession = getDeviceSession(channel, remoteAddress); if (deviceSession == null) { return null; } Position position = new Position(); position.setProtocol(getProtocolName()); position.setDeviceId(deviceSession.getDeviceId()); getLastLocation(position, null); position.set(Position.KEY_RESULT, buf.readBytes(129).toString(StandardCharsets.UTF_8)); return position; }

Target:
private Position parseCommandResponse(Channel channel, SocketAddress remoteAddress, ChannelBuffer buf) { DeviceSession deviceSession = getDeviceSession(channel, remoteAddress); if (deviceSession == null) { return null; } Position position = new Position(); position.setProtocol(getProtocolName()); position.setDeviceId(deviceSession.getDeviceId()); getLastLocation(position, null); int responseTextLength = buf.bytesBefore((byte) 0); if (responseTextLength < 0) { responseTextLength = CMD_RESPONSE_SIZE - 3; } position.set(Position.KEY_RESULT, buf.readBytes(responseTextLength).toString(StandardCharsets.UTF_8)); return position; }
Source:
private void createNewExperimentNameGroup(Composite parent) { Font font = parent.getFont(); Composite folderGroup = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 2; folderGroup.setLayout(layout); folderGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH; String name = fExperiment.getName(); Label newExperimentLabel = new Label(folderGroup, SWT.NONE); newExperimentLabel.setFont(font); newExperimentLabel.setText(Messages.CopyExperimentDialog_ExperimentNewName); fNewExperimentName = new Text(folderGroup, SWT.BORDER); data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH; fNewExperimentName.setLayoutData(data); fNewExperimentName.setFont(font); fNewExperimentName.setFocus(); fNewExperimentName.setText(name); fNewExperimentName.setSelection(0, name.length()); fNewExperimentName.addListener(SWT.Modify, new Listener() { @Override public void handleEvent(Event event) { validateNewExperimentName(); } }); }

Target:
private void createNewExperimentNameGroup(Composite parent) { Font font = parent.getFont(); Composite folderGroup = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 2; folderGroup.setLayout(layout); folderGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); String name = fExperiment.getName(); Label newExperimentLabel = new Label(folderGroup, SWT.NONE); newExperimentLabel.setFont(font); newExperimentLabel.setText(Messages.CopyExperimentDialog_ExperimentNewName); fNewExperimentName = new Text(folderGroup, SWT.BORDER); GridData data = new GridData(GridData.FILL_HORIZONTAL); data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH; fNewExperimentName.setLayoutData(data); fNewExperimentName.setFont(font); fNewExperimentName.setFocus(); fNewExperimentName.setText(name); fNewExperimentName.setSelection(0, name.length()); fNewExperimentName.addListener(SWT.Modify, new Listener() { @Override public void handleEvent(Event event) { validateNewExperimentName(); } }); }
Source:
public void processRead(InputStream in, OutputStream out, byte frameHeader) throws IOException { WebSocketMessage message = null; int opcode = (frameHeader & 0x0F); String readableOpcode = WebSocketMessage.opcode2string(opcode); logger.debug("Process WebSocket frame: " + opcode + " (" + readableOpcode + ")"); if (WebSocketMessage.isControl(opcode)) { message = createWebSocketMessage(in, frameHeader); if(message.getOpcode() == WebSocketMessage.OPCODE_PING && automaticalyPingPong){ logger.info("I get a ping response"); sendPongResponse(message); } } else { boolean shouldContinueMessage = unfinishedMessages.containsKey(in); if (opcode == WebSocketMessage.OPCODE_CONTINUATION) { if (shouldContinueMessage) { message = unfinishedMessages.remove(in); message.readContinuation(in, frameHeader); } else { handleInvalidContinuation(in, out, frameHeader); return; } } else { message = createWebSocketMessage(in, frameHeader); } if (!message.isFinished()) { unfinishedMessages.put(in, message); } } if (isForwardOnly || notifyMessageObservers(message)) { notifyMessageSenderListeners(message, Initiator.PROXY); message.forward(out); } }

Target:
public void processRead(InputStream in, OutputStream out, byte frameHeader) throws IOException { WebSocketMessage message = null; int opcode = (frameHeader & 0x0F); String readableOpcode = WebSocketMessage.opcode2string(opcode); logger.debug("Process WebSocket frame: " + opcode + " (" + readableOpcode + ")"); if (WebSocketMessage.isControl(opcode)) { message = createWebSocketMessage(in, frameHeader); if (!Mode.PROXY.equals(mode) && message.getOpcode() == WebSocketMessage.OPCODE_PING) { sendPongResponse(message); } } else { boolean shouldContinueMessage = unfinishedMessages.containsKey(in); if (opcode == WebSocketMessage.OPCODE_CONTINUATION) { if (shouldContinueMessage) { message = unfinishedMessages.remove(in); message.readContinuation(in, frameHeader); } else { handleInvalidContinuation(in, out, frameHeader); return; } } else { message = createWebSocketMessage(in, frameHeader); } if (!message.isFinished()) { unfinishedMessages.put(in, message); } } if (isForwardOnly || notifyMessageObservers(message)) { notifyMessageSenderListeners(message, Initiator.PROXY); message.forward(out); } }
Source:
private void assureVectorSize() { int requiredVectorLength = min(nextBatchSize, MAX_BATCH_SIZE); if (nullVector.length < requiredVectorLength) { nullVector = new boolean[requiredVectorLength]; scaleVector = new long[requiredVectorLength]; systemMemoryContext.setBytes(requiredVectorLength * 9); } }

Target:
private void assureVectorSize() { int requiredVectorLength = min(nextBatchSize, MAX_BATCH_SIZE); if (nullVector.length < requiredVectorLength) { nullVector = new boolean[requiredVectorLength]; scaleVector = new long[requiredVectorLength]; systemMemoryContext.setBytes(getRetainedSizeInBytes()); } }
Source:
private String formatAmmo(Mounted m) { StringBuffer sb = new StringBuffer(64); int ammoIndex = m.getDesc().indexOf( Messages.getString("MechDisplay.0")); int loc = m.getLocation(); if (!m.getEntity().equals(entity)) { sb.append('['+ "TR] "); } else if (loc != Entity.LOC_NONE) { sb.append('[').append(entity.getLocationAbbr(loc)).append("] "); } if (ammoIndex == -1) { sb.append(m.getDesc()); } else { sb.append(m.getDesc().substring(0, ammoIndex)); sb.append(m.getDesc().substring(ammoIndex + 4)); } if (m.isHotLoaded()) { sb.append(Messages.getString("MechDisplay.isHotLoaded")); } return sb.toString(); }

Target:
private String formatAmmo(Mounted m) { StringBuffer sb = new StringBuffer(64); int ammoIndex = m.getDesc().indexOf( Messages.getString("MechDisplay.0")); int loc = m.getLocation(); if (!m.getEntity().equals(entity)) { sb.append("[TR] "); } else if (loc != Entity.LOC_NONE) { sb.append('[').append(entity.getLocationAbbr(loc)).append("] "); } if (ammoIndex == -1) { sb.append(m.getDesc()); } else { sb.append(m.getDesc().substring(0, ammoIndex)); sb.append(m.getDesc().substring(ammoIndex + 4)); } if (m.isHotLoaded()) { sb.append(Messages.getString("MechDisplay.isHotLoaded")); } return sb.toString(); }
Source:
protected VolumeList addVolumeToOwnerList(VolumeList volumeList, String volume, String owner, long maxUserVolumeCount, long txID) throws IOException { if (volumeList != null && volumeList.getVolumeNamesList().size() >= maxUserVolumeCount) { throw new OMException("Too many volumes for user:" + owner, OMException.ResultCodes.USER_TOO_MANY_VOLUMES); } List<String> prevVolList = new ArrayList<>(); long objectID = 100; if (volumeList != null) { prevVolList.addAll(volumeList.getVolumeNamesList()); objectID = volumeList.getObjectID(); } prevVolList.add(volume); VolumeList newVolList = VolumeList.newBuilder() .setObjectID(objectID) .setUpdateID(txID) .addAllVolumeNames(prevVolList).build(); return newVolList; }

Target:
protected VolumeList addVolumeToOwnerList(VolumeList volumeList, String volume, String owner, long maxUserVolumeCount, long txID) throws IOException { if (volumeList != null && volumeList.getVolumeNamesList().size() >= maxUserVolumeCount) { throw new OMException("Too many volumes for user:" + owner, OMException.ResultCodes.USER_TOO_MANY_VOLUMES); } List<String> prevVolList = new ArrayList<>(); long objectID = txID; if (volumeList != null) { prevVolList.addAll(volumeList.getVolumeNamesList()); objectID = volumeList.getObjectID(); } prevVolList.add(volume); VolumeList newVolList = VolumeList.newBuilder() .setObjectID(objectID) .setUpdateID(txID) .addAllVolumeNames(prevVolList).build(); return newVolList; }
Source:
public static ZkHostDomainPartition create(ZooKeeperPlus zk, String domainPath, int partNum, int initialDomainGroupVersion) throws IOException { try { String hdpPath = domainPath + "/" + partNum; zk.create(hdpPath, null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT); zk.create(hdpPath + UPDATING_TO_VERSION_PATH_SEGMENT, initialDomainGroupVersion, CreateMode.PERSISTENT); zk.create(hdpPath + "/counters", 0, CreateMode.PERSISTENT); return new ZkHostDomainPartition(zk, hdpPath); } catch (Exception e) { throw new IOException(e); } }

Target:
public static ZkHostDomainPartition create(ZooKeeperPlus zk, String domainPath, int partNum, int initialDomainGroupVersion) throws IOException { try { String hdpPath = domainPath + "/" + partNum; zk.create(hdpPath, null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT); zk.create(hdpPath + UPDATING_TO_VERSION_PATH_SEGMENT, initialDomainGroupVersion, CreateMode.PERSISTENT); zk.create(hdpPath + "/counters", null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT); return new ZkHostDomainPartition(zk, hdpPath); } catch (Exception e) { throw new IOException(e); } }
Source:
public static final Map<String, List<String>> getResourceNames(String path) { final HMODULE target = Kernel32.INSTANCE.LoadLibraryEx(path, null, Kernel32.LOAD_LIBRARY_AS_DATAFILE); final List<String> types = new ArrayList<String>(); WinBase.EnumResTypeProc ertp = new WinBase.EnumResTypeProc() { @Override public boolean invoke(HMODULE module, Pointer type, Pointer lParam) { if (Pointer.nativeValue(type) < 65535) { types.add(Pointer.nativeValue(type) + ""); } else { types.add(type.getWideString(0)); } return true; } }; Kernel32.INSTANCE.EnumResourceTypes(target, ertp, null); final Map<String, List<String>> result = new LinkedHashMap<String, List<String>>(); for (final String typeName : types) { result.put(typeName, new ArrayList<String>()); Pointer pointer = null; try { pointer = new Pointer(Long.parseLong(typeName)); } catch (Exception e) { pointer = new Memory(Native.WCHAR_SIZE * (typeName.length() + 1)); pointer.setWideString(0, typeName); } Kernel32.INSTANCE.EnumResourceNames(target, pointer, new WinBase.EnumResNameProc() { @Override public boolean invoke(HMODULE module, Pointer t, Pointer name, Pointer lParam) { if (Pointer.nativeValue(name) < 65535) { result.get(typeName).add(Pointer.nativeValue(name) + ""); } else { result.get(typeName).add(name.getWideString(0)); } return true; } }, null); } return result; }

Target:
public static Map<String, List<String>> getResourceNames(String path) { final HMODULE target = Kernel32.INSTANCE.LoadLibraryEx(path, null, Kernel32.LOAD_LIBRARY_AS_DATAFILE); final List<String> types = new ArrayList<String>(); WinBase.EnumResTypeProc ertp = new WinBase.EnumResTypeProc() { @Override public boolean invoke(HMODULE module, Pointer type, Pointer lParam) { if (Pointer.nativeValue(type) < 65535) { types.add(Pointer.nativeValue(type) + ""); } else { types.add(type.getWideString(0)); } return true; } }; Kernel32.INSTANCE.EnumResourceTypes(target, ertp, null); final Map<String, List<String>> result = new LinkedHashMap<String, List<String>>(); for (final String typeName : types) { result.put(typeName, new ArrayList<String>()); Pointer pointer = null; try { pointer = new Pointer(Long.parseLong(typeName)); } catch (Exception e) { pointer = new Memory(Native.WCHAR_SIZE * (typeName.length() + 1)); pointer.setWideString(0, typeName); } Kernel32.INSTANCE.EnumResourceNames(target, pointer, new WinBase.EnumResNameProc() { @Override public boolean invoke(HMODULE module, Pointer t, Pointer name, Pointer lParam) { if (Pointer.nativeValue(name) < 65535) { result.get(typeName).add(Pointer.nativeValue(name) + ""); } else { result.get(typeName).add(name.getWideString(0)); } return true; } }, null); } return result; }
Source:
private static String reportOnIncompatibility(ConfiguredTarget target) { Preconditions.checkNotNull(target); String message = "\nDependency chain:"; IncompatiblePlatformProvider provider = null; while (target != null) { message += "\n " + target.getLabel().toString(); provider = target.getProvider(IncompatiblePlatformProvider.class); target = provider.getTargetResponsibleForIncompatibility(); } message += " <-- target platform didn't satisfy constraint " + provider.getConstraintResponsibleForIncompatibility().label().toString(); return message; }

Target:
private static String reportOnIncompatibility(ConfiguredTarget target) { Preconditions.checkNotNull(target); String message = "\nDependency chain:"; IncompatiblePlatformProvider provider = null; while (target != null) { message += "\n " + target.getLabel(); provider = target.getProvider(IncompatiblePlatformProvider.class); ImmutableList<ConfiguredTarget> targetList = provider.targetsResponsibleForIncompatibility(); if (targetList == null) { target = null; } else { target = targetList.get(0); } } message += " <-- target platform didn't satisfy constraint"; if (provider.constraintsResponsibleForIncompatibility().size() == 1) { message += " " + provider.constraintsResponsibleForIncompatibility().get(0).label(); return message; } message += "s ["; boolean first = true; for (ConstraintValueInfo constraintValueInfo : provider.constraintsResponsibleForIncompatibility()) { if (first) { first = false; } else { message += ", "; } message += constraintValueInfo.label(); } message += "]"; return message; }
Source:
public void setItems(Collection<T> value, T selectedItem) { List<T> items = new ArrayList<>(value); if (items.get(0) != null) { items.add(0, null); } super.setItems(items, selectedItem); }

Target:
public void setItems(Collection<T> value, T selectedItem) { List<T> items = value == null ? new ArrayList<>() : new ArrayList<>(value); if (items.isEmpty() || items.get(0) != null) { items.add(0, null); } super.setItems(items, selectedItem); }
Source:
public static void proceedToNextStateFrom(InstallState prior) { InstallState next = getNextInstallState(prior); LOGGER.log(Main.isDevelopmentMode ? Level.INFO : Level.FINE, "Install state transitioning from: " + prior + " to: " + next); if (next != null) { Jenkins.getInstance().setInstallState(next); } }

Target:
public static void proceedToNextStateFrom(InstallState prior) { InstallState next = getNextInstallState(prior); if (next != null) { Jenkins.getInstance().setInstallState(next); } }
Source:
protected final void lockAndRegisterBackupLock(TxInvocationContext ctx, Object key) throws InterruptedException { if (cll.localNodeOwnsLock(key)) { lockKeyAndCheckOwnership(ctx, key); } else if (cll.localNodeIsOwner(key)) { ctx.getCacheTransaction().addBackupLockForKey(key); } }

Target:
protected final void lockAndRegisterBackupLock(TxInvocationContext ctx, Object key) throws InterruptedException { if (cdl.localNodeIsPrimaryOwner(key)) { lockKeyAndCheckOwnership(ctx, key); } else if (cdl.localNodeIsOwner(key)) { ctx.getCacheTransaction().addBackupLockForKey(key); } }
Source:
public String get(String macPoolId, String macPoolName) { if (macPoolId != null) { return macPoolId; } if (macPoolName != null) { MacPool macPoolByName = callerResource.getEntity(MacPool.class, VdcQueryType.GetMacPoolByName, new NameQueryParameters(macPoolName), null, true); if (macPoolByName != null) { return macPoolByName.getId().toString(); } } return null; }

Target:
public String get(String macPoolId, String macPoolName) { if (macPoolId != null) { return macPoolId; } if (macPoolName != null) { MacPool macPoolByName = callerResource.getEntity(MacPool.class, VdcQueryType.GetMacPoolByName, new NameQueryParameters(macPoolName), macPoolName, true); if (macPoolByName != null) { return macPoolByName.getId().toString(); } } return null; }
Source:
private void preprocessParameters(StudentProfileAttributes studentProfile) { studentProfile.shortName = StringHelper.trimIfNotNull(studentProfile.shortName); studentProfile.email = StringHelper.trimIfNotNull(studentProfile.email); studentProfile.gender = GenderType.valueOf(String.valueOf(studentProfile.gender)); studentProfile.nationality = StringHelper.trimIfNotNull(studentProfile.nationality); studentProfile.institute = StringHelper.trimIfNotNull(studentProfile.institute); studentProfile.moreInfo = StringHelper.trimIfNotNull(studentProfile.moreInfo); }

Target:
private void preprocessParameters(StudentProfileAttributes studentProfile) { studentProfile.shortName = StringHelper.trimIfNotNull(studentProfile.shortName); studentProfile.email = StringHelper.trimIfNotNull(studentProfile.email); studentProfile.nationality = StringHelper.trimIfNotNull(studentProfile.nationality); studentProfile.institute = StringHelper.trimIfNotNull(studentProfile.institute); studentProfile.moreInfo = StringHelper.trimIfNotNull(studentProfile.moreInfo); }
Source:
public void testRecordShallowRecommendation() throws Exception { try ( Repository remoteDb = createBareRepository(); Repository tempDb = createWorkRepository()) { StringBuilder xmlContent = new StringBuilder(); xmlContent .append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n") .append("<manifest>") .append("<remote name=\"remote1\" fetch=\".\" />") .append("<default revision=\"master\" remote=\"remote1\" />") .append("<project path=\"shallow-please\" ") .append("name=\"").append(defaultUri).append("\" ") .append("clone-depth=\"1\" />") .append("<project path=\"non-shallow\" ") .append("name=\"").append(defaultUri).append("\" />") .append("</manifest>"); JGitTestUtil.writeTrashFile(tempDb, "manifest.xml", xmlContent.toString()); RepoCommand command = new RepoCommand(remoteDb); command.setPath(tempDb.getWorkTree().getAbsolutePath() + "/manifest.xml") .setURI(rootUri) .setRecommendShallow(true) .call(); File directory = createTempDirectory("testBareRepo"); try (Repository localDb = Git.cloneRepository() .setDirectory(directory) .setURI(remoteDb.getDirectory().toURI().toString()).call() .getRepository();) { File gitmodules = new File(localDb.getWorkTree(), ".gitmodules"); assertTrue("The .gitmodules file should exist", gitmodules.exists()); FileBasedConfig c = new FileBasedConfig(gitmodules, FS.DETECTED); c.load(); assertEquals("Recording shallow configuration should work", "true", c.getString("submodule", "shallow-please", "shallow")); assertNull("Recording shallow configuration should work", c.getString("submodule", "non-shallow", "shallow")); } } }

Target:
public void testRecordShallowRecommendation() throws Exception { try ( Repository remoteDb = createBareRepository(); Repository tempDb = createWorkRepository()) { StringBuilder xmlContent = new StringBuilder(); xmlContent .append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n") .append("<manifest>") .append("<remote name=\"remote1\" fetch=\".\" />") .append("<default revision=\"master\" remote=\"remote1\" />") .append("<project path=\"shallow-please\" ") .append("name=\"").append(defaultUri).append("\" ") .append("clone-depth=\"1\" />") .append("<project path=\"non-shallow\" ") .append("name=\"").append(defaultUri).append("\" />") .append("</manifest>"); JGitTestUtil.writeTrashFile(tempDb, "manifest.xml", xmlContent.toString()); RepoCommand command = new RepoCommand(remoteDb); command.setPath(tempDb.getWorkTree().getAbsolutePath() + "/manifest.xml") .setURI(rootUri) .setRecommendShallow(true) .call(); File directory = createTempDirectory("testBareRepo"); try (Repository localDb = Git.cloneRepository() .setDirectory(directory) .setURI(remoteDb.getDirectory().toURI().toString()).call() .getRepository();) { File gitmodules = new File(localDb.getWorkTree(), ".gitmodules"); assertTrue("The .gitmodules file should exist", gitmodules.exists()); FileBasedConfig c = new FileBasedConfig(gitmodules, FS.DETECTED); c.load(); assertEquals("Recording shallow configuration should work", "true", c.getString("submodule", "shallow-please", "shallow")); assertNull("Recording non shallow configuration should work", c.getString("submodule", "non-shallow", "shallow")); } } }
Source:
public void declarativeWithSCMEnvVars() throws Exception { WorkflowJob p = r.jenkins.createProject(WorkflowJob.class, "job with dir"); p.setDefinition(new CpsFlowDefinition(loadPipelineScript("declarativeWithSCMEnvVars.groovy"), true)); WorkflowRun b = p.scheduleBuild2(0).waitForStart(); assertNotNull(b); r.assertBuildStatusSuccess((r.waitForCompletion(b))); r.assertLogNotContains("GIT_COMMIT is null", b); }

Target:
public void declarativeWithSCMEnvVars() throws Exception { prepRepoWithJenkinsfile("declarativeWithSCMEnvVars.groovy"); WorkflowJob p = r.jenkins.createProject(WorkflowJob.class, "job with dir"); p.setDefinition(new CpsScmFlowDefinition(new GitStep(sampleRepo.toString()).createSCM(), "Jenkinsfile")); WorkflowRun b = p.scheduleBuild2(0).waitForStart(); assertNotNull(b); r.assertBuildStatusSuccess((r.waitForCompletion(b))); r.assertLogNotContains("GIT_COMMIT is null", b); r.assertLogContains("GIT_COMMIT is ", b); }
Source:
public void registerRequest(int type, String path) { if (sampler.nextFloat() <= REQUEST_PREPROCESS_SAMPLE_RATE) { PathStatsQueue pathStatsQueue = immutableRequestsMap.get(Request.op2String(type)); if (pathStatsQueue != null) { pathStatsQueue.registerRequest(path); } else { LOG.error("We should not handle {}", type); } } }

Target:
public void registerRequest(int type, String path) { if (!enabled) return; if (sampler.nextFloat() <= REQUEST_PREPROCESS_SAMPLE_RATE) { PathStatsQueue pathStatsQueue = immutableRequestsMap.get(Request.op2String(type)); if (pathStatsQueue != null) { pathStatsQueue.registerRequest(path); } else { LOG.error("We should not handle {}", type); } } }
Source:
public void defaultApplicationIdUserAgentTest() throws Exception { final HttpPipeline pipeline = new HttpPipelineBuilder() .httpClient(new NoOpHttpClient() { @Override public Mono<HttpResponse> send(HttpRequest request) { String header = request.getHeaders().getValue("User-Agent"); String expectedHeaderPrefix = "azsdk-java-package.name"; Assertions.assertTrue(header.startsWith(expectedHeaderPrefix)); return Mono.just(new MockHttpResponse(request, 200)); } }) .policies(new UserAgentPolicy( null, "package.name", "package_version", Configuration.NONE, () -> "1.0")) .build(); HttpResponse response = pipeline.send(new HttpRequest(HttpMethod.GET, new URL("http://localhost"))).block(); Assertions.assertEquals(200, response.getStatusCode()); }

Target:
public void defaultApplicationIdUserAgentTest() throws Exception { final HttpPipeline pipeline = new HttpPipelineBuilder() .httpClient(new NoOpHttpClient() { @Override public Mono<HttpResponse> send(HttpRequest request) { String header = request.getHeaders().getValue("User-Agent"); String expectedHeaderPrefix = "azsdk-java-package.name"; Assertions.assertTrue(header.startsWith(expectedHeaderPrefix)); return Mono.just(new MockHttpResponse(request, 200)); } }) .policies(new UserAgentPolicy( null, "package.name", "package_version", Configuration.NONE, () -> "1.0")) .build(); Mono<HttpResponse> response = pipeline.send(new HttpRequest(HttpMethod.GET, new URL("http://localhost"))); StepVerifier.create(response) .expectNextMatches(httpResponse -> { assertEquals(200, httpResponse.getStatusCode()); assertTrue(httpResponse.getRequest().getHeaders().getValue("User-Agent").startsWith("azsdk")); return true; }) .verifyComplete(); }
Source:
protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == RequestCodes.DO_LOGIN) { if (resultCode == RESULT_OK) { initShareFragment(true); } else { finish(); } } }

Target:
protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == RequestCodes.DO_LOGIN) { if (resultCode == RESULT_OK) { refreshContent(); } else { finish(); } } }
Source:
public Map<Long, Optional<String>> translatePidsToForcedIds(Set<Long> thePids) { Map<Long, Optional<String>> retVal = new HashMap<>(myForcedIdCache.getAllPresent(thePids)); List<Long> remainingPids = thePids .stream() .filter(t -> !retVal.containsKey(t)) .collect(Collectors.toList()); new QueryChunker<Long>().chunk(remainingPids, t->{ List<ForcedId> forcedIds = myForcedIdDao.findAllById(t); for (ForcedId forcedId : forcedIds) { Long nextResourcePid = forcedId.getResourceId(); Optional<String> nextForcedId = Optional.of(forcedId.getForcedId()); retVal.put(nextResourcePid, nextForcedId); myForcedIdCache.put(nextResourcePid, nextForcedId); } }); remainingPids = thePids .stream() .filter(t -> !retVal.containsKey(t)) .collect(Collectors.toList()); for (Long nextResourcePid : remainingPids) { retVal.put(nextResourcePid, Optional.empty()); myForcedIdCache.put(nextResourcePid, Optional.empty()); } return retVal; }

Target:
public Map<Long, Optional<String>> translatePidsToForcedIds(Set<Long> thePids) { Map<Long, Optional<String>> retVal = new HashMap<>(myForcedIdCache.getAllPresent(thePids)); List<Long> remainingPids = thePids .stream() .filter(t -> !retVal.containsKey(t)) .collect(Collectors.toList()); new QueryChunker<Long>().chunk(remainingPids, t -> { List<ForcedId> forcedIds = myForcedIdDao.findAllByResourcePid(t); for (ForcedId forcedId : forcedIds) { Long nextResourcePid = forcedId.getResourceId(); Optional<String> nextForcedId = Optional.of(forcedId.getForcedId()); retVal.put(nextResourcePid, nextForcedId); myForcedIdCache.put(nextResourcePid, nextForcedId); } }); remainingPids = thePids .stream() .filter(t -> !retVal.containsKey(t)) .collect(Collectors.toList()); for (Long nextResourcePid : remainingPids) { retVal.put(nextResourcePid, Optional.empty()); myForcedIdCache.put(nextResourcePid, Optional.empty()); } return retVal; }
Source:
private static boolean isValidTransformFunction(FieldSpec fieldSpec) { String column = fieldSpec.getName(); String transformFunction = fieldSpec.getTransformFunction(); if (transformFunction != null) { FunctionEvaluator functionEvaluator = FunctionEvaluatorFactory.getExpressionEvaluator(fieldSpec); if (functionEvaluator != null) { List<String> arguments = functionEvaluator.getArguments(); if (arguments.contains(column)) { LOGGER.error("The arguments of transform function: {}, should not contain the destination column: {}", transformFunction, column); return false; } } } return true; }

Target:
private static boolean isValidTransformFunction(FieldSpec fieldSpec) { String column = fieldSpec.getName(); String transformFunction = fieldSpec.getTransformFunction(); if (transformFunction != null) { try { List<String> arguments = FunctionEvaluatorFactory.getExpressionEvaluator(fieldSpec).getArguments(); if (arguments.contains(column)) { LOGGER.error("The arguments of transform function: {}, should not contain the destination column: {}", transformFunction, column); return false; } } catch (Exception e) { LOGGER .error("Exception in getting arguments for transform function for column {}", transformFunction, column, e); return false; } } return true; }
Source:
public void init(Session session, Map<String, String> parameters) throws OpenAS2Exception { super.init(session, parameters); logger.info(this.getName() + " initialized..."); final ResourceConfig rc = new ResourceConfig(); rc.register(new AuthenticationFilter( parameters.getOrDefault("userid","userid"), parameters.getOrDefault("password","pWd") )).register(new ControlResource(this)); URI baseUri = URI.create(parameters.getOrDefault("baseuri", BASE_URI)); try { if (baseUri.getScheme().equalsIgnoreCase("https")) { SSLContextConfigurator sslCon = new SSLContextConfigurator(); sslCon.setKeyStoreFile(parameters.get("ssl_keystore")); sslCon.setKeyStorePass(parameters.getOrDefault("ssl_keystore_password", "")); GrizzlyHttpContainer container = (GrizzlyHttpContainer) ContainerFactory.createContainer(GrizzlyHttpContainer.class, rc); SSLEngineConfigurator sslEngineConfigurator = new SSLEngineConfigurator(sslCon, false, false, false); server = GrizzlyHttpServerFactory.createHttpServer(baseUri, container, true, sslEngineConfigurator, true); } else { server = GrizzlyHttpServerFactory.createHttpServer(baseUri, rc); } server.start(); } catch (IOException ex) { Logger.getLogger(RestCommandProcessor.class.getName()).log(Level.SEVERE, null, ex); } }

Target:
public void init(Session session, Map<String, String> parameters) throws OpenAS2Exception { try { super.init(session, parameters); logger.info(this.getName() + " initialized..."); final ResourceConfig rc = new ResourceConfig(); rc.register(new LoggerRequestFilter(logger)) .register(new AuthenticationRequestFilter( parameters.getOrDefault("userid","userid"), parameters.getOrDefault("password","pWd") )) .register(new ApiResource(this)) .register(new CORSFilter()); URI baseUri = URI.create(parameters.getOrDefault("baseuri", BASE_URI)); logger.info("Creating and starting a new instance of grizzly http server"); logger.info("Exposing the Jersey application at "+baseUri); if (baseUri.getScheme().equalsIgnoreCase("https")) { SSLContextConfigurator sslCon = new SSLContextConfigurator(); String keystore = parameters.get("ssl_keystore"); if(null == keystore) { throw new RuntimeException("Missing SSL Keystore parameter in the configuration. You cannot use SSL without a Certificate"); } sslCon.setKeyStoreFile(keystore); sslCon.setKeyStorePass(parameters.getOrDefault("ssl_keystore_password", "")); sslCon.setSecurityProtocol(parameters.getOrDefault("ssl_protocol", "TLS")); GrizzlyHttpContainer container = (GrizzlyHttpContainer) ContainerFactory.createContainer(GrizzlyHttpContainer.class, rc); SSLEngineConfigurator sslEngineConfigurator = new SSLEngineConfigurator(sslCon, false, false, false); server = GrizzlyHttpServerFactory.createHttpServer(baseUri, container, true, sslEngineConfigurator, true); } else { server = GrizzlyHttpServerFactory.createHttpServer(baseUri, rc); } server.start(); } catch (IOException ex) { Logger.getLogger(RestCommandProcessor.class.getName()).log(Level.SEVERE, null, ex); throw new OpenAS2Exception(ex); } catch (RuntimeException ex) { Logger.getLogger(RestCommandProcessor.class.getName()).log(Level.SEVERE, null, ex); throw new OpenAS2Exception(ex); } }
Source:
public static <T> Response<T> success(int code, @Nullable T body) { if (code < 200 || code >= 300) throw new IllegalArgumentException("code < 200 or >= 300: " + code); return success(body, new okhttp3.Response.Builder() .code(code) .message("Response.success()") .protocol(Protocol.HTTP_1_1) .request(new Request.Builder().url("http://localhost/").build()) .build()); }

Target:
public static <T> Response<T> success(int code, @Nullable T body) { if (code < 200 || code >= 300) { throw new IllegalArgumentException("code < 200 or >= 300: " + code); } return success(body, new okhttp3.Response.Builder() .code(code) .message("Response.success()") .protocol(Protocol.HTTP_1_1) .request(new Request.Builder().url("http://localhost/").build()) .build()); }
Source:
public boolean isAndroidMessage() { for (String platform : platforms) { if (platform.equalsIgnoreCase(PLATFORM_ANDROID)) { return true; } } return false; }

Target:
public boolean isAndroidMessage() { for (String platform : platforms) { if (platform.trim().equalsIgnoreCase(Platform.ANDROID.key)) { return true; } } return false; }
Source:
public void craiIndexInitializationCheck() { final StringBuilder error = new StringBuilder(); if (byteOffsetFromContainer == UNINITIALIZED_INDEXING_PARAMETER) { error.append("Cannot index this Slice for CRAI because its byteOffsetFromContainer is unknown.").append(System.lineSeparator()); } if (containerByteOffset == UNINITIALIZED_INDEXING_PARAMETER) { error.append("Cannot index this Slice for CRAI because its containerByteOffset is unknown.").append(System.lineSeparator()); } if (byteSize == UNINITIALIZED_INDEXING_PARAMETER) { error.append("Cannot index this Slice for CRAI because its byteSize is unknown.").append(System.lineSeparator()); } if (error.length() > 0) { throw new CRAMException(error.toString()); } }

Target:
void craiIndexInitializationCheck() { final StringBuilder error = new StringBuilder(); if (byteOffsetFromContainer == UNINITIALIZED_INDEXING_PARAMETER) { error.append("Cannot index this Slice for CRAI because its byteOffsetFromContainer is unknown.").append(System.lineSeparator()); } if (containerByteOffset == UNINITIALIZED_INDEXING_PARAMETER) { error.append("Cannot index this Slice for CRAI because its containerByteOffset is unknown.").append(System.lineSeparator()); } if (byteSize == UNINITIALIZED_INDEXING_PARAMETER) { error.append("Cannot index this Slice for CRAI because its byteSize is unknown.").append(System.lineSeparator()); } if (error.length() > 0) { throw new CRAMException(error.toString()); } }
Source:
public List<Attribute> getAttributes(PerunSession sess, Member member, Group group, boolean workWithUserAttributes) throws InternalErrorException, WrongAttributeAssignmentException { List<Attribute> attributes = getAttributesManagerImpl().getVirtualAttributes(sess, member, group); Iterator<Attribute> attributeIterator = attributes.iterator(); while(attributeIterator.hasNext()) if(attributeIterator.next().getValue() == null) attributeIterator.remove(); attributes.addAll(getAttributesManagerImpl().getAttributes(sess, member, group)); if(workWithUserAttributes) { User user = getPerunBl().getUsersManagerBl().getUserByMember(sess, member); attributes.addAll(getAttributesManagerImpl().getAttributes(sess, user)); attributes.addAll(getAttributesManagerImpl().getAttributes(sess, member)); } return attributes; }

Target:
public List<Attribute> getAttributes(PerunSession sess, Member member, Group group, boolean workWithUserAttributes) throws InternalErrorException, WrongAttributeAssignmentException { List<Attribute> attributes = getAttributesManagerImpl().getVirtualAttributes(sess, member, group); Iterator<Attribute> attributeIterator = attributes.iterator(); while(attributeIterator.hasNext()) if(attributeIterator.next().getValue() == null) attributeIterator.remove(); attributes.addAll(getAttributesManagerImpl().getAttributes(sess, member, group)); if(workWithUserAttributes) { User user = getPerunBl().getUsersManagerBl().getUserByMember(sess, member); attributes.addAll(this.getAttributes(sess, user)); attributes.addAll(this.getAttributes(sess, member)); } return attributes; }
Source:
private List<DiskImage> getImagesExcludedFromPreview(List<DiskImage> images, Guid previousActiveSnapshotId, Guid newActiveSnapshotId) { List<DiskImage> excludedImages = new ArrayList<>(); for (DiskImage image : images) { if (((image.getDiskStorageType() == DiskStorageType.IMAGE) || (image.getDiskStorageType() == DiskStorageType.CINDER)) && image.getVmSnapshotId().equals(previousActiveSnapshotId)) { getImageDao().updateImageVmSnapshotId(image.getImageId(), newActiveSnapshotId); excludedImages.add(image); } } return excludedImages; }

Target:
private List<DiskImage> getImagesExcludedFromPreview(List<DiskImage> images, Guid previousActiveSnapshotId, Guid newActiveSnapshotId) { List<DiskImage> excludedImages = new ArrayList<>(); for (DiskImage image : images) { if (image.isStorageTypeSupportsSnapshot() && image.getVmSnapshotId().equals(previousActiveSnapshotId)) { getImageDao().updateImageVmSnapshotId(image.getImageId(), newActiveSnapshotId); excludedImages.add(image); } } return excludedImages; }
Source:
public void process(JSONRequestContext jsonRequestContext) { StudentGroupContactLogEntryDAO logEntryDAO = DAOFactory.getInstance().getStudentGroupContactLogEntryDAO(); StudentGroupContactLogEntryCommentDAO entryCommentDAO = DAOFactory.getInstance().getStudentGroupContactLogEntryCommentDAO(); try { Long entryId = jsonRequestContext.getLong("entryId"); StudentGroupContactLogEntry entry = logEntryDAO.findById(entryId); String commentText = jsonRequestContext.getRequest().getParameter("commentText"); String commentCreatorName = jsonRequestContext.getRequest().getParameter("commentCreatorName"); Date commentDate = new Date(NumberUtils.createLong(jsonRequestContext.getRequest().getParameter("commentDate"))); StudentGroupContactLogEntryComment comment = entryCommentDAO.create(entry, commentText, commentDate, commentCreatorName); Map<String, Object> info = new HashMap<String, Object>(); info.put("id", comment.getId()); info.put("creatorName", comment.getCreatorName()); info.put("timestamp", comment.getCommentDate().getTime()); info.put("text", comment.getText()); info.put("entryId", entryId); jsonRequestContext.addResponseParameter("results", info); } catch (Exception e) { throw new SmvcRuntimeException(e); } }

Target:
public void process(JSONRequestContext jsonRequestContext) { StudentGroupContactLogEntryDAO logEntryDAO = DAOFactory.getInstance().getStudentGroupContactLogEntryDAO(); StudentGroupContactLogEntryCommentDAO entryCommentDAO = DAOFactory.getInstance().getStudentGroupContactLogEntryCommentDAO(); Long entryId = jsonRequestContext.getLong("entryId"); if (entryId == null) throw new SmvcRuntimeException(StatusCode.UNDEFINED, "EntryId was not defined."); try { StudentGroupContactLogEntry entry = logEntryDAO.findById(entryId); String commentText = jsonRequestContext.getString("commentText"); String commentCreatorName = jsonRequestContext.getString("commentCreatorName"); Date commentDate = jsonRequestContext.getDate("commentDate"); StudentGroupContactLogEntryComment comment = entryCommentDAO.create(entry, commentText, commentDate, commentCreatorName); Map<String, Object> info = new HashMap<String, Object>(); info.put("id", comment.getId()); info.put("creatorName", comment.getCreatorName()); info.put("timestamp", comment.getCommentDate() != null ? comment.getCommentDate().getTime() : ""); info.put("text", comment.getText()); info.put("entryId", entryId); jsonRequestContext.addResponseParameter("results", info); } catch (Exception e) { throw new SmvcRuntimeException(e); } }
Source:
public void testExecuteAndPostProcess() { gaeSimulation.loginAsInstructor("idOfInstructor3"); ______TS("typical success case"); String[] submissionParams = new String[] { Const.ParamsNames.COURSE_ID, "idOfTypicalCourse1" }; InstructorCourseInstructorCopyPageAction action = getAction(submissionParams); ShowPageResult result = getShowPageResult(action); String expectedString = getPageResultDestination( Const.ViewURIs.INSTRUCTOR_COURSE_INSTRUCTOR_COPY_MODAL, false, "idOfInstructor3"); assertEquals(expectedString, result.getDestinationWithParams()); assertTrue(result.getStatusMessage().isEmpty()); ______TS("failure: non-existent course"); submissionParams = new String[] { Const.ParamsNames.COURSE_ID, "INVALID COURSE" }; action = getAction(submissionParams); try { result = getShowPageResult(action); signalFailureToDetectException(); } catch (UnauthorizedAccessException uae) { assertEquals("Trying to access system using a non-existent instructor entity", uae.getMessage()); } ______TS("failure: unsufficient permissions"); gaeSimulation.loginAsInstructor(typicalBundle.accounts.get("helperOfCourse1").googleId); submissionParams = new String[] { Const.ParamsNames.COURSE_ID, "idOfTypicalCourse1" }; action = getAction(submissionParams); try { result = getShowPageResult(action); signalFailureToDetectException(); } catch (UnauthorizedAccessException uae) { assertEquals("Course [idOfTypicalCourse1] is not accessible to instructor [helper@course1.tmt] " + "for privilege [canmodifyinstructor]", uae.getMessage()); } }

Target:
public void testExecuteAndPostProcess() { gaeSimulation.loginAsInstructor("idOfInstructor3"); ______TS("typical success case"); String[] submissionParams = new String[] { Const.ParamsNames.COURSE_ID, "idOfTypicalCourse1" }; InstructorCourseInstructorCopyPageAction action = getAction(submissionParams); ShowPageResult result = getShowPageResult(action); String expectedString = getPageResultDestination( Const.ViewURIs.INSTRUCTOR_COURSE_INSTRUCTOR_COPY_MODAL, false, "idOfInstructor3"); assertEquals(expectedString, result.getDestinationWithParams()); assertTrue(result.getStatusMessage().isEmpty()); ______TS("failure: non-existent course"); submissionParams = new String[] { Const.ParamsNames.COURSE_ID, "INVALID COURSE" }; action = getAction(submissionParams); try { result = getShowPageResult(action); signalFailureToDetectException(); } catch (UnauthorizedAccessException uae) { assertEquals("Trying to access system using a non-existent instructor entity", uae.getMessage()); } ______TS("failure: insufficient permissions"); gaeSimulation.loginAsInstructor(typicalBundle.accounts.get("helperOfCourse1").googleId); submissionParams = new String[] { Const.ParamsNames.COURSE_ID, "idOfTypicalCourse1" }; action = getAction(submissionParams); try { result = getShowPageResult(action); signalFailureToDetectException(); } catch (UnauthorizedAccessException uae) { assertEquals("Course [idOfTypicalCourse1] is not accessible to instructor [helper@course1.tmt] " + "for privilege [canmodifyinstructor]", uae.getMessage()); } }
Source:
public void start() { log.info( "Opening connection to MongoDB instance" ); try { Object cfgHost = this.cfg.get( "hibernate.ogm.mongo.host" ); String host = cfgHost != null ? cfgHost.toString() : DEFAULT_HOST; Object cfgPort = this.cfg.get( "hibernate.ogm.mongo.port" ); int port = cfgPort != null ? Integer.valueOf( cfgPort.toString() ).intValue() : DEFAULT_PORT; log.tracef( "Opening connection to: %1$s : %1$s", host, String.valueOf( port ) ); this.mongo = new Mongo( host, port ); } catch ( UnknownHostException e ) { throw new HibernateException( "The database host cannot be resolved", e ); } catch ( MongoException e ) { throw new HibernateException( "Cannot open the MongoDB connection", e ); } }

Target:
public void start() { if ( !isCacheProvided ) { log.info( "Opening connection to MongoDB instance" ); try { Object cfgHost = this.cfg.get( "hibernate.ogm.mongo.host" ); String host = cfgHost != null ? cfgHost.toString() : DEFAULT_HOST; int port = DEFAULT_PORT; Object cfgPort = this.cfg.get( "hibernate.ogm.mongo.port" ); if ( cfgPort != null ) { try { int temporaryPort = Integer.valueOf( cfgPort.toString() ).intValue(); if ( temporaryPort < 1 || temporaryPort > 65535 ) { throw new HibernateException( "The value set for the hibernate.ogm.mongo.port property must be between 1 and 65535" ); } port = temporaryPort; } catch ( NumberFormatException e ) { throw new HibernateException( "The value set for the hibernate.ogm.mongo.port is not a number" ); } } if ( log.isTraceEnabled() ) { log.tracef( "Opening connection to: %1$s : %1$s", host, String.valueOf( port ) ); } this.mongo = new Mongo( host, port ); this.isCacheProvided = true; } catch ( UnknownHostException e ) { throw new HibernateException( "The database host cannot be resolved", e ); } catch ( RuntimeException e ) { log.unableToInitializeMongoDB( e ); } } }
Source:
protected String sendGetToElectricity(String query) { Uri.Builder uriBuilder = Uri.parse(BASE_URL_ELECTRICITY).buildUpon(); uriBuilder.encodedQuery(query); Uri uri = uriBuilder.build(); try { URL url = new URL(uri.toString()); return ApiConnection.getResponseFromHttpConnection(url); } catch (MalformedURLException e) { e.printStackTrace(); } return null; }

Target:
protected String sendGetToElectricity(String query) { Uri.Builder uriBuilder = Uri.parse(BASE_URL_ELECTRICITY).buildUpon(); uriBuilder.encodedQuery(query); uriBuilder.appendQueryParameter("Authorization", AUTHORIZATION); Uri uri = uriBuilder.build(); try { URL url = new URL(uri.toString()); Map.Entry<String, String> authorizationProperty = new Map.Entry<String, String>() { @Override public String getKey() { return "Authorization"; } @Override public String getValue() { return AUTHORIZATION; } @Override public String setValue(String object) { return null; } }; return ApiConnection.getResponseFromHttpConnection(url, authorizationProperty); } catch (MalformedURLException e) { e.printStackTrace(); } return null; }
Source:
RunConfiguration getRunConfiguration(MatrixBuildExecution context) throws IOException { RunConfiguration runConfig = new RunConfiguration(); try { buildLock.writeLock().lock(); runConfig.config = rebuildConfigurations(context); runConfig.axisList = (AxisList) Jenkins.XSTREAM.fromXML(Jenkins.XSTREAM.toXML(axes)); } finally { buildLock.writeLock().unlock(); } return runConfig; }

Target:
RunConfiguration getRunConfiguration(MatrixBuildExecution context) throws IOException { RunConfiguration runConfig = new RunConfiguration(); try { buildLock.lock(); runConfig.config = rebuildConfigurations(context); runConfig.axisList = (AxisList) Jenkins.XSTREAM.fromXML(Jenkins.XSTREAM.toXML(axes)); } finally { buildLock.unlock(); } return runConfig; }
Source:
public File writeClassCode(String packageName, String classname, String classCode) throws RandoopOutputException { File testFile = javaFileWriter.writeClassCode(packageName, classname, classCode); try { Minimize.mainMinimize( testFile, Minimize.suiteclasspath, Minimize.testsuitetimeout, Minimize.verboseminimizer); } catch (IOException e) { System.err.println("IOException: " + e.getMessage()); e.printStackTrace(); throw new RandoopOutputException( "Couldn't output minimized test suite due to an IOException."); } return testFile; }

Target:
public File writeClassCode(String packageName, String classname, String classCode) throws RandoopOutputException { File testFile = javaFileWriter.writeClassCode(packageName, classname, classCode); try { Minimize.mainMinimize( testFile, Minimize.suiteclasspath, Minimize.testsuitetimeout, Minimize.verboseminimizer); } catch (IOException e) { throw new RandoopOutputException(e); } return testFile; }