nus-yam/ex-repair huggingface dataset:
Buggy code:
public final class DeferredAttrNSImpl extends AttrNSImpl implements DeferredNode { static final long serialVersionUID = 6074924934945957154L ; protected transient int fNodeIndex ; DeferredAttrNSImpl ( DeferredDocumentImpl ownerDocument , int nodeIndex ) { } public int getNodeIndex ( ) { } protected void synchronizeData ( ) { needsSyncData ( false ) ; DeferredDocumentImpl ownerDocument = ( ( DeferredDocumentImpl ) ( ownerDocument ( ) ) ) ; int attrQName = ownerDocument . getNodeName ( fNodeIndex ) ; StringPool pool = ownerDocument . getStringPool ( ) ; name = pool . toString ( attrQName ) ; int index = name . indexOf ( ':' ) ; String prefix ; if ( index < 0 ) { prefix = null ; localName = name ; } else { prefix = name . substring ( 0 , index ) ; localName = name . substring ( ( index + 1 ) ) ; } isSpecified ( ( ( ownerDocument . getNodeValue ( fNodeIndex ) ) == 1 ) ) ; namespaceURI = pool . toString ( ownerDocument . getNodeURI ( fNodeIndex ) ) ; <START_BUG> if ( ( ( namespaceURI ) == null ) && ( ( namespaceURI . length ( ) ) == 0 ) ) { <END_BUG> if ( prefix != null ) { if ( prefix . equals ( "xmlns" ) ) { namespaceURI = "http:////www.w3.org//2000//xmlns//" ; } } else if ( name . equals ( "xmlns" ) ) { namespaceURI = "http:////www.w3.org//2000//xmlns//" ; } } } protected void synchronizeChildren ( ) { } }

Fix:
if ( ( ( namespaceURI ) == null ) || ( ( namespaceURI . length ( ) ) == 0 ) ) {
Buggy code:
public class JSFMetadataProcessor implements DeploymentUnitProcessor { public static final String JAVAX_FACES_WEBAPP_FACES_SERVLET = "javax.faces.webapp.FacesServlet" ; @ Override public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; WarMetaData metaData = deploymentUnit . getAttachment ( ATTACHMENT_KEY ) ; if ( ( ( metaData == null ) || ( ( metaData . getMergedJBossWebMetaData ( ) ) == null ) ) || ( ( metaData . getMergedJBossWebMetaData ( ) . getServlets ( ) ) == null ) ) { return ; } JBossServletMetaData jsf = null ; for ( JBossServletMetaData servlet : metaData . getMergedJBossWebMetaData ( ) . getServlets ( ) ) { <START_BUG> if ( JSFMetadataProcessor . JAVAX_FACES_WEBAPP_FACES_SERVLET . equals ( servlet . getServletClass ( ) ) ) { <END_BUG> jsf = servlet ; } } if ( jsf != null ) { if ( ( jsf . getMultipartConfig ( ) ) == null ) { jsf . setMultipartConfig ( new MultipartConfigMetaData ( ) ) ; } } } @ Override public void undeploy ( DeploymentUnit context ) { } }

Fix:
if ( servlet . getServletClass ( ) . equals ( JSFMetadataProcessor . JAVAX_FACES_WEBAPP_FACES_SERVLET ) ) {
Buggy code:
public class SystemInfoHandler extends RequestHandlerBase { private static Logger log = LoggerFactory . getLogger ( SystemInfoHandler . class ) ; private String hostname = null ; private CoreContainer cc ; public SystemInfoHandler ( ) { } public SystemInfoHandler ( CoreContainer cc ) { } private void init ( ) { } @ Override public void handleRequestBody ( SolrQueryRequest req , SolrQueryResponse rsp ) throws Exception { } private CoreContainer getCoreContainer ( SolrQueryRequest req , SolrCore core ) { } private SimpleOrderedMap < Object > getCoreInfo ( SolrCore core , IndexSchema schema ) { } public static SimpleOrderedMap < Object > getSystemInfo ( ) { SimpleOrderedMap < Object > info = new SimpleOrderedMap < Object > ( ) ; OperatingSystemMXBean os = ManagementFactory . getOperatingSystemMXBean ( ) ; info . add ( "name" , os . getName ( ) ) ; info . add ( "version" , os . getVersion ( ) ) ; info . add ( "arch" , os . getArch ( ) ) ; info . add ( "systemLoadAverage" , os . getSystemLoadAverage ( ) ) ; SystemInfoHandler . addGetterIfAvaliable ( os , "committedVirtualMemorySize" , info ) ; SystemInfoHandler . addGetterIfAvaliable ( os , "freePhysicalMemorySize" , info ) ; SystemInfoHandler . addGetterIfAvaliable ( os , "freeSwapSpaceSize" , info ) ; SystemInfoHandler . addGetterIfAvaliable ( os , "processCpuTime" , info ) ; SystemInfoHandler . addGetterIfAvaliable ( os , "totalPhysicalMemorySize" , info ) ; SystemInfoHandler . addGetterIfAvaliable ( os , "totalSwapSpaceSize" , info ) ; SystemInfoHandler . addGetterIfAvaliable ( os , "openFileDescriptorCount" , info ) ; SystemInfoHandler . addGetterIfAvaliable ( os , "maxFileDescriptorCount" , info ) ; try { if ( ! ( os . getName ( ) . toLowerCase ( Locale . ROOT ) . startsWith ( "windows" ) ) ) { info . add ( "uname" , SystemInfoHandler . execute ( "uname<seq2seq4repair_space>-a" ) ) ; info . add ( "uptime" , SystemInfoHandler . execute ( "uptime" ) ) ; } <START_BUG> } catch ( Throwable ex ) { <END_BUG> ex . printStackTrace ( ) ; } return info ; } static void addGetterIfAvaliable ( Object obj , String getter , NamedList < Object > info ) { } private static String execute ( String cmd ) { } public static SimpleOrderedMap < Object > getJvmInfo ( ) { } private static SimpleOrderedMap < Object > getLuceneInfo ( ) { } @ Override public String getDescription ( ) { } @ Override public String getSource ( ) { } private static final long ONE_KB = 1024 ; private static final long ONE_MB = ( SystemInfoHandler . ONE_KB ) * ( SystemInfoHandler . ONE_KB ) ; private static final long ONE_GB = ( SystemInfoHandler . ONE_KB ) * ( SystemInfoHandler . ONE_MB ) ; private static String humanReadableUnits ( long bytes , DecimalFormat df ) { } }

Fix:
} catch ( Exception ex ) {
Buggy code:
public class Enemy extends Agent { float damage = Settings . ENEMY_DAMAGE ; public int goldDrop ; public int expDrop ; float engageRadius = Settings . ENEMY_ENGAGE_RADIUS ; float disengageRadius = Settings . ENEMY_DISENGAGE_RADIUS ; float attackRadius = Settings . ENEMY_MELEE_RADIUS ; float nextAttackTime ; float attackDelay = 200.0F ; float nextChargeTime = 0 ; float chargeDelay = Settings . CHARGE_DELAY ; float minChargeDistance = Settings . MIN_CHARGE_DISTANCE ; float maxChargeDistance = Settings . MAX_CHARGE_DISTANCE ; float chargeTime = Settings . CHARGE_TIME ; float chargeEndTime = 0 ; int chargeScalar = Settings . CHARGE_SCALAR ; public boolean isChasing = false ; public boolean isShot = false ; public boolean isMelee = false ; public boolean isCharging = false ; Vector2f chargePoint ; public Agent target ; public Player shooter ; public Enemy ( Vector2f position , int level , boolean isMelee ) { } @ Override public void update ( float dt ) { } private void chasePlayer ( Agent agent , float dt ) { Vector2f delta = target . position . copy ( ) . sub ( position ) ; float dist = VectorUtility . getDistanceToEntity ( this , agent ) ; if ( ( ( ( ( isMelee ) && ( ( nextChargeTime ) < ( World . TIME ) ) ) && ( ! ( isCharging ) ) ) && ( dist > ( minChargeDistance ) ) ) && ( dist < ( maxChargeDistance ) ) ) { speedForce = ( speedForce ) * ( chargeScalar ) ; chargeEndTime = ( chargeTime ) + ( World . TIME ) ; nextChargeTime = ( chargeDelay ) + ( World . TIME ) ; isCharging = true ; } else <START_BUG> if ( ( isCharging ) && ( ( chargeEndTime ) == ( World . TIME ) ) ) { <END_BUG> speedForce = Settings . ENEMY_SPEED_FORCE ; isCharging = false ; } if ( dist < ( attackRadius ) ) { if ( isShot ) isShot = false ; if ( ( nextAttackTime ) < ( World . TIME ) ) { if ( isMelee ) { if ( ! ( isCharging ) ) { agent . takeDamage ( this , damage ) ; nextAttackTime = ( World . TIME ) + ( attackDelay ) ; } } else { rotation = calculateAngleToTarget ( target ) ; rangedAttack ( ) ; } } } else if ( ( dist > ( disengageRadius ) ) && ( ! ( isShot ) ) ) { target = null ; isChasing = false ; } else { move ( dt , delta ) ; } } protected void rangedAttack ( ) { } @ Override protected void move ( float dt , Vector2f input ) { } @ Override public void render ( Graphics graphics ) { } private Player getClosestPlayer ( ) { } @ Override public float getDamage ( ) { } @ Override public void die ( ) { } @ Override public void collides ( Entity other ) { } @ Override protected void attack ( ) { } }

Fix:
if ( ( isCharging ) && ( ( chargeEndTime ) <= ( World . TIME ) ) ) {
Buggy code:
public class MoveMessageAction extends FrameAction implements SelectionListener { public MoveMessageAction ( AbstractFrameController frameController ) { } public void actionPerformed ( ActionEvent evt ) { SelectFolderDialog dialog = treeModel . getSelectFolderDialog ( ) ; if ( dialog . success ( ) ) { Folder destFolder = dialog . getSelectedFolder ( ) ; FolderCommandReference [ ] result = new FolderCommandReference [ 2 ] ; <START_BUG> FolderCommandReference [ ] r1 = ( ( org . columba . mail . gui . frame . AbstractMailFrameController ) ( getFrameController ( ) ) ) . getTableSelection ( ) ; <END_BUG> FolderCommandReference r2 = new FolderCommandReference ( destFolder ) ; result [ 0 ] = r1 [ 0 ] ; result [ 1 ] = r2 ; MoveMessageCommand c = new MoveMessageCommand ( result ) ; processor . addOp ( c ) ; } } public void selectionChanged ( SelectionChangedEvent e ) { } }

Fix:
FolderCommandReference [ ] r1 = ( ( org . columba . mail . gui . frame . AbstractMailFrameController ) ( getFrameMediator ( ) ) ) . getTableSelection ( ) ;
Buggy code:
public class MainFrame extends JFrame implements Remoteable , TestListener { private static transient Logger log = Hierarchy . getDefaultHierarchy ( ) . getLoggerFor ( "jmeter.gui" ) ; JPanel all ; JPanel mainPanel ; Box toolPanel ; JScrollPane treePanel ; JMeterMenuBar menuBar ; JTree tree ; TreeModel treeModel ; ActionListener actionHandler ; JMeterTreeListener treeListener ; ImageIcon runningIcon = JMeterUtils . getImage ( "thread.enabled.gif" ) ; ImageIcon stoppedIcon = JMeterUtils . getImage ( "thread.disabled.gif" ) ; JButton runningIndicator ; private boolean running ; int previousDragXLocation = 0 ; int previousDragYLocation = 0 ; private Set hosts = new HashSet ( ) ; JDialog stoppingMessage ; public MainFrame ( ActionListener actionHandler , TreeModel treeModel , JMeterTreeListener treeListener ) { } public MainFrame ( ) { } public void setFileSaveEnabled ( boolean enabled ) { } public void showStoppingMessage ( String host ) { } public void setFileLoadEnabled ( boolean enabled ) { } public void setEditAddMenu ( JMenu menu ) { } public void setEditMenu ( JPopupMenu menu ) { } public void setEditAddEnabled ( boolean enabled ) { } public void setEditRemoveEnabled ( boolean enabled ) { } public void setEditEnabled ( boolean enabled ) { } public void closeMenu ( ) { } public void setMainPanel ( JComponent comp ) { } public JTree getTree ( ) { } public void testStarted ( String host ) { } public void testStarted ( ) { } public void testEnded ( ) { } public void testEnded ( String host ) { } private void init ( ) { } private TreeCellRenderer getCellRenderer ( ) { } private void addThemAll ( ) { this . setJMenuBar ( menuBar ) ; all = new JPanel ( new GridBagLayout ( ) ) ; GridBagConstraints gbc = new GridBagConstraints ( ) ; { gbc . gridx = 0 ; gbc . gridy = 0 ; gbc . gridheight = 1 ; gbc . gridwidth = 1 ; <START_BUG> gbc . fill = gbc . BOTH ; <END_BUG> gbc . weightx = 1 ; gbc . weighty = 0 ; all . add ( toolPanel , gbc . clone ( ) ) ; } JSplitPane treeAndMain = new JSplitPane ( JSplitPane . HORIZONTAL_SPLIT ) ; treeAndMain . setLeftComponent ( treePanel ) ; treeAndMain . setRightComponent ( new JScrollPane ( mainPanel ) ) ; treeAndMain . setContinuousLayout ( true ) ; { ( gbc . gridy ) ++ ; gbc . weighty = 1 ; all . add ( treeAndMain , gbc . clone ( ) ) ; } this . getContentPane ( ) . add ( all ) ; } private void createToolBar ( ) { } private void createTreePanel ( ) { } public void drawDraggedComponent ( Component dragIcon , int x , int y ) { } private void createMainPanel ( ) { } private JTree makeTree ( ) { } private class WindowHappenings extends WindowAdapter { public void windowClosing ( WindowEvent event ) { } } public void testIterationStart ( IterationEvent event ) { } }

Fix:
gbc . fill = GridBagConstraints . BOTH ;
Buggy code:
public class BindingAddHandler extends SocketBindingAddHandler { public static final BindingAddHandler INSTANCE = new BindingAddHandler ( ) ; private static final InetAddress ANY_IPV6 ; private BindingAddHandler ( ) { } @ Override protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { } @ Override protected boolean requiresRuntime ( OperationContext context ) { } @ Override protected boolean requiresRuntimeVerification ( ) { } public static ServiceController < SocketBinding > installBindingService ( OperationContext context , ModelNode config , String name ) throws UnknownHostException , OperationFailedException { final ServiceTarget serviceTarget = context . getServiceTarget ( ) ; final ModelNode intfNode = INTERFACE . resolveModelAttribute ( context , config ) ; final String intf = ( intfNode . isDefined ( ) ) ? intfNode . asString ( ) : null ; <START_BUG> final int port = PORT . resolveModelAttribute ( context , config ) . asInt ( ) ; <END_BUG> final boolean fixedPort = FIXED_PORT . resolveModelAttribute ( context , config ) . asBoolean ( ) ; final ModelNode mcastNode = MULTICAST_ADDRESS . resolveModelAttribute ( context , config ) ; final String mcastAddr = ( mcastNode . isDefined ( ) ) ? mcastNode . asString ( ) : null ; final int mcastPort = MULTICAST_PORT . resolveModelAttribute ( context , config ) . asInt ( 0 ) ; final InetAddress mcastInet = ( mcastAddr == null ) ? null : InetAddress . getByName ( mcastAddr ) ; final ModelNode mappingsNode = config . get ( CLIENT_MAPPINGS ) ; final List < ClientMapping > clientMappings = ( mappingsNode . isDefined ( ) ) ? BindingAddHandler . parseClientMappings ( mappingsNode ) : null ; final SocketBindingService service = new SocketBindingService ( name , port , fixedPort , mcastInet , mcastPort , clientMappings ) ; final ServiceBuilder < SocketBinding > builder = serviceTarget . addService ( JBOSS_BINDING_NAME . append ( name ) , service ) ; if ( intf != null ) { builder . addDependency ( JBOSS_NETWORK_INTERFACE . append ( intf ) , NetworkInterfaceBinding . class , service . getInterfaceBinding ( ) ) ; } return builder . addDependency ( SOCKET_BINDING_MANAGER , SocketBindingManager . class , service . getSocketBindings ( ) ) . setInitialMode ( ON_DEMAND ) . install ( ) ; } public static List < ClientMapping > parseClientMappings ( ModelNode mappings ) throws OperationFailedException { } }

Fix:
final int port = PORT . resolveModelAttribute ( context , config ) . asInt ( 0 ) ;
Buggy code:
public class ThemeRegistryReader extends RegistryReader { private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle . getBundle ( ThemeRegistryReader . class . getName ( ) ) ; private Collection categoryDefinitions = new HashSet ( ) ; private Collection colorDefinitions = new HashSet ( ) ; private Collection fontDefinitions = new HashSet ( ) ; private ThemeDescriptor themeDescriptor = null ; private ThemeRegistry themeRegistry ; private Map dataMap = new HashMap ( ) ; public ThemeRegistryReader ( ) { } public Collection getCategoryDefinitions ( ) { } public Collection getColorDefinitions ( ) { } public Map getData ( ) { } public Collection getFontDefinitions ( ) { } private ThemeElementCategory readCategory ( IConfigurationElement element ) { String name = element . getAttribute ( ATT_LABEL ) ; String id = element . getAttribute ( ATT_ID ) ; String parentId = element . getAttribute ( ATT_PARENT_ID ) ; String description = null ; IConfigurationElement [ ] descriptions = element . getChildren ( TAG_DESCRIPTION ) ; if ( ( descriptions . length ) > 0 ) description = descriptions [ 0 ] . getValue ( ) ; <START_BUG> return new ThemeElementCategory ( name , id , parentId , description , element . getDeclaringExtension ( ) . getNamespace ( ) , element ) ; <END_BUG> } private ColorDefinition readColor ( IConfigurationElement element ) { } private String getColorValue ( IConfigurationElement element ) { } private String getPlatformSpecificColorValue ( IConfigurationElement [ ] elements ) { } private IConfigurationElement getBestPlatformMatch ( IConfigurationElement [ ] elements ) { } public boolean readElement ( IConfigurationElement element ) { } private FontDefinition readFont ( IConfigurationElement element ) { } private String getPlatformSpecificFontValue ( IConfigurationElement [ ] elements ) { } private String getFontValue ( IConfigurationElement element ) { } private String checkColorFactory ( IConfigurationElement element ) { } protected ThemeDescriptor readTheme ( IConfigurationElement element ) { } public void readThemes ( IExtensionRegistry in , ThemeRegistry out ) { } public void setRegistry ( ThemeRegistry out ) { } }

Fix:
return new ThemeElementCategory ( name , id , parentId , description , element . getNamespace ( ) , element ) ;
Buggy code:
public class Utils { public static int getClusterID ( String ipAddress , int port , int no_clusters ) { int result = ipAddress . hashCode ( ) ; result = ( 31 * result ) + port ; <START_BUG> return result % no_clusters ; <END_BUG> } }

Fix:
return Math . abs ( ( result % no_clusters ) ) ;
Buggy code:
public class DemoActivity extends ActionBarActivity { private static final String TAG = "DemoActivity" ; private SlidingPanelLayout mLayout ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; <START_BUG> setContentView ( activity_horizontal_demo ) ; <END_BUG> setSupportActionBar ( ( ( Toolbar ) ( findViewById ( main_toolbar ) ) ) ) ; mLayout = ( ( SlidingPanelLayout ) ( findViewById ( sliding_layout ) ) ) ; mLayout . setPanelSlideListener ( new PanelSlideListener ( ) { @ Override public void onPanelSlide ( View panel , float slideOffset ) { Log . i ( DemoActivity . TAG , ( "onPanelSlide,<seq2seq4repair_space>offset<seq2seq4repair_space>" + slideOffset ) ) ; } @ Override public void onPanelExpanded ( View panel ) { Log . i ( DemoActivity . TAG , "onPanelExpanded" ) ; } @ Override public void onPanelCollapsed ( View panel ) { Log . i ( DemoActivity . TAG , "onPanelCollapsed" ) ; } @ Override public void onPanelAnchored ( View panel ) { Log . i ( DemoActivity . TAG , "onPanelAnchored" ) ; } @ Override public void onPanelHidden ( View panel ) { Log . i ( DemoActivity . TAG , "onPanelHidden" ) ; } } ) ; TextView t = ( ( TextView ) ( findViewById ( main ) ) ) ; t . setOnClickListener ( new OnClickListener ( ) { @ Override public void onClick ( View v ) { mLayout . setPanelState ( COLLAPSED ) ; } } ) ; t = ( ( TextView ) ( findViewById ( name ) ) ) ; t . setText ( Html . fromHtml ( getString ( hello ) ) ) ; Button f = ( ( Button ) ( findViewById ( follow ) ) ) ; f . setText ( Html . fromHtml ( getString ( R . string . follow ) ) ) ; f . setMovementMethod ( LinkMovementMethod . getInstance ( ) ) ; f . setOnClickListener ( new OnClickListener ( ) { @ Override public void onClick ( View v ) { Intent i = new Intent ( Intent . ACTION_VIEW ) ; i . setData ( Uri . parse ( "http:////www.twitter.com//umanoapp" ) ) ; startActivity ( i ) ; } } ) ; } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onPrepareOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override public void onBackPressed ( ) { } }

Fix:
setContentView ( activity_demo ) ;
Buggy code:
public class HTTPSampler2 extends HTTPSamplerBase implements Interruptible { private static final long serialVersionUID = 240L ; private final transient HTTPHC3Impl hc ; public HTTPSampler2 ( ) { } @ Override public boolean interrupt ( ) { } @ Override protected HTTPSampleResult sample ( URL u , String method , boolean areFollowingRedirect , int depth ) { } protected HttpClient setupConnection ( URL url , HttpMethodBase httpMethod , HTTPSampleResult res ) throws IOException { } protected void saveConnectionCookies ( HttpMethod httpMethod , URL url , CookieManager cookieManager ) { } protected String getResponseHeaders ( HttpMethod httpMethod ) { } protected String getConnectionHeaders ( HttpMethod httpMethod ) { } protected void setSavedClient ( HttpClient savedClient ) { } @ Override public void testIterationStart ( LoopIterationEvent event ) { <START_BUG> hc . testIterationStart ( event ) ; <END_BUG> } }

Fix:
hc . notifyFirstSampleAfterLoopRestart ( ) ;
Buggy code:
public class PefilActivity extends ActionBarActivity { @ Override protected void onCreate ( Bundle savedInstanceState ) { } private void requestInfoUser ( ) { } private void showUserInfo ( GraphUser user ) { TextView textViewPerfil = ( ( TextView ) ( findViewById ( textViewPerfil ) ) ) ; ImageView imageView = ( ( ImageView ) ( findViewById ( imageViewPerfil ) ) ) ; <START_BUG> String urlPicturePerfil = ( "https:////graph.facebook.com//" + ( user . getId ( ) ) ) + "//picture?width=240&height=240" ; <END_BUG> Picasso . with ( this ) . load ( urlPicturePerfil ) . transform ( new CirclePicture ( ) ) . into ( imageView ) ; String fistName = ( ( ( ( getString ( text_fist_name ) ) + "<seq2seq4repair_space>" ) + ( user . getFirstName ( ) ) ) + "\n" ) + "\n" ; String lastName = ( ( ( ( getString ( text_last_name ) ) + "<seq2seq4repair_space>" ) + ( user . getLastName ( ) ) ) + "\n" ) + "\n" ; String gender = ( ( ( ( getString ( text_gender ) ) + "<seq2seq4repair_space>" ) + ( user . getProperty ( "gender" ) ) ) + "\n" ) + "\n" ; String email = ( ( ( ( getString ( text_email ) ) + "<seq2seq4repair_space>" ) + ( user . getProperty ( "email" ) ) ) + "\n" ) + "\n" ; String birthDay = ( ( getString ( text_birthday ) ) + "<seq2seq4repair_space>" ) + ( user . getBirthday ( ) ) ; textViewPerfil . setText ( ( ( ( ( fistName + lastName ) + gender ) + email ) + birthDay ) ) ; } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } }

Fix:
String urlPicturePerfil = ( "https:////graph.facebook.com//" + ( user . getId ( ) ) ) + "//picture?width=200&height=200" ;
Buggy code:
public class WeightedMFacetShort extends MFacetShort implements WeightedMFacet { public WeightedMFacetShort ( MultiValueFacetDataCache mDataCaches ) { } @ Override public void refresh ( int id ) { } <START_BUG> public boolean hasWeight ( long target ) { <END_BUG> for ( int i = 0 ; i < ( this . _length ) ; i ++ ) if ( ( ( ( TermShortList ) ( _mTermList ) ) . getPrimitiveValue ( _buf [ i ] ) ) == target ) { _weight [ 0 ] = weightBuf [ i ] ; return true ; } return false ; } @ Override public int getWeight ( ) { } }

Fix:
public boolean hasWeight ( short target ) {
Buggy code:
public abstract class Store { protected static final String snapshotsFile = "snapshots" ; protected static final String infoFile = "info" ; protected static final String traceFile = "trace" ; protected String separator = "//" ; final Map < String , Trace < ? > > traces = new HashMap < String , Trace < ? > > ( ) ; static final Map < String , Class < ? > > type_class_map = new HashMap < String , Class < ? > > ( ) ; private Set < Reader < ? > > openReaders = new java . util . HashSet < Reader < ? > > ( ) ; @ SuppressWarnings ( "serial" ) public class NoSuchTraceException extends Exception { private String trace_name ; public NoSuchTraceException ( String traceName ) { } @ Override public String toString ( ) { } } @ SuppressWarnings ( "serial" ) public class LoadTraceException extends Exception { private String _name ; public LoadTraceException ( String name ) { } @ Override public String toString ( ) { } } public static void buildTypeClassMap ( ) throws IOException { if ( Store . type_class_map . isEmpty ( ) ) { <START_BUG> Reflections reflections = new Reflections ( "//\\w+\\.class" ) ; <END_BUG> for ( Class < ? > klass : Reflections . getSubClasses ( Trace . class , reflections . listClasses ( "ditl" ) ) ) Store . addTraceClass ( klass ) ; } } public static void addTraceClass ( Class < ? > klass ) { } String traceFile ( String name ) { } String infoFile ( String name ) { } String snapshotsFile ( String name ) { } public Collection < Trace < ? > > listTraces ( ) { } public List < Trace < ? > > listTraces ( String type ) { } Reader . InputStreamOpener getStreamOpener ( final String name ) { } public abstract boolean hasFile ( String name ) { } public boolean hasTrace ( String name ) { } public Trace < ? > getTrace ( String name ) throws Store . NoSuchTraceException { } public abstract InputStream getInputStream ( String name ) throws IOException { } public String getTraceResource ( Trace < ? > trace , String resource ) throws IOException { } PersistentMap readTraceInfo ( String path ) throws IOException { } public static Store open ( File ... files ) throws IOException { } void notifyClose ( Reader < ? > reader ) { } void notifyOpen ( Reader < ? > reader ) { } public void close ( ) throws IOException { } public void loadTrace ( String name ) throws Store . LoadTraceException , IOException { } Trace < ? > buildTrace ( String name , PersistentMap info , String type ) throws Store . LoadTraceException { } }

Fix:
Reflections reflections = new Reflections ( "\\w+\\.class" ) ;
Buggy code:
public class EditorSashContainer extends PartSashContainer { private static final String DEFAULT_WORKBOOK_ID = "DefaultEditorWorkbook" ; private ArrayList editorWorkbooks = new ArrayList ( 3 ) ; private EditorStack activeEditorWorkbook ; private DropTarget dropTarget ; public EditorSashContainer ( String editorId , WorkbenchPage page , Composite parent ) { } public void addEditor ( EditorPane pane , EditorStack stack ) { } protected void childAdded ( LayoutPart child ) { } protected void childRemoved ( LayoutPart child ) { } protected EditorStack createDefaultWorkbook ( ) { } protected Composite createParent ( Composite parentWidget ) { } public void dispose ( ) { } protected void disposeParent ( ) { } public EditorStack getActiveWorkbook ( ) { } public String getActiveWorkbookID ( ) { } public ArrayList getEditorWorkbooks ( ) { } public int getEditorWorkbookCount ( ) { } protected boolean isActiveWorkbook ( EditorStack workbook ) { } public void findSashes ( LayoutPart pane , PartPane . Sashes sashes ) { } public void removeAllEditors ( ) { } public void removeEditor ( EditorPane pane ) { } public IStatus restoreState ( IMemento memento ) { } public IStatus saveState ( IMemento memento ) { } public void setActiveWorkbook ( EditorStack newWorkbook , boolean hasFocus ) { } public void setActiveWorkbookFromID ( String id ) { } public EditorStack getWorkbookFromID ( String id ) { } public void updateTabList ( ) { } public void createControl ( Composite parent ) { } private void addDropSupport ( ) { if ( ( dropTarget ) == null ) { WorkbenchWindowConfigurer winConfigurer = ( ( WorkbenchWindow ) ( page . getWorkbenchWindow ( ) ) ) . getWindowConfigurer ( ) ; <START_BUG> dropTarget = new DropTarget ( getControl ( ) , ( ( DND . DROP_DEFAULT ) | ( DND . DROP_COPY ) ) ) ; <END_BUG> dropTarget . setTransfer ( winConfigurer . getTransfers ( ) ) ; if ( ( winConfigurer . getDropTargetListener ( ) ) != null ) { dropTarget . addDropListener ( winConfigurer . getDropTargetListener ( ) ) ; } } } DropTarget getDropTarget ( ) { } public boolean isCompressible ( ) { } public boolean isStackType ( LayoutPart toTest ) { } public boolean isPaneType ( LayoutPart toTest ) { } protected PartStack createStack ( ) { } protected void setVisiblePart ( ILayoutContainer container , LayoutPart visiblePart ) { } protected LayoutPart getVisiblePart ( ILayoutContainer container ) { } public LayoutPart pickPartToZoom ( ) { } public IStatus restorePresentationState ( IMemento areaMem ) { } }

Fix:
dropTarget = new DropTarget ( getControl ( ) , ( ( ( DND . DROP_DEFAULT ) | ( DND . DROP_COPY ) ) | ( DND . DROP_LINK ) ) ) ;
Buggy code:
<START_BUG> public class SearchParams extends BaseSearchParams { <END_BUG> private String imName ; public SearchParams ( String imName ) { } public SearchParams setImName ( String imName ) { } public String getImName ( ) { } @ Override public Multimap < String , String > toMap ( ) { Multimap < String , String > map = super . toMap ( ) ; map . put ( "im_name" , imName ) ; return map ; } }

Fix:
public class SearchParams extends BaseSearchParams < SearchParams > {
Buggy code:
public class ByteArrayBuf implements ByteBuf { private final byte [ ] data ; private int pos ; private int limit ; public ByteArrayBuf ( byte [ ] data ) { } public byte [ ] array ( ) { } @ Override public int capacity ( ) { } @ Override public int position ( ) { } @ Override public ByteArrayBuf position ( int position ) { } @ Override public int limit ( ) { } @ Override public ByteArrayBuf limit ( int limit ) { } @ Override public ByteArrayBuf clear ( ) { } @ Override public ByteArrayBuf flip ( ) { } @ Override public int read ( ) throws IOException { <START_BUG> return data [ ( ( pos ) ++ ) ] ; <END_BUG> } @ Override public void read ( byte [ ] b , int off , int len ) throws IOException { } @ Override public String readStringUtf8 ( int len ) throws IOException { } @ Override public void write ( int b ) throws IOException { } @ Override public void write ( byte [ ] b , int off , int len ) throws IOException { } @ Override public void shift ( int position , int length , int distance ) { } public void copyTo ( ByteSink out ) throws IOException { } @ Override public void write2 ( int b1 , int b2 ) throws IOException { } @ Override public void write3 ( int b1 , int b2 , int b3 ) throws IOException { } @ Override public void write4 ( int b1 , int b2 , int b3 , int b4 ) throws IOException { } @ Override public void write5 ( int b1 , int b2 , int b3 , int b4 , int b5 ) throws IOException { } @ Override public void write6 ( int b1 , int b2 , int b3 , int b4 , int b5 , int b6 ) throws IOException { } @ Override public void write7 ( int b1 , int b2 , int b3 , int b4 , int b5 , int b6 , int b7 ) throws IOException { } @ Override public void write8 ( int b1 , int b2 , int b3 , int b4 , int b5 , int b6 , int b7 , int b8 ) throws IOException { } }

Fix:
return 255 & ( data [ ( ( pos ) ++ ) ] ) ;
Buggy code:
public class AsyncAppender extends AppenderSkeleton implements AppenderAttachable { public static final int DEFAULT_BUFFER_SIZE = 128 ; private BoundedFIFO bf = new BoundedFIFO ( AsyncAppender . DEFAULT_BUFFER_SIZE ) ; AppenderAttachableImpl aai ; private Dispatcher dispatcher ; private boolean locationInfo = false ; private boolean interruptedWarningMessage = false ; public AsyncAppender ( ) { } public void addAppender ( Appender newAppender ) { } public void append ( LoggingEvent event ) { <START_BUG> event . prepareForSerialization ( ) ; <END_BUG> if ( locationInfo ) { event . getLocationInformation ( ) ; } synchronized ( bf ) { while ( bf . isFull ( ) ) { try { bf . wait ( ) ; } catch ( InterruptedException e ) { if ( ! ( interruptedWarningMessage ) ) { interruptedWarningMessage = true ; getLogger ( ) . warn ( "AsyncAppender<seq2seq4repair_space>interrupted." , e ) ; } else { getLogger ( ) . warn ( "AsyncAppender<seq2seq4repair_space>interrupted<seq2seq4repair_space>again." ) ; } } } bf . put ( event ) ; if ( bf . wasEmpty ( ) ) { bf . notify ( ) ; } } } public void close ( ) { } public Enumeration getAllAppenders ( ) { } public Appender getAppender ( String name ) { } public boolean getLocationInfo ( ) { } public boolean isAttached ( Appender appender ) { } public boolean requiresLayout ( ) { } public void removeAllAppenders ( ) { } public void removeAppender ( Appender appender ) { } public void removeAppender ( String name ) { } public void setLocationInfo ( boolean flag ) { } public void setBufferSize ( int size ) { } public int getBufferSize ( ) { } }

Fix:
event . prepareForDeferredProcessing ( ) ;
Buggy code:
public class OrderPreservingPartitioner implements IPartitioner < StringToken > { public static final StringToken MINIMUM = new StringToken ( "" ) ; public static final BigInteger CHAR_MASK = new BigInteger ( "65535" ) ; public DecoratedKey < StringToken > decorateKey ( ByteBuffer key ) { } public DecoratedKey < StringToken > convertFromDiskFormat ( ByteBuffer key ) { } public StringToken midpoint ( Token ltoken , Token rtoken ) { } private static BigInteger bigForString ( String str , int sigchars ) { } private String stringForBig ( BigInteger big , int sigchars , boolean remainder ) { } public StringToken getMinimumToken ( ) { } public StringToken getRandomToken ( ) { } private final Token . TokenFactory < String > tokenFactory = new Token . TokenFactory < String > ( ) { public ByteBuffer toByteArray ( Token < String > stringToken ) { } public Token < String > fromByteArray ( ByteBuffer bytes ) { } public String toString ( Token < String > stringToken ) { } public Token < String > fromString ( String string ) { } } ; public Token . TokenFactory < String > getTokenFactory ( ) { } public boolean preservesOrder ( ) { } public StringToken getToken ( ByteBuffer key ) { } public Map < Token , Float > describeOwnership ( List < Token > sortedTokens ) { Map < Token , Float > allTokens = new HashMap < Token , Float > ( ) ; List < Range > sortedRanges = new ArrayList < Range > ( ) ; Token lastToken = sortedTokens . get ( ( ( sortedTokens . size ( ) ) - 1 ) ) ; for ( Token node : sortedTokens ) { allTokens . put ( node , new Float ( 0.0 ) ) ; sortedRanges . add ( new Range ( lastToken , node ) ) ; lastToken = node ; } for ( String ks : DatabaseDescriptor . getTables ( ) ) { for ( CFMetaData cfmd : DatabaseDescriptor . getKSMetaData ( ks ) . cfMetaData ( ) . values ( ) ) { for ( Range r : sortedRanges ) { <START_BUG> allTokens . put ( r . right , ( ( allTokens . get ( r . right ) ) + ( instance . getSplits ( ks , cfmd . cfName , r , 1 ) . size ( ) ) ) ) ; <END_BUG> } } } Float total = new Float ( 0.0 ) ; for ( Float f : allTokens . values ( ) ) total += f ; for ( Map . Entry < Token , Float > row : allTokens . entrySet ( ) ) allTokens . put ( row . getKey ( ) , ( ( row . getValue ( ) ) // total ) ) ; return allTokens ; } }

Fix:
allTokens . put ( r . right , ( ( allTokens . get ( r . right ) ) + ( instance . getSplits ( ks , cfmd . cfName , r , DatabaseDescriptor . getIndexInterval ( ) ) . size ( ) ) ) ) ;
Buggy code:
public abstract class CriteriaTest extends AbstractCriteriaTestCase { protected static OpenJPAEntityManagerFactorySPI emf ; protected static SQLAuditor auditor ; protected CriteriaBuilder cb ; protected EntityManager em ; protected static Class < ? > [ ] CLASSES = new Class < ? > [ ] { Account . class , Address . class , A . class , B . class , CompUser . class , Contact . class , Contractor . class , Course . class , CreditCard . class , Customer . class , C . class , Department . class , DependentId . class , Dependent . class , D . class , Employee . class , Exempt . class , FemaleUser . class , FrequentFlierPlan . class , Item . class , LineItem . class , Magazine . class , MaleUser . class , Manager . class , Movie . class , Order . class , Person . class , Phone . class , Photo . class , Product . class , Publisher . class , Request . class , Semester . class , Student . class , TransactionHistory . class , Transaction . class , VideoStore . class , Foo . class , Bar . class } ; protected Class < ? > [ ] getDomainClasses ( ) { } public void setUp ( ) { } protected OpenJPAEntityManagerFactorySPI getEntityManagerFactory ( ) { } protected void setEntityManagerFactory ( OpenJPAEntityManagerFactorySPI emf ) { } protected SQLAuditor getAuditor ( ) { } protected void setAuditor ( SQLAuditor auditor ) { } <START_BUG> protected CriteriaBuilder getCriteriaBuilder ( ) { <END_BUG> return cb ; } protected void setCriteriaBuilder ( CriteriaBuilder cb ) { } protected EntityManager getEntityManager ( ) { } protected void setEntityManager ( EntityManager em ) { } }

Fix:
protected OpenJPACriteriaBuilder getCriteriaBuilder ( ) {
Buggy code:
public class Duration extends AbstractTimeValue { private static final long serialVersionUID = 1L ; public static final Duration NONE = Duration . milliseconds ( 0 ) ; public static final Duration ONE_DAY = Duration . days ( 1 ) ; public static final Duration ONE_HOUR = Duration . hours ( 1 ) ; public static final Duration ONE_MINUTE = Duration . minutes ( 1 ) ; public static final Duration ONE_SECOND = Duration . seconds ( 1 ) ; public static final Duration ONE_WEEK = Duration . days ( 7 ) ; private static final Pattern pattern = Pattern . compile ( "([0-9]+([.,][0-9]+)?)\\s+(millisecond|second|minute|hour|day)s?" , Pattern . CASE_INSENSITIVE ) ; public static Duration benchmark ( final ICode code , final Log log ) { } public static Duration benchmark ( final Runnable code ) { } public static Duration days ( final double days ) { } public static Duration days ( final int days ) { } public static Duration elapsed ( final Time start ) { <START_BUG> return start . elapsed ( ) ; <END_BUG> } public static Duration hours ( final double hours ) { } public static Duration hours ( final int hours ) { } public static Duration milliseconds ( final double milliseconds ) { } public static Duration milliseconds ( final long milliseconds ) { } public static Duration minutes ( final double minutes ) { } public static Duration minutes ( final int minutes ) { } public static Duration seconds ( final double seconds ) { } public static Duration seconds ( final int seconds ) { } public static Duration valueOf ( final long time ) { } public static Duration valueOf ( final String string ) throws StringValueConversionException { } public static Duration valueOf ( final String string , final Locale locale ) throws StringValueConversionException { } protected Duration ( final long milliseconds ) { } public Duration add ( final Duration duration ) { } public final double days ( ) { } public final double hours ( ) { } public final double minutes ( ) { } public final double seconds ( ) { } public final void sleep ( ) { } public Duration subtract ( final Duration that ) { } public String toString ( ) { } public String toString ( final Locale locale ) { } private String unitString ( final double value , final String units , final Locale locale ) { } }

Fix:
return start . elapsedSince ( ) ;
Buggy code:
public class DeviceCommandsFragment extends SherlockFragment { private List < Command > commands ; private TextView logTextView ; public void setCommands ( List < Command > commands ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } private void setupCommands ( List < Command > commands ) { if ( commands != null ) { logTextView . setText ( "" ) ; for ( Command command : commands ) { <START_BUG> logTextView . append ( ( ( command . toString ( ) ) + "\n" ) ) ; <END_BUG> } } } }

Fix:
logTextView . append ( ( ( command . toString ( ) ) + "\n\n" ) ) ;
Buggy code:
public class Game extends JFrame implements Runnable { private static final long serialVersionUID = 6639258471146102807L ; private static final String TITLE = "Runner" ; public static final int WIDTH = 800 ; public static final int HEIGHT = 600 ; private boolean running ; private Thread thread ; public static int KILLS ; public static int LEVEL ; public Game ( ) { } public void tick ( ) { } public void render ( ) { } private void init ( ) { } public synchronized void start ( ) { } public synchronized void stop ( ) { } @ Override public void run ( ) { long lastTime = System . nanoTime ( ) ; <START_BUG> final double ns = 1.0E9 // 60.0 ; <END_BUG> double delta = 0 ; init ( ) ; while ( running ) { long now = System . nanoTime ( ) ; delta += ( now - lastTime ) // ns ; lastTime = now ; while ( delta >= 1 ) { tick ( ) ; delta -- ; } render ( ) ; } stop ( ) ; } public static void main ( String [ ] args ) { } }

Fix:
final double ns = 1.0E9 // 150.0 ;
Buggy code:
public class ContestRules extends AppCompatActivity { protected Msg message ; private static boolean contestStarted ; protected static final String TAG = ContestRules . class . getSimpleName ( ) ; public static long timer ; Button startContestBtn ; TextView con_details_tv ; protected String con_details ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } public void startContest ( View view ) { } @ Override protected void onStart ( ) { } private void initToolbar ( ) { Toolbar mToolbar ; mToolbar = ( ( Toolbar ) ( findViewById ( include ) ) ) ; setSupportActionBar ( mToolbar ) ; getSupportActionBar ( ) . setHomeButtonEnabled ( true ) ; getSupportActionBar ( ) . setDisplayHomeAsUpEnabled ( true ) ; <START_BUG> getSupportActionBar ( ) . setTitle ( "Set<seq2seq4repair_space>Timer" ) ; <END_BUG> mToolbar . setNavigationOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { onBackPressed ( ) ; } } ) ; } @ Override public void onBackPressed ( ) { } }

Fix:
getSupportActionBar ( ) . setTitle ( "Rules" ) ;
Buggy code:
public class NestedExceptionTest { static class ExceptionOne extends Exception { private static final long serialVersionUID = - 6723739469084198030L ; } static class ExceptionTwo extends Exception { private static final long serialVersionUID = 2383431696698789083L ; } public void raise ( final Exception e ) throws Exception { } public String exceptional ( final int n ) throws Exception { try { <START_BUG> if ( ( n % 2 ) == 1 ) { <END_BUG> if ( n == 1 ) { raise ( new NestedExceptionTest . ExceptionOne ( ) ) ; } else throw new RuntimeException ( ) ; } } catch ( RuntimeException e ) { throw new NestedExceptionTest . ExceptionOne ( ) ; } finally { try { if ( ( n == 2 ) || ( n == 3 ) ) { if ( n == 2 ) { raise ( new NestedExceptionTest . ExceptionTwo ( ) ) ; } else throw new RuntimeException ( ) ; } } catch ( RuntimeException e ) { throw new NestedExceptionTest . ExceptionTwo ( ) ; } } return "done" ; } @ Test ( expected = NestedExceptionTest . ExceptionOne . class ) public void test1 ( ) throws Exception { } @ Test ( expected = NestedExceptionTest . ExceptionTwo . class ) public void test2 ( ) throws Exception { } @ Test ( expected = NestedExceptionTest . ExceptionTwo . class ) public void test3 ( ) throws Exception { } @ Test public void test4 ( ) throws Exception { } }

Fix:
if ( ( n == 1 ) || ( n == 3 ) ) {
Buggy code:
public class LocalizedFormatsTest { @ Test public void testMessageNumber ( ) { <START_BUG> Assert . assertEquals ( 316 , LocalizedFormats . values ( ) . length ) ; <END_BUG> } @ Test public void testAllKeysPresentInPropertiesFiles ( ) { } @ Test public void testAllPropertiesCorrespondToKeys ( ) { } @ Test public void testNoMissingFrenchTranslation ( ) { } @ Test public void testNoOpEnglishTranslation ( ) { } @ Test public void testVariablePartsConsistency ( ) { } }

Fix:
Assert . assertEquals ( 317 , LocalizedFormats . values ( ) . length ) ;
Buggy code:
public class ArmorSetBonusHandler { private float healPercentage = Armor . nincodiumArmorHealingPercentage ; private float healRadius = Armor . nincodiumArmorHealingRadius ; @ SubscribeEvent public void entityAttacked ( LivingAttackEvent event ) { if ( ( event . source . getEntity ( ) ) instanceof EntityPlayerMP ) { EntityPlayer player = ( ( EntityPlayer ) ( event . source . getEntity ( ) ) ) ; if ( ( ( ! ( player . isEntityEqual ( event . entity ) ) ) && ( isWearingNincodiumArmorSet ( player ) ) ) && ( isHealingChanceSuccessful ( ) ) ) { EntityPlayerMP closestPlayer = getClosestPlayerToEntityWithLeastHealth ( player , healRadius ) ; <START_BUG> if ( ( ( closestPlayer != null ) && ( ( event . entityLiving . getHealth ( ) ) > 0 ) ) && ( ( closestPlayer . getHealth ( ) ) < 20 ) ) { <END_BUG> float healed = ( event . ammount ) * ( healPercentage ) ; closestPlayer . setHealth ( ( ( closestPlayer . getHealth ( ) ) + healed ) ) ; EntityPlayer close = Minecraft . getMinecraft ( ) . theWorld . getPlayerEntityByName ( closestPlayer . getDisplayName ( ) ) ; close . playSound ( "random.levelup" , 1 , 2 ) ; } } } } private boolean isHealingChanceSuccessful ( ) { } private EntityPlayerMP getClosestPlayerToEntityWithLeastHealth ( EntityPlayer player , double healRadius2 ) { } private EntityPlayerMP getClosestPlayerWithLeastHealth ( EntityPlayer player , double p_72977_1_ , double p_72977_3_ , double p_72977_5_ , double p_72977_7_ ) { } private EntityPlayerMP getLowestHPOfEntities ( List < EntityPlayerMP > playersNear ) { } private boolean isWearingNincodiumArmorSet ( EntityPlayer player ) { } }

Fix:
if ( ( ( closestPlayer != null ) && ( ( event . entityLiving . getHealth ( ) ) > 0 ) ) && ( ( closestPlayer . getHealth ( ) ) < ( closestPlayer . getMaxHealth ( ) ) ) ) {
Buggy code:
} if ( ( this . cores ) == null ) { <START_BUG> ( ( HttpServletResponse ) ( response ) ) . sendError ( 503 , "Server<seq2seq4repair_space>is<seq2seq4repair_space>shutting<seq2seq4repair_space>down" ) ; <END_BUG>

Fix:
( ( HttpServletResponse ) ( response ) ) . sendError ( 503 , "Server<seq2seq4repair_space>is<seq2seq4repair_space>shutting<seq2seq4repair_space>down<seq2seq4repair_space>or<seq2seq4repair_space>failed<seq2seq4repair_space>to<seq2seq4repair_space>initialize" ) ;
Buggy code:
public class VaultTool { public static final String KEYSTORE_PARAM = "keystore" ; public static final String KEYSTORE_PASSWORD_PARAM = "keystore-password" ; public static final String ENC_DIR_PARAM = "enc-dir" ; public static final String SALT_PARAM = "salt" ; public static final String ITERATION_PARAM = "iteration" ; public static final String ALIAS_PARAM = "alias" ; public static final String VAULT_BLOCK_PARAM = "vault-block" ; public static final String ATTRIBUTE_PARAM = "attribute" ; public static final String SEC_ATTR_VALUE_PARAM = "sec-attr" ; public static final String CHECK_SEC_ATTR_EXISTS_PARAM = "check-sec-attr" ; public static final String HELP_PARAM = "help" ; private VaultInteractiveSession session = null ; private VaultSession nonInteractiveSession = null ; private Options options = null ; private CommandLineParser parser = null ; private CommandLine cmdLine = null ; public void setSession ( VaultInteractiveSession sess ) { } public VaultInteractiveSession getSession ( ) { } public static void main ( String [ ] args ) { } public VaultTool ( String [ ] args ) { } public VaultTool ( ) { } private void initOptions ( ) { } private int execute ( ) throws Exception { if ( cmdLine . hasOption ( VaultTool . HELP_PARAM ) ) { printUsage ( ) ; return 100 ; } String keystoreURL = cmdLine . getOptionValue ( VaultTool . KEYSTORE_PARAM , "vault.keystore" ) ; String keystorePassword = cmdLine . getOptionValue ( VaultTool . KEYSTORE_PASSWORD_PARAM , "" ) ; String encryptionDirectory = cmdLine . getOptionValue ( VaultTool . ENC_DIR_PARAM , "vault" ) ; String salt = cmdLine . getOptionValue ( VaultTool . SALT_PARAM , "12345678" ) ; int iterationCount = Integer . parseInt ( cmdLine . getOptionValue ( VaultTool . ITERATION_PARAM , "23" ) ) ; nonInteractiveSession = new VaultSession ( keystoreURL , keystorePassword , encryptionDirectory , salt , iterationCount ) ; nonInteractiveSession . startVaultSession ( cmdLine . getOptionValue ( "alias" , "vault" ) ) ; String vaultBlock = cmdLine . getOptionValue ( VaultTool . VAULT_BLOCK_PARAM , "vb" ) ; String attributeName = cmdLine . getOptionValue ( VaultTool . ATTRIBUTE_PARAM , "password" ) ; if ( cmdLine . hasOption ( VaultTool . CHECK_SEC_ATTR_EXISTS_PARAM ) ) { if ( nonInteractiveSession . checkSecuredAttribute ( vaultBlock , attributeName ) ) { System . out . println ( "Password<seq2seq4repair_space>already<seq2seq4repair_space>exists." ) ; return 0 ; } else { System . out . println ( "Password<seq2seq4repair_space>doesn't<seq2seq4repair_space>exist." ) ; return 5 ; } } else { <START_BUG> String password = cmdLine . getOptionValue ( VaultTool . ATTRIBUTE_PARAM , "password" ) ; <END_BUG> nonInteractiveSession . addSecuredAttributeWithDisplay ( vaultBlock , attributeName , password . toCharArray ( ) ) ; return 0 ; } } private void summary ( ) { } private void printUsage ( ) { } public static boolean isWindows ( ) { } }

Fix:
String password = cmdLine . getOptionValue ( VaultTool . SEC_ATTR_VALUE_PARAM , "password" ) ;