nus-yam/ex-repair huggingface dataset:
Buggy code:
public class Radio < T > extends LabeledWebMarkupContainer { private static final long serialVersionUID = 1L ; private static final String ATTR_DISABLED = "disabled" ; private int uuid = - 1 ; private final RadioGroup < T > group ; public Radio ( final String id ) { } public Radio ( final String id , final IModel < T > model ) { } public Radio ( final String id , final RadioGroup < T > group ) { } public Radio ( final String id , final IModel < T > model , final RadioGroup < T > group ) { } public String getValue ( ) { } @ SuppressWarnings ( "unchecked" ) protected RadioGroup < T > getGroup ( ) { } @ Override protected void onComponentTag ( final ComponentTag tag ) { super . onComponentTag ( tag ) ; checkComponentTag ( tag , "input" ) ; checkComponentTagAttribute ( tag , "type" , "radio" ) ; final String value = getValue ( ) ; RadioGroup < ? > group = getGroup ( ) ; tag . put ( "name" , group . getInputName ( ) ) ; tag . put ( "value" , value ) ; if ( group . hasRawInput ( ) ) { String rawInput = group . getRawInput ( ) ; if ( ( rawInput != null ) && ( rawInput . equals ( value ) ) ) { tag . put ( "checked" , "checked" ) ; } } else if ( group . getModelComparator ( ) . compare ( group , Radio . getDefaultModelObject ( ) ) ) { tag . put ( "checked" , "checked" ) ; } if ( group . wantOnSelectionChangedNotifications ( ) ) { CharSequence url = group . urlFor ( INTERFACE ) ; Form < ? > form = group . findParent ( Form . class ) ; if ( form != null ) { tag . put ( "onclick" , form . getJsForInterfaceUrl ( url ) ) ; } else { <START_BUG> tag . put ( "onclick" , ( ( ( ( "window.location.href='" + url ) + ( ( url . toString ( ) . indexOf ( '?' ) ) > ( - 1 ) ? "&amp;" : "?" ) ) + ( group . getInputName ( ) ) ) + "='<seq2seq4repair_space>+<seq2seq4repair_space>this.value;" ) ) ; <END_BUG> } } if ( ! ( Radio . isEnabledInHierarchy ( ) ) ) { tag . put ( Radio . ATTR_DISABLED , Radio . ATTR_DISABLED ) ; } final String marker = "wicket-" + ( getGroup ( ) . getMarkupId ( ) ) ; String clazz = tag . getAttribute ( "class" ) ; if ( Strings . isEmpty ( clazz ) ) { clazz = marker ; } else { clazz = ( clazz + "<seq2seq4repair_space>" ) + marker ; } tag . put ( "class" , clazz ) ; } public Radio < T > setLabel ( IModel < String > labelModel ) { } @ SuppressWarnings ( "unchecked" ) public final IModel < T > getModel ( ) { } public final void setModel ( IModel < T > model ) { } @ SuppressWarnings ( "unchecked" ) public final T getModelObject ( ) { } public final void setModelObject ( T object ) { } @ Override protected boolean getStatelessHint ( ) { } }

Fix:
tag . put ( "onclick" , ( ( ( ( "window.location.href='" + url ) + ( ( url . toString ( ) . indexOf ( '?' ) ) > ( - 1 ) ? "&" : "?" ) ) + ( group . getInputName ( ) ) ) + "='<seq2seq4repair_space>+<seq2seq4repair_space>this.value;" ) ) ;
Buggy code:
public abstract class AbstractBrokerMessageHandler implements ApplicationEventPublisherAware , SmartLifecycle , MessageHandler { protected final Log logger = LogFactory . getLog ( getClass ( ) ) ; private final Collection < String > destinationPrefixes ; private ApplicationEventPublisher eventPublisher ; private AtomicBoolean brokerAvailable = new AtomicBoolean ( false ) ; private boolean autoStartup = true ; private Object lifecycleMonitor = new Object ( ) ; private volatile boolean running = false ; public AbstractBrokerMessageHandler ( ) { } public AbstractBrokerMessageHandler ( Collection < String > destinationPrefixes ) { } public Collection < String > getDestinationPrefixes ( ) { } @ Override public void setApplicationEventPublisher ( ApplicationEventPublisher publisher ) { } public ApplicationEventPublisher getApplicationEventPublisher ( ) { } public void setAutoStartup ( boolean autoStartup ) { } @ Override public boolean isAutoStartup ( ) { } @ Override public int getPhase ( ) { } @ Override public final boolean isRunning ( ) { } public boolean isBrokerAvailable ( ) { } @ Override public final void start ( ) { } protected void startInternal ( ) { } @ Override public final void stop ( ) { } protected void stopInternal ( ) { } @ Override public final void stop ( Runnable callback ) { } @ Override public final void handleMessage ( Message < ? > message ) { if ( ! ( this . running ) ) { if ( logger . isTraceEnabled ( ) ) { <START_BUG> logger . trace ( ( "Message<seq2seq4repair_space>broker<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>running.<seq2seq4repair_space>Ignoring<seq2seq4repair_space>message<seq2seq4repair_space>id=" + ( message . getHeaders ( ) . getId ( ) ) ) ) ; <END_BUG> } return ; } handleMessageInternal ( message ) ; } protected abstract void handleMessageInternal ( Message < ? > message ) { } protected boolean checkDestinationPrefix ( String destination ) { } protected void publishBrokerAvailableEvent ( ) { } protected void publishBrokerUnavailableEvent ( ) { } }

Fix:
logger . trace ( ( "Message<seq2seq4repair_space>broker<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>running.<seq2seq4repair_space>Ignoring<seq2seq4repair_space>message=" + message ) ) ;
Buggy code:
public class Snippet229 { public static void main ( String [ ] args ) { final Display display = new Display ( ) ; Shell shell = new Shell ( display ) ; shell . setText ( "Custom<seq2seq4repair_space>gradient<seq2seq4repair_space>selection<seq2seq4repair_space>for<seq2seq4repair_space>Table" ) ; shell . setLayout ( new FillLayout ( ) ) ; final Table table = new Table ( shell , ( ( SWT . MULTI ) | ( SWT . FULL_SELECTION ) ) ) ; table . setHeaderVisible ( true ) ; table . setLinesVisible ( true ) ; int columnCount = 3 ; for ( int i = 0 ; i < columnCount ; i ++ ) { TableColumn column = new TableColumn ( table , SWT . NONE ) ; column . setText ( ( "Column<seq2seq4repair_space>" + i ) ) ; } int itemCount = 8 ; for ( int i = 0 ; i < itemCount ; i ++ ) { TableItem item = new TableItem ( table , SWT . NONE ) ; item . setText ( new String [ ] { ( "item<seq2seq4repair_space>" + i ) + "<seq2seq4repair_space>a" , ( "item<seq2seq4repair_space>" + i ) + "<seq2seq4repair_space>b" , ( "item<seq2seq4repair_space>" + i ) + "<seq2seq4repair_space>c" } ) ; } table . addListener ( EraseItem , new Listener ( ) { public void handleEvent ( Event event ) { if ( ( ( event . detail ) & ( SWT . SELECTED ) ) != 0 ) { GC gc = event . gc ; Rectangle area = table . getClientArea ( ) ; int columnCount = table . getColumnCount ( ) ; if ( ( ( event . index ) == ( columnCount - 1 ) ) || ( columnCount == 0 ) ) { int width = ( ( area . x ) + ( area . width ) ) - ( event . x ) ; if ( width > 0 ) { Region region = new Region ( ) ; gc . getClipping ( region ) ; region . add ( event . x , event . y , width , event . height ) ; gc . setClipping ( region ) ; region . dispose ( ) ; } } gc . setAdvanced ( true ) ; if ( gc . getAdvanced ( ) ) gc . setAlpha ( 127 ) ; Rectangle rect = event . getBounds ( ) ; Color foreground = gc . getForeground ( ) ; Color background = gc . getBackground ( ) ; gc . setForeground ( display . getSystemColor ( COLOR_RED ) ) ; gc . setBackground ( display . getSystemColor ( COLOR_LIST_BACKGROUND ) ) ; <START_BUG> gc . fillGradientRectangle ( 0 , rect . y , display . getBounds ( ) . width , rect . height , false ) ; <END_BUG> gc . setForeground ( foreground ) ; gc . setBackground ( background ) ; event . detail &= ~ ( SWT . SELECTED ) ; } } } ) ; for ( int i = 0 ; i < columnCount ; i ++ ) { table . getColumn ( i ) . pack ( ) ; } table . setSelection ( table . getItem ( 0 ) ) ; shell . setSize ( 500 , 200 ) ; shell . open ( ) ; while ( ! ( shell . isDisposed ( ) ) ) { if ( ! ( display . readAndDispatch ( ) ) ) display . sleep ( ) ; } display . dispose ( ) ; } }

Fix:
gc . fillGradientRectangle ( 0 , rect . y , 500 , rect . height , false ) ;
Buggy code:
public class BzipTestCase extends TestCase { private static final byte [ ] HEADER = new byte [ ] { ( ( byte ) ( 'B' ) ) , ( ( byte ) ( 'Z' ) ) } ; public BzipTestCase ( final String name ) { } public void testBzipOutputStream ( ) throws Exception { } public void testBzipInputStream ( ) throws Exception { } private void compareContents ( final String initial , final File generated ) throws Exception { } private CBZip2InputStream getPackedInput ( final InputStream input ) throws IOException { } private CBZip2OutputStream getPackedOutput ( final OutputStream output ) throws IOException { } private File getOutputFile ( final String postfix ) throws IOException { } private InputStream getInputStream ( final String resource ) throws Exception { <START_BUG> final String filename = ( ( ( "src" + ( File . separator ) ) + "testcases" ) + ( File . separator ) ) + ( getClass ( ) . getName ( ) . replace ( '.' , File . separatorChar ) ) ; <END_BUG> final String path = FileUtil . getPath ( filename ) ; final File input = new File ( path , resource ) ; return new FileInputStream ( input ) ; } }

Fix:
final String filename = ( ( ( "src" + ( File . separator ) ) + "test" ) + ( File . separator ) ) + ( getClass ( ) . getName ( ) . replace ( '.' , File . separatorChar ) ) ;
Buggy code:
public class State { private ArrayList < Transition > transitions ; private String stateName ; private Boolean finalState ; public State ( String stateName ) { } protected State ( ) { } public Collection < Transition > getTransitions ( ) { } public String getStateName ( ) { } public boolean isFinalState ( ) { } public void setFinal ( ) { } public void unFinal ( ) { } public boolean isAcceptedString ( String string ) { if ( ( finalState ) && ( string . isEmpty ( ) ) ) { return true ; } else if ( string . isEmpty ( ) ) { for ( Transition transition : transitions ) { <START_BUG> if ( ( transition . getTo ( ) . isAcceptedString ( string ) ) && ( transition . getLabel ( ) . getClass ( ) . getName ( ) . equals ( Epsilon . getInstance ( ) . getClass ( ) . getName ( ) ) ) ) <END_BUG> return true ; } return false ; } String characterToBeTested = string . substring ( 0 , 1 ) ; boolean accepted = false ; for ( Transition transition : transitions ) { if ( transition . getLabel ( ) . getClass ( ) . getName ( ) . equals ( Epsilon . getInstance ( ) . getClass ( ) . getName ( ) ) ) { accepted = transition . getTo ( ) . isAcceptedString ( string ) ; if ( accepted ) return accepted ; } else if ( transition . getLabel ( ) . getClass ( ) . getName ( ) . equals ( DotLabel . getInstance ( ) . getClass ( ) . getName ( ) ) ) { accepted = transition . getTo ( ) . isAcceptedString ( string . substring ( 1 ) ) ; if ( accepted ) return accepted ; } else if ( ( ( DefinedLabel ) ( transition . getLabel ( ) ) ) . definedLabel . equals ( characterToBeTested ) ) { accepted = transition . getTo ( ) . isAcceptedString ( string . substring ( 1 ) ) ; if ( accepted ) return accepted ; } } return false ; } public void addTransition ( Transition transition ) throws InvalidArgumentException { } public boolean testIfAllLablesArePresent ( Collection < Label > labels ) { } }

Fix:
if ( ( ( ! ( transition . getTo ( ) . equals ( this ) ) ) && ( transition . getTo ( ) . isAcceptedString ( string ) ) ) && ( transition . getLabel ( ) . getClass ( ) . getName ( ) . equals ( Epsilon . getInstance ( ) . getClass ( ) . getName ( ) ) ) )
Buggy code:
public class Shell { private static final Logger LOG = Logger . getLogger ( Shell . class ) ; private final HelpContent help ; private final IDriverResultHandler resultHandler ; private ConsoleReader console = null ; private File historyFile = null ; private BasicDriver crossdataDriver = null ; public static SimpleDateFormat dateFormat = new SimpleDateFormat ( "dd//M//yyyy" ) ; private boolean useAsync = false ; private static final String DEFAULT_PROMPT = "xdsh:" ; private static final char DEFAULT_TEMP_PROMPT = '»' ; public Shell ( boolean useAsync ) { } public static void main ( String [ ] args ) { } private void initialize ( ) { } public void println ( String msg ) { } protected void flush ( ) { } public void setPrompt ( String currentCatalog ) { } private HelpStatement parseHelp ( String inputText ) { } private void showHelp ( String inputText ) { } protected void removeResultsHandler ( String queryId ) { } protected void updatePrompt ( Result result ) { } public boolean connect ( ) { boolean result = true ; try { Result connectionResult = crossdataDriver . connect ( crossdataDriver . getUserName ( ) ) ; Shell . LOG . info ( "Driver<seq2seq4repair_space>connections<seq2seq4repair_space>established" ) ; Shell . LOG . info ( ConsoleUtils . stringResult ( connectionResult ) ) ; } catch ( ConnectionException ce ) { result = false ; <START_BUG> Shell . LOG . error ( ce . getMessage ( ) ) ; <END_BUG> } return result ; } public void closeConsole ( ) { } public void loop ( ) { } public void executeScript ( String scriptPath ) { } }

Fix:
Shell . LOG . error ( ce . getMessage ( ) , ce ) ;
Buggy code:
public class MapAccessTests extends ExpressionTestCase { @ Test public void testSimpleMapAccess01 ( ) { } @ Test public void testMapAccessThroughIndexer ( ) { } @ Test public void testCustomMapAccessor ( ) throws Exception { } @ Test public void testVariableMapAccess ( ) throws Exception { } public static class MapAccessor implements PropertyAccessor { public boolean canRead ( EvaluationContext context , Object target , String name ) throws AccessException { } public TypedValue read ( EvaluationContext context , Object target , String name ) throws AccessException { <START_BUG> return new TypedValue ( ( ( Map ) ( target ) ) . get ( name ) , TypeDescriptor . valueOf ( Object . class ) ) ; <END_BUG> } public boolean canWrite ( EvaluationContext context , Object target , String name ) throws AccessException { } @ SuppressWarnings ( "unchecked" ) public void write ( EvaluationContext context , Object target , String name , Object newValue ) throws AccessException { } public Class < ? > [ ] getSpecificTargetClasses ( ) { } } }

Fix:
return new TypedValue ( ( ( Map ) ( target ) ) . get ( name ) , TypeDescriptor . OBJECT ) ;
Buggy code:
public class WicketTagPanelTest extends TestCase { private static Log log = LogFactory . getLog ( WicketTagPanelTest . class ) ; private MockWebApplication application ; public WicketTagPanelTest ( String name ) { } protected void setUp ( ) throws Exception { super . setUp ( ) ; application = new MockWebApplication ( null ) ; <START_BUG> application . getPages ( ) . setHomePage ( WicketPanelPage . class ) ; <END_BUG> } public void testRenderHomePage ( ) throws Exception { } private boolean validatePage1 ( String document ) { } public void testRenderHomePageWicketTagRemoved ( ) throws Exception { } private boolean validatePage2 ( String document ) { } }

Fix:
application . getRequiredPageSettings ( ) . setHomePage ( WicketPanelPage . class ) ;
Buggy code:
public class ZipResourceStream extends AbstractResourceStream { private static final long serialVersionUID = 1L ; private static final Logger log = LoggerFactory . getLogger ( ZipResourceStream . class ) ; private final ByteArrayOutputStream bytearray ; public ZipResourceStream ( final File dir , final boolean recursive ) { } public ZipResourceStream ( final File dir ) { } private static void zipDir ( final File dir , final ZipOutputStream out , final String path , final boolean recursive ) throws IOException { if ( ! ( dir . isDirectory ( ) ) ) { throw new IllegalArgumentException ( ( "Not<seq2seq4repair_space>a<seq2seq4repair_space>directory:<seq2seq4repair_space>" + dir ) ) ; } String [ ] files = dir . list ( ) ; int BUFFER = 2048 ; BufferedInputStream origin = null ; byte [ ] data = new byte [ BUFFER ] ; for ( String file : files ) { if ( ZipResourceStream . log . isDebugEnabled ( ) ) { ZipResourceStream . log . debug ( ( "Adding:<seq2seq4repair_space>" + file ) ) ; } File f = new File ( dir , file ) ; if ( f . isDirectory ( ) ) { if ( recursive == true ) { ZipResourceStream . zipDir ( f , out , ( ( path + ( f . getName ( ) ) ) + "//" ) , recursive ) ; } } else { <START_BUG> out . putNextEntry ( new ZipEntry ( ( ( path . toString ( ) ) + ( f . getName ( ) ) ) ) ) ; <END_BUG> FileInputStream fi = new FileInputStream ( f ) ; origin = new BufferedInputStream ( fi , BUFFER ) ; int count ; while ( ( count = origin . read ( data , 0 , BUFFER ) ) != ( - 1 ) ) { out . write ( data , 0 , count ) ; } origin . close ( ) ; } } if ( path . equals ( "" ) ) { out . close ( ) ; } } public void close ( ) throws IOException { } @ Override public String getContentType ( ) { } public InputStream getInputStream ( ) throws ResourceStreamNotFoundException { } @ Override public long length ( ) { } @ Override public Time lastModifiedTime ( ) { } }

Fix:
out . putNextEntry ( new ZipEntry ( ( path + ( f . getName ( ) ) ) ) ) ;
Buggy code:
public class TypeEffect extends StatusEffect { private static final long serialVersionUID = - 3279292817876635213L ; private RobotActionType actionType ; private TypeEffectModificationType modificationType ; public TypeEffect ( RobotActionType actionType , TypeEffectModificationType modificationType , int startDuration ) { } public TypeEffect ( ) { } @ Override public double getDamageModificatorForRoboActionType ( RobotActionType robotActionType ) { } @ Override public StatusEffect resolveInteractionWith ( StatusEffect otherStatusEffect ) { if ( ( otherStatusEffect == null ) || ( ! ( otherStatusEffect instanceof TypeEffect ) ) ) return null ; TypeEffect otherTypeEffect = ( ( TypeEffect ) ( otherStatusEffect ) ) ; if ( ( this . actionType ) != ( otherTypeEffect . getActionType ( ) ) ) { <START_BUG> return null ; <END_BUG> } TypeEffect resolvedTypeEffect = null ; if ( ( this . modificationType ) == ( otherTypeEffect . getModificationType ( ) ) ) { int thisRoundsLeft = this . getRoundsLeft ( ) ; int otherRoundsLeft = otherTypeEffect . getRoundsLeft ( ) ; this . setRoundsLeft ( ( thisRoundsLeft + otherRoundsLeft ) ) ; } else { int thisRoundsLeft = this . getRoundsLeft ( ) ; int otherRoundsLeft = otherTypeEffect . getRoundsLeft ( ) ; int computedDuration = thisRoundsLeft - otherRoundsLeft ; this . setRoundsLeft ( computedDuration ) ; if ( computedDuration < 0 ) { resolvedTypeEffect = new TypeEffect ( this . actionType , otherTypeEffect . getModificationType ( ) , ( computedDuration * ( - 1 ) ) ) ; } } return resolvedTypeEffect ; } @ Override public void performInitialRobotModification ( Robot robot ) { } @ Override public void performEachRoundsModification ( Robot robot ) { } public RobotActionType getActionType ( ) { } public void setActionType ( RobotActionType actionType ) { } public TypeEffectModificationType getModificationType ( ) { } public void setModificationType ( TypeEffectModificationType modificationType ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object obj ) { } @ Override public String toString ( ) { } }

Fix:
return otherStatusEffect ;
Buggy code:
public class TSDBQueryDeserializer implements JsonDeserializer < TSDBQueryParametrization > { private static final Logger LOGGER = LogManager . getLogger ( TSDBQueryDeserializer . class ) ; public TSDBQueryParametrization deserialize ( JsonElement json , Type type , JsonDeserializationContext context ) throws JsonParseException { <START_BUG> TSDBQueryDeserializer . LOGGER . info ( "Deserializing<seq2seq4repair_space>json:<seq2seq4repair_space>{}" , json . getAsString ( ) ) ; <END_BUG> JsonObject jsonObject = json . getAsJsonObject ( ) ; JsonElement jsonStart = jsonObject . get ( "start" ) ; long start = jsonStart . getAsLong ( ) ; JsonElement jsonEnd = jsonObject . get ( "end" ) ; long end = jsonEnd . getAsLong ( ) ; JsonArray jsonQueriesArray = jsonObject . get ( "queries" ) . getAsJsonArray ( ) ; JsonElement jsonQueryElement = jsonQueriesArray . get ( 0 ) ; JsonObject jsonQueryObject = jsonQueryElement . getAsJsonObject ( ) ; JsonElement jsonMetric = jsonQueryObject . get ( "metric" ) ; String metric = jsonMetric . getAsString ( ) ; JsonElement jsonAggregator = jsonQueryObject . get ( "aggregator" ) ; Aggregator aggregator = Aggregators . get ( jsonAggregator . getAsString ( ) ) ; JsonElement jsonTagsElement = jsonQueryObject . get ( "tags" ) ; JsonObject jsonTagsObject = jsonTagsElement . getAsJsonObject ( ) ; Map < String , String > tags = new HashMap < String , String > ( ) ; for ( Map . Entry < String , JsonElement > entry : jsonTagsObject . entrySet ( ) ) { tags . put ( entry . getKey ( ) , entry . getValue ( ) . getAsString ( ) ) ; } JsonElement jsonSqlElement = jsonQueryObject . get ( "sql" ) ; String sql = jsonSqlElement . getAsString ( ) ; TSDBQueryParametrization query = new TSDBQueryParametrization ( ) ; query . setAggregator ( aggregator ) ; query . setEndTime ( end ) ; query . setStartTime ( start ) ; query . setMetric ( metric ) ; query . setTags ( tags ) ; query . setSql ( sql ) ; return query ; } }

Fix:
TSDBQueryDeserializer . LOGGER . info ( "Deserializing<seq2seq4repair_space>json" ) ;
Buggy code:
public class ValidateAddressOperationHandler implements OperationStepHandler { public static final String OPERATION_NAME = "validate-address" ; public static final ValidateAddressOperationHandler INSTANCE = new ValidateAddressOperationHandler ( ) ; public static final OperationDefinition DEFINITION = new org . jboss . as . controller . SimpleOperationDefinitionBuilder ( ValidateAddressOperationHandler . OPERATION_NAME , ControllerResolver . getResolver ( "global" ) ) . addParameter ( SimpleAttributeDefinitionBuilder . create ( VALUE , OBJECT ) . build ( ) ) . setReplyParameters ( SimpleAttributeDefinitionBuilder . create ( VALID , BOOLEAN ) . build ( ) , SimpleAttributeDefinitionBuilder . create ( PROBLEM , STRING ) . setAllowNull ( true ) . build ( ) ) . setReadOnly ( ) . build ( ) ; @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { final ModelNode address = operation . require ( VALUE ) ; final PathAddress pathAddr = PathAddress . pathAddress ( address ) ; final Resource resource = context . readResource ( EMPTY_ADDRESS ) ; Resource model = resource ; final Iterator < PathElement > iterator = pathAddr . iterator ( ) ; int index = 0 ; out : while ( iterator . hasNext ( ) ) { final PathElement next = iterator . next ( ) ; index ++ ; if ( model . hasChild ( next ) ) { model = model . getChild ( next ) ; } else { final PathAddress subAddress = pathAddr . subAddress ( 0 , index ) ; final ImmutableManagementResourceRegistration registration = context . getResourceRegistration ( ) . getSubModel ( subAddress ) ; if ( registration != null ) { boolean remote = registration . isRemote ( ) ; if ( remote && ( ! ( iterator . hasNext ( ) ) ) ) { break out ; } final PathAddress newAddress = pathAddr . subAddress ( index ) ; final ModelNode newOperation = operation . clone ( ) ; newOperation . get ( OP_ADDR ) . set ( subAddress . toModelNode ( ) ) ; newOperation . get ( VALUE ) . set ( newAddress . toModelNode ( ) ) ; final OperationStepHandler proxyHandler = registration . getOperationHandler ( EMPTY_ADDRESS , ValidateAddressOperationHandler . OPERATION_NAME ) ; if ( proxyHandler != null ) { <START_BUG> context . addStep ( newOperation , proxyHandler , IMMEDIATE ) ; <END_BUG> context . stepCompleted ( ) ; return ; } } context . getResult ( ) . get ( VALID ) . set ( false ) ; context . getResult ( ) . get ( PROBLEM ) . set ( MESSAGES . childResourceNotFound ( next ) ) ; context . stepCompleted ( ) ; return ; } } context . getResult ( ) . get ( VALID ) . set ( true ) ; context . stepCompleted ( ) ; } }

Fix:
context . addStep ( newOperation , proxyHandler , MODEL , true ) ;
Buggy code:
public class RadioChoice extends AbstractSingleSelectChoice implements IOnChangeListener { private class SuffixChange extends Change { final String prevSuffix ; SuffixChange ( String prevSuffix ) { } public void undo ( ) { } } private class PrefixChange extends Change { final String prevPrefix ; PrefixChange ( String prevSuffix ) { } public void undo ( ) { } } private String prefix = "" ; private String suffix = "<br<seq2seq4repair_space>//>\n" ; public RadioChoice ( final String id ) { } public RadioChoice ( final String id , final List choices ) { } public RadioChoice ( final String id , final List choices , final IChoiceRenderer renderer ) { } public RadioChoice ( final String id , IModel model , final List choices ) { } public RadioChoice ( final String id , IModel model , final List choices , final IChoiceRenderer renderer ) { } public RadioChoice ( String id , IModel choices ) { } public RadioChoice ( String id , IModel model , IModel choices ) { } public RadioChoice ( String id , IModel choices , IChoiceRenderer renderer ) { } public RadioChoice ( String id , IModel model , IModel choices , IChoiceRenderer renderer ) { } public void onSelectionChanged ( ) { } protected void onSelectionChanged ( Object newSelection ) { } protected boolean wantOnSelectionChangedNotifications ( ) { } public final String getPrefix ( ) { } public final RadioChoice setPrefix ( String prefix ) { } public final String getSuffix ( ) { } public final RadioChoice setSuffix ( String suffix ) { } protected final void onComponentTagBody ( final MarkupStream markupStream , final ComponentTag openTag ) { final StringBuffer buffer = new StringBuffer ( ) ; final List choices = getChoices ( ) ; for ( int index = 0 ; index < ( choices . size ( ) ) ; index ++ ) { final Object choice = choices . get ( index ) ; final String label = getChoiceRenderer ( ) . getDisplayValue ( choice ) ; if ( label != null ) { buffer . append ( getPrefix ( ) ) ; String id = getChoiceRenderer ( ) . getIdValue ( choice , index ) ; buffer . append ( ( ( ( ( ( ( ( "<input<seq2seq4repair_space>name=\"" + ( getInputName ( ) ) ) + "\"" ) + "<seq2seq4repair_space>type=\"radio\"" ) + ( isSelected ( choice , index ) ? "<seq2seq4repair_space>checked" : "" ) ) + "<seq2seq4repair_space>value=\"" ) + id ) + "\"" ) ) ; if ( wantOnSelectionChangedNotifications ( ) ) { final String url = urlFor ( IOnChangeListener . class ) ; <START_BUG> buffer . append ( ( ( ( ( ( ( "<seq2seq4repair_space>onclick=\"location.href=\'" + url ) + "&" ) + ( getPath ( ) ) ) + "=" ) + id ) + "\';\"" ) ) ; <END_BUG> } buffer . append ( ">" ) ; String display = getLocalizer ( ) . getString ( ( ( ( getId ( ) ) + "." ) + label ) , this , label ) ; String escaped = Strings . escapeMarkup ( display , false , true ) ; buffer . append ( escaped ) ; buffer . append ( getSuffix ( ) ) ; } } replaceComponentTagBody ( markupStream , openTag , buffer . toString ( ) ) ; } }

Fix:
buffer . append ( ( ( ( ( ( ( "<seq2seq4repair_space>onclick=\"location.href=\'" + url ) + "&" ) + ( getInputName ( ) ) ) + "=" ) + id ) + "\';\"" ) ) ;
Buggy code:
public class JettyWebSocketHandlerAdapter implements WebSocketListener { private static final Log logger = LogFactory . getLog ( JettyWebSocketHandlerAdapter . class ) ; private final WebSocketHandler webSocketHandler ; private final JettyWebSocketSession wsSession ; public JettyWebSocketHandlerAdapter ( WebSocketHandler webSocketHandler , JettyWebSocketSession wsSession ) { } @ Override public void onWebSocketConnect ( Session session ) { try { <START_BUG> this . wsSession . afterSessionInitialized ( session ) ; <END_BUG> this . webSocketHandler . afterConnectionEstablished ( this . wsSession ) ; } catch ( Throwable t ) { ExceptionWebSocketHandlerDecorator . tryCloseWithError ( this . wsSession , t , JettyWebSocketHandlerAdapter . logger ) ; } } @ Override public void onWebSocketText ( String payload ) { } @ Override public void onWebSocketBinary ( byte [ ] payload , int offset , int len ) { } @ Override public void onWebSocketClose ( int statusCode , String reason ) { } @ Override public void onWebSocketError ( Throwable cause ) { } }

Fix:
this . wsSession . initializeNativeSession ( session ) ;
Buggy code:
public final class LookupInjectionSource extends InjectionSource { private final String lookupName ; public LookupInjectionSource ( final String lookupName ) { } public void getResourceValue ( final ResolutionContext resolutionContext , final ServiceBuilder < ? > serviceBuilder , final DeploymentPhaseContext phaseContext , final Injector < ManagedReferenceFactory > injector ) { final String applicationName = resolutionContext . getApplicationName ( ) ; final String moduleName = resolutionContext . getModuleName ( ) ; final String componentName = resolutionContext . getComponentName ( ) ; final boolean compUsesModule = resolutionContext . isCompUsesModule ( ) ; final String lookupName ; if ( ! ( this . lookupName . contains ( "java:" ) ) ) { if ( ( componentName != null ) && ( ! compUsesModule ) ) { lookupName = "java:comp//env//" + ( this . lookupName ) ; } else if ( compUsesModule ) { lookupName = "java:module//env//" + ( this . lookupName ) ; } else { lookupName = "java:jboss//env" + ( this . lookupName ) ; } } else if ( ( this . lookupName . startsWith ( "java:comp//" ) ) && compUsesModule ) { lookupName = "java:module//" + ( this . lookupName . substring ( 10 ) ) ; } else { lookupName = this . lookupName ; } final ContextNames . BindInfo bindInfo = ContextNames . bindInfoFor ( applicationName , moduleName , componentName , lookupName ) ; <START_BUG> serviceBuilder . addDependency ( bindInfo . getBinderServiceName ( ) , ManagedReferenceFactory . class , injector ) ; <END_BUG> } public boolean equals ( Object configuration ) { } public int hashCode ( ) { } }

Fix:
bindInfo . setupLookupInjection ( serviceBuilder , injector ) ;
Buggy code:
public enum ScheduleChecker { INSTANCE ; private Map < MarketType , ScheduleChecker . Schedule > schedules ; private ScheduleChecker ( ) { } public boolean isTimeForWork ( MarketType marketType ) { boolean result = false ; <START_BUG> DateTime now = DateTime . now ( ) ; <END_BUG> ScheduleChecker . Schedule schedule = schedules . get ( marketType ) ; if ( ( ( schedule . dayOfWeeks [ now . dayOfWeek ( ) . get ( ) ] ) == 1 ) && ( ( schedule . hours [ now . hourOfDay ( ) . get ( ) ] ) == 1 ) ) result = true ; return result ; } private ScheduleChecker . Schedule createInterbank ( ) { } private ScheduleChecker . Schedule createBlack ( ) { } private ScheduleChecker . Schedule createNbu ( ) { } private class Schedule { byte [ ] hours = new byte [ 25 ] ; byte [ ] dayOfWeeks = new byte [ 8 ] ; } }

Fix:
DateTime now = TimeUtil . getNow ( ) ;
Buggy code:
public class VotiferEvent implements Listener { static ConfigBonusReward bonusReward = ConfigBonusReward . getInstance ( ) ; static Config config = Config . getInstance ( ) ; static ConfigVoteSites configVoteSites = ConfigVoteSites . getInstance ( ) ; static ConfigFormat format = ConfigFormat . getInstance ( ) ; static Main plugin = Main . plugin ; public static void playerVote ( String playerName , String voteSiteURL ) { } public VotiferEvent ( Main plugin ) { } @ EventHandler ( priority = EventPriority . NORMAL , ignoreCancelled = true ) public void onVotiferEvent ( VotifierEvent event ) { Vote vote = event . getVote ( ) ; String voteSite = vote . getServiceName ( ) ; String voteUsername = vote . getUsername ( ) ; if ( ( voteUsername . length ( ) ) == 0 ) { VotiferEvent . plugin . getLogger ( ) . warning ( ( "No<seq2seq4repair_space>name<seq2seq4repair_space>from<seq2seq4repair_space>vote<seq2seq4repair_space>on<seq2seq4repair_space>" + voteSite ) ) ; return ; } VotiferEvent . plugin . getLogger ( ) . info ( ( ( ( ( "Recieved<seq2seq4repair_space>a<seq2seq4repair_space>vote<seq2seq4repair_space>from<seq2seq4repair_space>'" + voteSite ) + "'<seq2seq4repair_space>by<seq2seq4repair_space>player<seq2seq4repair_space>'" ) + voteUsername ) + "'!" ) ) ; if ( VotiferEvent . config . getDebugEnabled ( ) ) { VotiferEvent . plugin . getLogger ( ) . info ( ( "PlayerUsername:<seq2seq4repair_space>" + voteUsername ) ) ; VotiferEvent . plugin . getLogger ( ) . info ( ( "VoteSite:<seq2seq4repair_space>" + voteSite ) ) ; } String voteSiteName = Utils . getInstance ( ) . getVoteSiteName ( voteSite ) ; PlayerVoteEvent voteEvent = new PlayerVoteEvent ( VotiferEvent . plugin . getVoteSite ( voteSiteName ) , new User ( voteUsername ) ) ; <START_BUG> Bukkit . getServer ( ) . getPluginManager ( ) . callEvent ( voteEvent ) ; <END_BUG> if ( voteEvent . isCancelled ( ) ) { return ; } BungeeVote . getInstance ( ) . sendBungeeVote ( voteUsername , voteSite ) ; VotiferEvent . playerVote ( voteUsername , voteSite ) ; } }

Fix:
VotiferEvent . plugin . getServer ( ) . getPluginManager ( ) . callEvent ( voteEvent ) ;
Buggy code:
public class CapsuleTemplateEntrypoint extends DefaultEntrypoint { protected IClass template ; public CapsuleTemplateEntrypoint ( IMethod method ) { } @ Override protected int makeArgument ( AbstractRootMethod root , int i ) { } protected int makeReceiver ( AbstractRootMethod root ) { } protected int makeProcedureArgument ( AbstractRootMethod root , int i ) { <START_BUG> assert i > 1 ; <END_BUG> assert isProcedure ( method ) ; return super . makeArgument ( root , i ) ; } protected void addDummy ( AbstractRootMethod root , IField field , int receiverValueNumber ) { } protected void addState ( AbstractRootMethod root , IField field , int instValueNumber ) { } public static Set < Entrypoint > makeAll ( IClass template ) { } }

Fix:
assert i > 0 ;
Buggy code:
public class ListTestModelCallValidatTest { @ Test public void testListCall ( ) { QueryParamsValidator validator = new QueryParamsValidator ( ) ; TestCase . assertTrue ( validator . validate ( ListTestModelCall . class ) ) ; <START_BUG> TestCase . assertTrue ( validator . validate ( ListIdFieldTestModelCall . class ) ) ; <END_BUG> TestCase . assertTrue ( validator . validate ( ListTestModelCallChild . class ) ) ; } }

Fix:
TestCase . assertTrue ( validator . validate ( ListIdParentFieldTestModelCall . class ) ) ;
Buggy code:
public class TruncateVerbHandler implements IVerbHandler { private static Logger logger = LoggerFactory . getLogger ( TruncateVerbHandler . class ) ; public void doVerb ( Message message ) { byte [ ] bytes = message . getMessageBody ( ) ; ByteArrayInputStream buffer = new ByteArrayInputStream ( bytes ) ; try { <START_BUG> Truncation t = Truncation . serializer ( ) . deserialize ( new DataInputStream ( buffer ) ) ; <END_BUG> TruncateVerbHandler . logger . debug ( "Applying<seq2seq4repair_space>{}" , t ) ; try { Table . open ( t . keyspace ) . truncate ( t . columnFamily ) ; } catch ( IOException e ) { TruncateVerbHandler . logger . error ( "Error<seq2seq4repair_space>in<seq2seq4repair_space>truncation" , e ) ; TruncateVerbHandler . respondError ( t , message ) ; throw e ; } catch ( InterruptedException e ) { TruncateVerbHandler . logger . error ( "Error<seq2seq4repair_space>in<seq2seq4repair_space>truncation" , e ) ; TruncateVerbHandler . respondError ( t , message ) ; throw e ; } catch ( ExecutionException e ) { TruncateVerbHandler . logger . error ( "Error<seq2seq4repair_space>in<seq2seq4repair_space>truncation" , e ) ; TruncateVerbHandler . respondError ( t , message ) ; throw e ; } TruncateVerbHandler . logger . debug ( "Truncate<seq2seq4repair_space>operation<seq2seq4repair_space>succeeded<seq2seq4repair_space>at<seq2seq4repair_space>this<seq2seq4repair_space>host" ) ; TruncateResponse response = new TruncateResponse ( t . keyspace , t . columnFamily , true ) ; Message responseMessage = TruncateResponse . makeTruncateResponseMessage ( message , response ) ; TruncateVerbHandler . logger . debug ( "{}<seq2seq4repair_space>applied.<seq2seq4repair_space>Sending<seq2seq4repair_space>response<seq2seq4repair_space>to<seq2seq4repair_space>{}@{}<seq2seq4repair_space>" , new Object [ ] { t , message . getMessageId ( ) , message . getFrom ( ) } ) ; MessagingService . instance ( ) . sendOneWay ( responseMessage , message . getFrom ( ) ) ; } catch ( IOException e ) { TruncateVerbHandler . logger . error ( "Error<seq2seq4repair_space>in<seq2seq4repair_space>truncation" , e ) ; throw new RuntimeException ( "Error<seq2seq4repair_space>in<seq2seq4repair_space>truncation" , e ) ; } catch ( InterruptedException e ) { TruncateVerbHandler . logger . error ( "Error<seq2seq4repair_space>in<seq2seq4repair_space>truncation" , e ) ; throw new RuntimeException ( "Error<seq2seq4repair_space>in<seq2seq4repair_space>truncation" , e ) ; } catch ( ExecutionException e ) { TruncateVerbHandler . logger . error ( "Error<seq2seq4repair_space>in<seq2seq4repair_space>truncation" , e ) ; throw new RuntimeException ( "Error<seq2seq4repair_space>in<seq2seq4repair_space>truncation" , e ) ; } } private static void respondError ( Truncation t , Message truncateRequestMessage ) throws IOException { } }

Fix:
Truncation t = Truncation . serializer ( ) . deserialize ( new DataInputStream ( buffer ) , message . getVersion ( ) ) ;
Buggy code:
final class CameraManager { private static final String TAG = "CameraManager" ; private static final int MIN_FRAME_WIDTH = 240 ; private static final int MIN_FRAME_HEIGHT = 240 ; private static final int MAX_FRAME_WIDTH = 480 ; private static final int MAX_FRAME_HEIGHT = 360 ; private static final int TEN_DESIRED_ZOOM = 27 ; private static final int DESIRED_SHARPNESS = 30 ; private static final Pattern COMMA_PATTERN = Pattern . compile ( "," ) ; private static CameraManager cameraManager ; private Camera camera ; private final Context context ; private Point screenResolution ; private Point cameraResolution ; private Rect framingRect ; private Handler previewHandler ; private int previewMessage ; private Handler autoFocusHandler ; private int autoFocusMessage ; private boolean initialized ; private boolean previewing ; private int previewFormat ; private String previewFormatString ; private final boolean useOneShotPreviewCallback ; private final PreviewCallback previewCallback = new Camera . PreviewCallback ( ) { public void onPreviewFrame ( byte [ ] data , Camera camera ) { } } ; private final AutoFocusCallback autoFocusCallback = new Camera . AutoFocusCallback ( ) { public void onAutoFocus ( boolean success , Camera camera ) { } } ; public static void init ( Context context ) { } public static CameraManager get ( ) { } private CameraManager ( Context context ) { } public void openDriver ( SurfaceHolder holder ) throws IOException { if ( ( camera ) == null ) { camera = Camera . open ( ) ; if ( ( camera ) == null ) { throw new IOException ( ) ; } camera . setPreviewDisplay ( holder ) ; if ( ! ( initialized ) ) { initialized = true ; getScreenResolution ( ) ; } setCameraParameters ( ) ; SharedPreferences prefs = PreferenceManager . getDefaultSharedPreferences ( context ) ; <START_BUG> if ( prefs . getBoolean ( KEY_FRONT_LIGHT , true ) ) { <END_BUG> FlashlightManager . enableFlashlight ( ) ; } } } public void closeDriver ( ) { } public void startPreview ( ) { } public void stopPreview ( ) { } public void requestPreviewFrame ( Handler handler , int message ) { } public void requestAutoFocus ( Handler handler , int message ) { } public Rect getFramingRect ( ) { } public Point [ ] convertResultPoints ( ResultPoint [ ] points ) { } public PlanarYUVLuminanceSource buildLuminanceSource ( byte [ ] data , int width , int height ) { } private void setCameraParameters ( ) { } private Point getScreenResolution ( ) { } private Point getCameraResolution ( Camera . Parameters parameters ) { } private static Point findBestPreviewSizeValue ( String previewSizeValueString , Point screenResolution ) { } private void setFlash ( Camera . Parameters parameters ) { } private void setZoom ( Camera . Parameters parameters ) { } }

Fix:
if ( prefs . getBoolean ( KEY_FRONT_LIGHT , false ) ) {
Buggy code:
public class Javadoc extends Comment { public static final SimplePropertyDescriptor COMMENT_PROPERTY = new SimplePropertyDescriptor ( Javadoc . class , "comment" , String . class , ASTNode . MANDATORY ) ; public static final ChildListPropertyDescriptor TAGS_PROPERTY = new ChildListPropertyDescriptor ( Javadoc . class , "tags" , TagElement . class , ASTNode . CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS_2_0 ; private static final List PROPERTY_DESCRIPTORS_3_0 ; public static List propertyDescriptors ( int apiLevel ) { } private static final String MINIMAL_DOC_COMMENT = "//**<seq2seq4repair_space>*//" ; private String comment = Javadoc . MINIMAL_DOC_COMMENT ; private ASTNode . NodeList tags = new ASTNode . NodeList ( Javadoc . TAGS_PROPERTY ) ; Javadoc ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final Object internalGetSetObjectProperty ( SimplePropertyDescriptor property , boolean get , Object value ) { } final List internalGetChildListProperty ( ChildListPropertyDescriptor property ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { Javadoc result = new Javadoc ( target ) ; <START_BUG> result . setSourceRange ( this . getStartPosition ( ) , this . getLength ( ) ) ; <END_BUG> if ( ( this . ast . apiLevel ) == ( AST . JLS2_INTERNAL ) ) { result . setComment ( getComment ( ) ) ; } result . tags ( ) . addAll ( ASTNode . copySubtrees ( target , tags ( ) ) ) ; return result ; } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public String getComment ( ) { } public void setComment ( String docComment ) { } public List tags ( ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ;
Buggy code:
public class ProfileManager { private File location ; private File profilesConfig ; private XmlElement profiles ; private static ProfileManager instance ; private XmlIO xml ; private Profile currentProfile ; public ProfileManager ( ) { } public static ProfileManager getInstance ( ) { } public Profile getProfileForName ( String name ) { } protected void removeProfileXmlElement ( String name ) { } protected XmlElement getXmlElementForName ( String name ) { } protected Profile getProfileForLocation ( String path ) { } public Profile getProfile ( String location ) { } public String getSelectedProfile ( ) { } public void setAlwaysAsk ( boolean alwaysAsk ) { } public boolean isAlwaysAsk ( ) { } protected Profile promptForProfile ( ) { } public XmlElement getProfiles ( ) { } public void addProfile ( Profile p ) { } public void renameProfile ( String oldName , String newName ) { } protected void loadProfilesConfiguration ( ) { } public Profile getCurrentProfile ( ) { } public void removeProfile ( String profile ) { Profile p = getProfileForName ( profile ) ; String [ ] folders = new String [ ] { "mail" , "addressbook" , "chat" , "log" } ; String [ ] files = new String [ ] { "options.xml" , "external_tools.xml" } ; File location = p . getLocation ( ) ; for ( int i = 0 ; i < ( folders . length ) ; i ++ ) { DiskIO . deleteDirectory ( new File ( location , folders [ i ] ) ) ; } for ( int i = 0 ; i < ( files . length ) ; i ++ ) { <START_BUG> new File ( files [ i ] ) . delete ( ) ; <END_BUG> } if ( ( location . listFiles ( ) . length ) == 0 ) location . delete ( ) ; removeProfileXmlElement ( profile ) ; } }

Fix:
new File ( location , files [ i ] ) . delete ( ) ;
Buggy code:
class JobDetailPanel extends FlexTable { private static DateTimeFormat niceFormat = DateTimeFormat . getFormat ( "HH:mm:ss<seq2seq4repair_space>(yyyy-MM-dd)" ) ; public JobDetailPanel ( JobInfo info ) { } public static String statusToString ( int status ) { switch ( status ) { case HadoopService . JOBSTATE_SUCCESS : return "successful" ; case HadoopService . JOBSTATE_RUNNING : return "running" ; case HadoopService . JOBSTATE_FAILED : return "failed" ; default : <START_BUG> return "undefined<seq2seq4repair_space>-<seq2seq4repair_space>check<seq2seq4repair_space>logs" ; <END_BUG> } } }

Fix:
return "undefined" ;
Buggy code:
public class JndiLocatorDelegate extends JndiLocatorSupport { @ Override public Object lookup ( String jndiName ) throws NamingException { } @ Override public < T > T lookup ( String jndiName , Class < T > requiredType ) throws NamingException { } public static JndiLocatorDelegate createDefaultResourceRefLocator ( ) { } public static boolean isDefaultJndiEnvironmentAvailable ( ) { try { <START_BUG> new InitialContext ( ) ; <END_BUG> return true ; } catch ( Throwable ex ) { return false ; } } }

Fix:
new InitialContext ( ) . getEnvironment ( ) ;
Buggy code:
public class RequestCycle extends RequestHandlerStack implements IEventSink , IRequestCycle { private static final Logger log = LoggerFactory . getLogger ( RequestCycle . class ) ; private boolean cleanupFeedbackMessagesOnDetach = true ; public interface DetachCallback { public void onDetach ( RequestCycle requestCycle ) { } } public static RequestCycle get ( ) { } private static void set ( RequestCycle requestCycle ) { } private Request request ; private final Response originalResponse ; private final IRequestMapper requestMapper ; private final IExceptionMapper exceptionMapper ; private final List < RequestCycle . DetachCallback > detachCallbacks = new ArrayList < RequestCycle . DetachCallback > ( ) ; private UrlRenderer urlRenderer ; private MetaDataEntry < ? > [ ] metaData ; private final long startTime = System . currentTimeMillis ( ) ; public RequestCycle ( RequestCycleContext context ) { } protected UrlRenderer newUrlRenderer ( ) { <START_BUG> return new UrlRenderer ( getRequest ( ) . getUrl ( ) ) ; <END_BUG> } public Response getOriginalResponse ( ) { } public final UrlRenderer getUrlRenderer ( ) { } protected IRequestHandler resolveRequestHandler ( ) { } protected int getExceptionRetryCount ( ) { } public boolean processRequest ( ) { } public boolean processRequestAndDetach ( ) { } private void executeExceptionRequestHandler ( final IRequestHandler handler , final int retryCount ) { } protected IRequestHandler handleException ( final Exception e ) { } public Request getRequest ( ) { } public void setRequest ( Request request ) { } @ Override protected RequestCycle getRequestCycle ( ) { } public final < T > void setMetaData ( final MetaDataKey < T > key , final T object ) { } public final < T > T getMetaData ( final MetaDataKey < T > key ) { } public Url mapUrlFor ( IRequestHandler handler ) { } public Url mapUrlFor ( ResourceReference reference , PageParameters params ) { } public final < C extends Page > Url mapUrlFor ( final Class < C > pageClass , final PageParameters parameters ) { } public final CharSequence urlFor ( ResourceReference reference , PageParameters params ) { } public final < C extends Page > CharSequence urlFor ( final Class < C > pageClass , final PageParameters parameters ) { } public CharSequence urlFor ( IRequestHandler handler ) { } private String renderUrl ( Url url ) { } @ Override public void detach ( ) { } public void register ( RequestCycle . DetachCallback detachCallback ) { } public void setResponsePage ( IRequestablePage page ) { } public void setResponsePage ( Class < ? extends IRequestablePage > pageClass ) { } public void setResponsePage ( Class < ? extends IRequestablePage > pageClass , PageParameters parameters ) { } public boolean isCleanupFeedbackMessagesOnDetach ( ) { } public void setCleanupFeedbackMessagesOnDetach ( boolean cleanupFeedbackMessagesOnDetach ) { } public final long getStartTime ( ) { } public void onEvent ( IEvent < ? > event ) { } protected void onBeginRequest ( ) { } protected void onEndRequest ( ) { } }

Fix:
return new UrlRenderer ( getRequest ( ) . getBaseUrl ( ) ) ;
Buggy code:
public final class CSVSerde extends AbstractSerDe { private ObjectInspector inspector ; private String [ ] outputFields ; private int numCols ; private ArrayList < String > row ; private char separatorChar ; private char quoteChar ; private char escapeChar ; private CSVParser csvParser ; @ Override public void initialize ( final Configuration conf , final Properties tbl ) throws SerDeException { } private final char getProperty ( final Properties tbl , final String property , final char def ) { } @ Override public Writable serialize ( Object obj , ObjectInspector objInspector ) throws SerDeException { } @ Override public Object deserialize ( final Writable blob ) throws SerDeException { Text rowText = ( ( Text ) ( blob ) ) ; try { <START_BUG> final String [ ] strings = this . csvParser . parseLine ( rowText . toString ( ) ) ; <END_BUG> for ( String thisRow : strings ) { if ( strings != null ) { row . add ( thisRow . replace ( "\r\n" , "<CRLF>" ) . replace ( "\r" , "<CR>" ) . replace ( "\n" , "<LF>" ) ) ; } else { row . add ( null ) ; } } return row ; } catch ( final IOException e ) { throw new SerDeException ( e ) ; } } private CSVWriter newWriter ( final Writer writer , char separator , char quote , char escape ) { } @ Override public ObjectInspector getObjectInspector ( ) throws SerDeException { } @ Override public Class < ? extends Writable > getSerializedClass ( ) { } public SerDeStats getSerDeStats ( ) { } No newline ; at end ; of file ; }

Fix:
final String [ ] strings = this . csvParser . parseLineMulti ( rowText . toString ( ) ) ;