type stringclasses 1
value | dataset stringclasses 1
value | input stringlengths 75 160k | instruction stringlengths 117 171 | output stringlengths 88 168k |
|---|---|---|---|---|
Inversion-Mutation | megadiff | "@Override
public void tearDown() throws Exception {
super.tearDown();
deleteDirectory(OUTBOX_DIR);
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "tearDown" | "@Override
public void tearDown() throws Exception {
<MASK>deleteDirectory(OUTBOX_DIR);</MASK>
super.tearDown();
}" |
Inversion-Mutation | megadiff | "public Pagination() {
paginationDiv.setStyle(Bootstrap.Pagination.LEFT);
paginationDiv.add(list);
initWidget(paginationDiv);
setSize(PaginationSize.NORMAL);
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "Pagination" | "public Pagination() {
paginationDiv.setStyle(Bootstrap.Pagination.LEFT);
paginationDiv.add(list);
<MASK>setSize(PaginationSize.NORMAL);</MASK>
initWidget(paginationDiv);
}" |
Inversion-Mutation | megadiff | "public static InApplicationMonitor initInstance(CorePlugin corePlugin, KeyHandler keyHandler) {
CorePlugin previousCorePlugin;
synchronized (semaphore) {
LOGGER.info("+++ initializing InApplicationMonitor() +++");
INSTANCE.keyHandler = keyHandler;
LOGGER.info("syncing from previous c... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "initInstance" | "public static InApplicationMonitor initInstance(CorePlugin corePlugin, KeyHandler keyHandler) {
CorePlugin previousCorePlugin;
synchronized (semaphore) {
LOGGER.info("+++ initializing InApplicationMonitor() +++");
INSTANCE.keyHandler = keyHandler;
previousCorePlugin = INSTANCE.coreP... |
Inversion-Mutation | megadiff | "@Override
public void onStart() {
boolean resize = false;
boolean move = false;
boolean hidden = !g.visible();
Effect fx;
g.show();
for (String key : prps.keys()) {
String val = prps.get(key);
if ((fx = computeFxProp(e, key, val, hidden)) != null) {
effects.add(f... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onStart" | "@Override
public void onStart() {
boolean resize = false;
boolean move = false;
boolean hidden = !g.visible();
Effect fx;
g.show();
for (String key : prps.keys()) {
String val = prps.get(key);
if ((fx = computeFxProp(e, key, val, hidden)) != null) {
effects.add(f... |
Inversion-Mutation | megadiff | "public int getSectionForPosition(int position) {
int savedCursorPos = mDataCursor.getPosition();
mDataCursor.moveToPosition(position);
String curName = mDataCursor.getString(mColumnIndex);
mDataCursor.moveToPosition(savedCursorPos);
// Linear search, as there are only a fe... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getSectionForPosition" | "public int getSectionForPosition(int position) {
int savedCursorPos = mDataCursor.getPosition();
mDataCursor.moveToPosition(position);
<MASK>mDataCursor.moveToPosition(savedCursorPos);</MASK>
String curName = mDataCursor.getString(mColumnIndex);
// Linear search, as there ... |
Inversion-Mutation | megadiff | "private CommonPrefs refresh()
{
SharedPreferences sp =
PreferenceManager.getDefaultSharedPreferences( s_context );
String key;
key = s_context.getString( R.string.key_show_arrow );
showBoardArrow = sp.getBoolean( key, true );
key = s_context.getString... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "refresh" | "private CommonPrefs refresh()
{
SharedPreferences sp =
PreferenceManager.getDefaultSharedPreferences( s_context );
String key;
key = s_context.getString( R.string.key_show_arrow );
showBoardArrow = sp.getBoolean( key, true );
key = s_context.getString... |
Inversion-Mutation | megadiff | "public static void populate(){
if(Zegana.xa == 't'){
Zegana.currentGen = Zegana.select(Zegana.currentGen, Zegana.performance);
for(int i=0; i<currentGen.length; i++){
if(Math.random()< Zegana.mutationChance)
Zegana.twiddle(currentGen[i]);
}
}else if(Zegana.xa == 'i'){
Deck[] new... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "populate" | "public static void populate(){
if(Zegana.xa == 't'){
Zegana.currentGen = Zegana.select(Zegana.currentGen, Zegana.performance);
for(int i=0; i<currentGen.length; i++){
if(Math.random()< Zegana.mutationChance)
Zegana.twiddle(currentGen[i]);
}
}else if(Zegana.xa == 'i'){
Deck[] new... |
Inversion-Mutation | megadiff | "public StorageUnit(StorageUnit su){
super(su);
assert su != null;
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "StorageUnit" | "public StorageUnit(StorageUnit su){
<MASK>assert su != null;</MASK>
super(su);
}" |
Inversion-Mutation | megadiff | "public synchronized void refreshFeedCache(boolean force) {
Log.i(LOG_TAG, "Refreshing the cache feed from db. The force flag value is ["+force+"] and the size of cache elements is :: " + cachedEarthQuakeFeed.size());
if(cachedEarthQuakeFeed.size() == 0 || force) {
cachedEarthQuakeFeed.clear();
Earthquake... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "refreshFeedCache" | "public synchronized void refreshFeedCache(boolean force) {
Log.i(LOG_TAG, "Refreshing the cache feed from db. The force flag value is ["+force+"] and the size of cache elements is :: " + cachedEarthQuakeFeed.size());
if(cachedEarthQuakeFeed.size() == 0 || force) {
EarthquakeCursor allEarthquakes = db.getEar... |
Inversion-Mutation | megadiff | "@Transactional @Test
public void testInternalRetrySuccessOnSecondAttemptWithItemProvider() throws Exception {
assertInitialState();
JmsItemReader<Object> provider = new JmsItemReader<Object>();
// provider.setItemType(Message.class);
jmsTemplate.setDefaultDestinationName("queue");
provider.setJms... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testInternalRetrySuccessOnSecondAttemptWithItemProvider" | "@Transactional @Test
public void testInternalRetrySuccessOnSecondAttemptWithItemProvider() throws Exception {
assertInitialState();
JmsItemReader<Object> provider = new JmsItemReader<Object>();
// provider.setItemType(Message.class);
<MASK>provider.setJmsTemplate(jmsTemplate);</MASK>
jmsTemplate.s... |
Inversion-Mutation | megadiff | "private void populateDataSet() throws DataException
{
int originalMaxRows = this.populator.getQuery( ).getMaxRows( );
boolean changeMaxRows = filterByRow == null?false:filterByRow.getFilterList( FilterByRow.QUERY_FILTER )
.size( )
+ filterByRow.getFilterList( FilterByRow.GROUP_FILTER ).size( ) > 0;... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "populateDataSet" | "private void populateDataSet() throws DataException
{
int originalMaxRows = this.populator.getQuery( ).getMaxRows( );
boolean changeMaxRows = filterByRow == null?false:filterByRow.getFilterList( FilterByRow.QUERY_FILTER )
.size( )
+ filterByRow.getFilterList( FilterByRow.GROUP_FILTER ).size( ) > 0;... |
Inversion-Mutation | megadiff | "public void close() {
isClose.set(true);
try {
connectionsPool.destroy();
openChannels.close();
for (Channel channel : openChannels) {
ChannelHandlerContext ctx = channel.getPipeline().getContext(NettyAsyncHttpProvider.class);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "close" | "public void close() {
isClose.set(true);
try {
connectionsPool.destroy();
openChannels.close();
for (Channel channel : openChannels) {
ChannelHandlerContext ctx = channel.getPipeline().getContext(NettyAsyncHttpProvider.class);
... |
Inversion-Mutation | megadiff | "private void initializeView(int position, View view) {
Database.Schedule schedule = mSchedules[position];
int scheduleId = schedule.getId();
CompoundButton checkBox = (CompoundButton)view.findViewById(R.id.checkbox);
int[] ids = mDatabase.getScheduleIdsOfTask(mId);... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "initializeView" | "private void initializeView(int position, View view) {
Database.Schedule schedule = mSchedules[position];
int scheduleId = schedule.getId();
CompoundButton checkBox = (CompoundButton)view.findViewById(R.id.checkbox);
int[] ids = mDatabase.getScheduleIdsOfTask(mId);... |
Inversion-Mutation | megadiff | "public void hidePlaceholder() {
if (super.getText().equals(this.getPlaceholderText())) {
super.setText("");
}
super.removeStyleName(this.getPlaceholderStyleName());
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "hidePlaceholder" | "public void hidePlaceholder() {
if (super.getText().equals(this.getPlaceholderText())) {
super.setText("");
<MASK>super.removeStyleName(this.getPlaceholderStyleName());</MASK>
}
}" |
Inversion-Mutation | megadiff | "@Override
public void onError(MediaRecorder mr, int what, int extra) {
Log.e(TAG, "MediaRecorder error. what=" + what + ". extra=" + extra);
stopVideoRecording();
if (what == MediaRecorder.MEDIA_RECORDER_ERROR_UNKNOWN) {
// We may have run out of space on the sdcard.
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onError" | "@Override
public void onError(MediaRecorder mr, int what, int extra) {
Log.e(TAG, "MediaRecorder error. what=" + what + ". extra=" + extra);
if (what == MediaRecorder.MEDIA_RECORDER_ERROR_UNKNOWN) {
// We may have run out of space on the sdcard.
<MASK>stopVideoRecordin... |
Inversion-Mutation | megadiff | "void addLinkContentItem(PDFLink link, String structurePointer) {
int structParent = getNextParentTreeKey();
link.setStructParent(structParent);
PDFDictionary contentItem = new PDFDictionary();
contentItem.put("Type", OBJR);
contentItem.put("Pg", this.currentPage);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "addLinkContentItem" | "void addLinkContentItem(PDFLink link, String structurePointer) {
int structParent = getNextParentTreeKey();
link.setStructParent(structParent);
<MASK>parentTree.getNums().put(structParent, link);</MASK>
PDFDictionary contentItem = new PDFDictionary();
contentItem.put("Type"... |
Inversion-Mutation | megadiff | "@Override
public final void execute(CharWrapper characters, ProductionContext context) throws Exception {
characters.removeSpace();
String extraExcMsg="";
if(!hasValue){
hasValue=true;
Matcher match = characters.match(getPattern());
if(match.find()){
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "execute" | "@Override
public final void execute(CharWrapper characters, ProductionContext context) throws Exception {
characters.removeSpace();
String extraExcMsg="";
if(!hasValue){
Matcher match = characters.match(getPattern());
if(match.find()){
characters.shift(match... |
Inversion-Mutation | megadiff | "public void updatePingGUIValue(String value) {
// Format of value : ICMP ip nb_try nb_worked total_timems[ first_timems]*[;...]
// We can't use the total time as on linux it isn't the sum of all the pings.
// So we will display the first time.
//final String regex = "\\S+\\s\\S+\\s(\\d+)... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "updatePingGUIValue" | "public void updatePingGUIValue(String value) {
// Format of value : ICMP ip nb_try nb_worked total_timems[ first_timems]*[;...]
// We can't use the total time as on linux it isn't the sum of all the pings.
// So we will display the first time.
//final String regex = "\\S+\\s\\S+\\s(\\d+)... |
Inversion-Mutation | megadiff | "@Override
public void processCommandWithMap(ICommandSender sender, Map map, String[] args){
Player player = PlayerRegistry.instance().getPlayerByUsername(args[0]);
args[0] = null;
String cmd = Joiner.on(" ").skipNulls().join(args);
if (player != null){
FMLCommonHa... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "processCommandWithMap" | "@Override
public void processCommandWithMap(ICommandSender sender, Map map, String[] args){
args[0] = null;
String cmd = Joiner.on(" ").skipNulls().join(args);
<MASK>Player player = PlayerRegistry.instance().getPlayerByUsername(args[0]);</MASK>
if (player != null){
... |
Inversion-Mutation | megadiff | "OnlineSectioningServerImpl(Long sessionId, boolean waitTillStarted) throws SectioningException {
iConfig = new ServerConfig();
org.hibernate.Session hibSession = SessionDAO.getInstance().createNewSession();
try {
Session session = SessionDAO.getInstance().get(sessionId, hibSession);
if (session == nul... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "OnlineSectioningServerImpl" | "OnlineSectioningServerImpl(Long sessionId, boolean waitTillStarted) throws SectioningException {
org.hibernate.Session hibSession = SessionDAO.getInstance().createNewSession();
try {
Session session = SessionDAO.getInstance().get(sessionId, hibSession);
if (session == null)
throw new SectioningExce... |
Inversion-Mutation | megadiff | "protected Resource resolve(String location) {
Resource resource = null;
Matcher matcher = VAR_REPLACE_REGEX.matcher(location);
boolean allValuesReplaced = true;
StringBuffer sb = new StringBuffer();
while (matcher.find()) {
boolean env = matcher.group(1) != nul... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "resolve" | "protected Resource resolve(String location) {
Resource resource = null;
Matcher matcher = VAR_REPLACE_REGEX.matcher(location);
boolean allValuesReplaced = true;
StringBuffer sb = new StringBuffer();
while (matcher.find()) {
boolean env = matcher.group(1) != nul... |
Inversion-Mutation | megadiff | "private void checkSearch(Intent intent){
if (Intent.ACTION_SEARCH.equals(intent.getAction())) {
String query = intent.getStringExtra(SearchManager.QUERY);
Log.d("basti", "Search String: " + query);
SearchRecentSuggestions suggestions = new SearchRecentSuggestions(this, SelectScre... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "checkSearch" | "private void checkSearch(Intent intent){
if (Intent.ACTION_SEARCH.equals(intent.getAction())) {
String query = intent.getStringExtra(SearchManager.QUERY);
Log.d("basti", "Search String: " + query);
SearchRecentSuggestions suggestions = new SearchRecentSuggestions(this, SelectScre... |
Inversion-Mutation | megadiff | "public void run() {
FileConnection file = null;
InputStream is = null;
Image capturedImage = null;
try {
file = (FileConnection) Connector.open("file://" + imagePath, Connector.READ_WRITE);
is = file.openInputStream();
capturedImage = Image.createImage(is);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "public void run() {
FileConnection file = null;
InputStream is = null;
Image capturedImage = null;
try {
file = (FileConnection) Connector.open("file://" + imagePath, Connector.READ_WRITE);
is = file.openInputStream();
capturedImage = Image.createImage(is);
... |
Inversion-Mutation | megadiff | "public DataExportPopupMenu() {
if (validateUserHasNasAccess()) {
this.add(createNASMenuItem());
}
if (validateUserHasButler1Access()) {
this.add(createButler2MenuItem());
this.add(createButler1MenuItem());
}
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "DataExportPopupMenu" | "public DataExportPopupMenu() {
if (validateUserHasNasAccess()) {
this.add(createNASMenuItem());
}
if (validateUserHasButler1Access()) {
<MASK>this.add(createButler1MenuItem());</MASK>
this.add(createButler2MenuItem());
... |
Inversion-Mutation | megadiff | "public InitialAccountRegistrationFrame()
{
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
MainPanel mainPanel = new MainPanel(new BorderLayout(5, 5));
JPanel messageAreaPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
JTextArea messageArea =
new JTextArea(Reso... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "InitialAccountRegistrationFrame" | "public InitialAccountRegistrationFrame()
{
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
MainPanel mainPanel = new MainPanel(new BorderLayout(5, 5));
JPanel messageAreaPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
JTextArea messageArea =
new JTextArea(Reso... |
Inversion-Mutation | megadiff | "public void run(IProgressMonitor monitor) throws InterruptedException {
monitor.beginTask(NLS.bind(Messages.DeleteProjectActionDeleting,
new Object[] {m_project.getName(),
m_project.getMajorProjectVersion(),
m_proje... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "public void run(IProgressMonitor monitor) throws InterruptedException {
monitor.beginTask(NLS.bind(Messages.DeleteProjectActionDeleting,
new Object[] {m_project.getName(),
m_project.getMajorProjectVersion(),
m_proje... |
Inversion-Mutation | megadiff | "private SSLSocketFactory createSSLSocketFactory() {
InputStream keyStoreIS = null;
try {
final SSLContext sslContext = SSLContext.getInstance(this.sslConfiguration.getProperty("protocol", "SSL"));
if (this.sslConfiguration.getProperty("keyStoreType") != null) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createSSLSocketFactory" | "private SSLSocketFactory createSSLSocketFactory() {
InputStream keyStoreIS = null;
try {
final SSLContext sslContext = SSLContext.getInstance(this.sslConfiguration.getProperty("protocol", "SSL"));
if (this.sslConfiguration.getProperty("keyStoreType") != null) {
... |
Inversion-Mutation | megadiff | "public CoreTexture2D(
@Nonnull final CoreGL gl,
@Nonnull final BufferFactory bufferFactory,
final int textureId,
final int target,
final int level,
final int internalFormat,
final int width,
final int height,
final int b... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "CoreTexture2D" | "public CoreTexture2D(
@Nonnull final CoreGL gl,
@Nonnull final BufferFactory bufferFactory,
final int textureId,
final int target,
final int level,
final int internalFormat,
final int width,
final int height,
final int b... |
Inversion-Mutation | megadiff | "@Override
public boolean onTouchEvent(MotionEvent event) {
if ( !isTouchScreenEnabled ) {
return true;
}
int x = (int)event.getX();
int y = (int)event.getY();
int dx = getWidth();
int dy = getHeight();
int START_DRAG_THRESHOLD = mActivity.getPalmTipPixels();
final int zone = getTa... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onTouchEvent" | "@Override
public boolean onTouchEvent(MotionEvent event) {
if ( !isTouchScreenEnabled ) {
return true;
}
int x = (int)event.getX();
int y = (int)event.getY();
int dx = getWidth();
int dy = getHeight();
int START_DRAG_THRESHOLD = mActivity.getPalmTipPixels();
final int zone = getTa... |
Inversion-Mutation | megadiff | "@Override
public void run() {
Log.v("cr3", "onTouchEvent: long tap delayed event myId=" + myId + ", currentId=" + longTouchId);
if ( myId==longTouchId ) {
touchEventIgnoreNextUp = true;
isBrightnessControlActive = false;
isManualScrollActive = false;
onLongTap( manualScrol... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "@Override
public void run() {
Log.v("cr3", "onTouchEvent: long tap delayed event myId=" + myId + ", currentId=" + longTouchId);
if ( myId==longTouchId ) {
touchEventIgnoreNextUp = true;
isBrightnessControlActive = false;
isManualScrollActive = false;
<MASK>manualScrollStart... |
Inversion-Mutation | megadiff | "public static void query(String query) throws IllegalArgumentException,
IllegalAccessException {
flash.put("query", query);
List<Object> exeResult = new ArrayList<Object>();
// Try to exe the query
try {
Query exeQuery = JPA.em().createQuery(query);
exeResult.addAll(exeQuery.getResultList())... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "query" | "public static void query(String query) throws IllegalArgumentException,
IllegalAccessException {
flash.put("query", query);
<MASK>Query exeQuery = JPA.em().createQuery(query);</MASK>
List<Object> exeResult = new ArrayList<Object>();
// Try to exe the query
try {
exeResult.addAll(exeQuery.getR... |
Inversion-Mutation | megadiff | "public Object visitClassNode(ClassNode visited)
{
FormatterClassNode classNode = new FormatterClassNode(document);
SourcePosition position = visited.getPosition();
classNode.setBegin(builder.createTextNode(document, position.getStartOffset(), visited.getCPath().getPosition()
.getStartOffset()));
bui... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "visitClassNode" | "public Object visitClassNode(ClassNode visited)
{
FormatterClassNode classNode = new FormatterClassNode(document);
SourcePosition position = visited.getPosition();
classNode.setBegin(builder.createTextNode(document, position.getStartOffset(), visited.getCPath().getPosition()
.getStartOffset()));
bui... |
Inversion-Mutation | megadiff | "private void storeHistory(ConnectionResource conn, History history,
Repository repository) throws SQLException {
Integer reposId = null;
Map<String, Integer> authors = null;
Map<String, Integer> files = null;
PreparedStatement addChangeset = null;
PreparedSta... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "storeHistory" | "private void storeHistory(ConnectionResource conn, History history,
Repository repository) throws SQLException {
Integer reposId = null;
Map<String, Integer> authors = null;
Map<String, Integer> files = null;
PreparedStatement addChangeset = null;
PreparedSta... |
Inversion-Mutation | megadiff | "public void onReceivedMessage(SipProvider provider, Message msg) {
if (msg.isResponse()) {
int code = msg.getStatusLine().getCode();
if (code >= 100 && code < 200
&& (statusIs(STATE_TRYING) || statusIs(STATE_PROCEEDING))) {
if (statusIs(STATE_TRYING)) {
retransmission_to.halt();
trans... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onReceivedMessage" | "public void onReceivedMessage(SipProvider provider, Message msg) {
if (msg.isResponse()) {
int code = msg.getStatusLine().getCode();
if (code >= 100 && code < 200
&& (statusIs(STATE_TRYING) || statusIs(STATE_PROCEEDING))) {
if (statusIs(STATE_TRYING)) {
retransmission_to.halt();
trans... |
Inversion-Mutation | megadiff | "private void storeHistory(ConnectionResource conn, History history,
Repository repository) throws SQLException {
Integer reposId = null;
Map<String, Integer> authors = null;
Map<String, Integer> files = null;
PreparedStatement addChangeset = null;
PreparedSta... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "storeHistory" | "private void storeHistory(ConnectionResource conn, History history,
Repository repository) throws SQLException {
Integer reposId = null;
Map<String, Integer> authors = null;
Map<String, Integer> files = null;
PreparedStatement addChangeset = null;
PreparedSta... |
Inversion-Mutation | megadiff | "protected ILazyDataset getLazyDataset(final File path,
final String dsPath,
final IConversionContext context) throws Exception {
final DataHolder dh = LoaderFactory.getData(path.getAbsolutePath());
context.setSelectedH5P... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getLazyDataset" | "protected ILazyDataset getLazyDataset(final File path,
final String dsPath,
final IConversionContext context) throws Exception {
final DataHolder dh = LoaderFactory.getData(path.getAbsolutePath());
if (context.getSliceD... |
Inversion-Mutation | megadiff | "private void insertAfter(Node n[], int s, int e) {
int l1 = e - s;
System.arraycopy(n, s, nodes, endUsed, l1);
endUsed += l1;
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "insertAfter" | "private void insertAfter(Node n[], int s, int e) {
int l1 = e - s;
<MASK>endUsed += l1;</MASK>
System.arraycopy(n, s, nodes, endUsed, l1);
}" |
Inversion-Mutation | megadiff | "@Override
public void doExecute() {
if (setNameCmd != null) {
// This is a hack.
// TODO: Fix this when we stop using canExecute()==false for no-op commands.
if (!setNameCmd.canExecute()) setNameCmd = null;
}
flow = FlowLinkUtil.getCommonFlow(source, target);
if (flow == null) {
if (... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doExecute" | "@Override
public void doExecute() {
if (setNameCmd != null) {
// This is a hack.
// TODO: Fix this when we stop using canExecute()==false for no-op commands.
if (!setNameCmd.canExecute()) setNameCmd = null;
}
flow = FlowLinkUtil.getCommonFlow(source, target);
if (flow == null) {
if (... |
Inversion-Mutation | megadiff | "public void next(double[] point) {
pos = iterator.next();
for (int i = 0; i < point.length; i++) {
point[i] = tiles[i].getSampleDouble(pos.x, pos.y);
}
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "next" | "public void next(double[] point) {
for (int i = 0; i < point.length; i++) {
point[i] = tiles[i].getSampleDouble(pos.x, pos.y);
}
<MASK>pos = iterator.next();</MASK>
}" |
Inversion-Mutation | megadiff | "@Override
public void appModeChanged() {
setCursor(new Cursor(Cursor.WAIT_CURSOR));
if (currentMode != null) {
saveLayout(FILEPATH_LAYOUT + "." + currentMode.name());
saveConfig(FILEPATH_MAP + "." + currentMode.name());
}
final CidsAppBackend.Mode ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "appModeChanged" | "@Override
public void appModeChanged() {
setCursor(new Cursor(Cursor.WAIT_CURSOR));
if (currentMode != null) {
saveLayout(FILEPATH_LAYOUT + "." + currentMode.name());
saveConfig(FILEPATH_MAP + "." + currentMode.name());
}
final CidsAppBackend.Mode ... |
Inversion-Mutation | megadiff | "@Override
protected void getJobDone() throws InterruptedException {
/** Read stdErr pipe **/
this.stdErrThread = new Thread(){
@Override
public void run(){
char[] chars = new char[BUF_SIZE];
int i = 0;
while(i > -1){
try{
i = Console.this.getStdErr().getData(ch... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getJobDone" | "@Override
protected void getJobDone() throws InterruptedException {
/** Read stdErr pipe **/
this.stdErrThread = new Thread(){
@Override
public void run(){
char[] chars = new char[BUF_SIZE];
int i = 0;
while(i > -1){
try{
i = Console.this.getStdErr().getData(ch... |
Inversion-Mutation | megadiff | "public void run() {
char[] chars = new char[BUF_SIZE];
int i = 0;
while(i > -1){
try {
i = Console.this.getStdIn().getData(chars, Console.this.writingLock);
if(i != -1){
print(String.copyValueOf(chars, 0, i));
Console.this.writingLock.unlock();
}
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "public void run() {
char[] chars = new char[BUF_SIZE];
int i = 0;
while(i > -1){
try {
i = Console.this.getStdIn().getData(chars, Console.this.writingLock);
if(i != -1){
print(String.copyValueOf(chars, 0, i));
}
<MASK>Console.this.writingLock.unlock... |
Inversion-Mutation | megadiff | "public DataSessionContext( int mode, ModuleHandle moduleHandle, ScriptContext scriptContext, ClassLoader classLoader ) throws AdapterException
{
try
{
if ( !( mode == MODE_GENERATION
|| mode == MODE_PRESENTATION
|| mode == MODE_DIRECT_PRESENTATION || mode == MODE_UPDATE ) )
throw new Adapt... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "DataSessionContext" | "public DataSessionContext( int mode, ModuleHandle moduleHandle, ScriptContext scriptContext, ClassLoader classLoader ) throws AdapterException
{
try
{
if ( !( mode == MODE_GENERATION
|| mode == MODE_PRESENTATION
|| mode == MODE_DIRECT_PRESENTATION || mode == MODE_UPDATE ) )
throw new Adapt... |
Inversion-Mutation | megadiff | "public void createFieldEditors() {
if(System.getProperty("os.name").equals("Mac OS X")){
addField(new DirectoryFieldEditor(BrowserPreferenceConstants.P_PRIMARY_BROWSER_PATH, "Primary Browser", getFieldEditorParent()));
addField(new DirectoryFieldEditor(BrowserPreferenceConstants.P_SECONDARY_BROWSER_PATH... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createFieldEditors" | "public void createFieldEditors() {
if(System.getProperty("os.name").equals("Mac OS X")){
addField(new DirectoryFieldEditor(BrowserPreferenceConstants.P_PRIMARY_BROWSER_PATH, "Primary Browser", getFieldEditorParent()));
addField(new DirectoryFieldEditor(BrowserPreferenceConstants.P_SECONDARY_BROWSER_PATH... |
Inversion-Mutation | megadiff | "public ArithmeticExpression parse(String rpnInput) {
Queue<Character> unprocessed = new ArrayDeque<>();
for (int charI = 0; charI < rpnInput.length(); charI++) {
char c = rpnInput.charAt(charI);
if (c == ' ') {
continue;
}
unprocessed.offer(c);
}
Deque<ArithmeticExpression> workSta... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "parse" | "public ArithmeticExpression parse(String rpnInput) {
Queue<Character> unprocessed = new ArrayDeque<>();
for (int charI = 0; charI < rpnInput.length(); charI++) {
char c = rpnInput.charAt(charI);
if (c == ' ') {
continue;
}
unprocessed.offer(c);
}
Deque<ArithmeticExpression> workSta... |
Inversion-Mutation | megadiff | "private File getTileFile(MapTile tile) {
World world = tile.getWorld();
File worldTileDirectory = worldTileDirectories.get(world);
if (worldTileDirectory == null) {
worldTileDirectory = new File(DynmapPlugin.tilesDirectory, tile.getWorld().getName());
worldTileDire... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getTileFile" | "private File getTileFile(MapTile tile) {
World world = tile.getWorld();
File worldTileDirectory = worldTileDirectories.get(world);
if (worldTileDirectory == null) {
worldTileDirectory = new File(DynmapPlugin.tilesDirectory, tile.getWorld().getName());
<MASK>worldTil... |
Inversion-Mutation | megadiff | "public void openChat(Protocol p, Contact c, boolean allowingStateLoss) {
FragmentManager fragmentManager = getSupportFragmentManager();
ChatView chatView = (ChatView) fragmentManager.findFragmentById(R.id.chat_fragment);
c.activate(p);
if (chatView == null) {
Fragment r... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "openChat" | "public void openChat(Protocol p, Contact c, boolean allowingStateLoss) {
FragmentManager fragmentManager = getSupportFragmentManager();
ChatView chatView = (ChatView) fragmentManager.findFragmentById(R.id.chat_fragment);
c.activate(p);
if (chatView == null) {
Fragment r... |
Inversion-Mutation | megadiff | "@Override
public synchronized int enableApnType(String apnType) {
ApnContext apnContext = mApnContexts.get(apnType);
if (apnContext == null || !isApnTypeAvailable(apnType)) {
if (DBG) log("enableApnType: " + apnType + " is type not available");
return PhoneConstants.APN... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "enableApnType" | "@Override
public synchronized int enableApnType(String apnType) {
ApnContext apnContext = mApnContexts.get(apnType);
if (apnContext == null || !isApnTypeAvailable(apnType)) {
if (DBG) log("enableApnType: " + apnType + " is type not available");
return PhoneConstants.APN... |
Inversion-Mutation | megadiff | "public void run() {
if(runPolling()) {
LOGGER.info("SCM changes detected in "+ job.getName());
job.scheduleBuild();
}
synchronized(SCMTrigger.this) {
if(abortNow)
return; // terminate now without queueing t... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "public void run() {
if(runPolling()) {
LOGGER.info("SCM changes detected in "+ job.getName());
job.scheduleBuild();
}
synchronized(SCMTrigger.this) {
if(abortNow)
return; // terminate now without queueing t... |
Inversion-Mutation | megadiff | "private void analyzeContinue(boolean checkComputerMove, boolean resetBoard)
{
endLengthyCommand();
String title = m_analyzeCommand.getResultTitle();
try
{
if (resetBoard)
resetBoard();
Gtp.Error e = m_commandThread.getException();
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "analyzeContinue" | "private void analyzeContinue(boolean checkComputerMove, boolean resetBoard)
{
endLengthyCommand();
String title = m_analyzeCommand.getResultTitle();
try
{
if (resetBoard)
resetBoard();
Gtp.Error e = m_commandThread.getException();
... |
Inversion-Mutation | megadiff | "public void unmute() {
if (!mute)
return;
effectsVolume = prevEffectsVolume;
mute = false;
setSoundVolume(prevSoundsVolume);
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "unmute" | "public void unmute() {
if (!mute)
return;
effectsVolume = prevEffectsVolume;
<MASK>setSoundVolume(prevSoundsVolume);</MASK>
mute = false;
}" |
Inversion-Mutation | megadiff | "@After
public final void shutDown() {
if (this.context != null) {
this.cleanup(this.context);
this.context.close();
}
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "shutDown" | "@After
public final void shutDown() {
<MASK>this.cleanup(this.context);</MASK>
if (this.context != null) {
this.context.close();
}
}" |
Inversion-Mutation | megadiff | "protected static String initApp(final String[] args) {
try {
/* Metal */
UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
MetalLookAndFeel.setCurrentTheme(
new OceanTheme() {
/** e.g. arrows on split pane... */
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "initApp" | "protected static String initApp(final String[] args) {
try {
/* Metal */
UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
MetalLookAndFeel.setCurrentTheme(
new OceanTheme() {
/** e.g. arrows on split pane... */
... |
Inversion-Mutation | megadiff | "public void uncaughtException(final Thread t,
final Throwable ex) {
System.out.println(ex.toString());
System.out.println(Tools.getStackTrace(ex));
if (!uncaughtException
&& Tools.get... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "uncaughtException" | "public void uncaughtException(final Thread t,
final Throwable ex) {
<MASK>uncaughtException = true;</MASK>
System.out.println(ex.toString());
System.out.println(Tools.getStackTrace(ex));
i... |
Inversion-Mutation | megadiff | "private void responseImage(String contentPath) throws Exception {
HttpServletResponse response = Struts2Utils.getResponse();
HttpServletRequest request = Struts2Utils.getRequest();
if (StringUtils.isBlank(contentPath)) {
response.sendError(HttpServletResponse.SC_BAD_REQUEST, "path parametter is required."... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "responseImage" | "private void responseImage(String contentPath) throws Exception {
HttpServletResponse response = Struts2Utils.getResponse();
HttpServletRequest request = Struts2Utils.getRequest();
if (StringUtils.isBlank(contentPath)) {
response.sendError(HttpServletResponse.SC_BAD_REQUEST, "path parametter is required."... |
Inversion-Mutation | megadiff | "@Override
public void handleMessage(Message msg) {
BluetoothAudioGateway.IncomingConnectionInfo info =
(BluetoothAudioGateway.IncomingConnectionInfo)msg.obj;
int type = BluetoothHandsfree.TYPE_UNKNOWN;
switch(msg.what) {
case BluetoothAu... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handleMessage" | "@Override
public void handleMessage(Message msg) {
BluetoothAudioGateway.IncomingConnectionInfo info =
(BluetoothAudioGateway.IncomingConnectionInfo)msg.obj;
int type = BluetoothHandsfree.TYPE_UNKNOWN;
switch(msg.what) {
case BluetoothAu... |
Inversion-Mutation | megadiff | "private void performOperation(IFileBuffer fileBuffer, IFileBufferOperation operation, IProgressMonitor progressMonitor) throws CoreException, OperationCanceledException {
ISchedulingRule rule= fileBuffer.computeCommitRule();
IJobManager manager= Platform.getJobManager();
try {
manager.beginRule(rule,... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "performOperation" | "private void performOperation(IFileBuffer fileBuffer, IFileBufferOperation operation, IProgressMonitor progressMonitor) throws CoreException, OperationCanceledException {
ISchedulingRule rule= fileBuffer.computeCommitRule();
IJobManager manager= Platform.getJobManager();
<MASK>manager.beginRule(rule, prog... |
Inversion-Mutation | megadiff | "public final void disable() {
disableModule();
synchronized (lock) {
enabled = false;
}
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "disable" | "public final void disable() {
synchronized (lock) {
enabled = false;
}
<MASK>disableModule();</MASK>
}" |
Inversion-Mutation | megadiff | "public boolean onTouchEvent(MotionEvent event) {
if (myAction != null) {
new Handler().post(myAction);
}
myDialog.dismiss();
return true;
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onTouchEvent" | "public boolean onTouchEvent(MotionEvent event) {
<MASK>myDialog.dismiss();</MASK>
if (myAction != null) {
new Handler().post(myAction);
}
return true;
}" |
Inversion-Mutation | megadiff | "@Override
protected Sample getPoints() throws Exception, InterruptedException,
ExecutionException {
IplImage grabbed;
CanvasFrame frame = null;
FrameRecorder recorder = null;
Loader.load(opencv_objdetect.class);
String urlToDownload = "https://dl.dropbox.com/u/8720454/haarcascade_mcs_mouth.xml";
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getPoints" | "@Override
protected Sample getPoints() throws Exception, InterruptedException,
ExecutionException {
IplImage grabbed;
CanvasFrame frame = null;
FrameRecorder recorder = null;
<MASK>List<Future<int[]>> points = new Vector<Future<int[]>>();</MASK>
Loader.load(opencv_objdetect.class);
String urlToDo... |
Inversion-Mutation | megadiff | "public void init( String settingsFile )
{
initLog();
SoapUI.setSoapUICore( this );
loadExternalLibraries();
initSettings( settingsFile == null ? DEFAULT_SETTINGS_FILE : settingsFile );
initExtensions( getExtensionClassLoader() );
initCoreComponents();
// this is to provoke initializatio... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "init" | "public void init( String settingsFile )
{
initLog();
SoapUI.setSoapUICore( this );
loadExternalLibraries();
initSettings( settingsFile == null ? DEFAULT_SETTINGS_FILE : settingsFile );
<MASK>initCoreComponents();</MASK>
initExtensions( getExtensionClassLoader() );
// this is to provoke ... |
Inversion-Mutation | megadiff | "public static Properties parseRequestLine(String cmd, String args, Properties prop, String virtualHost) {
// getting the last request line for debugging purposes
String prevRequestLine = prop.containsKey(CONNECTION_PROP_REQUESTLINE)?
prop.getProperty(CONNECTION_PROP_REQUEST... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "parseRequestLine" | "public static Properties parseRequestLine(String cmd, String args, Properties prop, String virtualHost) {
// getting the last request line for debugging purposes
String prevRequestLine = prop.containsKey(CONNECTION_PROP_REQUESTLINE)?
prop.getProperty(CONNECTION_PROP_REQUEST... |
Inversion-Mutation | megadiff | "public void doGet(HttpServletRequest httpRequest,
HttpServletResponse httpResponse) throws IOException,
ServletException {
WaybackRequest wbRequest = (WaybackRequest) httpRequest
.getAttribute(WMREQUEST_ATTRIBUTE);
ReplayRenderer renderer;
try {
renderer = wayback.getReplayRenderer();
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doGet" | "public void doGet(HttpServletRequest httpRequest,
HttpServletResponse httpResponse) throws IOException,
ServletException {
WaybackRequest wbRequest = (WaybackRequest) httpRequest
.getAttribute(WMREQUEST_ATTRIBUTE);
ReplayRenderer renderer;
try {
renderer = wayback.getReplayRenderer();
... |
Inversion-Mutation | megadiff | "public Main(DeviceEntry defaultDevice) {
this.logQueueAppender = new QueueAppender(1024);
Logger.addAppender(logQueueAppender);
JMenuBar menuBar = new JMenuBar();
JMenu menuFile = new JMenu("File");
menuOpenJADFile = new JMenuItem("Open JAD File...");
menuOpenJADFile.addActionListener(menuOpe... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "Main" | "public Main(DeviceEntry defaultDevice) {
this.logQueueAppender = new QueueAppender(1024);
Logger.addAppender(logQueueAppender);
JMenuBar menuBar = new JMenuBar();
JMenu menuFile = new JMenu("File");
menuOpenJADFile = new JMenuItem("Open JAD File...");
menuOpenJADFile.addActionListener(menuOpe... |
Inversion-Mutation | megadiff | "public void writeMimeMessage(BufferedReader reader, OutputStream os, MimeHeader mimeHeader) throws IOException {
String line;
// with alternative, there are two body forms (plain+html)
if ("multipart/alternative".equals(mimeHeader.contentType)) {
attachmentIndex-... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "writeMimeMessage" | "public void writeMimeMessage(BufferedReader reader, OutputStream os, MimeHeader mimeHeader) throws IOException {
String line;
// with alternative, there are two body forms (plain+html)
if ("multipart/alternative".equals(mimeHeader.contentType)) {
attachmentIndex-... |
Inversion-Mutation | megadiff | "private void writeToWithPunc(BufferedWriter bw, String[][] textOutput)
throws IOException {
GetString getString = GetString.altGetString(
textOutput, toChunkedCorpus().getArrays(), alpha);
for (int sent = 0; sent < corpus.length; sent++) {
int chunkI = 0;
for (int seg = 0; se... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "writeToWithPunc" | "private void writeToWithPunc(BufferedWriter bw, String[][] textOutput)
throws IOException {
GetString getString = GetString.altGetString(
textOutput, toChunkedCorpus().getArrays(), alpha);
for (int sent = 0; sent < corpus.length; sent++) {
for (int seg = 0; seg < corpus[sent].lengt... |
Inversion-Mutation | megadiff | "private boolean synchronizeProgram()
{
if (m_gtp == null)
{
showError(i18n("MSG_NO_PROGRAM_ATTACHED"), "", false);
return false;
}
if (! checkCommandInProgress())
return false;
String name = getProgramName();
if (m_gtp.is... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "synchronizeProgram" | "private boolean synchronizeProgram()
{
if (m_gtp == null)
{
showError(i18n("MSG_NO_PROGRAM_ATTACHED"), "", false);
<MASK>return false;</MASK>
}
if (! checkCommandInProgress())
<MASK>return false;</MASK>
String name = getProgramNam... |
Inversion-Mutation | megadiff | "protected void taskFunc()
{
int ret;
Buffer data = Buffer.create();
data.ensureSize (readSize);
data.offset = 0;
try {
data.length = input.read (data.data, 0, readSize);
}
catch (Exception e) {
e.printStackTrace();
data.length = 0;
}
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "taskFunc" | "protected void taskFunc()
{
int ret;
Buffer data = Buffer.create();
data.ensureSize (readSize);
data.offset = 0;
try {
data.length = input.read (data.data, 0, readSize);
}
catch (Exception e) {
e.printStackTrace();
data.length = 0;
}
... |
Inversion-Mutation | megadiff | "@Override
public List<LegendElement> getLegendElements() {
List<LegendElement> legendItems = new ArrayList<LegendElement>();
legendItems.add(LegendElement.createTask("blocker", BugzillaImages.OVERLAY_CRITICAL)); //$NON-NLS-1$
legendItems.add(LegendElement.createTask("critical", BugzillaImages.OVERLAY_CRITIC... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getLegendElements" | "@Override
public List<LegendElement> getLegendElements() {
List<LegendElement> legendItems = new ArrayList<LegendElement>();
legendItems.add(LegendElement.createTask("blocker", BugzillaImages.OVERLAY_CRITICAL)); //$NON-NLS-1$
legendItems.add(LegendElement.createTask("critical", BugzillaImages.OVERLAY_CRITIC... |
Inversion-Mutation | megadiff | "private void updateProviderListenersLocked(String provider, boolean enabled) {
int listeners = 0;
LocationProviderProxy p = mProvidersByName.get(provider);
if (p == null) {
return;
}
ArrayList<Receiver> deadReceivers = null;
ArrayList<Upd... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "updateProviderListenersLocked" | "private void updateProviderListenersLocked(String provider, boolean enabled) {
int listeners = 0;
LocationProviderProxy p = mProvidersByName.get(provider);
if (p == null) {
return;
}
ArrayList<Receiver> deadReceivers = null;
ArrayList<Upd... |
Inversion-Mutation | megadiff | "public @Nonnull Org authenticate(boolean force) throws CloudException, InternalException {
Cache<Org> cache = Cache.getInstance(provider, "vCloudOrgs", Org.class, CacheLevel.CLOUD_ACCOUNT, new TimePeriod<Minute>(25, TimePeriod.MINUTE));
ProviderContext ctx = provider.getContext();
if( ctx ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "authenticate" | "public @Nonnull Org authenticate(boolean force) throws CloudException, InternalException {
Cache<Org> cache = Cache.getInstance(provider, "vCloudOrgs", Org.class, CacheLevel.CLOUD_ACCOUNT, new TimePeriod<Minute>(25, TimePeriod.MINUTE));
ProviderContext ctx = provider.getContext();
if( ctx ... |
Inversion-Mutation | megadiff | "@Override
public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, final BuildListener listener)
throws InterruptedException, IOException {
final SCTMTestSuiteResult rootSuite = new SCTMTestSuiteResult("root");
FilePath workspace = build.getWorkspace();
FilePath resultRootPath = ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "perform" | "@Override
public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, final BuildListener listener)
throws InterruptedException, IOException {
final SCTMTestSuiteResult rootSuite = new SCTMTestSuiteResult("root");
FilePath workspace = build.getWorkspace();
FilePath resultRootPath = ... |
Inversion-Mutation | megadiff | "public void install() throws IOException {
if (isUpToDate()) {
notifyInstallComplete();
return;
}
if (!confirmInstall()) {
notifyInstallComplete();
return;
}
destinationDir = installDirChooser.getInstallDir();
if (destinationDir != null) {
bar = new JPro... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "install" | "public void install() throws IOException {
if (isUpToDate()) {
notifyInstallComplete();
return;
}
if (!confirmInstall()) {
notifyInstallComplete();
return;
}
destinationDir = installDirChooser.getInstallDir();
if (destinationDir != null) {
bar = new JPro... |
Inversion-Mutation | megadiff | "public boolean shouldAlwaysShow(Object parent, AbstractTask task, int depth) {
return task.isActive() || TasksUiPlugin.getTaskActivityManager().isCompletedToday(task)
|| hasChanges(parent, task)
|| hasInterestingSubTasks(parent, task, depth)
// note that following condition is wrapped in ()!
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "shouldAlwaysShow" | "public boolean shouldAlwaysShow(Object parent, AbstractTask task, int depth) {
return task.isActive() || TasksUiPlugin.getTaskActivityManager().isCompletedToday(task)
<MASK>|| hasInterestingSubTasks(parent, task, depth)</MASK>
|| hasChanges(parent, task)
// note that following condition is wrapped... |
Inversion-Mutation | megadiff | "@Test
public void testBackgroundConnect() throws Exception
{
final int CONNECTION_TIMEOUT_MS = 4000;
CuratorZookeeperClient client = new CuratorZookeeperClient(server.getConnectString(), 10000, CONNECTION_TIMEOUT_MS, null, new RetryOneTime(1));
try
{
As... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testBackgroundConnect" | "@Test
public void testBackgroundConnect() throws Exception
{
final int CONNECTION_TIMEOUT_MS = 4000;
CuratorZookeeperClient client = new CuratorZookeeperClient(server.getConnectString(), 10000, CONNECTION_TIMEOUT_MS, null, new RetryOneTime(1));
<MASK>client.start();</MASK>
... |
Inversion-Mutation | megadiff | "private void renderLights(Graphics2D g, PlayerView view) {
// Setup
timer.start("lights-1");
Graphics2D newG = (Graphics2D)g.create();
Area clip = new Area(g.getClip());
if (visibleScreenArea != null) {
clip.intersect(visibleScreenArea);
}
SwingUtil.useAntiAliasing(ne... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "renderLights" | "private void renderLights(Graphics2D g, PlayerView view) {
// Setup
timer.start("lights-1");
Graphics2D newG = (Graphics2D)g.create();
Area clip = new Area(g.getClip());
if (visibleScreenArea != null) {
clip.intersect(visibleScreenArea);
}
SwingUtil.useAntiAliasing(ne... |
Inversion-Mutation | megadiff | "public void addSeamRuntime(String name, String version, String seamHome) {
log.info("Adding Seam Runtime: " + name +
"\nVersion: " + version +
"\nHome: " + seamHome);
SWTBot wiz = open.preferenceOpen(ActionItem.Preference.JBossToolsWebSeam.LABEL);
SWTBotTable tbRuntimeEnvironments = bot.table();
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "addSeamRuntime" | "public void addSeamRuntime(String name, String version, String seamHome) {
log.info("Adding Seam Runtime: " + name +
"\nVersion: " + version +
"\nHome: " + seamHome);
SWTBot wiz = open.preferenceOpen(ActionItem.Preference.JBossToolsWebSeam.LABEL);
SWTBotTable tbRuntimeEnvironments = bot.table();
... |
Inversion-Mutation | megadiff | "public WebSpherePropertiesPanel() {
setLayout(new GridBagLayout());
{
JLabel hostLabel = new JLabel();
Mnemonics.setLocalizedText(hostLabel, NbBundle.getMessage(WebSpherePropertiesPanel.class, "LBL_Host"));
add(hostLabel, new GridBagConstraints(0, 0, 1, 1, 0.0... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "WebSpherePropertiesPanel" | "public WebSpherePropertiesPanel() {
setLayout(new GridBagLayout());
{
JLabel hostLabel = new JLabel();
Mnemonics.setLocalizedText(hostLabel, NbBundle.getMessage(WebSpherePropertiesPanel.class, "LBL_Host"));
add(hostLabel, new GridBagConstraints(0, 0, 1, 1, 0.0... |
Inversion-Mutation | megadiff | "@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
String requestUri = req.getRequestURI();
String resourcePath = RESOURCE_FOLDER + getResourcePath(requestUri);
URL url = ResourceServlet.class.getResource(resourcePath)... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doGet" | "@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
String requestUri = req.getRequestURI();
String resourcePath = RESOURCE_FOLDER + getResourcePath(requestUri);
URL url = ResourceServlet.class.getResource(resourcePath)... |
Inversion-Mutation | megadiff | "@Override
public void setValue(Date date) {
monthPicker.setValue(date);
if (date != null) {
updateDateTextBox();
}
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setValue" | "@Override
public void setValue(Date date) {
if (date != null) {
<MASK>monthPicker.setValue(date);</MASK>
updateDateTextBox();
}
}" |
Inversion-Mutation | megadiff | "public synchronized boolean next(Writable key, Writable value) throws IOException {
if (!(key instanceof Text)) {
throw new IllegalArgumentException("Key should be of type Text but: "
+ key.getClass().getName());
}
if (!(value instanceof Text)) {
throw new IllegalArgumentExcepti... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "next" | "public synchronized boolean next(Writable key, Writable value) throws IOException {
if (!(key instanceof Text)) {
throw new IllegalArgumentException("Key should be of type Text but: "
+ key.getClass().getName());
}
if (!(value instanceof Text)) {
throw new IllegalArgumentExcepti... |
Inversion-Mutation | megadiff | "public synchronized void termLogging(boolean explain)
{
// enumerate the errors
int errs = 0;
for(Iterator it = allErrors.iterator(); it.hasNext(); )
{
MessageLog el = (MessageLog)it.next();
el.index = ++errs;
}
for(Iterator it = allWarn... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "termLogging" | "public synchronized void termLogging(boolean explain)
{
// enumerate the errors
int errs = 0;
for(Iterator it = allErrors.iterator(); it.hasNext(); )
{
MessageLog el = (MessageLog)it.next();
el.index = ++errs;
}
for(Iterator it = allWarn... |
Inversion-Mutation | megadiff | "public void run() {
// To print consistent message in message window
String extraMsg = "errors/warnings";
if (getNumErrors() == 0) extraMsg = "warnings";
else if (getNumWarnings() == 0) extraMsg = "errors";
String msg = errorSystem + " found "+getNumErrors()+" errors, "+getNumWarnin... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "public void run() {
// To print consistent message in message window
String extraMsg = "errors/warnings";
if (getNumErrors() == 0) extraMsg = "warnings";
else if (getNumWarnings() == 0) extraMsg = "errors";
String msg = errorSystem + " found "+getNumErrors()+" errors, "+getNumWarnin... |
Inversion-Mutation | megadiff | "protected final void updateSizeCheck() {
final Rectangle oClientArea = clientArea;
final Rectangle nClientArea = GLCanvas.this.getClientArea();
if ( nClientArea != null &&
( nClientArea.width != oClientArea.width || nClientArea.height != oClientArea.height )
) {
c... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "updateSizeCheck" | "protected final void updateSizeCheck() {
final Rectangle oClientArea = clientArea;
final Rectangle nClientArea = GLCanvas.this.getClientArea();
if ( nClientArea != null &&
( nClientArea.width != oClientArea.width || nClientArea.height != oClientArea.height )
) {
c... |
Inversion-Mutation | megadiff | "public void getDissemination(Context context, String PID, String bDefPID, String methodName,
Property[] userParms, Date asOfDateTime, HttpServletResponse response, HttpServletRequest request)
throws IOException, ServerException
{
ServletOutputStream out = null;
MIMETypedStream dissemination ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getDissemination" | "public void getDissemination(Context context, String PID, String bDefPID, String methodName,
Property[] userParms, Date asOfDateTime, HttpServletResponse response, HttpServletRequest request)
throws IOException, ServerException
{
ServletOutputStream out = null;
MIMETypedStream dissemination ... |
Inversion-Mutation | megadiff | "@Override
public void paintComponent(Graphics g)
{
super.paintComponent(g);
if(appStateIndicator.getState() != ApplicationState.RUNNING)
{
return;
}
showCoordinates();
// Briefly lock the sim to update entity sha... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "paintComponent" | "@Override
public void paintComponent(Graphics g)
{
super.paintComponent(g);
if(appStateIndicator.getState() != ApplicationState.RUNNING)
{
return;
}
showCoordinates();
// Briefly lock the sim to update entity sha... |
Inversion-Mutation | megadiff | "public Player(Socket client, PacketManager pm, byte opCode) {
super(client, pm);
ID = getFreeID();
this.chat = new Messages(pm.server);
if (opCode != 255) {
Packet packet = pm.getPacket(opCode);
if (packet == null) {
pm.server.Log("Client sent " + opCode);
pm.server.Log("How do..?");
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "Player" | "public Player(Socket client, PacketManager pm, byte opCode) {
super(client, pm);
ID = getFreeID();
if (opCode != 255) {
Packet packet = pm.getPacket(opCode);
if (packet == null) {
pm.server.Log("Client sent " + opCode);
pm.server.Log("How do..?");
} else {
byte[] message = new byte... |
Inversion-Mutation | megadiff | "@Override
protected void onCreate(Bundle savedInstanceState) {
ThemeManager.setTheme(this);
super.onCreate(savedInstanceState);
//int sdk = Build.VERSION.SDK_INT;
//if (sdk < 11) {
requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
setContentView(R.layout.mai... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCreate" | "@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//int sdk = Build.VERSION.SDK_INT;
//if (sdk < 11) {
requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
<MASK>ThemeManager.setTheme(this);</MASK>
setContentView... |
Inversion-Mutation | megadiff | "@Override
protected Void doInBackground(Void... params) {
if (pickedTheme.contains("STOCK")) {
readUIValuesFromXML(pickedTheme);
} else {
Intent mvSdUi = new Intent("com.cyanogenmod.cmparts.RESTORE_CMPARTS_UI");
mvSdUi.putExtra("filename"... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doInBackground" | "@Override
protected Void doInBackground(Void... params) {
if (pickedTheme.contains("STOCK")) {
readUIValuesFromXML(pickedTheme);
<MASK>return null;</MASK>
} else {
Intent mvSdUi = new Intent("com.cyanogenmod.cmparts.RESTORE_CMPARTS_UI")... |
Inversion-Mutation | megadiff | "public final void togglePaneExpanded(final TogglePaneStateEvent stateEventParam) {
//TODO check that the source corresponds to a toggle pane that actually belongs to this accordion
final TogglePaneState state = stateEventParam.getSource();
Reqs.PRE_COND.Logic.requireTrue(isTogglePaneBelongin... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "togglePaneExpanded" | "public final void togglePaneExpanded(final TogglePaneStateEvent stateEventParam) {
//TODO check that the source corresponds to a toggle pane that actually belongs to this accordion
final TogglePaneState state = stateEventParam.getSource();
Reqs.PRE_COND.Logic.requireTrue(isTogglePaneBelongin... |
Inversion-Mutation | megadiff | "public static TextPaint getPaint(BaseDanmaku danmaku) {
PAINT.setTextSize(danmaku.textSize);
applyTextScaleConfig(danmaku, PAINT);
if (HAS_SHADOW) {
PAINT.setShadowLayer(3.0f, 0, 0, danmaku.textShadowColor);
} else {
PAINT.clearShadowLayer();
}
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getPaint" | "public static TextPaint getPaint(BaseDanmaku danmaku) {
PAINT.setTextSize(danmaku.textSize);
applyTextScaleConfig(danmaku, PAINT);
<MASK>PAINT.setAntiAlias(ANTI_ALIAS);</MASK>
if (HAS_SHADOW) {
PAINT.setShadowLayer(3.0f, 0, 0, danmaku.textShadowColor);
} else {... |
Inversion-Mutation | megadiff | "private Table getPlaceInGroupForm() throws RemoteException {
Table table = new Table();
table.setCellpadding(5);
table.setWidth(Table.HUNDRED_PERCENT);
table.setHeight(Table.HUNDRED_PERCENT);
int row = 1;
ChildCareApplication application = getBusiness().getApplication(_applicationID);
boolean ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getPlaceInGroupForm" | "private Table getPlaceInGroupForm() throws RemoteException {
Table table = new Table();
table.setCellpadding(5);
table.setWidth(Table.HUNDRED_PERCENT);
table.setHeight(Table.HUNDRED_PERCENT);
int row = 1;
ChildCareApplication application = getBusiness().getApplication(_applicationID);
boolean ... |
Inversion-Mutation | megadiff | "public void documentChanged(DocumentEvent e) {
if (fWidgetCommand.event == e)
updateTextListeners(fWidgetCommand);
fLastSentSelectionChange= null;
handleVisibleDocumentChanged(e);
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "documentChanged" | "public void documentChanged(DocumentEvent e) {
<MASK>handleVisibleDocumentChanged(e);</MASK>
if (fWidgetCommand.event == e)
updateTextListeners(fWidgetCommand);
fLastSentSelectionChange= null;
}" |
Inversion-Mutation | megadiff | "public Callback getObservers() {
Callback callback = new Callback();
callback.attachForwardingObserver(propManager);
callback.attachForwardingObserver(movementMonitor);
callback.attachForwardedObserver(movementMonitor);
callback.attachForwardedObserver(estateManager);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getObservers" | "public Callback getObservers() {
Callback callback = new Callback();
callback.attachForwardingObserver(propManager);
callback.attachForwardingObserver(movementMonitor);
callback.attachForwardedObserver(estateManager);
callback.attachForwardedObserver(sceneManager);
... |
Inversion-Mutation | megadiff | "@Override
public Type typeCheck(Environment env, TypeList qualifiers, NameScope scope)
{
Pattern pattern = state.initPattern;
Expression exp = state.initExpression;
boolean canBeExecuted = false;
if (pattern instanceof IdentifierPattern &&
exp instanceof EqualsExpression)
{
EqualsExpressio... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "typeCheck" | "@Override
public Type typeCheck(Environment env, TypeList qualifiers, NameScope scope)
{
Pattern pattern = state.initPattern;
Expression exp = state.initExpression;
boolean canBeExecuted = false;
if (pattern instanceof IdentifierPattern &&
exp instanceof EqualsExpression)
{
EqualsExpressio... |
Inversion-Mutation | megadiff | "private void initSuggest() {
String locale = mSubtypeSwitcher.getInputLocaleStr();
Locale savedLocale = mSubtypeSwitcher.changeSystemLocale(new Locale(locale));
if (mSuggest != null) {
mSuggest.close();
}
final SharedPreferences prefs = mPrefs;
mQui... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "initSuggest" | "private void initSuggest() {
<MASK>updateAutoTextEnabled();</MASK>
String locale = mSubtypeSwitcher.getInputLocaleStr();
Locale savedLocale = mSubtypeSwitcher.changeSystemLocale(new Locale(locale));
if (mSuggest != null) {
mSuggest.close();
}
final S... |
Inversion-Mutation | megadiff | "@EventHandler(priority = EventPriority.HIGH)
public void onPlayerInteractEvent (PlayerInteractEvent event) {
// Check whether the block still exists
if (event.getClickedBlock() == null) return;
// Check the player did something to a sign
if (!(event.getClickedBlock().getState()... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onPlayerInteractEvent" | "@EventHandler(priority = EventPriority.HIGH)
public void onPlayerInteractEvent (PlayerInteractEvent event) {
// Check whether the block still exists
if (event.getClickedBlock() == null) return;
// Check the player did something to a sign
if (!(event.getClickedBlock().getState()... |
Inversion-Mutation | megadiff | "protected void drawCrosshairs(double[] beamCentre, double length, Color colour, Color labelColour, String nameStub, String labelText) {
if (!active) return; // We are likely off screen.
if (crosshairs == null) {
try {
final String regionName = RegionUtils.getUniqueName(nameStub, plottingSystem);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "drawCrosshairs" | "protected void drawCrosshairs(double[] beamCentre, double length, Color colour, Color labelColour, String nameStub, String labelText) {
if (!active) return; // We are likely off screen.
if (crosshairs == null) {
try {
final String regionName = RegionUtils.getUniqueName(nameStub, plottingSystem);
... |
Inversion-Mutation | megadiff | "public void visitCompilationUnit(GNode n) {
printer.p("#include <iostream>\n");
printer.p("#include <sstream>\n");
printer.p("#include \"out.h\"\n");
printer.pln();
visit(n);
printer.flush();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "visitCompilationUnit" | "public void visitCompilationUnit(GNode n) {
<MASK>printer.p("#include \"out.h\"\n");</MASK>
printer.p("#include <iostream>\n");
printer.p("#include <sstream>\n");
printer.pln();
visit(n);
printer.flush();
}" |
Inversion-Mutation | megadiff | "protected XSAttributeUseImpl traverseLocal(Element attrDecl,
XSDocumentInfo schemaDoc,
SchemaGrammar grammar,
XSComplexTypeDecl enclosingCT) {
// General Attribute Checking
Object[] attrValues = fAttrChecker.checkAttributes(attrDecl, false, schemaDoc);... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "traverseLocal" | "protected XSAttributeUseImpl traverseLocal(Element attrDecl,
XSDocumentInfo schemaDoc,
SchemaGrammar grammar,
XSComplexTypeDecl enclosingCT) {
// General Attribute Checking
Object[] attrValues = fAttrChecker.checkAttributes(attrDecl, false, schemaDoc);... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.