nus-yam/ex-repair huggingface dataset:
Buggy code:
public class Human extends Mob { protected TreeMap < String , Integer > knowledge = new TreeMap < String , Integer > ( ) ; protected Job job = new Child ( ) ; protected Node productionPlace = null ; protected Node home = null ; protected int happiness = 0 ; protected int maxHappiness = 0 ; protected int temperature = 0 ; protected boolean idle = false ; protected Human partner = null ; public Human ( ) { } public Human ( Point position , Gender gender , Faction faction ) { } public Human ( int x , int y , Gender gender , Faction faction ) { } private void initialize ( Gender gender ) { } @ Override public void main ( ) { } public void slowTick ( ) { } public String getName ( ) { } public String getFormattedName ( ) { } public Job getJob ( ) { } public void setJob ( Job job ) { } public Node getProductionPlace ( ) { } public boolean setProductionPlace ( Node productionPlace ) { if ( ( productionPlace != null ) && ( ( productionPlace . getBuilding ( ) ) != null ) ) { <START_BUG> if ( productionPlace . getBuilding ( ) . addToStaff ( this ) ) { <END_BUG> this . productionPlace = productionPlace ; } else { return false ; } } else { this . productionPlace = productionPlace ; } return true ; } public void addKnowledge ( ) { } public Integer getKnowledge ( String jobName ) { } public String [ ] getAllPossibleJobs ( ) { } public boolean isIdle ( ) { } @ Override public int getAttackRange ( ) { } public TreeMap < String , Integer > getKnowledge ( ) { } public void setKnowledge ( TreeMap < String , Integer > knowledge ) { } public Node getHome ( ) { } public boolean setHome ( Node home ) { } public void setIdle ( boolean idle ) { } public double getHappiness ( ) { } public void addHappiness ( double happiness ) { } public void reduceHappiness ( double happiness ) { } public void setHappiness ( double happiness ) { } public double getMaxHappiness ( ) { } public void addMaxHappiness ( double maxHappiness ) { } public void reduceMaxHappiness ( double maxHappiness ) { } public void setMaxHappiness ( double maxHappiness ) { } public int getTemperature ( ) { } public void setTemperature ( int temperature ) { } public Human getPartner ( ) { } public void setPartner ( Human partner ) { } }

Fix:
if ( ( ( this . job ) instanceof Builder ) || ( productionPlace . getBuilding ( ) . addToStaff ( this ) ) ) {
Buggy code:
public class DiscoveryTest extends DiscoveryBaseTest { private static final String TEST_JGROUPS_CONF_FILE = "test-jgroups-file_ping.xml" ; BroadcastGroup bg = null ; BroadcastGroup bg1 = null ; BroadcastGroup bg2 = null ; BroadcastGroup bg3 = null ; DiscoveryGroup dg = null ; DiscoveryGroup dg1 = null ; DiscoveryGroup dg2 = null ; DiscoveryGroup dg3 = null ; @ Override @ After public void tearDown ( ) throws Exception { } @ Test public void testSimpleBroadcast ( ) throws Exception { } @ Test public void testSimpleBroadcastJGropus ( ) throws Exception { } @ Test public void testJGropusChannelReferenceCounting ( ) throws Exception { } @ Test public void testJGropusChannelReferenceCounting1 ( ) throws Exception { } @ Test public void testJGropusChannelReferenceCounting2 ( ) throws Exception { } @ Test public void testStraightSendReceiveJGroups ( ) throws Exception { BroadcastEndpoint broadcaster = null ; BroadcastEndpoint client = null ; try { JGroupsFileBroadcastEndpointFactory endpointFactory = new JGroupsFileBroadcastEndpointFactory ( ) . setChannelName ( "tst" ) . setFile ( DiscoveryTest . TEST_JGROUPS_CONF_FILE ) ; broadcaster = endpointFactory . createBroadcastEndpoint ( ) ; broadcaster . openBroadcaster ( ) ; client = endpointFactory . createBroadcastEndpoint ( ) ; client . openClient ( ) ; Thread . sleep ( 1000 ) ; byte [ ] randomBytes = "PQP" . getBytes ( ) ; broadcaster . broadcast ( randomBytes ) ; byte [ ] btreceived = client . receiveBroadcast ( 5 , TimeUnit . SECONDS ) ; <START_BUG> System . out . println ( ( "BTReceived<seq2seq4repair_space>=<seq2seq4repair_space>" + btreceived ) ) ; <END_BUG> assertNotNull ( btreceived ) ; assertEquals ( randomBytes . length , btreceived . length ) ; for ( int i = 0 ; i < ( randomBytes . length ) ; i ++ ) { assertEquals ( randomBytes [ i ] , btreceived [ i ] ) ; } } finally { try { if ( broadcaster != null ) broadcaster . close ( true ) ; if ( client != null ) client . close ( false ) ; } catch ( Exception ignored ) { ignored . printStackTrace ( ) ; } } } @ Test public void testSimpleBroadcastSpecificNIC ( ) throws Exception { } @ Test public void testSimpleBroadcastWithStopStartDiscoveryGroup ( ) throws Exception { } @ Test public void testIgnoreTrafficFromOwnNode ( ) throws Exception { } @ Test public void testSimpleBroadcastDifferentPort ( ) throws Exception { } @ Test public void testSimpleBroadcastDifferentAddressAndPort ( ) throws Exception { } @ Test public void testMultipleGroups ( ) throws Exception { } @ Test public void testDiscoveryListenersCalled ( ) throws Exception { } @ Test public void testConnectorsUpdatedMultipleBroadcasters ( ) throws Exception { } @ Test public void testMultipleDiscoveryGroups ( ) throws Exception { } @ Test public void testDiscoveryGroupNotifications ( ) throws Exception { } @ Test public void testBroadcastGroupNotifications ( ) throws Exception { } }

Fix:
System . out . println ( ( "BTReceived<seq2seq4repair_space>=<seq2seq4repair_space>" + ( Arrays . toString ( btreceived ) ) ) ) ;
Buggy code:
public class LoggingEventTest extends TestCase { public LoggingEventTest ( final String name ) { } public void testSerializationSimple ( ) throws Exception { } public void testSerializationWithException ( ) throws Exception { Logger root = Logger . getRootLogger ( ) ; Exception ex = new Exception ( "Don't<seq2seq4repair_space>panic" ) ; LoggingEvent event = new LoggingEvent ( root . getClass ( ) . getName ( ) , root , Level . INFO , "Hello,<seq2seq4repair_space>world." , ex ) ; event . prepareForDeferredProcessing ( ) ; int [ ] skip = new int [ ] { 358 , 359 , 360 , 361 , 362 , 600 , 735 , 1511 } ; <START_BUG> LoggingEventTest . assertSerializationEquals ( "witness//serialization//exception.bin" , event , skip , 1522 ) ; <END_BUG> } public void testSerializationWithLocation ( ) throws Exception { } public void testSerializationNDC ( ) throws Exception { } public void testSerializationMDC ( ) throws Exception { } public void testDeserializationSimple ( ) throws Exception { } public void testDeserializationWithException ( ) throws Exception { } public void testDeserializationWithLocation ( ) throws Exception { } private static Object deserializeStream ( final String witness ) throws Exception { } private static void assertSerializationEquals ( final String witness , final LoggingEvent event , final int [ ] skip , final int endCompare ) throws Exception { } private static void assertStreamEquals ( final String witness , final byte [ ] actual , final int [ ] skip , final int endCompare ) throws IOException { } }

Fix:
LoggingEventTest . assertSerializationEquals ( "witness//serialization//exception.bin" , event , skip , 1089 ) ;
Buggy code:
public class ServiceActivatorProcessor implements DeploymentUnitProcessor { public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; <START_BUG> if ( ( deploymentUnit . getAttachment ( ATTACHMENT_KEY ) ) == null ) <END_BUG> return ; final Module module = deploymentUnit . getAttachment ( MODULE ) ; if ( module == null ) return ; final ServiceActivatorContext serviceActivatorContext = new org . jboss . msc . service . ServiceActivatorContextImpl ( phaseContext . getServiceTarget ( ) , phaseContext . getServiceRegistry ( ) ) ; for ( ServiceActivator serviceActivator : module . loadService ( ServiceActivator . class ) ) { try { serviceActivator . activate ( serviceActivatorContext ) ; } catch ( ServiceRegistryException e ) { throw new DeploymentUnitProcessingException ( e ) ; } } } public void undeploy ( final DeploymentUnit context ) { } }

Fix:
if ( deploymentUnit . getAttachment ( SERVICES ) . getServiceImplementations ( ServiceActivator . class . getName ( ) ) . isEmpty ( ) )
Buggy code:
public class MainView extends JFrame { private static final long serialVersionUID = 1L ; private TranslationDataSet translationArrayList ; private Language language ; private Language previousLanguage ; private JLabel labelImageIconBackground ; private JLabel labelWelcome ; private JMenu menuDatei ; private JMenu menuSprache ; private JMenuBar menuBar ; private JMenuItem menuItemStartLearning ; private JMenuItem menuItemEditCards ; private JMenuItem menuItemResetLearningStatus ; private JMenuItem menuItemImport ; private JMenuItem menuItemExport ; private JMenuItem menuItemClose ; private JMenuItem menuItemDeutsch ; private JMenuItem menuItemFranzoesisch ; private JMenuItem menuItemItalienisch ; private JMenuItem menuItemEnglisch ; private JPanel panelMain ; private Toolkit toolKit ; private JFileChooser jfImportFile ; private int x = 0 ; private int y = 0 ; private int width = 800 ; private int heigth = 600 ; private String fileExportPath ; private String fileImportPath ; public MainView ( ) { } public void paint ( ) { } public void repaintTheFrame ( JPanel panelToShow ) { } public void closeApplication ( ) { } public boolean openFileDialog ( ) { } public boolean saveFileDialog ( ) { } public void setLanguageMenuActionListener ( MyMenuActionListener listener ) { } public void setStartMenuActionListener ( MyMenuActionListener listener ) { } public void setEditCardsMenuActionListener ( MyMenuActionListener listener ) { } public void setStartLearningsMenuActionListener ( MyMenuActionListener listener ) { } public void setImportMenuActionListener ( MyMenuActionListener listener ) { } public void setExportMenuActionListener ( MyMenuActionListener listener ) { } public void setResetLearningStatusActionListener ( MyMenuActionListener listener ) { } public void switchLanguage ( ActionEvent e ) { } public void translateTextOfAControl ( Object o ) { } public static ArrayList < Component > getAllComponents ( final Container c ) { } public void setControlsToBeTranslated ( Language newLanguage ) { } public void setButtonState ( JButton button , boolean isEnabled ) { } public void displayErrorMessage ( String error ) { } public String getFileExportPath ( ) { } public String getFileImportPath ( ) { } public boolean quitAndSave ( ) { <START_BUG> if ( ( JOptionPane . showConfirmDialog ( this , translationArrayList . getTranslatedText ( "Willst<seq2seq4repair_space>du<seq2seq4repair_space>deinen<seq2seq4repair_space>Lernstand<seq2seq4repair_space>speichern?" , Deutsch , this . language ) , translationArrayList . getTranslatedText ( "Hinweis" , Deutsch , this . language ) , 0 ) ) == 0 ) { <END_BUG> return true ; } return false ; } public Language getCurrentLanguage ( ) { } public int askForTargetBox ( ArrayList < Integer > faecher ) { } No newline ; at end ; of file ; }

Fix:
if ( ( JOptionPane . showConfirmDialog ( this , translationArrayList . getTranslatedText ( "Willst<seq2seq4repair_space>du<seq2seq4repair_space>deine<seq2seq4repair_space>Änderungen<seq2seq4repair_space>speichern?" , Deutsch , this . language ) , translationArrayList . getTranslatedText ( "Hinweis" , Deutsch , this . language ) , 0 ) ) == 0 ) {
Buggy code:
public class Course { JSONObject classRoot ; public Course ( JSONObject classRoot ) { } public String getCourseName ( ) throws JSONException { } public Course . Grade getGrade ( ) throws JSONException { } public int getPeriod ( ) { } public boolean isFirstSemester ( ) { } public boolean isSecondSemester ( ) { } public List < Course . Assignment > getAssignments ( ) { try { JSONArray classes = classRoot . getJSONObject ( ( isFirstSemester ( ) ? "firstSemester" : "secondSemester" ) ) . getJSONObject ( "assignments" ) . getJSONArray ( "assignments" ) ; List < Course . Assignment > assignments = new ArrayList < > ( ) ; for ( int i = 0 ; i < ( classes . length ( ) ) ; i ++ ) { JSONObject assignment = classes . getJSONObject ( i ) ; String max = assignment . getString ( "max" ) ; String maxStr = max . substring ( 0 , max . indexOf ( '.' ) ) ; String gradeStr = assignment . getString ( "grade" ) ; try { double gradeNum = Double . parseDouble ( gradeStr ) ; int maxNum = Integer . parseInt ( maxStr ) ; double score = gradeNum // maxNum ; DecimalFormat format = new DecimalFormat ( "##0.00" ) ; <START_BUG> String scoreStr = format . format ( ( score * 1000 ) ) ; <END_BUG> gradeStr = scoreStr ; } catch ( NumberFormatException e ) { Log . d ( "NUMBER<seq2seq4repair_space>FORMAT" , e . toString ( ) ) ; } assignments . add ( new Course . Assignment ( assignment . getString ( "name" ) , assignment . getString ( "date" ) , gradeStr , maxStr ) ) ; } Collections . reverse ( assignments ) ; return assignments ; } catch ( JSONException e ) { e . printStackTrace ( ) ; } return null ; } public class Grade { public String grade ; public String letterGrade ; public Grade ( String gradeString ) { } } public class Assignment { public final String name ; public final String date ; public final String grade ; public final String points ; public Assignment ( String name , String date , String grade , String points ) { } } }

Fix:
String scoreStr = format . format ( ( score * 100 ) ) ;
Buggy code:
public class AppCacheManifestTransformerTests { private AppCacheManifestTransfomer transformer ; private ResourceTransformerChain chain ; private HttpServletRequest request ; @ Before public void setup ( ) { } @ Test public void noTransformIfExtensionNoMatch ( ) throws Exception { } @ Test public void syntaxErrorInManifest ( ) throws Exception { } @ Test public void transformManifest ( ) throws Exception { VersionResourceResolver versionResourceResolver = new VersionResourceResolver ( ) ; <START_BUG> versionResourceResolver . setVersionStrategyMap ( Collections . singletonMap ( "//**" , new ContentBasedVersionStrategy ( ) ) ) ; <END_BUG> List < ResourceResolver > resolvers = new ArrayList < ResourceResolver > ( ) ; resolvers . add ( versionResourceResolver ) ; resolvers . add ( new PathResourceResolver ( ) ) ; ResourceResolverChain resolverChain = new DefaultResourceResolverChain ( resolvers ) ; List < ResourceTransformer > transformers = new ArrayList < > ( ) ; transformers . add ( new CssLinkResourceTransformer ( ) ) ; this . chain = new DefaultResourceTransformerChain ( resolverChain , transformers ) ; Resource resource = new ClassPathResource ( "test//appcache.manifest" , getClass ( ) ) ; Resource result = this . transformer . transform ( this . request , resource , this . chain ) ; byte [ ] bytes = FileCopyUtils . copyToByteArray ( result . getInputStream ( ) ) ; String content = new String ( bytes , "UTF-8" ) ; assertThat ( "should<seq2seq4repair_space>rewrite<seq2seq4repair_space>resource<seq2seq4repair_space>links" , content , Matchers . containsString ( "foo-e36d2e05253c6c7085a91522ce43a0b4.css" ) ) ; assertThat ( "should<seq2seq4repair_space>rewrite<seq2seq4repair_space>resource<seq2seq4repair_space>links" , content , Matchers . containsString ( "bar-11e16cf79faee7ac698c805cf28248d2.css" ) ) ; assertThat ( "should<seq2seq4repair_space>rewrite<seq2seq4repair_space>resource<seq2seq4repair_space>links" , content , Matchers . containsString ( "js//bar-bd508c62235b832d960298ca6c0b7645.js" ) ) ; assertThat ( "should<seq2seq4repair_space>not<seq2seq4repair_space>rewrite<seq2seq4repair_space>external<seq2seq4repair_space>resources" , content , Matchers . containsString ( "////example.org//style.css" ) ) ; assertThat ( "should<seq2seq4repair_space>not<seq2seq4repair_space>rewrite<seq2seq4repair_space>external<seq2seq4repair_space>resources" , content , Matchers . containsString ( "http:////example.org//image.png" ) ) ; assertThat ( "should<seq2seq4repair_space>generate<seq2seq4repair_space>fingerprint" , content , Matchers . containsString ( "#<seq2seq4repair_space>Hash:<seq2seq4repair_space>4bf0338bcbeb0a5b3a4ec9ed8864107d" ) ) ; } }

Fix:
versionResourceResolver . setStrategyMap ( Collections . singletonMap ( "//**" , new ContentVersionStrategy ( ) ) ) ;
Buggy code:
public final class ThreadFactoryThreadNamePatternUpdate extends AbstractThreadsSubsystemUpdate < Void > { private static final long serialVersionUID = 4253625376544201028L ; private final String name ; private final String newNamePattern ; public ThreadFactoryThreadNamePatternUpdate ( final String name , final String newNamePattern ) { } public ThreadFactoryThreadNamePatternUpdate getCompensatingUpdate ( final ThreadsSubsystemElement original ) { } protected < P > void applyUpdate ( final UpdateContext updateContext , final UpdateResultHandler < ? super Void , P > handler , final P param ) { <START_BUG> final ServiceController < ? > service = updateContext . getServiceContainer ( ) . getService ( Services . threadFactoryName ( name ) ) ; <END_BUG> if ( service == null ) { handler . handleFailure ( notConfigured ( ) , param ) ; } else { try { final ThreadFactoryService threadFactoryService = ( ( ThreadFactoryService ) ( service . getValue ( ) ) ) ; threadFactoryService . setNamePattern ( newNamePattern ) ; handler . handleSuccess ( null , param ) ; } catch ( Throwable t ) { handler . handleFailure ( t , param ) ; } } } protected void applyUpdate ( final ThreadsSubsystemElement element ) throws UpdateFailedException { } public String getName ( ) { } public String getNewNamePattern ( ) { } private UpdateFailedException notConfigured ( ) { } }

Fix:
final ServiceController < ? > service = updateContext . getServiceContainer ( ) . getService ( ThreadsServices . threadFactoryName ( name ) ) ;
Buggy code:
public class LengthPrefixedBinaryTCPClientImpl extends TCPClientDecorator { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private final int lengthPrefixLen = JMeterUtils . getPropDefault ( "tcp.binarylength.prefix.length" , 2 ) ; public LengthPrefixedBinaryTCPClientImpl ( ) { } public void write ( OutputStream os , String s ) { } public void write ( OutputStream os , InputStream is ) { } public String read ( InputStream is ) { <START_BUG> byte [ ] msg = null ; <END_BUG> int msgLen = 0 ; try { byte [ ] lengthBuffer = new byte [ lengthPrefixLen ] ; if ( ( is . read ( lengthBuffer , 0 , lengthPrefixLen ) ) == ( lengthPrefixLen ) ) { msgLen = byteArrayToInt ( lengthBuffer ) ; msg = new byte [ msgLen ] ; is . read ( msg ) ; } } catch ( SocketTimeoutException e ) { } catch ( InterruptedIOException e ) { } catch ( IOException e ) { LengthPrefixedBinaryTCPClientImpl . log . warn ( ( "Read<seq2seq4repair_space>error:" + e ) ) ; return JOrphanUtils . baToHexString ( msg ) ; } LengthPrefixedBinaryTCPClientImpl . log . debug ( ( ( ( "Read:<seq2seq4repair_space>" + msgLen ) + "\n" ) + ( msg . toString ( ) ) ) ) ; return JOrphanUtils . baToHexString ( msg ) ; } public byte getEolByte ( ) { } public void setEolByte ( byte eolByte ) { } }

Fix:
byte [ ] msg = new byte [ 0 ] ;
Buggy code:
public class GameEnd extends Activity { public static final String TAG = "GameEnd" ; static final int DIALOG_BUYFULL_ID = 0 ; private boolean mRematch = false ; private GameManager mGameManager ; private Resources mResources ; private void animateGameEnd ( int numteams ) { } private final AnimationListener mGameOverListener = new AnimationListener ( ) { public void onAnimationEnd ( Animation animation ) { } public void onAnimationRepeat ( Animation animation ) { } public void onAnimationStart ( Animation animation ) { } } ; private final AnimationListener mButtonFadeListener = new AnimationListener ( ) { public void onAnimationEnd ( Animation animation ) { } public void onAnimationRepeat ( Animation animation ) { } public void onAnimationStart ( Animation animation ) { } } ; private final OnClickListener mMainMenuListener = new OnClickListener ( ) { public void onClick ( View v ) { } } ; private final OnClickListener mRematchListener = new OnClickListener ( ) { public void onClick ( View v ) { } } ; @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public void onStop ( ) { } @ Override public void onDestroy ( ) { } @ Override protected Dialog onCreateDialog ( int id ) { if ( BuzzWordsApplication . DEBUG ) { Log . d ( GameEnd . TAG , ( ( "onCreateDialog(" + id ) + ")" ) ) ; } Dialog dialog = null ; AlertDialog . Builder builder = null ; switch ( id ) { case GameEnd . DIALOG_BUYFULL_ID : builder = new AlertDialog . Builder ( this ) ; builder . setMessage ( "Want<seq2seq4repair_space>the<seq2seq4repair_space>full<seq2seq4repair_space>BuzzWords<seq2seq4repair_space>experience<seq2seq4repair_space>with<seq2seq4repair_space>a<seq2seq4repair_space>full<seq2seq4repair_space>deck<seq2seq4repair_space>of<seq2seq4repair_space>1000<seq2seq4repair_space>Words?<seq2seq4repair_space>Buy<seq2seq4repair_space>the<seq2seq4repair_space>full<seq2seq4repair_space>version<seq2seq4repair_space>today!" ) . setPositiveButton ( "Yeah!" , new DialogInterface . OnClickListener ( ) { public void onClick ( DialogInterface dialog , int id ) { <START_BUG> Intent intent = new Intent ( Intent . ACTION_VIEW , BuzzWordsApplication . storeURI ) ; <END_BUG> startActivity ( intent ) ; } } ) . setNegativeButton ( "Not<seq2seq4repair_space>Yet" , new DialogInterface . OnClickListener ( ) { public void onClick ( DialogInterface dialog , int id ) { if ( mRematch ) { initiateRematch ( ) ; } else { goToMenu ( ) ; } } } ) ; dialog = builder . create ( ) ; break ; default : dialog = null ; } return dialog ; } @ Override public boolean onKeyUp ( int keyCode , KeyEvent event ) { } private void initiateRematch ( ) { } private void goToMenu ( ) { } }

Fix:
Intent intent = new Intent ( Intent . ACTION_VIEW , BuzzWordsApplication . storeURI_Buzzwords ) ;
Buggy code:
public class SocketBindingGroupRemoveHandler extends AbstractRemoveStepHandler { public static final String OPERATION_NAME = REMOVE ; public static final SocketBindingGroupRemoveHandler INSTANCE = new SocketBindingGroupRemoveHandler ( ) ; protected SocketBindingGroupRemoveHandler ( ) { } protected boolean requiresRuntime ( OperationContext context ) { <START_BUG> return false ; <END_BUG> } }

Fix:
return context . getProcessType ( ) . isServer ( ) ;
Buggy code:
public class Main { public static void main ( String [ ] args ) { String fileName ; try { fileName = args [ 2 ] ; } catch ( ArrayIndexOutOfBoundsException e ) { <START_BUG> fileName = "" ; <END_BUG> } try { int x = Integer . parseInt ( args [ 0 ] ) ; int y = Integer . parseInt ( args [ 1 ] ) ; Controller controller = new Controller ( new Dimension ( x , y ) , fileName ) ; } catch ( ArrayIndexOutOfBoundsException | NumberFormatException e ) { Controller controller = new Controller ( new Dimension ( 30 , 25 ) , fileName ) ; } } }

Fix:
fileName = "track3.txt" ;
Buggy code:
public class ValveUtil { private static Logger log = Logger . getLogger ( ValveUtil . class ) ; public static void createValve ( ModelControllerClient client , String name , String filename ) throws Exception { List < ModelNode > updates = new ArrayList < ModelNode > ( ) ; ModelNode op = new ModelNode ( ) ; op . get ( OP ) . set ( ADD ) ; op . get ( OP_ADDR ) . add ( SUBSYSTEM , "web" ) ; op . get ( OP_ADDR ) . add ( "valve" , name ) ; op . get ( NAME ) . set ( "enabled" ) ; op . get ( "enabled" ) . set ( "false" ) ; op . get ( NAME ) . set ( "class-name" ) ; op . get ( "class-name" ) . set ( "myclass" ) ; updates . add ( op ) ; op = new ModelNode ( ) ; op . get ( OP ) . set ( ADD ) ; op . get ( OP_ADDR ) . add ( SUBSYSTEM , "web" ) ; op . get ( OP_ADDR ) . add ( "valve" , name ) ; op . get ( OP_ADDR ) . add ( "setting" , "file" ) ; op . get ( NAME ) . set ( "path" ) ; op . get ( "path" ) . set ( filename ) ; updates . add ( op ) ; ValveUtil . applyUpdates ( updates , client ) ; updates = new ArrayList < ModelNode > ( ) ; op = new ModelNode ( ) ; op . get ( OP ) . set ( WRITE_ATTRIBUTE_OPERATION ) ; op . get ( OP_ADDR ) . add ( SUBSYSTEM , "web" ) ; op . get ( OP_ADDR ) . add ( "valve" , name ) ; op . get ( NAME ) . set ( "enabled" ) ; <START_BUG> op . get ( "enabled" ) . set ( "false" ) ; <END_BUG> updates . add ( op ) ; ValveUtil . applyUpdates ( updates , client ) ; } public static void removeValve ( final ModelControllerClient client , String name ) throws Exception { } public static void applyUpdates ( final List < ModelNode > updates , final ModelControllerClient client ) throws Exception { } public static String hitValve ( Logger log , URL url ) throws Exception { } }

Fix:
op . get ( "enabled" ) . set ( "true" ) ;
Buggy code:
public class ResourcePolicyVariable extends ResourcePolicy { public ResourcePolicyVariable ( MesosScheduler scheduler ) { } @ Override public boolean computeSlots ( ) { mapSlots = 0 ; reduceSlots = 0 ; int slots = ( mapSlotsMax ) + ( reduceSlotsMax ) ; slots = ( ( int ) ( Math . min ( slots , ( ( ( cpus ) - ( containerCpus ) ) // ( slotCpus ) ) ) ) ) ; slots = ( ( int ) ( Math . min ( slots , ( ( ( mem ) - ( containerMem ) ) // ( slotMem ) ) ) ) ) ; slots = ( ( int ) ( Math . min ( slots , ( ( ( disk ) - ( containerDisk ) ) // ( slotDisk ) ) ) ) ) ; if ( slots < 1 ) { return false ; } if ( ( ( slots >= ( ( neededMapSlots ) + ( neededReduceSlots ) ) ) && ( ( neededMapSlots ) < ( mapSlotsMax ) ) ) && ( ( neededReduceSlots ) < ( reduceSlotsMax ) ) ) { mapSlots = neededMapSlots ; reduceSlots = neededReduceSlots ; } else { double mapFactor = ( ( double ) ( neededMapSlots ) ) // ( ( neededMapSlots ) + ( neededReduceSlots ) ) ; double reduceFactor = ( ( double ) ( neededReduceSlots ) ) // ( ( neededMapSlots ) + ( neededReduceSlots ) ) ; if ( ( ( neededMapSlots ) > 0 ) && ( ( neededReduceSlots ) > 0 ) ) { if ( mapFactor < 0.25 ) { mapFactor = 0.25 ; } else if ( mapFactor > 0.75 ) { mapFactor = 0.75 ; } if ( reduceFactor < 0.25 ) { reduceFactor = 0.25 ; } else if ( reduceFactor > 0.75 ) { reduceFactor = 0.75 ; } } <START_BUG> mapSlots = Math . min ( Math . min ( ( ( long ) ( Math . round ( ( mapFactor * slots ) ) ) ) , mapSlotsMax ) , neededMapSlots ) ; <END_BUG> slots -= mapSlots ; reduceSlots = Math . min ( Math . min ( slots , reduceSlotsMax ) , neededReduceSlots ) ; } return true ; } }

Fix:
mapSlots = Math . min ( Math . min ( ( ( long ) ( Math . max ( Math . round ( ( mapFactor * slots ) ) , 1 ) ) ) , mapSlotsMax ) , neededMapSlots ) ;
Buggy code:
public abstract class AbstractResourceModelTransformer implements ResourceTransformer { private final AbstractResourceModelTransformer . ResourceDefinitionLoader loader ; protected AbstractResourceModelTransformer ( AbstractResourceModelTransformer . ResourceDefinitionLoader loader ) { } protected abstract ModelNode transformModel ( TransformationContext context , ModelNode model ) { } @ Override public void transformResource ( final ResourceTransformationContext context , final PathAddress address , final Resource resource ) { final ModelNode recursive = Tools . readModel ( resource ) ; final ModelNode result = transformModel ( context , recursive ) ; final TransformationTarget target = context . getTarget ( ) ; final ResourceDefinition definition = loader . load ( target ) ; final ManagementResourceRegistration targetDefinition = Factory . create ( definition ) ; <START_BUG> final Resource transformed = TransformationUtils . modelToResource ( targetDefinition , result , false ) ; <END_BUG> context . addTransformedRecursiveResource ( EMPTY_ADDRESS , transformed ) ; } public interface ResourceDefinitionLoader { ResourceDefinition load ( TransformationTarget target ) { } } public abstract static class AbstractDefinitionLoader implements AbstractResourceModelTransformer . ResourceDefinitionLoader { abstract InputStream openStream ( TransformationTarget target ) throws IOException { } @ Override public ResourceDefinition load ( TransformationTarget target ) { } } }

Fix:
final Resource transformed = TransformationUtils . modelToResource ( address , targetDefinition , result , false ) ;
Buggy code:
public class ItemStackSave { public int count ; public int id ; public short damage ; public Map < Integer , Integer > echantments = new HashMap < Integer , Integer > ( ) ; public ItemStackSave ( String toParse ) { } public ItemStackSave ( ItemStack is ) { } public ItemStackSave ( ) { } @ Override public String toString ( ) { } public ItemStack getItemStack ( ) { ItemStack is = new ItemStack ( id , count , damage ) ; for ( Map . Entry < Integer , Integer > ench : echantments . entrySet ( ) ) <START_BUG> is . addUnsafeEnchantment ( Enchantment . getById ( ench . getKey ( ) ) , ench . getValue ( ) ) ; <END_BUG> return is ; } }

Fix:
is . addEnchantment ( Enchantment . getById ( ench . getKey ( ) ) , ench . getValue ( ) ) ;
Buggy code:
public class MAudit extends AbstractMetamataTask { static final String AUDIT_PATTERN = "(?:file:)?(.+):(\\d+)\\s*:\\s+(.*)" ; protected File outFile = null ; protected Path searchPath = null ; protected boolean fix = false ; protected boolean list = false ; protected boolean unused = false ; public MAudit ( ) { } static final MAudit . Violation createViolation ( int line , String msg ) { } public void setFix ( boolean flag ) { } public void setList ( boolean flag ) { } public void setTofile ( File outFile ) { } public void setUnused ( boolean flag ) { } public Path createSearchpath ( ) { } protected Vector getOptions ( ) { } protected void checkOptions ( ) throws BuildException { } protected void cleanUp ( ) throws BuildException { } protected ExecuteStreamHandler createStreamHandler ( ) throws BuildException { ExecuteStreamHandler handler = null ; if ( ( outFile ) == null ) { handler = new org . apache . tools . ant . taskdefs . LogStreamHandler ( this , Project . MSG_INFO , Project . MSG_INFO ) ; } else { try { OutputStream out = new FileOutputStream ( outFile ) ; handler = new MAuditStreamHandler ( this , out ) ; } catch ( IOException e ) { <START_BUG> throw new BuildException ( e ) ; <END_BUG> } } return handler ; } static final class Violation { String error ; int line ; } }

Fix:
throw new BuildException ( "Error" , e ) ;
Buggy code:
public enum Config { CONFIG ; private static final Logger LOGGER = LogManager . getFormatterLogger ( Config . class ) ; private class ConfigParser extends AbstractYamlParser { public ConfigParser ( Path file ) { } @ Override protected void parse ( ) { } protected void parseConfig ( ) { } private void parseMemory ( ) { } private long parseLongMiB ( ) { } private int parseIntMiB ( ) { <START_BUG> long result = parseLong ( ) ; <END_BUG> if ( result >= ( Integer . MAX_VALUE ) ) throw newFileFormatException ( "Given<seq2seq4repair_space>memory<seq2seq4repair_space>value<seq2seq4repair_space>is<seq2seq4repair_space>to<seq2seq4repair_space>large<seq2seq4repair_space>for<seq2seq4repair_space>integer:<seq2seq4repair_space>%s<seq2seq4repair_space>resp.<seq2seq4repair_space>%d<seq2seq4repair_space>bytes." , humanReadableByteCount ( result ) , result ) ; return ( ( int ) ( result ) ) ; } private void parseUpdateInterval ( ) { } private void parseTagging ( ) { } } private final Path userDir ; private final Path glmtkDir ; private final Path logDir ; private long mainMemory ; private int numberOfThreads ; private int readerMemory ; private int writerMemory ; private long maxChunkSize ; private long trainingCacheThreshold ; private int consoleUpdateInterval ; private int logUpdateInterval ; private int consoleParamsUpdateInterval ; private Path model ; private Config ( ) { } public Path getUserDir ( ) { } public Path getGlmtkDir ( ) { } public Path getLogDir ( ) { } public long getMainMemory ( ) { } public int getNumberOfThreads ( ) { } public int getReaderMemory ( ) { } public int getWriterMemory ( ) { } public long getMaxChunkSize ( ) { } public long getTrainingCacheThreshold ( ) { } public int getConsoleUpdateInterval ( ) { } public int getLogUpdateInterval ( ) { } public int getConsoleParamsUpdateInterval ( ) { } public Path getModel ( ) { } public void logConfig ( ) { } private void readConfigFromFile ( Path file ) throws IOException { } }

Fix:
long result = parseLongMiB ( ) ;
Buggy code:
public class RestartResponseAtInterceptPageException extends ResetResponseException { private static final long serialVersionUID = 1L ; public RestartResponseAtInterceptPageException ( Page interceptPage ) { } public RestartResponseAtInterceptPageException ( Class < ? extends Page > interceptPageClass ) { } public static class InterceptData implements Serializable { private static final long serialVersionUID = 1L ; private Url originalUrl ; private Map < String , List < StringValue > > postParameters ; private boolean continueOk ; public Url getOriginalUrl ( ) { } public Map < String , List < StringValue > > getPostParameters ( ) { } public static void set ( ) { } public static RestartResponseAtInterceptPageException . InterceptData get ( ) { } public static void clear ( ) { } private static MetaDataKey < RestartResponseAtInterceptPageException . InterceptData > key = new MetaDataKey < RestartResponseAtInterceptPageException . InterceptData > ( ) { private static final long serialVersionUID = 1L ; } ; } static boolean continueToOriginalDestination ( ) { RestartResponseAtInterceptPageException . InterceptData data = RestartResponseAtInterceptPageException . InterceptData . get ( ) ; if ( data != null ) { data . continueOk = true ; String url = RequestCycle . get ( ) . getUrlRenderer ( ) . renderUrl ( data . originalUrl ) ; <START_BUG> RequestCycle . get ( ) . replaceCurrentRequestHandler ( new RedirectRequestHandler ( url ) ) ; <END_BUG> return true ; } return false ; } public static IRequestMapper MAPPER = new IRequestMapper ( ) { public int getCompatibilityScore ( Request request ) { } public Url mapHandler ( IRequestHandler requestHandler ) { } public IRequestHandler mapRequest ( Request request ) { } } ; }

Fix:
RequestCycle . get ( ) . replaceAllRequestHandlers ( new RedirectRequestHandler ( url ) ) ;
Buggy code:
class LoadDisseminator extends TimerTask { private static final Logger logger_ = Logger . getLogger ( LoadDisseminator . class ) ; protected static final String loadInfo_ = "LOAD-INFORMATION" ; public void run ( ) { String diskUtilization = String . valueOf ( instance . getLoad ( ) ) ; if ( LoadDisseminator . logger_ . isDebugEnabled ( ) ) LoadDisseminator . logger_ . debug ( "Disseminating<seq2seq4repair_space>load<seq2seq4repair_space>info<seq2seq4repair_space>..." ) ; <START_BUG> Gossiper . instance . addApplicationState ( LoadDisseminator . loadInfo_ , new ApplicationState ( diskUtilization ) ) ; <END_BUG> } }

Fix:
Gossiper . instance . addLocalApplicationState ( LoadDisseminator . loadInfo_ , new ApplicationState ( diskUtilization ) ) ;
Buggy code:
public class TestStressAdvance extends LuceneTestCase { public void testStressAdvance ( ) throws Exception { for ( int iter = 0 ; iter < 3 ; iter ++ ) { if ( VERBOSE ) { System . out . println ( ( "\nTEST:<seq2seq4repair_space>iter=" + iter ) ) ; } Directory dir = newDirectory ( ) ; RandomIndexWriter w = new RandomIndexWriter ( random , dir ) ; final Set < Integer > aDocs = new HashSet < Integer > ( ) ; final Document doc = new Document ( ) ; final Field f = newField ( "field" , "" , NOT_ANALYZED_NO_NORMS ) ; doc . add ( f ) ; final Field idField = newField ( "id" , "" , YES , NOT_ANALYZED_NO_NORMS ) ; doc . add ( idField ) ; <START_BUG> int num = atLeast ( 5000 ) ; <END_BUG> for ( int id = 0 ; id < num ; id ++ ) { if ( ( random . nextInt ( 4 ) ) == 3 ) { f . setValue ( "a" ) ; aDocs . add ( id ) ; } else { f . setValue ( "b" ) ; } idField . setValue ( ( "" + id ) ) ; w . addDocument ( doc ) ; } w . optimize ( ) ; final List < Integer > aDocIDs = new ArrayList < Integer > ( ) ; final List < Integer > bDocIDs = new ArrayList < Integer > ( ) ; final IndexReader r = w . getReader ( ) ; final int [ ] idToDocID = new int [ r . maxDoc ( ) ] ; for ( int docID = 0 ; docID < ( idToDocID . length ) ; docID ++ ) { int id = Integer . parseInt ( r . document ( docID ) . get ( "id" ) ) ; if ( aDocs . contains ( id ) ) { aDocIDs . add ( docID ) ; } else { bDocIDs . add ( docID ) ; } } final TermsEnum te = r . getSequentialSubReaders ( ) [ 0 ] . fields ( ) . terms ( "field" ) . iterator ( ) ; DocsEnum de = null ; for ( int iter2 = 0 ; iter2 < 10 ; iter2 ++ ) { if ( VERBOSE ) { System . out . println ( ( ( ( "\nTEST:<seq2seq4repair_space>iter=" + iter ) + "<seq2seq4repair_space>iter2=" ) + iter2 ) ) ; } assertEquals ( FOUND , te . seekCeil ( new BytesRef ( "a" ) ) ) ; de = te . docs ( null , de ) ; testOne ( de , aDocIDs ) ; assertEquals ( FOUND , te . seekCeil ( new BytesRef ( "b" ) ) ) ; de = te . docs ( null , de ) ; testOne ( de , bDocIDs ) ; } w . close ( ) ; r . close ( ) ; dir . close ( ) ; } } private void testOne ( DocsEnum docs , List < Integer > expected ) throws Exception { } }

Fix:
int num = atLeast ( 4097 ) ;
Buggy code:
public class PanelHolder { private static final String LOG = "PanelHolder" ; private ReaderActivity activity ; private Governor governor ; private PanelHolder sisterPanelHolder ; private SplitPanel panel ; private int position ; private Epub book ; private boolean isPanelHidden ; private boolean extractAudioFromThisPanel ; public PanelHolder ( int position , ReaderActivity activity , Governor governor ) { } public void setActivity ( ReaderActivity activity ) { } public int getPosition ( ) { } public void updatePosition ( int position ) { } public void setSisterPanelHolder ( PanelHolder panelHolder ) { } public PanelHolder getSisterPanelHolder ( ) { } public SplitPanel getPanel ( ) { } public boolean hasOpenPanel ( ) { } public void hideOrReappearPanel ( ) { } public void hidePanel ( ) { } public void reappearPanel ( ) { } public void closePanel ( ) { } public void changePanelWeight ( float weight ) { } public void changePanel ( SplitPanel p ) { } public void reAttachPanel ( ) { } public BookPanel getBookPanel ( ) { } public boolean isBookPanel ( ) { } public BookPanel getSisterBookPanel ( ) { } public SelectionWebView getSisterWebView ( ) { } public Epub getBook ( ) { } public boolean openBook ( String path ) { } public void setBookPage ( String page ) { } public void loadPageIntoView ( String pathOfPage ) { } public void changeChapter ( boolean forward ) { } public void changeCSS ( String [ ] settings ) { } public void setNote ( String page ) { } public boolean displayMetadata ( ) { } public boolean displayToC ( ) { } public String [ ] getLanguagesInABook ( ) { } public boolean extractAudio ( ) { } public boolean canExtractAudio ( ) { } public int loadPanel ( SharedPreferences preferences , boolean creatingActivity ) { Log . d ( PanelHolder . LOG , "PanelHolder.loadPanel" ) ; if ( ( ( panel ) == null ) || ( ! ( panel . selfCheck ( creatingActivity ) ) ) ) { Log . d ( PanelHolder . LOG , "PanelHolder.loadPanel<seq2seq4repair_space>-<seq2seq4repair_space>creating<seq2seq4repair_space>panel<seq2seq4repair_space>from<seq2seq4repair_space>memory" ) ; panel = newPanelByClassName ( preferences . getString ( ( ( getS ( ViewType ) ) + ( position ) ) , "" ) ) ; if ( ( panel ) != null ) { panel . updatePosition ( position ) ; if ( ( panel ) instanceof AudioPanel ) { ( ( AudioPanel ) ( panel ) ) . setAudioList ( sisterPanelHolder . book . getAudio ( ) ) ; } <START_BUG> panel . loadState ( preferences ) ; <END_BUG> } } else if ( creatingActivity ) { if ( isBookPanel ( ) ) { getBookPanel ( ) . loadScrollPosition ( preferences ) ; } } if ( ( ( panel ) != null ) && ( ! ( panel . isAdded ( ) ) ) ) { activity . addPanel ( panel ) ; } return ( panel ) != null ? 1 : 0 ; } public void saveState ( Editor editor ) { } public boolean loadState ( SharedPreferences preferences , boolean creatingActivity ) { } private SplitPanel newPanelByClassName ( String className ) { } private String getS ( int id ) { } public void onRuntimeChange ( ) { } }

Fix:
panel . loadState ( preferences , creatingActivity ) ;
Buggy code:
public class WebServiceWebServiceProviderCoExistRuleTest extends AbstractAnnotationValidationTest { @ Override protected Annotation getAnnotation ( ) { } @ Override protected String getClassContents ( ) { StringBuilder classContents = new StringBuilder ( "package<seq2seq4repair_space>com.example;\n\n" ) ; classContents . append ( "import<seq2seq4repair_space>javax.jws.WebService;\n\n" ) ; <START_BUG> classContents . append ( "@WebService(name=\"MyClass\",<seq2seq4repair_space>endpointInterface=\"MyInterface\",<seq2seq4repair_space>" ) ; <END_BUG> classContents . append ( "targetNamespace=\"http:////example.com//\",<seq2seq4repair_space>portName=\"MyClassPort\",<seq2seq4repair_space>" ) ; classContents . append ( "serviceName=\"MyClassService\")\n" ) ; classContents . append ( "public<seq2seq4repair_space>class<seq2seq4repair_space>MyClass<seq2seq4repair_space>{\n\n" ) ; classContents . append ( ( "\tpublic<seq2seq4repair_space>String<seq2seq4repair_space>myMethod()<seq2seq4repair_space>{" + "\n\t\treturn<seq2seq4repair_space>\"txt\";\n\t}\n\n}" ) ) ; return classContents . toString ( ) ; } @ Override protected String getClassName ( ) { } @ Override protected String getPackageName ( ) { } public void testWebServiceWebServiceProviderCoExistRule ( ) { } }

Fix:
classContents . append ( "@WebService(endpointInterface=\"MyInterface\",<seq2seq4repair_space>" ) ;
Buggy code:
public class StartRunnable extends BukkitRunnable { private Main main ; private boolean start ; private ArrayList < Material > listMap ; private boolean starter ; private int startTime = 15 ; public StartRunnable ( Main main , boolean start , ArrayList < Material > listMap ) { } @ Override public void run ( ) { if ( ! ( start ) ) { Bukkit . getOnlinePlayers ( ) . forEach ( ( player ) -> { player . getInventory ( ) . clear ( ) ; player . setGameMode ( GameMode . SPECTATOR ) ; player . setScoreboard ( main . getBoard ( ) ) ; player . getPlayer ( ) . updateInventory ( ) ; Title . sendTitle ( player , 10 , 100 , 10 , ( ChatColor . DARK_RED + "En<seq2seq4repair_space>Attente<seq2seq4repair_space>de<seq2seq4repair_space>joueurs." ) , ( ChatColor . GRAY + "Plus<seq2seq4repair_space>de<seq2seq4repair_space>joueurs<seq2seq4repair_space>sont<seq2seq4repair_space>requis<seq2seq4repair_space>au<seq2seq4repair_space>bon<seq2seq4repair_space>déroulement<seq2seq4repair_space>d'une<seq2seq4repair_space>partie." ) ) ; } ) ; main . getTeams ( ) . forEach ( ( team ) -> team . reset ( ) ) ; Resetc . reset ( new Location ( main . getServer ( ) . getWorld ( "World" ) , ( - 434 ) , 68 , 1272 ) , new Location ( main . getServer ( ) . getWorld ( "World" ) , ( - 513 ) , 41 , 1333 ) , listMap ) ; <START_BUG> if ( ( Bukkit . getOnlinePlayers ( ) . size ( ) ) >= 1 ) { <END_BUG> if ( ! ( starter ) ) { new Starter ( main , this ) . runTaskLater ( main , 300 ) ; starter = true ; startTime = 15 ; } Bukkit . getOnlinePlayers ( ) . forEach ( ( player ) -> Title . sendTitle ( player , 10 , 100 , 10 , ( ( ( ChatColor . DARK_GRAY + "" ) + ( startTime ) ) + "<seq2seq4repair_space>secondes" ) , ( ChatColor . GRAY + "Avant<seq2seq4repair_space>le<seq2seq4repair_space>debut<seq2seq4repair_space>de<seq2seq4repair_space>la<seq2seq4repair_space>partie" ) ) ) ; if ( ( starter ) == true ) { ( startTime ) -- ; } else { startTime = 15 ; } } } } public void setFalse ( ) { } public void setTrue ( ) { } public void setStartFalse ( ) { } }

Fix:
if ( ( Bukkit . getOnlinePlayers ( ) . size ( ) ) > 1 ) {
Buggy code:
public class Record implements Serializable , Map < String , Object > { private static final long serialVersionUID = 4614645901639942051L ; public static Record create ( ResultSet rs ) { try { Record re = new Record ( ) ; ResultSetMetaData meta = rs . getMetaData ( ) ; int count = meta . getColumnCount ( ) ; for ( int i = 1 ; i <= count ; i ++ ) { String name = meta . getColumnLabel ( i ) ; switch ( meta . getColumnType ( i ) ) { case Types . TIMESTAMP : { <START_BUG> re . set ( name , re . getTimestamp ( name ) ) ; <END_BUG> break ; } case Types . CLOB : { re . set ( name , rs . getString ( i ) ) ; break ; } default : re . set ( name , rs . getObject ( i ) ) ; break ; } re . setSqlType ( name , meta . getColumnType ( i ) ) ; } return re ; } catch ( SQLException e ) { throw Lang . wrapThrow ( e ) ; } } private Map < String , Object > map ; private Map < String , Integer > sqlTypeMap ; public Record ( ) { } public Record set ( String name , Object value ) { } public Object remove ( String name ) { } public int getColumnCount ( ) { } public Set < String > getColumnNames ( ) { } public int getInt ( String name ) { } public String getString ( String name ) { } public Timestamp getTimestamp ( String name ) { } public String toJson ( JsonFormat format ) { } public String toString ( ) { } public < T > T toPojo ( Class < T > type ) { } public void clear ( ) { } public boolean containsKey ( Object key ) { } public boolean containsValue ( Object value ) { } public Set < Map . Entry < String , Object > > entrySet ( ) { } public boolean equals ( Object out ) { } public Object get ( Object name ) { } public int hashCode ( ) { } public boolean isEmpty ( ) { } public Set < String > keySet ( ) { } public Object put ( String name , Object value ) { } public void putAll ( Map < ? extends String , ? extends Object > out ) { } public Object remove ( Object key ) { } public int size ( ) { } public Collection < Object > values ( ) { } public Chain toChain ( ) { } public int getSqlType ( String name ) { } protected void setSqlType ( String name , int value ) { } }

Fix:
re . set ( name , rs . getTimestamp ( name ) ) ;
Buggy code:
class MasterDomainControllerOperationHandlerImpl implements ManagementRequestHandlerFactory { private final DomainController domainController ; private final Executor asyncExecutor ; public MasterDomainControllerOperationHandlerImpl ( final DomainController domainController , final Executor asyncExecutor ) { } @ Override public ManagementRequestHandler < ? , ? > resolveHandler ( RequestHandlerChain handlers , ManagementRequestHeader header ) { } private class UnregisterOperation extends MasterDomainControllerOperationHandlerImpl . AbstractHostRequestHandler { @ Override void handleRequest ( String hostId , DataInput input , ManagementRequestContext < Void > context ) throws IOException { <START_BUG> domainController . unregisterRemoteHost ( hostId , null ) ; <END_BUG> final FlushableDataOutput os = writeGenericResponseHeader ( context ) ; try { os . write ( RESPONSE_END ) ; os . close ( ) ; } finally { StreamUtils . safeClose ( os ) ; } } } private class GetFileOperation extends MasterDomainControllerOperationHandlerImpl . AbstractHostRequestHandler { private final DomainRemoteFileRequestAndHandler remoteSupport = new DomainRemoteFileRequestAndHandler ( asyncExecutor ) ; @ Override void handleRequest ( String hostId , DataInput input , ManagementRequestContext < Void > context ) throws IOException { final RootFileReader reader = new RootFileReader ( ) { public File readRootFile ( byte rootId , String filePath ) throws RequestProcessingException { final HostFileRepository localFileRepository = domainController . getLocalFileRepository ( ) ; switch ( rootId ) { case DomainControllerProtocol . PARAM_ROOT_ID_FILE : { return localFileRepository . getFile ( filePath ) ; } case DomainControllerProtocol . PARAM_ROOT_ID_CONFIGURATION : { return localFileRepository . getConfigurationFile ( filePath ) ; } case DomainControllerProtocol . PARAM_ROOT_ID_DEPLOYMENT : { byte [ ] hash = HashUtil . hexStringToByteArray ( filePath ) ; return localFileRepository . getDeploymentRoot ( hash ) ; } default : { throw ROOT_LOGGER . invalidRootId ( rootId ) ; } } } } ; remoteSupport . handleRequest ( input , reader , context ) ; } } abstract static class AbstractHostRequestHandler implements ManagementRequestHandler < ModelNode , Void > { abstract void handleRequest ( final String hostId , DataInput input , ManagementRequestContext < Void > context ) throws IOException ; @ Override public void handleRequest ( DataInput input , ActiveOperation . ResultHandler < ModelNode > resultHandler , ManagementRequestContext < Void > context ) throws IOException { } protected FlushableDataOutput writeGenericResponseHeader ( final ManagementRequestContext < Void > context ) throws IOException { } } }

Fix:
domainController . unregisterRemoteHost ( hostId , null , true ) ;